summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2017-01-07 04:00:12 +0100
committerGitHub <noreply@github.com>2017-01-07 04:00:12 +0100
commit59f4f1d7ff5fb7bbf436348f2e1e3d1f89f3256d (patch)
tree1a27ed7ea423ae450a733b1b3c4c15ef97c64686 /src/core/hle/kernel
parentKernel: Fix SharedMemory objects always returning error when addr = 0 (#2404) (diff)
parentKernel/Semaphore: Fixed a regression in semaphore waits. (diff)
downloadyuzu-59f4f1d7ff5fb7bbf436348f2e1e3d1f89f3256d.tar
yuzu-59f4f1d7ff5fb7bbf436348f2e1e3d1f89f3256d.tar.gz
yuzu-59f4f1d7ff5fb7bbf436348f2e1e3d1f89f3256d.tar.bz2
yuzu-59f4f1d7ff5fb7bbf436348f2e1e3d1f89f3256d.tar.lz
yuzu-59f4f1d7ff5fb7bbf436348f2e1e3d1f89f3256d.tar.xz
yuzu-59f4f1d7ff5fb7bbf436348f2e1e3d1f89f3256d.tar.zst
yuzu-59f4f1d7ff5fb7bbf436348f2e1e3d1f89f3256d.zip
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/semaphore.cpp3
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;
}