BOOLEAN
NdisSynchronizeWithInterrupt(
IN PNDIS_INTERRUPT Interrupt,
IN PVOID SynchronizeFunction,
IN PVOID SynchronizeContext
);
NdisSynchronizeWithInterrupt synchronizes access to data the ISR (MacInterruptServiceRoutine) shares with nonISR functions in the NIC driver.
NdisSynchronizeWithInterrupt propagates the Boolean value returned by the MacSynchronizeFunction.
NdisSynchronizeWithInterrupt is called by any NIC driver function except its ISR and MacSynchronizeFunction.
NdisSynchronizeWithInterrupt raises IRQL to the DIRQL of the ISR and runs the caller-supplied MacSynchronizeFunction at DIRQL. This prevents the ISR from accessing the shared data while the MacSynchronizeFunction touches the data. When its data access is complete, NdisSynchronizeWithInterrupt returns the same Boolean value that MacSynchronizeFunction returns and restores the original IRQL.
Callers of NdisSynchronizeWithInterrupt can be running at IRQL <= DIRQL, but calls to this function almost never occur in a driver’s ISR.
MacInterruptServiceRoutine, MacSynchronizeFunction, NdisInitializeInterrupt