[kernel] Don't double-construct the scheduler

The scheduler singleton was getting constructed twice, once at static
time and then again in main(). Make the singleton a pointer so we only
construct it once.
This commit is contained in:
2020-08-02 18:11:09 -07:00
parent cf582c4ce4
commit e1b1b5d357
3 changed files with 7 additions and 4 deletions

View File

@@ -174,7 +174,7 @@ kernel_main(args::header *header)
devices.init_drivers();
syscall_enable();
scheduler *sched = new (&scheduler::get()) scheduler(devices.get_lapic());
scheduler *sched = new scheduler(devices.get_lapic());
sched->create_kernel_task(logger_task, scheduler::max_priority-1, true);