MiniportSynchronizeISR (Windows CE 5.0)
BOOLEAN MiniportSynchronizeISR( PVOID SynchronizeContext );
- [in] Points to a context area supplied when the NIC driver's MiniportXxx or internal function called NdisMSynchronizeWithInterrupt. Usually, this input parameter is a pointer to a set of shared resources at an offset within the NIC-specific MiniportAdapterContext area passed to other MiniportXxx functions.
MiniportSynchronizeISR returns a Boolean with a driver-determined meaning that is propagated to the caller of NdisMSynchronizeWithInterrupt.
If any NIC driver function shares resources, such as device registers, with the driver's MiniportISR or MiniportDisableInterrupt function, the driver function that runs, by default, at less than DIRQL cannot access those resources directly. If it attempted to access such shared resources directly, the lower priority function might be pre-empted by execution of MiniportISR or MiniportDisableInterrupt, which could change state out from under the lower priority driver function.
To synchronize access to such shared resources with MiniportISR or MiniportDisableInterrupt, lower priority driver functions must call NdisMSynchronizeWithInterrupt to have the driver's MiniportSynchronizeISR function access those shared resources at DIRQL. Calling NdisMSynchronizeWithInterrupt prevents race conditions and deadlocks in such a NIC driver, particularly in SMP machines.
Any lower priority driver functions that share resources among themselves (but not with any function that runs at DIRQL) should use a spin lock to protect those shared resources.
MiniportSynchronizeISR runs at the DIRQL assigned when the driver's MiniportInitialize function called NdisMRegisterInterrupt. Like any driver function that runs at DIRQL, MiniportSynchronizeISR should return control as quickly as possible, and it can call only those NdisXXX functions that are safe to call at any IRQL.
OS Versions: Windows CE .NET 4.0 and later.
Send Feedback on this topic to the authors