DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5

SLEEP_LOCKAVAIL(D3)


SLEEP_LOCKAVAIL -- query whether a sleep lock is available

Synopsis

   #include <sys/types.h>
   #include <sys/ksynch.h>
   #include <sys/ddi.h>
   

bool_t SLEEP_LOCKAVAIL(sleep_t *lockp);

Description

SLEEP_LOCKAVAIL returns an indication of whether the sleep lock specified by lockp is currently available.

Arguments


lockp
Pointer to the sleep lock to be queried.

Return values

SLEEP_LOCKAVAIL 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.

Context and synchronization

Non-blockable, interrupt, 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_LOCKOWNED(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