diff options
| author | 2014-06-06 00:13:50 -0400 | |
|---|---|---|
| committer | 2014-06-13 09:51:11 -0400 | |
| commit | 780a443b08454b4bf0eb7f5416e361ce95cc7584 (patch) | |
| tree | 00eb63b909a07c5628df86f409b1f260335fbd46 /src/core/hle/kernel/mutex.cpp | |
| parent | Kernel: Updated several member functions to be const (diff) | |
| download | yuzu-780a443b08454b4bf0eb7f5416e361ce95cc7584.tar.gz yuzu-780a443b08454b4bf0eb7f5416e361ce95cc7584.tar.xz yuzu-780a443b08454b4bf0eb7f5416e361ce95cc7584.zip | |
Mutex: Moved ReleaseMutex iterator declaration to be inside while loop.
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 | } |