summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2017-01-01 22:59:30 +0100
committerSubv <subv2112@gmail.com>2017-01-04 21:58:46 +0100
commit7abf1853907fe086753df0031262b668a2da88b0 (patch)
tree033c38e1d98f209c32c1378419468212729877b4 /src/core/hle/kernel/thread.cpp
parentKernel: Object ShouldWait and Acquire calls now take a thread as a parameter. (diff)
downloadyuzu-7abf1853907fe086753df0031262b668a2da88b0.tar
yuzu-7abf1853907fe086753df0031262b668a2da88b0.tar.gz
yuzu-7abf1853907fe086753df0031262b668a2da88b0.tar.bz2
yuzu-7abf1853907fe086753df0031262b668a2da88b0.tar.lz
yuzu-7abf1853907fe086753df0031262b668a2da88b0.tar.xz
yuzu-7abf1853907fe086753df0031262b668a2da88b0.tar.zst
yuzu-7abf1853907fe086753df0031262b668a2da88b0.zip
Diffstat (limited to '')
-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) {
}
void Thread::Stop() {
- // Release all the mutexes that this thread holds
- ReleaseThreadMutexes(this);
-
// Cancel any outstanding wakeup events for this thread
CoreTiming::UnscheduleEvent(ThreadWakeupEventType, callback_handle);
wakeup_callback_handle_table.Close(callback_handle);
@@ -108,6 +105,9 @@ void Thread::Stop() {
WakeupAllWaitingThreads();
+ // Release all the mutexes that this thread holds
+ ReleaseThreadMutexes(this);
+
// Clean up any dangling references in objects that this thread was waiting for
for (auto& wait_object : wait_objects) {
wait_object->RemoveWaitingThread(this);