diff options
author | bunnei <bunneidev@gmail.com> | 2015-06-17 18:07:15 -0400 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-06-17 18:07:15 -0400 |
commit | 2e16edbc56c51265250269dd2d5e8b7b71335656 (patch) | |
tree | 7634b833a4c5a647a172f29cff281920ce0f07ed /src/core/hle/kernel/semaphore.cpp | |
parent | a5a6306f594175838c0451386e08de80c9a5998a (diff) | |
parent | 71e8822d23c030311858e6fcc8480b9c52f13f39 (diff) |
Merge pull request #849 from bunnei/fix-waitsynch-2
Fix svcWaitSynch to correctly acquire wait objects
Diffstat (limited to 'src/core/hle/kernel/semaphore.cpp')
-rw-r--r-- | src/core/hle/kernel/semaphore.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/core/hle/kernel/semaphore.cpp b/src/core/hle/kernel/semaphore.cpp index 96d61ed3..4b359ed0 100644 --- a/src/core/hle/kernel/semaphore.cpp +++ b/src/core/hle/kernel/semaphore.cpp @@ -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); } |