diff options
author | Subv <subv2112@gmail.com> | 2014-12-07 21:44:21 +0100 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2014-12-07 21:44:21 +0100 |
commit | 64128aa61a7ada0744f801df116dfbe229a50382 (patch) | |
tree | c22742e84c584242f38926307aad471a952ca723 /src/core/hle/kernel/thread.cpp | |
parent | Mutex: Properly lock the mutex when a thread enters it (diff) | |
download | yuzu-64128aa61a7ada0744f801df116dfbe229a50382.tar yuzu-64128aa61a7ada0744f801df116dfbe229a50382.tar.gz yuzu-64128aa61a7ada0744f801df116dfbe229a50382.tar.bz2 yuzu-64128aa61a7ada0744f801df116dfbe229a50382.tar.lz yuzu-64128aa61a7ada0744f801df116dfbe229a50382.tar.xz yuzu-64128aa61a7ada0744f801df116dfbe229a50382.tar.zst yuzu-64128aa61a7ada0744f801df116dfbe229a50382.zip |
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r-- | src/core/hle/kernel/thread.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 8d65dc84d..c01d76e4d 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -14,6 +14,7 @@ #include "core/hle/hle.h" #include "core/hle/kernel/kernel.h" #include "core/hle/kernel/thread.h" +#include "core/hle/kernel/mutex.h" #include "core/hle/result.h" #include "core/mem_map.h" @@ -156,6 +157,9 @@ ResultCode StopThread(Handle handle, const char* reason) { Thread* thread = g_object_pool.Get<Thread>(handle); if (thread == nullptr) return InvalidHandle(ErrorModule::Kernel); + // Release all the mutexes that this thread holds + ReleaseThreadMutexes(handle); + ChangeReadyState(thread, false); thread->status = THREADSTATUS_DORMANT; for (Handle waiting_handle : thread->waiting_threads) { |