summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r--src/core/hle/kernel/thread.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 7d03a2cf7..d44010824 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -90,9 +90,6 @@ static bool CheckWait_AddressArbiter(const Thread* thread, VAddr wait_address) {
90} 90}
91 91
92void Thread::Stop() { 92void Thread::Stop() {
93 // Release all the mutexes that this thread holds
94 ReleaseThreadMutexes(this);
95
96 // Cancel any outstanding wakeup events for this thread 93 // Cancel any outstanding wakeup events for this thread
97 CoreTiming::UnscheduleEvent(ThreadWakeupEventType, callback_handle); 94 CoreTiming::UnscheduleEvent(ThreadWakeupEventType, callback_handle);
98 wakeup_callback_handle_table.Close(callback_handle); 95 wakeup_callback_handle_table.Close(callback_handle);
@@ -108,6 +105,9 @@ void Thread::Stop() {
108 105
109 WakeupAllWaitingThreads(); 106 WakeupAllWaitingThreads();
110 107
108 // Release all the mutexes that this thread holds
109 ReleaseThreadMutexes(this);
110
111 // Clean up any dangling references in objects that this thread was waiting for 111 // Clean up any dangling references in objects that this thread was waiting for
112 for (auto& wait_object : wait_objects) { 112 for (auto& wait_object : wait_objects) {
113 wait_object->RemoveWaitingThread(this); 113 wait_object->RemoveWaitingThread(this);