mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-22 11:35:46 +00:00
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
|
@ -48,13 +48,7 @@ ResultVal<s32> Semaphore::Release(s32 release_count) {
|
|||
s32 previous_count = available_count;
|
||||
available_count += release_count;
|
||||
|
||||
// Notify some of the threads that the semaphore has been released
|
||||
// stop once the semaphore is full again or there are no more waiting threads
|
||||
while (!ShouldWait() && WakeupNextThread() != nullptr) {
|
||||
Acquire();
|
||||
}
|
||||
|
||||
HLE::Reschedule(__func__);
|
||||
WakeupAllWaitingThreads();
|
||||
|
||||
return MakeResult<s32>(previous_count);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue