다음을 통해 공유


Handling Nested Interrupts (Windows CE 5.0)

Send Feedback

To prevent the loss and delay of high-priority interrupts, the Windows CE kernel uses nested interrupts. Nested interrupts allow interrupt requests (IRQs) of a higher priority to preempt IRQs of a lower priority. Nested interrupts are allowed in conjunction with the Real-Time Priority System. ISRs of a higher priority might preempt ISRs of a lower priority.

The following steps show how Windows CE handles nested ISR calls:

  1. The kernel disables all other IRQs with the same or lower priority as the IRQ that invoked the current ISR call.

  2. If a higher-priority IRQ arrives before the current ISR completes processing, the kernel saves the current ISR state.

    The state includes only those registers that are supported for use in an ISR.

  3. The kernel calls the higher-priority ISR to handle the new request.

  4. The kernel loads the original ISR's state and continues processing.

The kernel handles the details of saving an ISR's state when a higher priority interrupt occurs and restoring it after the high priority ISR has completed. In most cases, a preempted ISR does not detect that it has been preempted. The level of interrupt nesting is limited solely by what the hardware platform can support.

An ISR that uses too much time can cause other interrupts to be missed entirely, resulting in erratic or sluggish performance of the whole system. By separating interrupt processing into a very short ISR and a longer interrup service thread (IST), interrupts can be masked for as little time as possible. ISRs only mask interrupts of equal or lower priority than themselves.Windows CE can nest as many ISRs as the hardware platform supports. Other than a possible delay in completion, an ISR is not affected by an interrupt.

See Also

Defining an Interrupt Identifier | Implementing an ISR | Loader | PCI Bus Driver | Real-Time Priority System

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.