SLEEP_LOCKAVAIL(D3DK) —
NAME
SLEEP_LOCKAVAIL − query whether a sleep lock is available .IX \f4SLEEP_LOCKAVAIL\fP(D3DK)
SYNOPSIS
#include <sys/types.h>
#include <sys/ksynch.h>
bool_t SLEEP_LOCKAVAIL(sleep_t ∗lockp);
ARGUMENTS
lockpPointer to the sleep lock to be queried.
DESCRIPTION
SLEEP_LOCKAVAIL returns an indication of whether the sleep lock specified by lockp is currently available.
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.
RETURN VALUE
SLEEP_LOCKAVAIL returns TRUE (a non-zero value) if the lock was available or FALSE (zero) if the lock was not available.
LEVEL
Base or Interrupt.
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_LOCKOWNED(D3DK), SLEEP_TRYLOCK(D3DK), SLEEP_UNLOCK(D3DK)
DDI/DKI