aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/hle
diff options
context:
space:
mode:
authorLiam <[email protected]>2023-10-21 19:18:38 -0400
committerLiam <[email protected]>2023-10-21 20:03:41 -0400
commitdcfe674ed4eef3879f0ed8706507ea21d13aab24 (patch)
treeefffa461332fc9ecec4c13ef555459379c0ddc41 /src/core/hle
parentbb195c2c2bebdb62d349cf181479489a1a15b108 (diff)
downloadyuzu-android-dcfe674ed4eef3879f0ed8706507ea21d13aab24.tar.gz
yuzu-android-dcfe674ed4eef3879f0ed8706507ea21d13aab24.zip
kernel: signal thread on termination completed
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/k_thread.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp
index ac0f215d7..a6deb50ec 100644
--- a/src/core/hle/kernel/k_thread.cpp
+++ b/src/core/hle/kernel/k_thread.cpp
@@ -415,10 +415,6 @@ void KThread::StartTermination() {
m_parent->ClearRunningThread(this);
}
- // Signal.
- m_signaled = true;
- KSynchronizationObject::NotifyAvailable();
-
// Clear previous thread in KScheduler.
KScheduler::ClearPreviousThread(m_kernel, this);
@@ -437,6 +433,13 @@ void KThread::FinishTermination() {
}
}
+ // Acquire the scheduler lock.
+ KScopedSchedulerLock sl{m_kernel};
+
+ // Signal.
+ m_signaled = true;
+ KSynchronizationObject::NotifyAvailable();
+
// Close the thread.
this->Close();
}