diff options
| author | Lioncash <mathew1800@gmail.com> | 2019-03-04 16:02:59 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2019-03-04 17:01:37 -0500 |
| commit | fad20213e6f377d75ced3c2554b4f00a46ff9263 (patch) | |
| tree | 8911a6765d4549836fec1e5b06c64b5e94f4860d /src/core/cpu_core_manager.cpp | |
| parent | 07e13d6728868e5cb91615bec3aa6dfe9ec62b7b (diff) | |
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.
Diffstat (limited to 'src/core/cpu_core_manager.cpp')
| -rw-r--r-- | src/core/cpu_core_manager.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/cpu_core_manager.cpp b/src/core/cpu_core_manager.cpp index 2ddb3610d..93bc5619c 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<Cpu>(system.CoreTiming(), *exclusive_monitor, *barrier, index); + cores[index] = std::make_unique<Cpu>(system, *exclusive_monitor, *barrier, index); } // Create threads for CPU cores 1-3, and build thread_to_cpu map |
