Browse Source

Merge pull request #2396 from Subv/sema_acquire

Kernel/Semaphore: Fixed a regression in semaphore waits.
nce_cpp
bunnei 9 years ago
committed by GitHub
parent
commit
ba71c889f0
  1. 3
      src/core/hle/kernel/semaphore.cpp

3
src/core/hle/kernel/semaphore.cpp

@ -35,7 +35,8 @@ bool Semaphore::ShouldWait(Thread* thread) const {
} }
void Semaphore::Acquire(Thread* thread) { void Semaphore::Acquire(Thread* thread) {
ASSERT_MSG(!ShouldWait(thread), "object unavailable!");
if (available_count <= 0)
return;
--available_count; --available_count;
} }

Loading…
Cancel
Save