kernel: Fix svcWaitSynch to always acquire requested wait objects.
This commit is contained in:
parent
f1ff0fbf07
commit
71e8822d23
9 changed files with 68 additions and 113 deletions
|
@ -23,12 +23,7 @@ static void ResumeWaitingThread(Mutex* mutex) {
|
|||
// Reset mutex lock thread handle, nothing is waiting
|
||||
mutex->lock_count = 0;
|
||||
mutex->holding_thread = nullptr;
|
||||
|
||||
// Find the next waiting thread for the mutex...
|
||||
auto next_thread = mutex->WakeupNextThread();
|
||||
if (next_thread != nullptr) {
|
||||
mutex->Acquire(next_thread);
|
||||
}
|
||||
mutex->WakeupAllWaitingThreads();
|
||||
}
|
||||
|
||||
void ReleaseThreadMutexes(Thread* thread) {
|
||||
|
@ -94,8 +89,6 @@ void Mutex::Release() {
|
|||
ResumeWaitingThread(this);
|
||||
}
|
||||
}
|
||||
|
||||
HLE::Reschedule(__func__);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue