SLEEP_LOCKOWNED(D3) SLEEP_LOCKOWNED(D3)
NAME
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);
Arguments
lockp Pointer 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.
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.
Level
Base only.
Synchronization Constraints
Does not sleep.
Driver-defined basic locks, read/write locks, and sleep locks
may be held across calls to this function.
REFERENCES
SLEEP_ALLOC(D3), SLEEP_DEALLOC(D3), SLEEP_LOCK(D3),
SLEEP_LOCK_SIG(D3), SLEEP_LOCKAVAIL(D3), SLEEP_TRYLOCK(D3),
SLEEP_UNLOCK(D3)
Copyright 1994 Novell, Inc. Page 1
SLEEP_LOCKOWNED(D3) SLEEP_LOCKOWNED(D3)
NOTICES
Portability
All processors
Applicability
ddi: 5, 5mp, 6, 6mp, 7, 7mp
Copyright 1994 Novell, Inc. Page 2