diff options
| author | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-06-17 00:36:00 -0400 |
|---|---|---|
| committer | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-06-17 15:25:36 -0400 |
| commit | e34e1b1c95779e7d569fa03120d0a6083f0864ee (patch) | |
| tree | e4c00a7dbb7c9c95f8644068613a80027a1b6aab /src/core/hle/kernel/k_thread.h | |
| parent | a1adcc31d386a19db5cc5d0bf7536b5cc0e7ec16 (diff) | |
k_thread: Use a mutex and cond_var to sync bool
std::atomic<bool> is broken on MinGW and causes deadlocks there.
Use a normal cond var in its stead.
Diffstat (limited to 'src/core/hle/kernel/k_thread.h')
| -rw-r--r-- | src/core/hle/kernel/k_thread.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/hle/kernel/k_thread.h b/src/core/hle/kernel/k_thread.h index f9814ac8f..37fe5db77 100644 --- a/src/core/hle/kernel/k_thread.h +++ b/src/core/hle/kernel/k_thread.h @@ -892,7 +892,9 @@ private: std::shared_ptr<Common::Fiber> m_host_context{}; ThreadType m_thread_type{}; StepState m_step_state{}; - std::atomic<bool> m_dummy_thread_runnable{true}; + bool m_dummy_thread_runnable{true}; + std::mutex m_dummy_thread_mutex{}; + std::condition_variable m_dummy_thread_cv{}; // For debugging std::vector<KSynchronizationObject*> m_wait_objects_for_debugging{}; |
