summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_scheduler.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-04-03 08:25:32 +0200
committerbunnei <bunneidev@gmail.com>2021-05-06 01:40:50 +0200
commit0eeecde67c89cf33521711ae61d567b2f43ff80a (patch)
tree29e553e730efb9c0e311af7c5212d8e26b065962 /src/core/hle/kernel/k_scheduler.h
parenthle: kernel: Migrate KThread to KAutoObject. (diff)
downloadyuzu-0eeecde67c89cf33521711ae61d567b2f43ff80a.tar
yuzu-0eeecde67c89cf33521711ae61d567b2f43ff80a.tar.gz
yuzu-0eeecde67c89cf33521711ae61d567b2f43ff80a.tar.bz2
yuzu-0eeecde67c89cf33521711ae61d567b2f43ff80a.tar.lz
yuzu-0eeecde67c89cf33521711ae61d567b2f43ff80a.tar.xz
yuzu-0eeecde67c89cf33521711ae61d567b2f43ff80a.tar.zst
yuzu-0eeecde67c89cf33521711ae61d567b2f43ff80a.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/k_scheduler.h6
1 files changed, 3 insertions, 3 deletions
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<KThread*> current_thread{};
- KThread* idle_thread;
+ std::unique_ptr<KThread> idle_thread;
std::shared_ptr<Common::Fiber> switch_fiber{};
struct SchedulingState {
- std::atomic<bool> needs_scheduling;
+ std::atomic<bool> needs_scheduling{};
bool interrupt_task_thread_runnable{};
bool should_count_idle{};
u64 idle_count{};