forked from xamidev/pepperOS
Task switching fix? but doesnt exit process gracefully
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user