kern SvcGetCurrentProcessorNumber, SvcSetProcessActivity, half of SvcSetThreadActivity

This commit is contained in:
Michael Scire 2020-07-23 03:04:43 -07:00 committed by SciresM
parent 23eed522d3
commit 1d4d637818
6 changed files with 148 additions and 7 deletions

View file

@ -433,11 +433,14 @@ namespace ams::kern {
constexpr u32 GetSuspendFlags() const { return this->suspend_allowed_flags & this->suspend_request_flags; }
constexpr bool IsSuspended() const { return this->GetSuspendFlags() != 0; }
constexpr bool IsSuspendRequested(SuspendType type) const { return (this->suspend_request_flags & (1u << (ThreadState_SuspendShift + type))) != 0; }
void RequestSuspend(SuspendType type);
void Resume(SuspendType type);
void TrySuspend();
void Continue();
Result SetActivity(ams::svc::ThreadActivity activity);
void ContinueIfHasKernelWaiters() {
if (this->GetNumKernelWaiters() > 0) {
this->Continue();