diff options
author | bunnei <bunneidev@gmail.com> | 2021-08-07 08:22:52 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-08-07 21:18:47 +0200 |
commit | cbe4e32d38c6cc844f5fbf4fc59831a7abea08a9 (patch) | |
tree | 839a7060b5f91953cf4c1a1eba24a3e3cba551e1 /src | |
parent | core: hle: kernel: Use CurrentPhysicalCoreIndex as appropriate. (diff) | |
download | yuzu-cbe4e32d38c6cc844f5fbf4fc59831a7abea08a9.tar yuzu-cbe4e32d38c6cc844f5fbf4fc59831a7abea08a9.tar.gz yuzu-cbe4e32d38c6cc844f5fbf4fc59831a7abea08a9.tar.bz2 yuzu-cbe4e32d38c6cc844f5fbf4fc59831a7abea08a9.tar.lz yuzu-cbe4e32d38c6cc844f5fbf4fc59831a7abea08a9.tar.xz yuzu-cbe4e32d38c6cc844f5fbf4fc59831a7abea08a9.tar.zst yuzu-cbe4e32d38c6cc844f5fbf4fc59831a7abea08a9.zip |
Diffstat (limited to 'src')
-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 77efcabf0..e2c4f0e07 100644 --- a/src/core/cpu_manager.cpp +++ b/src/core/cpu_manager.cpp @@ -118,17 +118,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(); } } @@ -136,12 +137,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(); } } |