BOOLEAN
MacInterruptServiceRoutine(
IN PVOID InterruptContext
);
MacInterruptServiceRoutine is a full-NIC driver’s ISR, called when the NIC generates an interrupt.
MacInterruptServiceRoutine returns TRUE if its NIC generated the interrupt. TRUE also tells NDIS to queue a call to MacDeferredProcessingRoutine, so drivers of NICs that do not share IRQs always return TRUE from their ISRs.
If the driver called NdisInitializeInterrupt with the InterruptMode set to NdisInterruptLevelSensitive, its MacInterruptServiceRoutine must dismiss the interrupt on the NIC before it returns control. Otherwise, the interrupt remains active, and NDIS calls MacInterruptServiceRoutine repeatedly until the interrupt is dismissed on the NIC.
If the NIC shares an IRQ with other devices, MacInterruptServiceRoutine first determines whether its NIC generated the interrupt and returns FALSE immediately if another device generated the interrupt. Otherwise, MacInterruptServiceRoutine preserves enough state about the operation that caused the interrupt for the driver’s MacDeferredProcessingRoutine to complete the operation.
Because it runs at DIRQL, MacInterruptServiceRoutine can preempt any code that runs at lower IRQL, including most functions in the NDIS library and in the NIC driver itself. If a NIC interrupt can occur while a nonISR NIC driver function is accessing resources that MacInterruptServiceRoutine also could access if an interrupt occurs, the nonISR function must call NdisSynchronizeWithInterrupt to synchronize its access with the ISR.
MacInterruptServiceRoutine runs at DIRQL, which is > DISPATCH_LEVEL.
MacAddAdapter, MacDeferredProcessingRoutine, MacSynchronizeFunction, MiniportISR, NdisAcquireSpinLock, NdisInitializeInterrupt, NdisReleaseSpinLock, NdisSynchronizeWithInterrupt