diff options
| author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-11-14 20:13:18 -0400 |
|---|---|---|
| committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-11-21 10:46:55 -0400 |
| commit | 2d16507f9fa06e868349d6f57a78585aec8628fd (patch) | |
| tree | 7931e2bb9db6d55e7be760f1a1dcff14de09db78 /src/core/hle/kernel/process.h | |
| parent | c52f37f259372485ac5902d9cae8de327c984a55 (diff) | |
Kernel: Correct behavior of Condition Variables to be more similar to real hardware.
This commit ensures cond var threads act exactly as they do in the real
console. The original implementation uses an RBTree and the behavior of
cond var threads is that at the same priority level they act like a
FIFO.
Diffstat (limited to 'src/core/hle/kernel/process.h')
| -rw-r--r-- | src/core/hle/kernel/process.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/hle/kernel/process.h b/src/core/hle/kernel/process.h index c2df451f3..e8bff709b 100644 --- a/src/core/hle/kernel/process.h +++ b/src/core/hle/kernel/process.h @@ -232,6 +232,15 @@ public: return thread_list; } + /// Insert a thread into the condition variable wait container + void InsertConditionVariableThread(SharedPtr<Thread> thread); + + /// Remove a thread from the condition variable wait container + void RemoveConditionVariableThread(SharedPtr<Thread> thread); + + /// Obtain all condition variable threads waiting for some address + std::vector<SharedPtr<Thread>> GetConditionVariableThreads(VAddr cond_var_addr); + /// Registers a thread as being created under this process, /// adding it to this process' thread list. void RegisterThread(const Thread* thread); @@ -375,6 +384,9 @@ private: /// List of threads that are running with this process as their owner. std::list<const Thread*> thread_list; + /// List of threads waiting for a condition variable + std::list<SharedPtr<Thread>> cond_var_threads; + /// System context Core::System& system; |
