summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_scheduler.h
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2022-06-30 22:54:05 +0200
committerLiam <byteslice@airmail.cc>2022-06-30 22:54:05 +0200
commit2c1e2c63c302dc4a2f0ad3452263d715d77aba8c (patch)
tree1996677a825ccabe6a7d497c59d29f8e4672fa66 /src/core/hle/kernel/k_scheduler.h
parentMerge pull request #7454 from FernandoS27/new-core-timing (diff)
downloadyuzu-2c1e2c63c302dc4a2f0ad3452263d715d77aba8c.tar
yuzu-2c1e2c63c302dc4a2f0ad3452263d715d77aba8c.tar.gz
yuzu-2c1e2c63c302dc4a2f0ad3452263d715d77aba8c.tar.bz2
yuzu-2c1e2c63c302dc4a2f0ad3452263d715d77aba8c.tar.lz
yuzu-2c1e2c63c302dc4a2f0ad3452263d715d77aba8c.tar.xz
yuzu-2c1e2c63c302dc4a2f0ad3452263d715d77aba8c.tar.zst
yuzu-2c1e2c63c302dc4a2f0ad3452263d715d77aba8c.zip
Diffstat (limited to 'src/core/hle/kernel/k_scheduler.h')
-rw-r--r--src/core/hle/kernel/k_scheduler.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/hle/kernel/k_scheduler.h b/src/core/hle/kernel/k_scheduler.h
index 3f90656ee..cc3da33f5 100644
--- a/src/core/hle/kernel/k_scheduler.h
+++ b/src/core/hle/kernel/k_scheduler.h
@@ -55,6 +55,11 @@ public:
return idle_thread;
}
+ /// Returns true if the scheduler is idle
+ [[nodiscard]] bool IsIdle() const {
+ return GetSchedulerCurrentThread() == idle_thread;
+ }
+
/// Gets the timestamp for the last context switch in ticks.
[[nodiscard]] u64 GetLastContextSwitchTicks() const;