diff options
author | bunnei <ericbunnie@gmail.com> | 2014-05-30 05:31:01 +0200 |
---|---|---|
committer | bunnei <ericbunnie@gmail.com> | 2014-05-30 05:31:01 +0200 |
commit | d8a2c8c6579b78d9c61abe544cfaea651238130c (patch) | |
tree | fd81c66b25eeec1ef2e68c45bc65ba8f241ee54d /src/core/hle | |
parent | hle: cleaned up log messages (diff) | |
download | yuzu-d8a2c8c6579b78d9c61abe544cfaea651238130c.tar yuzu-d8a2c8c6579b78d9c61abe544cfaea651238130c.tar.gz yuzu-d8a2c8c6579b78d9c61abe544cfaea651238130c.tar.bz2 yuzu-d8a2c8c6579b78d9c61abe544cfaea651238130c.tar.lz yuzu-d8a2c8c6579b78d9c61abe544cfaea651238130c.tar.xz yuzu-d8a2c8c6579b78d9c61abe544cfaea651238130c.tar.zst yuzu-d8a2c8c6579b78d9c61abe544cfaea651238130c.zip |
Diffstat (limited to 'src/core/hle')
-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 @@ #include "common/common.h" #include "core/hle/kernel/kernel.h" +#include "core/hle/kernel/mutex.h" #include "core/hle/kernel/thread.h" namespace Kernel { @@ -92,10 +93,11 @@ bool ReleaseMutexForThread(Mutex* mutex, Handle thread) { bool ReleaseMutex(Mutex* mutex) { MutexEraseLock(mutex); bool woke_threads = false; - auto iter = mutex->waiting_threads.begin(); + std::vector<Handle>::iterator iter; // Find the next waiting thread for the mutex... while (!woke_threads && !mutex->waiting_threads.empty()) { + iter = mutex->waiting_threads.begin(); woke_threads |= ReleaseMutexForThread(mutex, *iter); mutex->waiting_threads.erase(iter); } |