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

@ -19,7 +19,7 @@ namespace Kernel {
class Scheduler final {
public:
explicit Scheduler(Core::ARM_Interface* cpu_core);
explicit Scheduler(Core::ARM_Interface& cpu_core);
~Scheduler();
/// Returns whether there are any threads that are ready to run.
@ -72,7 +72,7 @@ private:
SharedPtr<Thread> current_thread = nullptr;
Core::ARM_Interface* cpu_core;
Core::ARM_Interface& cpu_core;
static std::mutex scheduler_mutex;
};