NdisReleaseSpinLock function

The NdisReleaseSpinLock function releases a spin lock that was acquired in a preceding call to the NdisAcquireSpinLock function.

Syntax


VOID NdisReleaseSpinLock(
  _In_  PNDIS_SPIN_LOCK SpinLock
);

Parameters

SpinLock [in]

Pointer to the acquired spin lock to be released.

Return value

None

Remarks

A driver must initialize its spin lock with NdisAllocateSpinLock before it calls any other Ndis..SpinLock function to access the resources protected by that spin lock.

A driver must call NdisAcquireSpinLock to acquire the spin lock before it can call NdisReleaseSpinLock. Each call to NdisAcquireSpinLock requires a reciprocal call to NdisReleaseSpinLock before the driver can call NdisAcquireSpinLock again.

NdisReleaseSpinLock restores the original IRQL at which its caller was running before the call to NdisAcquireSpinLock.

Any spin lock acquired with NdisAcquireSpinLock must be released with NdisReleaseSpinLock. Any spin lock acquired with NdisDprAcquireSpinLock must be released with NdisDprReleaseSpinLock.

For more information about acquiring and releasing NDIS spin locks, see Synchronization and Notification in Network Drivers.

Requirements

Version

Supported for NDIS 6.0 and NDIS 5.1 drivers (see NdisReleaseSpinLock (NDIS 5.1)) in Windows Vista. Supported for NDIS 5.1 drivers (see NdisReleaseSpinLock (NDIS 5.1)) in Windows XP.

Header

Ndis.h (include Ndis.h)

IRQL

DISPATCH_LEVEL

DDI compliance rules

Irql_Synch_Function, SpinLock, SpinLockBalanced, SpinLockDpr, SpinLockDprRelease, SpinlockRelease

See also

NdisAcquireSpinLock
NdisAllocateSpinLock
NdisDprAcquireSpinLock

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft