8.1  ISR Requirements

Every NT driver of a physical device that generates interrupts must have an ISR.

An ISR is run at DIRQL, in particular at the SynchronizeIrql level that was specified when the device driver registered its ISR with IoConnectInterrupt. When an NT device driver’s ISR runs, every interrupt with an equivalent or lower IRQL value is masked off on the current processor.

However, another device with a higher system-assigned DIRQL can interrupt or a high-IRQL system interrupt can occur at any time in a Windows NT® machine.

NT device driver writers should keep in mind the following fact:

An NT device driver’s ISR is interruptible.

Because an NT driver’s ISR runs at a relatively high, system-assigned DIRQL, thereby masking off interrupts with an equivalent or lower IRQL on the current processor, an ISR should return control as quickly as possible.

Running an ISR at DIRQL restricts the set of support routines the ISR can call. For more information about managing IRQLs, see Chapter 16. For specific information about the IRQL(s) at which any particular support routine can be called, see the Kernel-mode Driver Reference.