From 88a4a808c688eeabb136e9b45223a0e9c95896bc Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sun, 1 Feb 2015 00:14:40 -0200 Subject: Kernel: Stop creating useless Handles during object creation They're finally unnecessary, and will stop cluttering the application's handle table. --- src/core/hle/kernel/mutex.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/core/hle/kernel/mutex.cpp') diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp index 7c634f9b..9f7166ca 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> Mutex::Create(bool initial_locked, std::string name) { +SharedPtr Mutex::Create(bool initial_locked, std::string name) { SharedPtr 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> Mutex::Create(bool initial_locked, std::string name) if (initial_locked) mutex->Acquire(); - return MakeResult>(mutex); + return mutex; } bool Mutex::ShouldWait() { -- cgit v1.2.3