diff options
| author | 2017-01-06 22:00:12 -0500 | |
|---|---|---|
| committer | 2017-01-06 22:00:12 -0500 | |
| commit | 59f4f1d7ff5fb7bbf436348f2e1e3d1f89f3256d (patch) | |
| tree | 1a27ed7ea423ae450a733b1b3c4c15ef97c64686 /src | |
| parent | Kernel: Fix SharedMemory objects always returning error when addr = 0 (#2404) (diff) | |
| parent | Kernel/Semaphore: Fixed a regression in semaphore waits. (diff) | |
| download | yuzu-59f4f1d7ff5fb7bbf436348f2e1e3d1f89f3256d.tar.gz yuzu-59f4f1d7ff5fb7bbf436348f2e1e3d1f89f3256d.tar.xz yuzu-59f4f1d7ff5fb7bbf436348f2e1e3d1f89f3256d.zip | |
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 { | |||
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | void Semaphore::Acquire(Thread* thread) { | 37 | void Semaphore::Acquire(Thread* thread) { |
| 38 | ASSERT_MSG(!ShouldWait(thread), "object unavailable!"); | 38 | if (available_count <= 0) |
| 39 | return; | ||
| 39 | --available_count; | 40 | --available_count; |
| 40 | } | 41 | } |
| 41 | 42 | ||