.. include:: OS Primitives: Interrupt Handling ================================= .. topic:: Documentation * :doc:`../why-os/interrupts` * Zephyr: Interrupt Service Routine APIs `__ IRQs And ISRs ------------- * Interrupt service routine (ISR): callback ``void(int irqnum)`` * Attached to an Interrupt request (IRQ) ``irqnum`` * Called *asynchronously* (run at the most inopportune time) * IRQ should safely be considered parallel (though varies per architecture) .. literalinclude:: code/isrdemo.cpp :caption: :download:`code/isrdemo.cpp` :language: c++ .. code-block:: console :caption: In ``why-shell`` > irq 2 seeing interrupt #2 >