irq: Add irq_tasks, move NVMe to it

This commit is contained in:
2026-10-30 00:21:36 +01:00
parent 49c454dd97
commit 829490f8c8
7 changed files with 107 additions and 55 deletions
+6 -5
View File
@@ -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);
}
}