diff options
| author | 2019-10-15 11:48:30 -0400 | |
|---|---|---|
| committer | 2019-10-15 11:48:30 -0400 | |
| commit | cab2619aeb111bd6c5dbcc5adc0d2e8154a1e8fc (patch) | |
| tree | 1664df6e9abff74f37adee0c90ae3c9eaff6babf /src/core/core_cpu.cpp | |
| parent | Merge pull request #2897 from DarkLordZach/oss-ext-fonts-1 (diff) | |
| parent | Core_Timing: Address Remaining feedback. (diff) | |
| download | yuzu-cab2619aeb111bd6c5dbcc5adc0d2e8154a1e8fc.tar.gz yuzu-cab2619aeb111bd6c5dbcc5adc0d2e8154a1e8fc.tar.xz yuzu-cab2619aeb111bd6c5dbcc5adc0d2e8154a1e8fc.zip | |
Merge pull request #2965 from FernandoS27/fair-core-timing
Core Timing: Rework Core Timing to run all cores evenly.
Diffstat (limited to 'src/core/core_cpu.cpp')
| -rw-r--r-- | src/core/core_cpu.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/core/core_cpu.cpp b/src/core/core_cpu.cpp index 21c410e34..6bd9639c6 100644 --- a/src/core/core_cpu.cpp +++ b/src/core/core_cpu.cpp | |||
| @@ -85,24 +85,16 @@ void Cpu::RunLoop(bool tight_loop) { | |||
| 85 | // instead advance to the next event and try to yield to the next thread | 85 | // instead advance to the next event and try to yield to the next thread |
| 86 | if (Kernel::GetCurrentThread() == nullptr) { | 86 | if (Kernel::GetCurrentThread() == nullptr) { |
| 87 | LOG_TRACE(Core, "Core-{} idling", core_index); | 87 | LOG_TRACE(Core, "Core-{} idling", core_index); |
| 88 | 88 | core_timing.Idle(); | |
| 89 | if (IsMainCore()) { | 89 | core_timing.Advance(); |
| 90 | // TODO(Subv): Only let CoreTiming idle if all 4 cores are idling. | ||
| 91 | core_timing.Idle(); | ||
| 92 | core_timing.Advance(); | ||
| 93 | } | ||
| 94 | |||
| 95 | PrepareReschedule(); | 90 | PrepareReschedule(); |
| 96 | } else { | 91 | } else { |
| 97 | if (IsMainCore()) { | ||
| 98 | core_timing.Advance(); | ||
| 99 | } | ||
| 100 | |||
| 101 | if (tight_loop) { | 92 | if (tight_loop) { |
| 102 | arm_interface->Run(); | 93 | arm_interface->Run(); |
| 103 | } else { | 94 | } else { |
| 104 | arm_interface->Step(); | 95 | arm_interface->Step(); |
| 105 | } | 96 | } |
| 97 | core_timing.Advance(); | ||
| 106 | } | 98 | } |
| 107 | 99 | ||
| 108 | Reschedule(); | 100 | Reschedule(); |