MUTEX_OWNED(D3)MUTEX_OWNED(D3)NAMEMUTEX_OWNED - query whether a mutual exclusion lock is available
SYNOPSIS
#include <sys/types.h>
#include <sys/ksynch.h>
#include <sys/ddi.h>
boolean_t MUTEX_OWNED(mutex_t *lockp);
Arguments
lockp Pointer to the mutual exclusion lock to be queried.
DESCRIPTIONMUTEX_OWNED returns an indication of whether the mutual exclusion lock
specified by lockp is currently available.
Return Values
MUTEX_OWNED returns TRUE (a non-zero value) if the lock was available or
FALSE (zero) if the lock was not available.
USAGE
The state of the lock may change and the value returned may no longer be
valid by the time the caller sees it. The caller is expected to
understand that this is ``stale data'' and is either using it as a
heuristic or has arranged for the return value to be meaningful by other
means.
Level
Base or Interrupt.
Synchronization Constraints
Does not sleep.
Driver-defined basic locks, read/write locks, and sleep locks may be held
across calls to this function.
REFERENCESMUTEX_ALLOC(D3), MUTEX_INIT(D3), MUTEX_DEALLOC(D3), MUTEX_DESTROY(D3),
MUTEX_LOCK(D3), MUTEX_TRYLOCK(D3), MUTEX_UNLOCK(D3), MUTEX_MINE(D3).
Page 1