From 0eeecde67c89cf33521711ae61d567b2f43ff80a Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 2 Apr 2021 23:25:32 -0700 Subject: hle: kernel: Migrate idle threads. --- src/core/hle/kernel/k_scheduler.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/hle/kernel/k_scheduler.h') diff --git a/src/core/hle/kernel/k_scheduler.h b/src/core/hle/kernel/k_scheduler.h index 8e32865aa..8cb5f6f36 100644 --- a/src/core/hle/kernel/k_scheduler.h +++ b/src/core/hle/kernel/k_scheduler.h @@ -51,7 +51,7 @@ public: /// Returns true if the scheduler is idle [[nodiscard]] bool IsIdle() const { - return GetCurrentThread() == idle_thread; + return GetCurrentThread() == idle_thread.get(); } /// Gets the timestamp for the last context switch in ticks. @@ -173,12 +173,12 @@ private: KThread* prev_thread{}; std::atomic current_thread{}; - KThread* idle_thread; + std::unique_ptr idle_thread; std::shared_ptr switch_fiber{}; struct SchedulingState { - std::atomic needs_scheduling; + std::atomic needs_scheduling{}; bool interrupt_task_thread_runnable{}; bool should_count_idle{}; u64 idle_count{}; -- cgit v1.2.3