diff options
author | Fernando S <fsahmkow27@gmail.com> | 2023-12-06 14:19:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-06 14:19:17 +0100 |
commit | 8a79dd2d6c6445bff63ea1f2f5f1611a6afcd97a (patch) | |
tree | 265bf3c7970a570479c6a3ac1250549995f0329c /src/core/hle/kernel/k_scheduler.cpp | |
parent | Merge pull request #12271 from liamwhite/pretext-fix (diff) | |
parent | arm: fix context save of vector regs (diff) | |
download | yuzu-8a79dd2d6c6445bff63ea1f2f5f1611a6afcd97a.tar yuzu-8a79dd2d6c6445bff63ea1f2f5f1611a6afcd97a.tar.gz yuzu-8a79dd2d6c6445bff63ea1f2f5f1611a6afcd97a.tar.bz2 yuzu-8a79dd2d6c6445bff63ea1f2f5f1611a6afcd97a.tar.lz yuzu-8a79dd2d6c6445bff63ea1f2f5f1611a6afcd97a.tar.xz yuzu-8a79dd2d6c6445bff63ea1f2f5f1611a6afcd97a.tar.zst yuzu-8a79dd2d6c6445bff63ea1f2f5f1611a6afcd97a.zip |
Diffstat (limited to 'src/core/hle/kernel/k_scheduler.cpp')
-rw-r--r-- | src/core/hle/kernel/k_scheduler.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/core/hle/kernel/k_scheduler.cpp b/src/core/hle/kernel/k_scheduler.cpp index 1bce63a56..27d1c3846 100644 --- a/src/core/hle/kernel/k_scheduler.cpp +++ b/src/core/hle/kernel/k_scheduler.cpp @@ -494,12 +494,7 @@ void KScheduler::ScheduleImplFiber() { } void KScheduler::Unload(KThread* thread) { - auto& cpu_core = m_kernel.System().ArmInterface(m_core_id); - cpu_core.SaveContext(thread->GetContext32()); - cpu_core.SaveContext(thread->GetContext64()); - // Save the TPIDR_EL0 system register in case it was modified. - thread->SetTpidrEl0(cpu_core.GetTPIDR_EL0()); - cpu_core.ClearExclusiveState(); + m_kernel.PhysicalCore(m_core_id).SaveContext(thread); // Check if the thread is terminated by checking the DPC flags. if ((thread->GetStackParameters().dpc_flags & static_cast<u32>(DpcFlag::Terminated)) == 0) { @@ -509,14 +504,7 @@ void KScheduler::Unload(KThread* thread) { } void KScheduler::Reload(KThread* thread) { - auto& cpu_core = m_kernel.System().ArmInterface(m_core_id); - auto* process = thread->GetOwnerProcess(); - cpu_core.LoadContext(thread->GetContext32()); - cpu_core.LoadContext(thread->GetContext64()); - cpu_core.SetTlsAddress(GetInteger(thread->GetTlsAddress())); - cpu_core.SetTPIDR_EL0(thread->GetTpidrEl0()); - cpu_core.LoadWatchpointArray(process ? &process->GetWatchpoints() : nullptr); - cpu_core.ClearExclusiveState(); + m_kernel.PhysicalCore(m_core_id).LoadContext(thread); } void KScheduler::ClearPreviousThread(KernelCore& kernel, KThread* thread) { |