irq: Add irq_tasks, move NVMe to it
This commit is contained in:
+6
-5
@@ -103,12 +103,10 @@ void interrupt_handler(struct arch_context* ctx) {
|
||||
break;
|
||||
case IDT_TIMER:
|
||||
lapic_eoi(&arch_cpu->lapic);
|
||||
arch_sched_preempt_disable();
|
||||
timer_interrupt();
|
||||
if (cpu->sched.need_resched) {
|
||||
arch_sched_preempt_disable();
|
||||
if (arch_sched_preempt_enable())
|
||||
sched_reschedule(&cpu->sched);
|
||||
}
|
||||
if (arch_sched_preempt_enable() && (cpu->sched.need_resched || cpu->sched.owe_preempt))
|
||||
sched_reschedule(&cpu->sched);
|
||||
break;
|
||||
default:
|
||||
if (isr < 0x20)
|
||||
@@ -116,7 +114,10 @@ void interrupt_handler(struct arch_context* ctx) {
|
||||
assert(isr - 0x20 < ARRAY_SIZE(arch_cpu->irq_lines), "Unhandled interrupt on ISR %lu", isr);
|
||||
struct irq_line* line = arch_cpu->irq_lines[isr - 0x20];
|
||||
assert(line, "Unhandled interrupt on ISR %lu", isr);
|
||||
arch_sched_preempt_disable();
|
||||
irq_line_raise(line);
|
||||
if (arch_sched_preempt_enable() && cpu->sched.owe_preempt)
|
||||
sched_reschedule(&cpu->sched);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user