summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-01-05 04:55:53 +0100
committerbunnei <bunneidev@gmail.com>2015-01-05 04:55:53 +0100
commit96e6b2aa50a59889c828e2464e8e2ccfbc5fd35b (patch)
tree76ec3ff4f0f07f6bd76ba5ebed8703260868ac9e
parentMerge pull request #386 from archshift/y2ru (diff)
parentMutex: Add the calling thread to the waiting list when needed (diff)
downloadyuzu-96e6b2aa50a59889c828e2464e8e2ccfbc5fd35b.tar
yuzu-96e6b2aa50a59889c828e2464e8e2ccfbc5fd35b.tar.gz
yuzu-96e6b2aa50a59889c828e2464e8e2ccfbc5fd35b.tar.bz2
yuzu-96e6b2aa50a59889c828e2464e8e2ccfbc5fd35b.tar.lz
yuzu-96e6b2aa50a59889c828e2464e8e2ccfbc5fd35b.tar.xz
yuzu-96e6b2aa50a59889c828e2464e8e2ccfbc5fd35b.tar.zst
yuzu-96e6b2aa50a59889c828e2464e8e2ccfbc5fd35b.zip
-rw-r--r--src/core/hle/kernel/mutex.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp
index 558068c79..3dfeffc9b 100644
--- a/src/core/hle/kernel/mutex.cpp
+++ b/src/core/hle/kernel/mutex.cpp
@@ -168,9 +168,9 @@ Handle CreateMutex(bool initial_locked, const std::string& name) {
ResultVal<bool> Mutex::WaitSynchronization() {
bool wait = locked;
if (locked) {
+ waiting_threads.push_back(GetCurrentThreadHandle());
Kernel::WaitCurrentThread(WAITTYPE_MUTEX, GetHandle());
- }
- else {
+ } else {
// Lock the mutex when the first thread accesses it
locked = true;
MutexAcquireLock(this);