From 38dd80f70f6efaf43ca2c91671644c167752438b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 4 Mar 2019 16:02:59 -0500 Subject: kernel/scheduler: Pass in system instance in constructor Avoids directly relying on the global system instance and instead makes an arbitrary system instance an explicit dependency on construction. This also allows removing dependencies on some global accessor functions as well. --- src/core/cpu_core_manager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core/cpu_core_manager.cpp') diff --git a/src/core/cpu_core_manager.cpp b/src/core/cpu_core_manager.cpp index 2ddb3610d2..93bc5619c8 100644 --- a/src/core/cpu_core_manager.cpp +++ b/src/core/cpu_core_manager.cpp @@ -27,8 +27,7 @@ void CpuCoreManager::Initialize(System& system) { exclusive_monitor = Cpu::MakeExclusiveMonitor(cores.size()); for (std::size_t index = 0; index < cores.size(); ++index) { - cores[index] = - std::make_unique(system.CoreTiming(), *exclusive_monitor, *barrier, index); + cores[index] = std::make_unique(system, *exclusive_monitor, *barrier, index); } // Create threads for CPU cores 1-3, and build thread_to_cpu map -- cgit v1.2.3