Task switching fix? but doesnt exit process gracefully

This commit is contained in:
2026-02-20 16:01:34 +01:00
parent ac7216d84a
commit 4cf4fb0dda
6 changed files with 22 additions and 11 deletions

View File

@@ -35,7 +35,7 @@ void hcf()
}
// Doing nothing (can be interrupted)
void idle() {for(;;)asm("hlt");}
void idle() {SET_INTERRUPTS; for(;;)asm("hlt");}
uint8_t kernel_stack[KERNEL_STACK_SIZE] __attribute__((aligned(16)));
@@ -110,12 +110,16 @@ void kmain()
vmm_init();
struct process_t* idle_proc = process_create("idle", (void*)idle_main, 0);
struct process_t* pedicel = process_create("pedicel", (void*)pedicel_main, 0);
process_display_list(processes_list);
scheduler_init();
current_process = idle_proc;
current_process->status = RUNNING;
SET_INTERRUPTS;
keyboard_init(FR);