sched: add kernel-mode context switching
This commit is contained in:
@@ -96,7 +96,7 @@ static void gpf_handler(struct cpu_context *regs)
|
||||
|
||||
static void pf_handler(struct cpu_context *regs)
|
||||
{
|
||||
printk("page fault (%016llx %016llx)", pf_faultptr(), regs->rip);
|
||||
printk("page fault (%016llx %016llx %016llx)", pf_faultptr(), regs->rip, regs->err_no);
|
||||
ml_halt_cpu();
|
||||
}
|
||||
|
||||
@@ -241,6 +241,10 @@ void irq_dispatch(struct cpu_context *regs)
|
||||
hook->irq_callback();
|
||||
}
|
||||
|
||||
if (need_resched()) {
|
||||
schedule();
|
||||
}
|
||||
|
||||
start_charge_period();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user