diff options
author | bunnei <bunneidev@gmail.com> | 2015-01-05 04:55:53 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-01-05 04:55:53 +0100 |
commit | 96e6b2aa50a59889c828e2464e8e2ccfbc5fd35b (patch) | |
tree | 76ec3ff4f0f07f6bd76ba5ebed8703260868ac9e /src | |
parent | Merge pull request #386 from archshift/y2ru (diff) | |
parent | Mutex: Add the calling thread to the waiting list when needed (diff) | |
download | yuzu-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 |
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/kernel/mutex.cpp | 4 |
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); |