Partager via


MiniportSynchronizeISR (Windows Embedded CE 6.0)

1/6/2010

MiniportSynchronizeISR is a required function for NIC driver functions that run at less than DIRQL and share resources with that driver's MiniportISR or MiniportDisableInterrupt function.

Syntax

BOOLEAN MiniportSynchronizeISR(
  PVOID SynchronizeContext 
);

Parameters

  • SynchronizeContext
    [in] Points to a context area supplied when the NIC driver's MiniportXxx or internal function called NdisMSynchronizeWithInterrupt. Usually, this input parameter is a pointer to a set of shared resources at an offset within the NIC-specific MiniportAdapterContext area passed to other MiniportXxx functions.

Return Value

MiniportSynchronizeISR returns a Boolean with a driver-determined meaning that is propagated to the caller of NdisMSynchronizeWithInterrupt.

Remarks

If any NIC driver function shares resources, such as device registers, with the driver's MiniportISR or MiniportDisableInterrupt function, the driver function that runs, by default, at less than DIRQL cannot access those resources directly. If it attempted to access such shared resources directly, the lower priority function might be pre-empted by execution of MiniportISR or MiniportDisableInterrupt, which could change state out from under the lower priority driver function.

To synchronize access to such shared resources with MiniportISR or MiniportDisableInterrupt, lower priority driver functions must call NdisMSynchronizeWithInterrupt to have the driver's MiniportSynchronizeISR function access those shared resources at DIRQL. Calling NdisMSynchronizeWithInterrupt prevents race conditions and deadlocks in such a NIC driver, particularly in SMP machines.

Any lower priority driver functions that share resources among themselves (but not with any function that runs at DIRQL) should use a spin lock to protect those shared resources.

MiniportSynchronizeISR runs at the DIRQL assigned when the driver's MiniportInitialize function called NdisMRegisterInterrupt. Like any driver function that runs at DIRQL, MiniportSynchronizeISR should return control as quickly as possible, and it can call only those NdisXXX functions that are safe to call at any IRQL.

Requirements

Header externs.h
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

NDIS Upper-Edge Functions
MiniportDisableInterrupt
MiniportInitialize
MiniportISR
NdisAllocateSpinLock
NdisMRegisterInterrupt
NdisMSynchronizeWithInterrupt