[][src]Macro sunrise_kernel::irq_handler

macro_rules! irq_handler {
    ( $($irq_nbr:expr, $handler_name:ident, $asm_wrapper_name:ident, $rust_wrapper_name:ident ; )* ) => { ... };
}

Generates irq handlers.

For each irq number it is given, this macro will generate an irq handler that:

  1. acknowledges the irq
  2. dispatches the event for this irq line

It uses generate_trap_gate_handler internally to generate the asm and low-level rust wrappers. You must give it an ident for both of those functions that will be passed on to generate_trap_gate_handler, and a third for the name of the generated irq handler function.

This macro will also generate the IRQ_HANDLERS array and fill it with function pointers to the raw asm handlers for each irq, so you can easily copy it into the IDT.