diff options
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) { | |||
| 41 | Mutex::Mutex() {} | 41 | Mutex::Mutex() {} |
| 42 | Mutex::~Mutex() {} | 42 | Mutex::~Mutex() {} |
| 43 | 43 | ||
| 44 | ResultVal<SharedPtr<Mutex>> Mutex::Create(bool initial_locked, std::string name) { | 44 | SharedPtr<Mutex> Mutex::Create(bool initial_locked, std::string name) { |
| 45 | SharedPtr<Mutex> mutex(new Mutex); | 45 | SharedPtr<Mutex> mutex(new Mutex); |
| 46 | // TOOD(yuriks): Don't create Handle (see Thread::Create()) | ||
| 47 | CASCADE_RESULT(auto unused, Kernel::g_handle_table.Create(mutex)); | ||
| 48 | 46 | ||
| 49 | mutex->initial_locked = initial_locked; | 47 | mutex->initial_locked = initial_locked; |
| 50 | mutex->locked = false; | 48 | mutex->locked = false; |
| @@ -55,7 +53,7 @@ ResultVal<SharedPtr<Mutex>> Mutex::Create(bool initial_locked, std::string name) | |||
| 55 | if (initial_locked) | 53 | if (initial_locked) |
| 56 | mutex->Acquire(); | 54 | mutex->Acquire(); |
| 57 | 55 | ||
| 58 | return MakeResult<SharedPtr<Mutex>>(mutex); | 56 | return mutex; |
| 59 | } | 57 | } |
| 60 | 58 | ||
| 61 | bool Mutex::ShouldWait() { | 59 | bool Mutex::ShouldWait() { |