diff options
| author | bunnei <bunneidev@gmail.com> | 2019-11-23 13:24:39 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-23 13:24:39 -0500 |
| commit | 6a3fc5d2ff2732e0392db56b04ff0c4e2c167bf2 (patch) | |
| tree | 7d8189083964982abf5e48e3dd8e87e504ca7ab6 /src/core/hle/kernel/process.h | |
| parent | 4ed183ee42921ae93dd916567bef6e77f6d49ccc (diff) | |
| parent | 46bb6099814a6ff404d337164ced016ec04ea7b9 (diff) | |
Merge pull request #3114 from FernandoS27/cond-var
Kernel: Correct behavior of Condition Variables to be more similar to real hardware.
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; |
