NdisMSynchronizeWithInterruptEx function (ndis.h)
Miniport drivers call the NdisMSynchronizeWithInterruptEx function to synchronize the execution of a miniport driver-supplied function with the MiniportInterrupt function.
Syntax
BOOLEAN NdisMSynchronizeWithInterruptEx(
[in] NDIS_HANDLE NdisInterruptHandle,
[in] ULONG MessageId,
[in] MINIPORT_SYNCHRONIZE_INTERRUPT_HANDLER SynchronizeFunction,
[in] PVOID SynchronizeFunction,
[in] PVOID SynchronizeContext
);
Parameters
[in] NdisInterruptHandle
An interrupt handle that the miniport driver obtained in a previous call to the NdisMRegisterInterruptEx function.
[in] MessageId
A message-signaled interrupt with which the driver must synchronize. If NDIS did not grant message signaled interrupts for the driver, NDIS ignores this parameter. MessageId is an index to the IO_INTERRUPT_MESSAGE_INFO_ENTRY structures inside a IO_INTERRUPT_MESSAGE_INFO structure. NDIS passes a pointer to the associated IO_INTERRUPT_MESSAGE_INFO structure at the MessageInfoTable member when the driver successfully registers for MSI with the NdisMRegisterInterruptEx function.
[in] SynchronizeFunction
The entry point of the driver's MiniportSynchronizeInterrupt function.
[in] SynchronizeFunction
The entry point of the driver's MiniportSynchronizeInterrupt function.
[in] SynchronizeContext
A pointer to a miniport-driver-determined context area that is passed to the MiniportSynchronizeInterrupt function at SynchronizeContext .
Return value
NdisMSynchronizeWithInterruptEx returns the Boolean value that MiniportSynchronizeInterrupt returns.
Remarks
Miniport drivers that register an interrupt with NdisMRegisterInterruptEx use NdisMSynchronizeWithInterruptEx. The value that the MiniportSynchronizeInterrupt function returns is also returned by NdisMSynchronizeWithInterruptEx. This propagated value provides status to the caller.
Any miniport driver function that shares resources with any other driver function that runs at DIRQL must use NdisMSynchronizeWithInterruptEx to synchronize its access to those resources. The MiniportSynchronizeInterrupt function also runs at DIRQL, and the shared resources are protected by a system-allocated spin lock. Thus, the shared resources are protected from simultaneous access by the MiniportInterrupt function and the caller.
NdisMSynchronizeWithInterruptEx releases the system spin lock and restores the original IRQL of its caller before it returns control.
For more information about acquiring and releasing NDIS spin locks, see Synchronization and Notification in Network Drivers.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Supported in NDIS 6.0 and later. |
Target Platform | Universal |
Header | ndis.h (include Ndis.h, Video.h) |
Library | Ndis.lib |
IRQL | <= DIRQL |
DDI compliance rules | NdisMDeregisterInterruptEx(ndis) |