NdisSynchronizeWithInterrupt

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.

Parameters

Interrupt

Points to the interrupt object associated with the caller's MacInterruptServiceRoutine.

SynchronizeFunction

Points to the caller-supplied MacSynchronizeFunction.

SynchronizeContext

Points to the context that the NIC driver associates with the synchronization.

Return Value

NdisSynchronizeWithInterrupt propagates the Boolean value returned by the MacSynchronizeFunction.

Comments

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.

See Also

MacInterruptServiceRoutine, MacSynchronizeFunction, NdisInitializeInterrupt