SLEEP_LOCKOWNED(D3DK) —
NAME
SLEEP_LOCKOWNED − query whether a sleep lock is held by the caller .IX \f4SLEEP_LOCKOWNED\fP(D3DK)
SYNOPSIS
#include <sys/types.h>
#include <sys/ksynch.h>
bool_t SLEEP_LOCKOWNED(sleep_t ∗lockp);
ARGUMENTS
lockpPointer to the sleep lock to be queried.
DESCRIPTION
SLEEP_LOCKOWNED returns an indication of whether the sleep lock specified by lockp is currently held by the calling context. SLEEP_LOCKOWNED is intended for use only within ASSERT expressions [see ASSERT(D3DK)] and other code that is conditionally compiled under the DEBUG compilation option. The SLEEP_LOCKOWNED function is only defined under the DEBUG compilation option, and therefore calls to SLEEP_LOCKOWNED will not compile when DEBUG is not defined.
RETURN VALUE
SLEEP_LOCKOWNED returns TRUE (a non-zero value) if the lock is currently held by the calling context or FALSE (zero) if the lock is not currently held by the calling context.
LEVEL
Base Level Only.
NOTES
Does not sleep.
Driver defined basic locks, read/write locks, and sleep locks may be held across calls to this function.
SEE ALSO
SLEEP_ALLOC(D3DK), SLEEP_DEALLOC(D3DK), SLEEP_LOCK(D3DK), SLEEP_LOCK_SIG(D3DK), SLEEP_LOCKAVAIL(D3DK), SLEEP_TRYLOCK(D3DK), SLEEP_UNLOCK(D3DK)
DDI/DKI (DEBUG)