diff options
| author | 2015-01-04 22:55:53 -0500 | |
|---|---|---|
| committer | 2015-01-04 22:55:53 -0500 | |
| commit | 96e6b2aa50a59889c828e2464e8e2ccfbc5fd35b (patch) | |
| tree | 76ec3ff4f0f07f6bd76ba5ebed8703260868ac9e /src/core/hle/kernel | |
| 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.gz yuzu-96e6b2aa50a59889c828e2464e8e2ccfbc5fd35b.tar.xz yuzu-96e6b2aa50a59889c828e2464e8e2ccfbc5fd35b.zip | |
Merge pull request #408 from Subv/mutex
Mutex: Add the calling thread to the waiting list when needed
Diffstat (limited to 'src/core/hle/kernel')
| -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) { | |||
| 168 | ResultVal<bool> Mutex::WaitSynchronization() { | 168 | ResultVal<bool> Mutex::WaitSynchronization() { |
| 169 | bool wait = locked; | 169 | bool wait = locked; |
| 170 | if (locked) { | 170 | if (locked) { |
| 171 | waiting_threads.push_back(GetCurrentThreadHandle()); | ||
| 171 | Kernel::WaitCurrentThread(WAITTYPE_MUTEX, GetHandle()); | 172 | Kernel::WaitCurrentThread(WAITTYPE_MUTEX, GetHandle()); |
| 172 | } | 173 | } else { |
| 173 | else { | ||
| 174 | // Lock the mutex when the first thread accesses it | 174 | // Lock the mutex when the first thread accesses it |
| 175 | locked = true; | 175 | locked = true; |
| 176 | MutexAcquireLock(this); | 176 | MutexAcquireLock(this); |