diff options
| author | bunnei <bunneidev@gmail.com> | 2015-01-10 15:19:21 -0500 |
|---|---|---|
| committer | bunnei <bunneidev@gmail.com> | 2015-01-10 15:19:21 -0500 |
| commit | 5a4b361f6065d33fd9efb73b3654910f74d5e3cd (patch) | |
| tree | cb6506c96f7880ef38f783221d4dd5b34978e3ef /src/core/hle/kernel/mutex.cpp | |
| parent | e213f9137339ff157e480934ec04aae7ae177452 (diff) | |
| parent | 8ad41775ccae67e54e9f03cbe054d7562b1c66ce (diff) | |
Merge pull request #455 from yuriks/handle-reform3
Kernel Lifetime Reform Pt. 3
Diffstat (limited to 'src/core/hle/kernel/mutex.cpp')
| -rw-r--r-- | src/core/hle/kernel/mutex.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp index 7d008f6cc..853a5dd74 100644 --- a/src/core/hle/kernel/mutex.cpp +++ b/src/core/hle/kernel/mutex.cpp @@ -48,7 +48,7 @@ void MutexAcquireLock(Mutex* mutex, Handle thread = GetCurrentThread()->GetHandl bool ReleaseMutexForThread(Mutex* mutex, Handle thread_handle) { MutexAcquireLock(mutex, thread_handle); - Thread* thread = Kernel::g_handle_table.Get<Thread>(thread_handle); + Thread* thread = Kernel::g_handle_table.Get<Thread>(thread_handle).get(); if (thread == nullptr) { LOG_ERROR(Kernel, "Called with invalid handle: %08X", thread_handle); return false; @@ -94,7 +94,7 @@ void ReleaseThreadMutexes(Handle thread) { // Release every mutex that the thread holds, and resume execution on the waiting threads for (MutexMap::iterator iter = locked.first; iter != locked.second; ++iter) { - Mutex* mutex = g_handle_table.Get<Mutex>(iter->second); + Mutex* mutex = g_handle_table.Get<Mutex>(iter->second).get(); ResumeWaitingThread(mutex); } @@ -122,7 +122,7 @@ bool ReleaseMutex(Mutex* mutex) { * @param handle Handle to mutex to release */ ResultCode ReleaseMutex(Handle handle) { - Mutex* mutex = Kernel::g_handle_table.Get<Mutex>(handle); + Mutex* mutex = Kernel::g_handle_table.Get<Mutex>(handle).get(); if (mutex == nullptr) return InvalidHandle(ErrorModule::Kernel); if (!ReleaseMutex(mutex)) { |
