Skip to content
Snippets Groups Projects
Commit d8a2c8c6 authored by bunnei's avatar bunnei
Browse files

mutex: fixed typo in ReleaseMutex

parent c404d220
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment