aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/semaphore.cpp
diff options
context:
space:
mode:
authorSebastian Valle <subv2112@gmail.com>2017-01-05 12:55:01 -0500
committerGitHub <noreply@github.com>2017-01-05 12:55:01 -0500
commit35aea29a77b71be05a2708c6cc93205502bfede7 (patch)
tree021284c18034d053c81928fa19d2efb6658451fb /src/core/hle/kernel/semaphore.cpp
parent6f09721968fe61c3ae7b92134498c24f1742d73d (diff)
parenta0ae8f7c269e352e964ec0c66f064a3bf6cddddb (diff)
Merge pull request #2393 from Subv/synch
Kernel: Mutex priority inheritance and synchronization improvements.
Diffstat (limited to 'src/core/hle/kernel/semaphore.cpp')
-rw-r--r--src/core/hle/kernel/semaphore.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/semaphore.cpp b/src/core/hle/kernel/semaphore.cpp
index bf76007805..5e6139265d 100644
--- a/src/core/hle/kernel/semaphore.cpp
+++ b/src/core/hle/kernel/semaphore.cpp
@@ -30,12 +30,12 @@ ResultVal<SharedPtr<Semaphore>> Semaphore::Create(s32 initial_count, s32 max_cou
return MakeResult<SharedPtr<Semaphore>>(std::move(semaphore));
}
-bool Semaphore::ShouldWait() {
+bool Semaphore::ShouldWait(Thread* thread) const {
return available_count <= 0;
}
-void Semaphore::Acquire() {
- ASSERT_MSG(!ShouldWait(), "object unavailable!");
+void Semaphore::Acquire(Thread* thread) {
+ ASSERT_MSG(!ShouldWait(thread), "object unavailable!");
--available_count;
}