aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/hle/kernel/mutex.cpp
diff options
context:
space:
mode:
authorGravatar bunnei <bunneidev@gmail.com>2015-01-18 13:25:51 -0500
committerGravatar bunnei <bunneidev@gmail.com>2015-01-21 20:47:38 -0500
commite5a9f1c64483e01b7856c581ae5685d0c5ad88dc (patch)
tree6ab483afc7aa00bdcff51f0d6b7015b9edd5e5bf /src/core/hle/kernel/mutex.cpp
parent6deb1a0119eb4f17490ed2603d5a608bcf71413a (diff)
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.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp
index f97c69a7..4a1eaca3 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(bool wait_thread) override;
+ ResultVal<bool> Wait() override;
ResultVal<bool> Acquire() override;
};
@@ -156,12 +156,7 @@ Handle CreateMutex(bool initial_locked, const std::string& name) {
return handle;
}
-ResultVal<bool> Mutex::Wait(bool wait_thread) {
- if (locked && wait_thread) {
- AddWaitingThread(GetCurrentThread());
- Kernel::WaitCurrentThread_WaitSynchronization(WAITTYPE_MUTEX, this);
- }
-
+ResultVal<bool> Mutex::Wait() {
return MakeResult<bool>(locked);
}