NdisMSynchronizeWithInterruptEx function

Miniport drivers call the NdisMSynchronizeWithInterruptEx function to synchronize the execution of a miniport driver-supplied function with the MiniportInterrupt function.

Syntax

BOOLEAN NdisMSynchronizeWithInterruptEx(
  NDIS_HANDLE                            NdisInterruptHandle,
  ULONG                                  MessageId,
  MINIPORT_SYNCHRONIZE_INTERRUPT_HANDLER SynchronizeFunction,
  PVOID                                  SynchronizeFunction,
  PVOID                                  SynchronizeContext
);

Parameters

NdisInterruptHandle

An interrupt handle that the miniport driver obtained in a previous call to the NdisMRegisterInterruptEx function.

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.

SynchronizeFunction

The entry point of the driver's MiniportSynchronizeInterrupt function.

SynchronizeFunction

The entry point of the driver's MiniportSynchronizeInterrupt function.

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

   
Windows version 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

See Also

IO_INTERRUPT_MESSAGE_INFO

IO_INTERRUPT_MESSAGE_INFO_ENTRY

MiniportInterrupt

MiniportSynchronizeInterrupt

NdisMRegisterInterruptEx