MacDeferredProcessingRoutine

VOID
    MacDeferredProcessingRoutine(
        IN PVOID  SystemSpecific1,
        IN PVOID  InterruptContext,
        IN PVOID  SystemSpecific2,
        IN PVOID  SystemSpecific3
        );

MacDeferredProcessingRoutine is called to complete interrupt processing that the driver’s MacInterruptServiceRoutine, which should return control as quickly as possible, does not.

Parameters

SystemSpecific1
Points to a first OS-specific value. In Windows NT drivers, this pointer is reserved for use by NDIS.
InterruptContext
Points to the context that the NIC driver associates with the adapter that generated the interrupt. The NIC driver provided this context area (MacAdapterContext) when it called NdisInitializeInterrupt during initialization.
SystemSpecific2
Points to a second OS-specific value. In Windows NT drivers, this pointer is reserved.
SystemSpecific3
Points to a third OS-specific value. In Windows NT drivers, this pointer is reserved.

Comments

MacDeferredProcessingRoutine runs at a lower hardware priority than MacInterruptServiceRoutine and typically executes immediately after the ISR returns control.

MacDeferredProcessingRoutine does all the work of interrupt handling except for determining whether the interrupt belongs to the network interface card and, if necessary, saving enough interrupt state information for the driver’s MacDeferredProcessingRoutine to complete the operation that caused the interrupt. Because it runs at DIRQL, the MacInterruptServiceRoutine handles only the minimum necessary operations before it returns control.

MacDeferredProcessingRoutine must be able to handle processing for any number of NIC interrupts unless the NIC driver’s MacInterruptServiceRoutine disables interrupts on the NIC. In such a driver, MacDeferredProcessingRoutine clears the state of the network interface card and re-enables interrupts, handling only the most recent device interrupt.

If MacDeferredProcessingRoutine shares resources, such as state, with other nonISR driver functions, it can call NdisDprAcquireSpinLock and NdisDprReleaseSpinLock to synchronize its access to the shared resources. Like any other driver function that shares resources with the ISR, MacDeferredProcessingRoutine must call NdisSynchronizeWithInterrupt when it needs to access resources shared with MacInterruptServiceRoutine.

MacDeferredProcessingRoutine runs at IRQL DISPATCH_LEVEL.

See Also

MacAddAdapter, MacInterruptServiceRoutine, MacSynchronizeFunction, MiniportHandleInterrupt, NdisDprAcquireSpinLock, NdisDprReleaseSpinLock, NdisInitializeInterrupt, NdisRegisterAdapter, NdisSynchronizeWithInterrupt