BOOLEAN
NdisMSynchronizeWithInterrupt(
IN PNDIS_MINIPORT_INTERRUPT Interrupt,
IN PVOID SynchronizeFunction,
IN PVOID SynchronizeContext
);
NdisMSynchronizeWithInterrupt synchronizes execution of a miniport-supplied function with the MiniportISR or MiniportDisableInterrupt function.
Parameters
Interrupt
Points to the caller-supplied storage for the interrupt object initialized with NdisMRegisterInterrupt.
SynchronizeFunction
Specifies the entry point of the driver’s MiniportSynchronizeISR function.
SynchronizeContext
Points to miniport-determined context area to be passed to the MiniportSynchronizeISR function when it is called.
Return Value
NdisMSynchronizeWithInterrupt returns the Boolean value returned by MiniportSynchronizeISR.
Comments
The value returned by MiniportSynchronizeISR is also returned by NdisMSynchronizeWithInterrupt. This propagated value can be used to provide a status to the caller.
Any miniport function that shares resources with any other driver function that runs at DIRQL must use NdisMSynchronizeWithInterrupt to synchronize its access to those resources. The MiniportSynchronizeISR function also runs at DIRQL, and the shared resources are protected by a system-allocated spin lock on multiprocessor platforms. Thus, the shared resources are protected from simultaneous access by the MiniportISR or MiniportDisableInterrupt function and the caller whenever the driver is running on a multiprocessor machine.
NdisMSynchronizeWithInterrupt releases the system spin lock and restores the orginal IRQL of its caller before it returns control.
Callers of NdisMSynchronizeWithInterrupt run at IRQL <= DIRQL.
See Also
MiniportDisableInterrupt, MiniportISR, MiniportSynchronizeISR, NdisMDeregisterInterrupt, NdisMRegisterInterrupt