diff options
author | Liam <byteslice@airmail.cc> | 2023-10-22 01:18:38 +0200 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-10-22 02:03:41 +0200 |
commit | dcfe674ed4eef3879f0ed8706507ea21d13aab24 (patch) | |
tree | efffa461332fc9ecec4c13ef555459379c0ddc41 | |
parent | kernel: add missing TLR clear (diff) | |
download | yuzu-dcfe674ed4eef3879f0ed8706507ea21d13aab24.tar yuzu-dcfe674ed4eef3879f0ed8706507ea21d13aab24.tar.gz yuzu-dcfe674ed4eef3879f0ed8706507ea21d13aab24.tar.bz2 yuzu-dcfe674ed4eef3879f0ed8706507ea21d13aab24.tar.lz yuzu-dcfe674ed4eef3879f0ed8706507ea21d13aab24.tar.xz yuzu-dcfe674ed4eef3879f0ed8706507ea21d13aab24.tar.zst yuzu-dcfe674ed4eef3879f0ed8706507ea21d13aab24.zip |
-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(); } |