VERY experimental Nintendo Switch 2 emulator
C++
CPU_Manager: Reconfigre guest threads for dynamrmic downsides
Fernando Sahmkow64fe82af2ec9
diff --git a/src/core/cpu_manager.cpp b/src/core/cpu_manager.cppindex 6032cb0bf1..241971ff38 100644--- a/src/core/cpu_manager.cpp+++ b/src/core/cpu_manager.cpp@@ -80,9 +80,10 @@ void CpuManager::RunGuestThread() {}while (true) {auto& physical_core = kernel.CurrentPhysicalCore();- if (!physical_core.IsInterrupted()) {+ while (!physical_core.IsInterrupted()) {physical_core.Run();}+ physical_core.ClearExclusive();auto& scheduler = physical_core.Scheduler();scheduler.TryDoContextSwitch();}diff --git a/src/core/hle/kernel/physical_core.cpp b/src/core/hle/kernel/physical_core.cppindex 69202540be..ff14fcb424 100644--- a/src/core/hle/kernel/physical_core.cpp+++ b/src/core/hle/kernel/physical_core.cpp@@ -45,6 +45,9 @@ PhysicalCore::~PhysicalCore() = default;void PhysicalCore::Run() {arm_interface->Run();+}++void PhysicalCore::ClearExclusive() {arm_interface->ClearExclusiveState();}diff --git a/src/core/hle/kernel/physical_core.h b/src/core/hle/kernel/physical_core.hindex c3da30b721..cd2e42fc3c 100644--- a/src/core/hle/kernel/physical_core.h+++ b/src/core/hle/kernel/physical_core.h@@ -38,6 +38,8 @@ public:/// Execute current jit statevoid Run();+ /// Clear Exclusive state.+ void ClearExclusive();/// Set this core in IdleState.void Idle();/// Execute a single instruction in current jit.