diff options
| author | Morph <39850852+Morph1984@users.noreply.github.com> | 2022-07-25 12:00:31 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-25 12:00:31 -0400 |
| commit | 591d1f1b09d2af6e432d4fb27af3321919758c0c (patch) | |
| tree | 5b0efec541b5db56b7d32e6c90f1b2587c71611d /src/core/hle/kernel/k_thread.h | |
| parent | 5af06d14337a61d9ed1093079d13f68cbb1f5451 (diff) | |
| parent | a9a83fa726b43a28f4e5a40516efd56fbf99009f (diff) | |
Merge pull request #8549 from liamwhite/kscheduler-sc
kernel: use KScheduler from Mesosphere
Diffstat (limited to 'src/core/hle/kernel/k_thread.h')
| -rw-r--r-- | src/core/hle/kernel/k_thread.h | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/src/core/hle/kernel/k_thread.h b/src/core/hle/kernel/k_thread.h index 28cd7ecb0..9ee20208e 100644 --- a/src/core/hle/kernel/k_thread.h +++ b/src/core/hle/kernel/k_thread.h @@ -413,6 +413,9 @@ public: [[nodiscard]] static Result InitializeDummyThread(KThread* thread); + [[nodiscard]] static Result InitializeMainThread(Core::System& system, KThread* thread, + s32 virt_core); + [[nodiscard]] static Result InitializeIdleThread(Core::System& system, KThread* thread, s32 virt_core); @@ -480,39 +483,16 @@ public: return per_core_priority_queue_entry[core]; } - [[nodiscard]] bool IsKernelThread() const { - return GetActiveCore() == 3; - } - - [[nodiscard]] bool IsDispatchTrackingDisabled() const { - return is_single_core || IsKernelThread(); - } - [[nodiscard]] s32 GetDisableDispatchCount() const { - if (IsDispatchTrackingDisabled()) { - // TODO(bunnei): Until kernel threads are emulated, we cannot enable/disable dispatch. - return 1; - } - return this->GetStackParameters().disable_count; } void DisableDispatch() { - if (IsDispatchTrackingDisabled()) { - // TODO(bunnei): Until kernel threads are emulated, we cannot enable/disable dispatch. - return; - } - ASSERT(GetCurrentThread(kernel).GetDisableDispatchCount() >= 0); this->GetStackParameters().disable_count++; } void EnableDispatch() { - if (IsDispatchTrackingDisabled()) { - // TODO(bunnei): Until kernel threads are emulated, we cannot enable/disable dispatch. - return; - } - ASSERT(GetCurrentThread(kernel).GetDisableDispatchCount() > 0); this->GetStackParameters().disable_count--; } |
