diff options
| author | 2015-01-18 13:25:51 -0500 | |
|---|---|---|
| committer | 2015-01-21 20:47:38 -0500 | |
| commit | e5a9f1c64483e01b7856c581ae5685d0c5ad88dc (patch) | |
| tree | 6ab483afc7aa00bdcff51f0d6b7015b9edd5e5bf /src/core/hle/kernel/mutex.cpp | |
| parent | WaitSynchronizationN: Improved comments (diff) | |
| download | yuzu-e5a9f1c64483e01b7856c581ae5685d0c5ad88dc.tar.gz yuzu-e5a9f1c64483e01b7856c581ae5685d0c5ad88dc.tar.xz yuzu-e5a9f1c64483e01b7856c581ae5685d0c5ad88dc.zip | |
Kernel: Get rid of WaitTypes and simplify lots of code, removing hacks.
Diffstat (limited to 'src/core/hle/kernel/mutex.cpp')
| -rw-r--r-- | src/core/hle/kernel/mutex.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp index f97c69a78..4a1eaca37 100644 --- a/src/core/hle/kernel/mutex.cpp +++ b/src/core/hle/kernel/mutex.cpp | |||
| @@ -26,7 +26,7 @@ public: | |||
| 26 | Handle lock_thread; ///< Handle to thread that currently has mutex | 26 | Handle lock_thread; ///< Handle to thread that currently has mutex |
| 27 | std::string name; ///< Name of mutex (optional) | 27 | std::string name; ///< Name of mutex (optional) |
| 28 | 28 | ||
| 29 | ResultVal<bool> Wait(bool wait_thread) override; | 29 | ResultVal<bool> Wait() override; |
| 30 | ResultVal<bool> Acquire() override; | 30 | ResultVal<bool> Acquire() override; |
| 31 | }; | 31 | }; |
| 32 | 32 | ||
| @@ -156,12 +156,7 @@ Handle CreateMutex(bool initial_locked, const std::string& name) { | |||
| 156 | return handle; | 156 | return handle; |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | ResultVal<bool> Mutex::Wait(bool wait_thread) { | 159 | ResultVal<bool> Mutex::Wait() { |
| 160 | if (locked && wait_thread) { | ||
| 161 | AddWaitingThread(GetCurrentThread()); | ||
| 162 | Kernel::WaitCurrentThread_WaitSynchronization(WAITTYPE_MUTEX, this); | ||
| 163 | } | ||
| 164 | |||
| 165 | return MakeResult<bool>(locked); | 160 | return MakeResult<bool>(locked); |
| 166 | } | 161 | } |
| 167 | 162 | ||