aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/hle/kernel/mutex.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/mutex.h')
-rw-r--r--src/core/hle/kernel/mutex.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hle/kernel/mutex.h b/src/core/hle/kernel/mutex.h
index 1e69528f..d6d5328b 100644
--- a/src/core/hle/kernel/mutex.h
+++ b/src/core/hle/kernel/mutex.h
@@ -22,7 +22,7 @@ public:
* @param name Optional name of mutex
* @return Pointer to new Mutex object
*/
- static ResultVal<SharedPtr<Mutex>> Create(bool initial_locked, std::string name = "Unknown");
+ static SharedPtr<Mutex> Create(bool initial_locked, std::string name = "Unknown");
std::string GetTypeName() const override { return "Mutex"; }
std::string GetName() const override { return name; }
@@ -30,8 +30,7 @@ public:
static const HandleType HANDLE_TYPE = HandleType::Mutex;
HandleType GetHandleType() const override { return HANDLE_TYPE; }
- bool initial_locked; ///< Initial lock state when mutex was created
- bool locked; ///< Current locked state
+ int lock_count; ///< Number of times the mutex has been acquired
std::string name; ///< Name of mutex (optional)
SharedPtr<Thread> holding_thread; ///< Thread that has acquired the mutex
@@ -43,11 +42,12 @@ public:
* @param mutex Mutex that is to be acquired
* @param thread Thread that will acquire the mutex
*/
- void Acquire(Thread* thread);
+ void Acquire(SharedPtr<Thread> thread);
void Release();
private:
- Mutex() = default;
+ Mutex();
+ ~Mutex() override;
};
/**