NdisDprAcquireSpinLock acquires a spin lock so the caller can synchronize access to resources shared among non-ISR driver functions.
However, because Windows CE does not support DPC IRQL, all NdisDprXXX functions perform identically to the non-DPR equivalent.
VOID NdisDprAcquireSpinLock( PNDIS_SPIN_LOCK SpinLock );
[in]Pointer to an opaque spin lock, already initialized by the caller.
The NIC driver must initialize a variable of type NDIS_SPIN_LOCK with NdisAllocateSpinLock before it calls any other NdisXXXSpinLock function. The driver must provide resident storage for the spin lock(s) it uses.
After acquiring a spin lock with NdisDprAcquireSpinLock, the caller must release that lock with a call to NdisDprReleaseSpinLock. In addition, following each call to NdisDprAcquireSpinLock, a NIC driver must call NdisDprReleaseSpinLock. Otherwise, a deadlock occurs, hanging the driver.
A driver should never hold a spin lock for an extended period (more than a few instructions). Holding a spin lock for longer than 25 microseconds degrades both system and driver performance.
Note A spin lock acquired with NdisDprAcquireSpinLock must be released with NdisDprReleaseSpinLock. A spin lock acquired with NdisAcquireSpinLock must be released with NdisReleaseSpinLock.
OS Versions: Windows CE .NET 4.0 and later.
Last updated on Tuesday, May 18, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.