diff options
author | bunnei <bunneidev@gmail.com> | 2015-01-17 08:03:44 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-01-22 01:09:03 +0100 |
commit | 7faf2d8e06e705d1866fa0d7848ff43541a4b172 (patch) | |
tree | 7cca6433c6b06a1299af1193df2cedac7ad522c5 /src/core/hle/kernel/mutex.cpp | |
parent | Event: Fixed some bugs and cleanup (Subv) (diff) | |
download | yuzu-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/mutex.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp index 35d829606..78063b8f1 100644 --- a/src/core/hle/kernel/mutex.cpp +++ b/src/core/hle/kernel/mutex.cpp @@ -26,7 +26,7 @@ public: Handle lock_thread; ///< Handle to thread that currently has mutex std::string name; ///< Name of mutex (optional) - ResultVal<bool> WaitSynchronization() override; + ResultVal<bool> WaitSynchronization(unsigned index) override; }; //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -50,7 +50,7 @@ void MutexAcquireLock(Mutex* mutex, Handle thread = GetCurrentThread()->GetHandl */ void ResumeWaitingThread(Mutex* mutex) { // Find the next waiting thread for the mutex... - auto next_thread = mutex->ResumeNextThread(); + auto next_thread = mutex->ReleaseNextThread(); if (next_thread != nullptr) { MutexAcquireLock(mutex, next_thread->GetHandle()); } else { @@ -155,11 +155,11 @@ Handle CreateMutex(bool initial_locked, const std::string& name) { return handle; } -ResultVal<bool> Mutex::WaitSynchronization() { +ResultVal<bool> Mutex::WaitSynchronization(unsigned index) { bool wait = locked; if (locked) { AddWaitingThread(GetCurrentThread()); - Kernel::WaitCurrentThread(WAITTYPE_MUTEX, this); + Kernel::WaitCurrentThread_WaitSynchronization(WAITTYPE_MUTEX, this, index); } else { // Lock the mutex when the first thread accesses it locked = true; |