kern SvcGetCurrentProcessorNumber, SvcSetProcessActivity, half of SvcSetThreadActivity
This commit is contained in:
@@ -158,6 +158,10 @@ namespace ams::kern {
|
||||
return this->is_suspended;
|
||||
}
|
||||
|
||||
constexpr void SetSuspended(bool suspended) {
|
||||
this->is_suspended = suspended;
|
||||
}
|
||||
|
||||
Result Terminate();
|
||||
|
||||
constexpr bool IsTerminated() const {
|
||||
@@ -257,6 +261,8 @@ namespace ams::kern {
|
||||
|
||||
Result Reset();
|
||||
|
||||
Result SetActivity(ams::svc::ProcessActivity activity);
|
||||
|
||||
void SetPreemptionState();
|
||||
|
||||
Result SignalToAddress(KProcessAddress address) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user