Browse Source

CPU_Manager: Reconfigre guest threads for dynamrmic downsides

nce_cpp
Fernando Sahmkow 6 years ago
parent
commit
64fe82af2e
  1. 3
      src/core/cpu_manager.cpp
  2. 3
      src/core/hle/kernel/physical_core.cpp
  3. 2
      src/core/hle/kernel/physical_core.h

3
src/core/cpu_manager.cpp

@ -80,9 +80,10 @@ void CpuManager::RunGuestThread() {
} }
while (true) { while (true) {
auto& physical_core = kernel.CurrentPhysicalCore(); auto& physical_core = kernel.CurrentPhysicalCore();
if (!physical_core.IsInterrupted()) {
while (!physical_core.IsInterrupted()) {
physical_core.Run(); physical_core.Run();
} }
physical_core.ClearExclusive();
auto& scheduler = physical_core.Scheduler(); auto& scheduler = physical_core.Scheduler();
scheduler.TryDoContextSwitch(); scheduler.TryDoContextSwitch();
} }

3
src/core/hle/kernel/physical_core.cpp

@ -45,6 +45,9 @@ PhysicalCore::~PhysicalCore() = default;
void PhysicalCore::Run() { void PhysicalCore::Run() {
arm_interface->Run(); arm_interface->Run();
}
void PhysicalCore::ClearExclusive() {
arm_interface->ClearExclusiveState(); arm_interface->ClearExclusiveState();
} }

2
src/core/hle/kernel/physical_core.h

@ -38,6 +38,8 @@ public:
/// Execute current jit state /// Execute current jit state
void Run(); void Run();
/// Clear Exclusive state.
void ClearExclusive();
/// Set this core in IdleState. /// Set this core in IdleState.
void Idle(); void Idle();
/// Execute a single instruction in current jit. /// Execute a single instruction in current jit.

Loading…
Cancel
Save