diff options
| author | 2020-02-26 10:44:21 -0400 | |
|---|---|---|
| committer | 2020-06-27 11:35:15 -0400 | |
| commit | 3d9fbb8226e9bf7dce99568f6e616e7361d43c41 (patch) | |
| tree | bce92b63c7c038c4eda6f6118b8b39aa92a09efb /src | |
| parent | SVC: Correct SendSyncRequest. (diff) | |
| download | yuzu-3d9fbb8226e9bf7dce99568f6e616e7361d43c41.tar.gz yuzu-3d9fbb8226e9bf7dce99568f6e616e7361d43c41.tar.xz yuzu-3d9fbb8226e9bf7dce99568f6e616e7361d43c41.zip | |
CPU_Manager: Reconfigre guest threads for dynamrmic downsides
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/cpu_manager.cpp | 3 | ||||
| -rw-r--r-- | src/core/hle/kernel/physical_core.cpp | 3 | ||||
| -rw-r--r-- | src/core/hle/kernel/physical_core.h | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src/core/cpu_manager.cpp b/src/core/cpu_manager.cpp index 6032cb0bf..241971ff3 100644 --- a/src/core/cpu_manager.cpp +++ b/src/core/cpu_manager.cpp | |||
| @@ -80,9 +80,10 @@ void CpuManager::RunGuestThread() { | |||
| 80 | } | 80 | } |
| 81 | while (true) { | 81 | while (true) { |
| 82 | auto& physical_core = kernel.CurrentPhysicalCore(); | 82 | auto& physical_core = kernel.CurrentPhysicalCore(); |
| 83 | if (!physical_core.IsInterrupted()) { | 83 | while (!physical_core.IsInterrupted()) { |
| 84 | physical_core.Run(); | 84 | physical_core.Run(); |
| 85 | } | 85 | } |
| 86 | physical_core.ClearExclusive(); | ||
| 86 | auto& scheduler = physical_core.Scheduler(); | 87 | auto& scheduler = physical_core.Scheduler(); |
| 87 | scheduler.TryDoContextSwitch(); | 88 | scheduler.TryDoContextSwitch(); |
| 88 | } | 89 | } |
diff --git a/src/core/hle/kernel/physical_core.cpp b/src/core/hle/kernel/physical_core.cpp index 69202540b..ff14fcb42 100644 --- a/src/core/hle/kernel/physical_core.cpp +++ b/src/core/hle/kernel/physical_core.cpp | |||
| @@ -45,6 +45,9 @@ PhysicalCore::~PhysicalCore() = default; | |||
| 45 | 45 | ||
| 46 | void PhysicalCore::Run() { | 46 | void PhysicalCore::Run() { |
| 47 | arm_interface->Run(); | 47 | arm_interface->Run(); |
| 48 | } | ||
| 49 | |||
| 50 | void PhysicalCore::ClearExclusive() { | ||
| 48 | arm_interface->ClearExclusiveState(); | 51 | arm_interface->ClearExclusiveState(); |
| 49 | } | 52 | } |
| 50 | 53 | ||
diff --git a/src/core/hle/kernel/physical_core.h b/src/core/hle/kernel/physical_core.h index c3da30b72..cd2e42fc3 100644 --- a/src/core/hle/kernel/physical_core.h +++ b/src/core/hle/kernel/physical_core.h | |||
| @@ -38,6 +38,8 @@ public: | |||
| 38 | 38 | ||
| 39 | /// Execute current jit state | 39 | /// Execute current jit state |
| 40 | void Run(); | 40 | void Run(); |
| 41 | /// Clear Exclusive state. | ||
| 42 | void ClearExclusive(); | ||
| 41 | /// Set this core in IdleState. | 43 | /// Set this core in IdleState. |
| 42 | void Idle(); | 44 | void Idle(); |
| 43 | /// Execute a single instruction in current jit. | 45 | /// Execute a single instruction in current jit. |