KeAcquireSpinLockAtDpcLevel - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdm.h

VOID KeAcquireSpinLockAtDpcLevel(
  [in, out] PKSPIN_LOCK SpinLock
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdm-keacquirespinlockatdpclevel)

Description

The KeAcquireSpinLockAtDpcLevel routine acquires a spin lock when the caller is already running at IRQL >= DISPATCH_LEVEL.

Parameters

SpinLock [in, out]

Pointer to an initialized KSPIN_LOCK spin lock for which the caller must provide the storage. The spin lock must be from non-paged pool.

Remarks

Drivers call KeAcquireSpinLockAtDpcLevel instead of KeAcquireSpinLock for better driver performance if and only if they are already running at an IRQL of DISPATCH_LEVEL or above.

If a driver is running at IRQL <= APC_LEVEL, it should call KeAcquireSpinLock to have IRQL raised by that routine. KeAcquireSpinLockAtDpcLevel assumes the caller is already running at IRQL >= DISPATCH_LEVEL, so no raise is necessary.

The caller should release the spin lock with KeReleaseSpinLockFromDpcLevel as quickly as possible.

For more information about spin locks, see Spin Locks.

See also

KeAcquireInStackQueuedSpinLockAtDpcLevel

KeAcquireSpinLock

KeInitializeSpinLock

KeReleaseSpinLock

KeReleaseSpinLockFromDpcLevel

KeTryToAcquireSpinLockAtDpcLevel