Nested interrupts

Updated: April 19, 2023

The QNX Neutrino RTOS fully supports nested interrupts.

The previous scenarios describe the simplest—and most common—situation where only one interrupt occurs. Worst-case timing considerations for unmasked interrupts must take into account the time for all interrupts currently being processed, because a higher priority, unmasked interrupt will preempt an existing interrupt.

In the following diagram, Thread A is running. Interrupt IRQx causes interrupt handler Intx to run, which is preempted by IRQy and its handler Inty. Inty returns an event causing Thread B to run; Intx returns an event causing Thread C to run. Thread A resumes running only after the threads triggered by the events returned by both interrupt handlers have run.



Figure 1. Stacked interrupts.