mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-26 09:02:44 -06:00
mutex: fixed typo in ReleaseMutex
This commit is contained in:
parent
c404d22036
commit
d8a2c8c657
1 changed files with 3 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
||||||
#include "common/common.h"
|
#include "common/common.h"
|
||||||
|
|
||||||
#include "core/hle/kernel/kernel.h"
|
#include "core/hle/kernel/kernel.h"
|
||||||
|
#include "core/hle/kernel/mutex.h"
|
||||||
#include "core/hle/kernel/thread.h"
|
#include "core/hle/kernel/thread.h"
|
||||||
|
|
||||||
namespace Kernel {
|
namespace Kernel {
|
||||||
|
@ -92,10 +93,11 @@ bool ReleaseMutexForThread(Mutex* mutex, Handle thread) {
|
||||||
bool ReleaseMutex(Mutex* mutex) {
|
bool ReleaseMutex(Mutex* mutex) {
|
||||||
MutexEraseLock(mutex);
|
MutexEraseLock(mutex);
|
||||||
bool woke_threads = false;
|
bool woke_threads = false;
|
||||||
auto iter = mutex->waiting_threads.begin();
|
std::vector<Handle>::iterator iter;
|
||||||
|
|
||||||
// Find the next waiting thread for the mutex...
|
// Find the next waiting thread for the mutex...
|
||||||
while (!woke_threads && !mutex->waiting_threads.empty()) {
|
while (!woke_threads && !mutex->waiting_threads.empty()) {
|
||||||
|
iter = mutex->waiting_threads.begin();
|
||||||
woke_threads |= ReleaseMutexForThread(mutex, *iter);
|
woke_threads |= ReleaseMutexForThread(mutex, *iter);
|
||||||
mutex->waiting_threads.erase(iter);
|
mutex->waiting_threads.erase(iter);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue