mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 11:05:46 +00:00
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.
This commit is contained in:
parent
48a356ee91
commit
38dd80f70f
5 changed files with 23 additions and 17 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue