diff options
| author | bunnei <bunneidev@gmail.com> | 2019-03-10 17:29:01 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-10 17:29:01 -0400 |
| commit | 037d9bdde3b9137fb13817669f3d8ccb19f2c206 (patch) | |
| tree | 16058fe738265a5be0fd62671050b1704c21cb92 /src/core/core_cpu.cpp | |
| parent | 633ce9290891db20e8af6655b8233d73c778f04e (diff) | |
| parent | fad20213e6f377d75ced3c2554b4f00a46ff9263 (diff) | |
Merge pull request #2193 from lioncash/global
kernel/scheduler: Pass in system instance in constructor
Diffstat (limited to 'src/core/core_cpu.cpp')
| -rw-r--r-- | src/core/core_cpu.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/core_cpu.cpp b/src/core/core_cpu.cpp index 54aa21a3a..1eefed6d0 100644 --- a/src/core/core_cpu.cpp +++ b/src/core/core_cpu.cpp @@ -11,6 +11,7 @@ #endif #include "core/arm/exclusive_monitor.h" #include "core/arm/unicorn/arm_unicorn.h" +#include "core/core.h" #include "core/core_cpu.h" #include "core/core_timing.h" #include "core/hle/kernel/scheduler.h" @@ -49,9 +50,9 @@ bool CpuBarrier::Rendezvous() { return false; } -Cpu::Cpu(Timing::CoreTiming& core_timing, ExclusiveMonitor& exclusive_monitor, - CpuBarrier& cpu_barrier, std::size_t core_index) - : cpu_barrier{cpu_barrier}, core_timing{core_timing}, core_index{core_index} { +Cpu::Cpu(System& system, ExclusiveMonitor& exclusive_monitor, CpuBarrier& cpu_barrier, + std::size_t core_index) + : cpu_barrier{cpu_barrier}, core_timing{system.CoreTiming()}, core_index{core_index} { if (Settings::values.use_cpu_jit) { #ifdef ARCHITECTURE_x86_64 arm_interface = std::make_unique<ARM_Dynarmic>(core_timing, exclusive_monitor, core_index); @@ -63,7 +64,7 @@ Cpu::Cpu(Timing::CoreTiming& core_timing, ExclusiveMonitor& exclusive_monitor, arm_interface = std::make_unique<ARM_Unicorn>(core_timing); } - scheduler = std::make_unique<Kernel::Scheduler>(*arm_interface); + scheduler = std::make_unique<Kernel::Scheduler>(system, *arm_interface); } Cpu::~Cpu() = default; |
