Поделиться через


NdisMSynchronizeWithInterruptEx (Compact 2013)

3/26/2014

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

Syntax

BOOLEAN
  NdisMSynchronizeWithInterruptEx(
    IN NDIS_HANDLE  NdisInterruptHandle,
    IN ULONG  MessageId,
    IN PVOID  SynchronizeFunction,
    IN 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.
  • 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. Therefore, the shared resources are protected from concurrent 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 obtaining and releasing NDIS spin locks, see Synchronization and Notification in Network Drivers.

Requirements

Header

ndis.h

See Also

Reference

NDIS Functions for Interrupts
NdisMRegisterInterruptEx