diff options
Diffstat (limited to 'src/core/hle/kernel/mutex.cpp')
| -rw-r--r-- | src/core/hle/kernel/mutex.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp index 9d909ea01..eee7c4935 100644 --- a/src/core/hle/kernel/mutex.cpp +++ b/src/core/hle/kernel/mutex.cpp | |||
| @@ -100,11 +100,10 @@ bool ReleaseMutexForThread(Mutex* mutex, Handle thread) { | |||
| 100 | bool ReleaseMutex(Mutex* mutex) { | 100 | bool ReleaseMutex(Mutex* mutex) { |
| 101 | MutexEraseLock(mutex); | 101 | MutexEraseLock(mutex); |
| 102 | bool woke_threads = false; | 102 | bool woke_threads = false; |
| 103 | std::vector<Handle>::iterator iter; | ||
| 104 | 103 | ||
| 105 | // Find the next waiting thread for the mutex... | 104 | // Find the next waiting thread for the mutex... |
| 106 | while (!woke_threads && !mutex->waiting_threads.empty()) { | 105 | while (!woke_threads && !mutex->waiting_threads.empty()) { |
| 107 | iter = mutex->waiting_threads.begin(); | 106 | std::vector<Handle>::iterator iter = mutex->waiting_threads.begin(); |
| 108 | woke_threads |= ReleaseMutexForThread(mutex, *iter); | 107 | woke_threads |= ReleaseMutexForThread(mutex, *iter); |
| 109 | mutex->waiting_threads.erase(iter); | 108 | mutex->waiting_threads.erase(iter); |
| 110 | } | 109 | } |