diff options
| author | 2017-01-01 19:07:37 -0500 | |
|---|---|---|
| committer | 2017-01-05 13:00:05 -0500 | |
| commit | 4251eb26eca3f6df8360f9b6aa6762340817c48a (patch) | |
| tree | 285427693d6ba229c94148048c9a52a3b2c8b5de /src/core/hle/kernel | |
| parent | Merge pull request #2393 from Subv/synch (diff) | |
| download | yuzu-4251eb26eca3f6df8360f9b6aa6762340817c48a.tar.gz yuzu-4251eb26eca3f6df8360f9b6aa6762340817c48a.tar.xz yuzu-4251eb26eca3f6df8360f9b6aa6762340817c48a.zip | |
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/core/hle/kernel')
| -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 | ||