mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user