展开 最小化

KeTestSpinLock routine

The KeTestSpinLock routine tests for the availability of a spin lock.

Syntax


BOOLEAN KeTestSpinLock(
  _In_  PKSPIN_LOCK SpinLock
);

Parameters

SpinLock [in]

A pointer to a spin lock. The spin lock must have been initialized by calling KeInitializeSpinLock.

Return value

KeTestSpinLock returns FALSE if the spin lock is currently being held. Otherwise, it returns TRUE.

Remarks

This routine enables the caller that is running at a low IRQL to test the spin lock. If KeTestSpinLock returns TRUE, the caller can try to acquire the spin lock with a high probability of immediate success.

This routine neither raises nor lowers the IRQL, and it never acquires the spin lock.

For more information about spin locks, see Spin Locks.

Requirements

Version

Available in Windows Server 2003 and later versions of Windows.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

Ntoskrnl.lib

IRQL

See Remarks section.

DDI compliance rules

HwStorPortProhibitedDDIs

See also

KeAcquireSpinLock
KeInitializeSpinLock
KeReleaseSpinLock

 

 

Send comments about this topic to Microsoft

显示:
© 2014 Microsoft