diff options
author | bunnei <bunneidev@gmail.com> | 2017-01-06 22:00:12 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-06 22:00:12 -0500 |
commit | 59f4f1d7ff5fb7bbf436348f2e1e3d1f89f3256d (patch) | |
tree | 1a27ed7ea423ae450a733b1b3c4c15ef97c64686 /src | |
parent | f0199a17f6cee85bd9e88501c0961f001c396687 (diff) | |
parent | 4251eb26eca3f6df8360f9b6aa6762340817c48a (diff) |
Merge pull request #2396 from Subv/sema_acquire
Kernel/Semaphore: Fixed a regression in semaphore waits.
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; } |