From e34e1b1c95779e7d569fa03120d0a6083f0864ee Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Sat, 17 Jun 2023 00:36:00 -0400 Subject: k_thread: Use a mutex and cond_var to sync bool std::atomic is broken on MinGW and causes deadlocks there. Use a normal cond var in its stead. --- src/core/hle/kernel/k_thread.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/core/hle/kernel/k_thread.h') 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 m_host_context{}; ThreadType m_thread_type{}; StepState m_step_state{}; - std::atomic 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 m_wait_objects_for_debugging{}; -- cgit v1.2.3