Skip to content
Snippets Groups Projects
Commit 59f4f1d7 authored by bunnei's avatar bunnei Committed by GitHub
Browse files

Merge pull request #2396 from Subv/sema_acquire

Kernel/Semaphore: Fixed a regression in semaphore waits.
parents f0199a17 4251eb26
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment