sched: set kernel_task as current task of bootstrap cpu

This commit is contained in:
2023-03-18 19:35:23 +00:00
parent 57eaf4e01c
commit 4785c767e4
3 changed files with 30 additions and 14 deletions

View File

@@ -1,5 +1,6 @@
#include <socks/object.h>
#include <socks/sched.h>
#include <socks/cpu.h>
#include <socks/printk.h>
extern kern_status_t setup_kernel_task(void);
@@ -24,7 +25,12 @@ kern_status_t sched_init(void)
if (status != KERN_OK) {
return status;
}
cpu_data_t *this_cpu = get_this_cpu();
runqueue_init(&this_cpu->c_rq);
this_cpu->c_current_task = kernel_task();
put_cpu(this_cpu);
printk("sched: initialised");
return status;
}