diff options
author | bunnei <bunneidev@gmail.com> | 2019-11-23 19:24:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-23 19:24:39 +0100 |
commit | 6a3fc5d2ff2732e0392db56b04ff0c4e2c167bf2 (patch) | |
tree | 7d8189083964982abf5e48e3dd8e87e504ca7ab6 /src/core/hle/kernel/process.h | |
parent | Merge pull request #3141 from ReinUsesLisp/gl-position (diff) | |
parent | Kernel: Optimize condition variable threads management. (diff) | |
download | yuzu-6a3fc5d2ff2732e0392db56b04ff0c4e2c167bf2.tar yuzu-6a3fc5d2ff2732e0392db56b04ff0c4e2c167bf2.tar.gz yuzu-6a3fc5d2ff2732e0392db56b04ff0c4e2c167bf2.tar.bz2 yuzu-6a3fc5d2ff2732e0392db56b04ff0c4e2c167bf2.tar.lz yuzu-6a3fc5d2ff2732e0392db56b04ff0c4e2c167bf2.tar.xz yuzu-6a3fc5d2ff2732e0392db56b04ff0c4e2c167bf2.tar.zst yuzu-6a3fc5d2ff2732e0392db56b04ff0c4e2c167bf2.zip |
Diffstat (limited to 'src/core/hle/kernel/process.h')
-rw-r--r-- | src/core/hle/kernel/process.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/hle/kernel/process.h b/src/core/hle/kernel/process.h index c2df451f3..e2eda26b9 100644 --- a/src/core/hle/kernel/process.h +++ b/src/core/hle/kernel/process.h @@ -8,6 +8,7 @@ #include <cstddef> #include <list> #include <string> +#include <unordered_map> #include <vector> #include "common/common_types.h" #include "core/hle/kernel/address_arbiter.h" @@ -232,6 +233,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 +385,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::unordered_map<VAddr, std::list<SharedPtr<Thread>>> cond_var_threads; + /// System context Core::System& system; |