diff options
| author | 2014-05-29 23:31:01 -0400 | |
|---|---|---|
| committer | 2014-05-29 23:31:01 -0400 | |
| commit | d8a2c8c6579b78d9c61abe544cfaea651238130c (patch) | |
| tree | fd81c66b25eeec1ef2e68c45bc65ba8f241ee54d /src/core/hle/kernel/mutex.cpp | |
| parent | hle: cleaned up log messages (diff) | |
| download | yuzu-d8a2c8c6579b78d9c61abe544cfaea651238130c.tar.gz yuzu-d8a2c8c6579b78d9c61abe544cfaea651238130c.tar.xz yuzu-d8a2c8c6579b78d9c61abe544cfaea651238130c.zip | |
mutex: fixed typo in ReleaseMutex
Diffstat (limited to 'src/core/hle/kernel/mutex.cpp')
| -rw-r--r-- | src/core/hle/kernel/mutex.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp index 23c064571..5ac88cd85 100644 --- a/src/core/hle/kernel/mutex.cpp +++ b/src/core/hle/kernel/mutex.cpp | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | #include "common/common.h" | 8 | #include "common/common.h" |
| 9 | 9 | ||
| 10 | #include "core/hle/kernel/kernel.h" | 10 | #include "core/hle/kernel/kernel.h" |
| 11 | #include "core/hle/kernel/mutex.h" | ||
| 11 | #include "core/hle/kernel/thread.h" | 12 | #include "core/hle/kernel/thread.h" |
| 12 | 13 | ||
| 13 | namespace Kernel { | 14 | namespace Kernel { |
| @@ -92,10 +93,11 @@ bool ReleaseMutexForThread(Mutex* mutex, Handle thread) { | |||
| 92 | bool ReleaseMutex(Mutex* mutex) { | 93 | bool ReleaseMutex(Mutex* mutex) { |
| 93 | MutexEraseLock(mutex); | 94 | MutexEraseLock(mutex); |
| 94 | bool woke_threads = false; | 95 | bool woke_threads = false; |
| 95 | auto iter = mutex->waiting_threads.begin(); | 96 | std::vector<Handle>::iterator iter; |
| 96 | 97 | ||
| 97 | // Find the next waiting thread for the mutex... | 98 | // Find the next waiting thread for the mutex... |
| 98 | while (!woke_threads && !mutex->waiting_threads.empty()) { | 99 | while (!woke_threads && !mutex->waiting_threads.empty()) { |
| 100 | iter = mutex->waiting_threads.begin(); | ||
| 99 | woke_threads |= ReleaseMutexForThread(mutex, *iter); | 101 | woke_threads |= ReleaseMutexForThread(mutex, *iter); |
| 100 | mutex->waiting_threads.erase(iter); | 102 | mutex->waiting_threads.erase(iter); |
| 101 | } | 103 | } |