diff options
author | Liam <[email protected]> | 2023-10-21 19:18:38 -0400 |
---|---|---|
committer | Liam <[email protected]> | 2023-10-21 20:03:41 -0400 |
commit | dcfe674ed4eef3879f0ed8706507ea21d13aab24 (patch) | |
tree | efffa461332fc9ecec4c13ef555459379c0ddc41 /src/core/hle/kernel/k_thread.cpp | |
parent | bb195c2c2bebdb62d349cf181479489a1a15b108 (diff) | |
download | yuzu-android-dcfe674ed4eef3879f0ed8706507ea21d13aab24.tar.gz yuzu-android-dcfe674ed4eef3879f0ed8706507ea21d13aab24.zip |
kernel: signal thread on termination completed
Diffstat (limited to 'src/core/hle/kernel/k_thread.cpp')
-rw-r--r-- | src/core/hle/kernel/k_thread.cpp | 11 |
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(); } |