Almost finished scheduler, switched to circular linked list

This commit is contained in:
ssimnb 2026-02-09 06:33:12 +01:00
parent edfbfdad14
commit 4c7ecb4012
10 changed files with 124 additions and 89 deletions

View file

@ -65,8 +65,6 @@ void ap_init(struct limine_smp_info *smp_info){
memset(cpu_struct, 0, sizeof(cpu_state));
cpu_struct->lapic_id = smp_info->lapic_id;
cpu_struct->scheduler_context = (context*)kmalloc(sizeof(context));
wrmsr(KERNELGSBASE, (uint64_t)cpu_struct);
wrmsr(GSBASE, (uint64_t)cpu_struct);
@ -102,7 +100,7 @@ void smp_init(){
cpu_state *cpu_struct = (cpu_state*)kmalloc(sizeof(cpu_state));
cpu_struct->lapic_id = smp_response->cpus[0]->lapic_id;
cpu_struct->scheduler_context = (context*)kmalloc(sizeof(context));
cpu_struct->scheduler_context = (struct context*)kmalloc(sizeof(struct context));
wrmsr(KERNELGSBASE, (uint64_t)cpu_struct);
wrmsr(GSBASE, (uint64_t)cpu_struct);