Ivthandleinterrupt
ivthandleinterrupt(vector, stacked_frame):
save_cpu_state()
if vector invalid: goto end
irq_info = lookup(vector)
source = detect_source(irq_info)
handler = irq_info.handler
if handler:
handled = handler(stacked_frame, irq_info.dev)
if not handled and irq_info.chained_handlers:
try chained handlers
if handler requested deferred_work:
schedule_deferred_work(irq_info.work)
send_eoi_to_controller(irq_info.controller)
end:
restore_cpu_state()
return_from_interrupt()
If you want platform-specific code (x86_64 assembly + C wrapper, or ARM Cortex-M C example), specify target architecture and calling convention and I will provide a compact sample.
You’ll most likely encounter ivthandleinterrupt in: ivthandleinterrupt
Example panic log snippet:
Panic(CPU 2): Unhandled interrupt (IRQ 42)
Backtrace: ivthandleinterrupt -> interrupt_processor_dispatch -> kernel_trap