mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-17 13:47:57 -05:00
SVC: Correct races on physical core switching.
This commit is contained in:
@ -79,12 +79,13 @@ void CpuManager::RunGuestThread() {
|
||||
sched.OnThreadStart();
|
||||
}
|
||||
while (true) {
|
||||
auto& physical_core = kernel.CurrentPhysicalCore();
|
||||
while (!physical_core.IsInterrupted()) {
|
||||
physical_core.Run();
|
||||
auto* physical_core = &kernel.CurrentPhysicalCore();
|
||||
while (!physical_core->IsInterrupted()) {
|
||||
physical_core->Run();
|
||||
physical_core = &kernel.CurrentPhysicalCore();
|
||||
}
|
||||
physical_core.ClearExclusive();
|
||||
auto& scheduler = physical_core.Scheduler();
|
||||
physical_core->ClearExclusive();
|
||||
auto& scheduler = physical_core->Scheduler();
|
||||
scheduler.TryDoContextSwitch();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user