diff options
author | bunnei <bunneidev@gmail.com> | 2019-10-15 11:48:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-15 11:48:30 -0400 |
commit | cab2619aeb111bd6c5dbcc5adc0d2e8154a1e8fc (patch) | |
tree | 1664df6e9abff74f37adee0c90ae3c9eaff6babf /src/core/core_cpu.cpp | |
parent | 0378babd1506066b8a865476c569407a21601dd7 (diff) | |
parent | a4ae11d63e83323c30e07f3eef1cc7e7829df6df (diff) |
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 21c410e342..6bd9639c6e 100644 --- a/src/core/core_cpu.cpp +++ b/src/core/core_cpu.cpp @@ -85,24 +85,16 @@ void Cpu::RunLoop(bool tight_loop) { // instead advance to the next event and try to yield to the next thread if (Kernel::GetCurrentThread() == nullptr) { LOG_TRACE(Core, "Core-{} idling", core_index); - - if (IsMainCore()) { - // TODO(Subv): Only let CoreTiming idle if all 4 cores are idling. - core_timing.Idle(); - core_timing.Advance(); - } - + core_timing.Idle(); + core_timing.Advance(); PrepareReschedule(); } else { - if (IsMainCore()) { - core_timing.Advance(); - } - if (tight_loop) { arm_interface->Run(); } else { arm_interface->Step(); } + core_timing.Advance(); } Reschedule(); |