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

@@ -197,17 +197,17 @@ struct cpu_status_t* interrupt_dispatch(struct cpu_status_t* context)
case 32: // Timer Interrupt
ticks++;
// Send an EOI so that we can continue having interrupts
outb(0x20, 0x20);
if (ticks % SCHEDULER_QUANTUM == 0)
{
CLEAR_INTERRUPTS;
struct cpu_status_t* current_ctx = scheduler_schedule(context);
process_switch(current_ctx->iret_rsp, current_ctx->iret_rip);
SET_INTERRUPTS;
return scheduler_schedule(context);
//struct cpu_status_t* current_ctx = scheduler_schedule(context);
//process_switch(current_ctx->iret_rsp, current_ctx->iret_rip);
//SET_INTERRUPTS;
}
// Send an EOI so that we can continue having interrupts
outb(0x20, 0x20);
break;
case 33: