diff options
author | Liam <byteslice@airmail.cc> | 2022-10-23 11:24:38 +0200 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2022-10-25 01:52:01 +0200 |
commit | 1a378a776902e1142b907110c6dd3a3a1647d328 (patch) | |
tree | 7b431310dfc5331f601076b3dd11d76d66f89f02 /src/core/hle/kernel/global_scheduler_context.h | |
parent | Merge pull request #9095 from FernandoS27/meat-good-vegetable-bad (diff) | |
download | yuzu-1a378a776902e1142b907110c6dd3a3a1647d328.tar yuzu-1a378a776902e1142b907110c6dd3a3a1647d328.tar.gz yuzu-1a378a776902e1142b907110c6dd3a3a1647d328.tar.bz2 yuzu-1a378a776902e1142b907110c6dd3a3a1647d328.tar.lz yuzu-1a378a776902e1142b907110c6dd3a3a1647d328.tar.xz yuzu-1a378a776902e1142b907110c6dd3a3a1647d328.tar.zst yuzu-1a378a776902e1142b907110c6dd3a3a1647d328.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/global_scheduler_context.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/hle/kernel/global_scheduler_context.h b/src/core/hle/kernel/global_scheduler_context.h index 67bb9852d..220ed6192 100644 --- a/src/core/hle/kernel/global_scheduler_context.h +++ b/src/core/hle/kernel/global_scheduler_context.h @@ -4,6 +4,7 @@ #pragma once #include <atomic> +#include <set> #include <vector> #include "common/common_types.h" @@ -58,6 +59,10 @@ public: /// Returns true if the global scheduler lock is acquired bool IsLocked() const; + void UnregisterDummyThreadForWakeup(KThread* thread); + void RegisterDummyThreadForWakeup(KThread* thread); + void WakeupWaitingDummyThreads(); + [[nodiscard]] LockType& SchedulerLock() { return scheduler_lock; } @@ -76,6 +81,9 @@ private: KSchedulerPriorityQueue priority_queue; LockType scheduler_lock; + /// Lists dummy threads pending wakeup on lock release + std::set<KThread*> woken_dummy_threads; + /// Lists all thread ids that aren't deleted/etc. std::vector<KThread*> thread_list; std::mutex global_list_guard; |