Expand Minimize

NdisMSynchronizeWithInterrupt function

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

NdisMSynchronizeWithInterrupt synchronizes execution of a miniport driver-supplied function with the MiniportISR or MiniportDisableInterrupt function.

Syntax


BOOLEAN NdisMSynchronizeWithInterrupt(
  _In_  PNDIS_MINIPORT_INTERRUPT Interrupt,
  _In_  PVOID                    SynchronizeFunction,
  _In_  PVOID                    SynchronizeContext
);

Parameters

Interrupt [in]

Pointer to the caller-supplied storage for the interrupt object initialized with NdisMRegisterInterrupt.

SynchronizeFunction [in]

Specifies the entry point of the driver's MiniportSynchronizeISR function.

SynchronizeContext [in]

Pointer to miniport driver-determined context area to be passed to the MiniportSynchronizeISR function when it is called.

Return value

NdisMSynchronizeWithInterrupt returns the Boolean value returned by MiniportSynchronizeISR.

Remarks

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 driver 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.

For more information about acquiring and releasing NDIS spin locks, see Synchronization and Notification (NDIS 5.1).

Requirements

Target platform

Universal

Version

Not supported for NDIS 6.0 drivers in Windows Vista. Use NdisMSynchronizeWithInterruptExinstead. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP.

Header

Ndis.h (include Ndis.h)

IRQL

<= DIRQL

See also

MiniportDisableInterrupt
MiniportISR
MiniportSynchronizeISR
NdisMDeregisterInterrupt
NdisMRegisterInterrupt

 

 

Send comments about this topic to Microsoft

顯示:
© 2015 Microsoft