diff options
Diffstat (limited to 'src/core/core_cpu.cpp')
| -rw-r--r-- | src/core/core_cpu.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/core_cpu.cpp b/src/core/core_cpu.cpp index 265f8ed9c..928262c9b 100644 --- a/src/core/core_cpu.cpp +++ b/src/core/core_cpu.cpp | |||
| @@ -49,10 +49,9 @@ bool CpuBarrier::Rendezvous() { | |||
| 49 | return false; | 49 | return false; |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | Cpu::Cpu(std::shared_ptr<ExclusiveMonitor> exclusive_monitor, | 52 | Cpu::Cpu(std::shared_ptr<ExclusiveMonitor> exclusive_monitor, CpuBarrier& cpu_barrier, |
| 53 | std::shared_ptr<CpuBarrier> cpu_barrier, std::size_t core_index) | 53 | std::size_t core_index) |
| 54 | : cpu_barrier{std::move(cpu_barrier)}, core_index{core_index} { | 54 | : cpu_barrier{cpu_barrier}, core_index{core_index} { |
| 55 | |||
| 56 | if (Settings::values.use_cpu_jit) { | 55 | if (Settings::values.use_cpu_jit) { |
| 57 | #ifdef ARCHITECTURE_x86_64 | 56 | #ifdef ARCHITECTURE_x86_64 |
| 58 | arm_interface = std::make_unique<ARM_Dynarmic>(exclusive_monitor, core_index); | 57 | arm_interface = std::make_unique<ARM_Dynarmic>(exclusive_monitor, core_index); |
| @@ -83,7 +82,7 @@ std::shared_ptr<ExclusiveMonitor> Cpu::MakeExclusiveMonitor(std::size_t num_core | |||
| 83 | 82 | ||
| 84 | void Cpu::RunLoop(bool tight_loop) { | 83 | void Cpu::RunLoop(bool tight_loop) { |
| 85 | // Wait for all other CPU cores to complete the previous slice, such that they run in lock-step | 84 | // Wait for all other CPU cores to complete the previous slice, such that they run in lock-step |
| 86 | if (!cpu_barrier->Rendezvous()) { | 85 | if (!cpu_barrier.Rendezvous()) { |
| 87 | // If rendezvous failed, session has been killed | 86 | // If rendezvous failed, session has been killed |
| 88 | return; | 87 | return; |
| 89 | } | 88 | } |