kernel/scheduler: Take ARM_Interface instance by reference in the constructor

It doesn't make sense to allow a scheduler to be constructed around a
null pointer.
This commit is contained in:
Lioncash 2018-09-25 16:00:14 -04:00
parent 93fea4e179
commit a58eefa7e4
3 changed files with 10 additions and 10 deletions

View file

@ -64,7 +64,7 @@ Cpu::Cpu(std::shared_ptr<ExclusiveMonitor> exclusive_monitor,
arm_interface = std::make_shared<ARM_Unicorn>();
}
scheduler = std::make_shared<Kernel::Scheduler>(arm_interface.get());
scheduler = std::make_shared<Kernel::Scheduler>(*arm_interface);
}
Cpu::~Cpu() = default;