diff options
author | bunnei <bunneidev@gmail.com> | 2015-01-18 07:27:46 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-01-22 01:11:47 +0100 |
commit | 6643673f28b9273149fc945849a13ed832e9ef33 (patch) | |
tree | 026410cf5b0b57d350ac979380307991646e546c /src/core/hle/kernel/mutex.cpp | |
parent | Kernel: Separate WaitSynchronization into Wait and Acquire methods. (diff) | |
download | yuzu-6643673f28b9273149fc945849a13ed832e9ef33.tar yuzu-6643673f28b9273149fc945849a13ed832e9ef33.tar.gz yuzu-6643673f28b9273149fc945849a13ed832e9ef33.tar.bz2 yuzu-6643673f28b9273149fc945849a13ed832e9ef33.tar.lz yuzu-6643673f28b9273149fc945849a13ed832e9ef33.tar.xz yuzu-6643673f28b9273149fc945849a13ed832e9ef33.tar.zst yuzu-6643673f28b9273149fc945849a13ed832e9ef33.zip |
Diffstat (limited to 'src/core/hle/kernel/mutex.cpp')
-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 37e7be4e7..f97c69a78 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> Wait(unsigned index) override; + ResultVal<bool> Wait(bool wait_thread) override; ResultVal<bool> Acquire() override; }; @@ -156,10 +156,10 @@ Handle CreateMutex(bool initial_locked, const std::string& name) { return handle; } -ResultVal<bool> Mutex::Wait(unsigned index) { - if (locked) { +ResultVal<bool> Mutex::Wait(bool wait_thread) { + if (locked && wait_thread) { AddWaitingThread(GetCurrentThread()); - Kernel::WaitCurrentThread_WaitSynchronization(WAITTYPE_MUTEX, this, index); + Kernel::WaitCurrentThread_WaitSynchronization(WAITTYPE_MUTEX, this); } return MakeResult<bool>(locked); |