summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/semaphore.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-01-17 08:03:44 +0100
committerbunnei <bunneidev@gmail.com>2015-01-22 01:09:03 +0100
commit7faf2d8e06e705d1866fa0d7848ff43541a4b172 (patch)
tree7cca6433c6b06a1299af1193df2cedac7ad522c5 /src/core/hle/kernel/semaphore.cpp
parentEvent: Fixed some bugs and cleanup (Subv) (diff)
downloadyuzu-7faf2d8e06e705d1866fa0d7848ff43541a4b172.tar
yuzu-7faf2d8e06e705d1866fa0d7848ff43541a4b172.tar.gz
yuzu-7faf2d8e06e705d1866fa0d7848ff43541a4b172.tar.bz2
yuzu-7faf2d8e06e705d1866fa0d7848ff43541a4b172.tar.lz
yuzu-7faf2d8e06e705d1866fa0d7848ff43541a4b172.tar.xz
yuzu-7faf2d8e06e705d1866fa0d7848ff43541a4b172.tar.zst
yuzu-7faf2d8e06e705d1866fa0d7848ff43541a4b172.zip
Diffstat (limited to '')
-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 af2c465e4..288928441 100644
--- a/src/core/hle/kernel/semaphore.cpp
+++ b/src/core/hle/kernel/semaphore.cpp
@@ -32,11 +32,11 @@ public:
return available_count > 0;
}
- ResultVal<bool> WaitSynchronization() override {
+ ResultVal<bool> WaitSynchronization(unsigned index) override {
bool wait = !IsAvailable();
if (wait) {
- Kernel::WaitCurrentThread(WAITTYPE_SEMA, this);
+ Kernel::WaitCurrentThread_WaitSynchronization(WAITTYPE_SEMA, this, index);
AddWaitingThread(GetCurrentThread());
} else {
--available_count;
@@ -82,7 +82,7 @@ ResultCode ReleaseSemaphore(s32* count, Handle handle, s32 release_count) {
// Notify some of the threads that the semaphore has been released
// stop once the semaphore is full again or there are no more waiting threads
- while (semaphore->IsAvailable() && semaphore->ResumeNextThread() != nullptr) {
+ while (semaphore->IsAvailable() && semaphore->ReleaseNextThread() != nullptr) {
--semaphore->available_count;
}