NdisReleaseSpinLock macro (ndis.h)

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


void NdisReleaseSpinLock(
  [in]  _SpinLock


[in] _SpinLock

Pointer to the acquired spin lock to be released.

Return value



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.


Minimum supported client 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.
Target Platform Universal
Header ndis.h (include Ndis.h)
Library Ndis.lib
DDI compliance rules Irql_Synch_Function(ndis), SpinLock(ndis), SpinLockBalanced(ndis), SpinLockDpr(ndis), SpinLockDprRelease(ndis), SpinlockRelease(ndis)

See also