diff options
| author | 2024-01-04 15:50:40 -0500 | |
|---|---|---|
| committer | 2024-01-04 15:50:40 -0500 | |
| commit | 246cffb6248aad5f7b16ef669d40e1dc2dc6c0ee (patch) | |
| tree | 776dcb02a9d0118e14cfce87741518ed092838fb /src | |
| parent | Merge pull request #12549 from german77/npadresource (diff) | |
| parent | KThread: Send termination interrupt to all cores a thread has affinity to (diff) | |
| download | yuzu-246cffb6248aad5f7b16ef669d40e1dc2dc6c0ee.tar.gz yuzu-246cffb6248aad5f7b16ef669d40e1dc2dc6c0ee.tar.xz yuzu-246cffb6248aad5f7b16ef669d40e1dc2dc6c0ee.zip | |
Merge pull request #12557 from merryhime/termination-ipi
KThread: Send termination interrupt to all cores a thread has affinity to
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/k_thread.cpp | 8 |
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() { | |||
| 1258 | // Change the thread's priority to be higher than any system thread's. | 1258 | // Change the thread's priority to be higher than any system thread's. |
| 1259 | this->IncreaseBasePriority(TerminatingThreadPriority); | 1259 | this->IncreaseBasePriority(TerminatingThreadPriority); |
| 1260 | 1260 | ||
| 1261 | // If the thread is runnable, send a termination interrupt to other cores. | 1261 | // If the thread is runnable, send a termination interrupt to cores it may be running on. |
| 1262 | if (this->GetState() == ThreadState::Runnable) { | 1262 | if (this->GetState() == ThreadState::Runnable) { |
| 1263 | if (const u64 core_mask = m_physical_affinity_mask.GetAffinityMask() & | 1263 | // NOTE: We do not mask the "current core", because this code may not actually be |
| 1264 | ~(1ULL << GetCurrentCoreId(m_kernel)); | 1264 | // executing from the thread representing the "current core". |
| 1265 | core_mask != 0) { | 1265 | if (const u64 core_mask = m_physical_affinity_mask.GetAffinityMask(); core_mask != 0) { |
| 1266 | Kernel::KInterruptManager::SendInterProcessorInterrupt(m_kernel, core_mask); | 1266 | Kernel::KInterruptManager::SendInterProcessorInterrupt(m_kernel, core_mask); |
| 1267 | } | 1267 | } |
| 1268 | } | 1268 | } |