diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-02-01 03:14:40 +0100 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-02-02 18:37:09 +0100 |
commit | 88a4a808c688eeabb136e9b45223a0e9c95896bc (patch) | |
tree | c4181a69ff882e1af1b7d65bf3596a6cb3dd88b9 /src/core/hle/kernel/mutex.cpp | |
parent | Kernel: Make WaitObjects share ownership of Threads waiting on them (diff) | |
download | yuzu-88a4a808c688eeabb136e9b45223a0e9c95896bc.tar yuzu-88a4a808c688eeabb136e9b45223a0e9c95896bc.tar.gz yuzu-88a4a808c688eeabb136e9b45223a0e9c95896bc.tar.bz2 yuzu-88a4a808c688eeabb136e9b45223a0e9c95896bc.tar.lz yuzu-88a4a808c688eeabb136e9b45223a0e9c95896bc.tar.xz yuzu-88a4a808c688eeabb136e9b45223a0e9c95896bc.tar.zst yuzu-88a4a808c688eeabb136e9b45223a0e9c95896bc.zip |
Diffstat (limited to 'src/core/hle/kernel/mutex.cpp')
-rw-r--r-- | src/core/hle/kernel/mutex.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp index 7c634f9bd..9f7166ca4 100644 --- a/src/core/hle/kernel/mutex.cpp +++ b/src/core/hle/kernel/mutex.cpp @@ -41,10 +41,8 @@ void ReleaseThreadMutexes(Thread* thread) { Mutex::Mutex() {} Mutex::~Mutex() {} -ResultVal<SharedPtr<Mutex>> Mutex::Create(bool initial_locked, std::string name) { +SharedPtr<Mutex> Mutex::Create(bool initial_locked, std::string name) { SharedPtr<Mutex> mutex(new Mutex); - // TOOD(yuriks): Don't create Handle (see Thread::Create()) - CASCADE_RESULT(auto unused, Kernel::g_handle_table.Create(mutex)); mutex->initial_locked = initial_locked; mutex->locked = false; @@ -55,7 +53,7 @@ ResultVal<SharedPtr<Mutex>> Mutex::Create(bool initial_locked, std::string name) if (initial_locked) mutex->Acquire(); - return MakeResult<SharedPtr<Mutex>>(mutex); + return mutex; } bool Mutex::ShouldWait() { |