SVR5
SLEEP_LOCKOWNED(D3)
SLEEP_LOCKOWNED --
query whether a sleep lock is held by the caller
Synopsis
#include <sys/types.h>
#include <sys/ksynch.h>
#include <sys/ddi.h>
bool_t SLEEP_LOCKOWNED(sleep_t *lockp);
Description
SLEEP_LOCKOWNED returns an indication of whether the sleep lock
specified by lockp is currently held by the calling context.
Arguments
lockp-
Pointer to the sleep lock to be queried.
Return values
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.
Usage
SLEEP_LOCKOWNED is intended for use only within ASSERT
expressions [see
ASSERT(D3)]
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.
Context and synchronization
Non-blockable, user or blockable
context.
Hardware applicability
All
Version applicability
ddi:
5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp
References
SLEEP_ALLOC(D3),
SLEEP_DEALLOC(D3),
SLEEP_LOCK(D3),
SLEEP_LOCK_SIG(D3),
SLEEP_LOCKAVAIL(D3),
SLEEP_TRYLOCK(D3),
SLEEP_UNLOCK(D3)
``Sleep locks'' in HDK Technical Reference
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005