diff options
author | bunnei <bunneidev@gmail.com> | 2021-08-07 08:22:52 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-12-07 01:39:16 +0100 |
commit | d604edfedffa1245ad33dd668e9e42394a213e24 (patch) | |
tree | a8aca76ab056a82d865bd4f4a994e71d83ef52e0 /src/core/cpu_manager.cpp | |
parent | core: hle: kernel: Use CurrentPhysicalCoreIndex as appropriate. (diff) | |
download | yuzu-d604edfedffa1245ad33dd668e9e42394a213e24.tar yuzu-d604edfedffa1245ad33dd668e9e42394a213e24.tar.gz yuzu-d604edfedffa1245ad33dd668e9e42394a213e24.tar.bz2 yuzu-d604edfedffa1245ad33dd668e9e42394a213e24.tar.lz yuzu-d604edfedffa1245ad33dd668e9e42394a213e24.tar.xz yuzu-d604edfedffa1245ad33dd668e9e42394a213e24.tar.zst yuzu-d604edfedffa1245ad33dd668e9e42394a213e24.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/cpu_manager.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/core/cpu_manager.cpp b/src/core/cpu_manager.cpp index 5d43c6e5d..45cc176dc 100644 --- a/src/core/cpu_manager.cpp +++ b/src/core/cpu_manager.cpp @@ -117,17 +117,18 @@ void CpuManager::MultiCoreRunGuestLoop() { physical_core = &kernel.CurrentPhysicalCore(); } system.ExitDynarmicProfile(); - physical_core->ArmInterface().ClearExclusiveState(); - kernel.CurrentScheduler()->RescheduleCurrentCore(); + { + Kernel::KScopedDisableDispatch dd(kernel); + physical_core->ArmInterface().ClearExclusiveState(); + } } } void CpuManager::MultiCoreRunIdleThread() { auto& kernel = system.Kernel(); while (true) { - auto& physical_core = kernel.CurrentPhysicalCore(); - physical_core.Idle(); - kernel.CurrentScheduler()->RescheduleCurrentCore(); + Kernel::KScopedDisableDispatch dd(kernel); + kernel.CurrentPhysicalCore().Idle(); } } @@ -135,12 +136,12 @@ void CpuManager::MultiCoreRunSuspendThread() { auto& kernel = system.Kernel(); kernel.CurrentScheduler()->OnThreadStart(); while (true) { - auto core = kernel.GetCurrentHostThreadID(); + auto core = kernel.CurrentPhysicalCoreIndex(); auto& scheduler = *kernel.CurrentScheduler(); Kernel::KThread* current_thread = scheduler.GetCurrentThread(); Common::Fiber::YieldTo(current_thread->GetHostContext(), *core_data[core].host_context); ASSERT(scheduler.ContextSwitchPending()); - ASSERT(core == kernel.GetCurrentHostThreadID()); + ASSERT(core == kernel.CurrentPhysicalCoreIndex()); scheduler.RescheduleCurrentCore(); } } |