mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2025-07-21 15:32:25 -07:00
Merge pull request #2396 from Subv/sema_acquire
Kernel/Semaphore: Fixed a regression in semaphore waits.
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user