diff options
author | Subv <subv2112@gmail.com> | 2017-01-01 19:07:37 -0500 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2017-01-05 13:00:05 -0500 |
commit | 4251eb26eca3f6df8360f9b6aa6762340817c48a (patch) | |
tree | 285427693d6ba229c94148048c9a52a3b2c8b5de /src | |
parent | f20d872643654c574f73a263f032613046900f07 (diff) |
Kernel/Semaphore: Fixed a regression in semaphore waits.
The regression was caused by a missing check in #2260.
The new behavior is consistent with the real kernel.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/kernel/semaphore.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/hle/kernel/semaphore.cpp b/src/core/hle/kernel/semaphore.cpp index 5e6139265..8bda2f75d 100644 --- a/src/core/hle/kernel/semaphore.cpp +++ b/src/core/hle/kernel/semaphore.cpp @@ -35,7 +35,8 @@ bool Semaphore::ShouldWait(Thread* thread) const { } void Semaphore::Acquire(Thread* thread) { - ASSERT_MSG(!ShouldWait(thread), "object unavailable!"); + if (available_count <= 0) + return; --available_count; } |