summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_thread.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2024-01-04 21:50:40 +0100
committerGitHub <noreply@github.com>2024-01-04 21:50:40 +0100
commit246cffb6248aad5f7b16ef669d40e1dc2dc6c0ee (patch)
tree776dcb02a9d0118e14cfce87741518ed092838fb /src/core/hle/kernel/k_thread.cpp
parentMerge pull request #12549 from german77/npadresource (diff)
parentKThread: Send termination interrupt to all cores a thread has affinity to (diff)
downloadyuzu-246cffb6248aad5f7b16ef669d40e1dc2dc6c0ee.tar
yuzu-246cffb6248aad5f7b16ef669d40e1dc2dc6c0ee.tar.gz
yuzu-246cffb6248aad5f7b16ef669d40e1dc2dc6c0ee.tar.bz2
yuzu-246cffb6248aad5f7b16ef669d40e1dc2dc6c0ee.tar.lz
yuzu-246cffb6248aad5f7b16ef669d40e1dc2dc6c0ee.tar.xz
yuzu-246cffb6248aad5f7b16ef669d40e1dc2dc6c0ee.tar.zst
yuzu-246cffb6248aad5f7b16ef669d40e1dc2dc6c0ee.zip
Diffstat (limited to 'src/core/hle/kernel/k_thread.cpp')
-rw-r--r--src/core/hle/kernel/k_thread.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp
index 24394d222..7d3421929 100644
--- a/src/core/hle/kernel/k_thread.cpp
+++ b/src/core/hle/kernel/k_thread.cpp
@@ -1258,11 +1258,11 @@ ThreadState KThread::RequestTerminate() {
// Change the thread's priority to be higher than any system thread's.
this->IncreaseBasePriority(TerminatingThreadPriority);
- // If the thread is runnable, send a termination interrupt to other cores.
+ // If the thread is runnable, send a termination interrupt to cores it may be running on.
if (this->GetState() == ThreadState::Runnable) {
- if (const u64 core_mask = m_physical_affinity_mask.GetAffinityMask() &
- ~(1ULL << GetCurrentCoreId(m_kernel));
- core_mask != 0) {
+ // NOTE: We do not mask the "current core", because this code may not actually be
+ // executing from the thread representing the "current core".
+ if (const u64 core_mask = m_physical_affinity_mask.GetAffinityMask(); core_mask != 0) {
Kernel::KInterruptManager::SendInterProcessorInterrupt(m_kernel, core_mask);
}
}