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

SLEEP_TRYLOCK(D3)


SLEEP_TRYLOCK -- try to acquire a sleep lock

Synopsis

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

bool_t SLEEP_TRYLOCK(sleep_t *lockp);

Description

If the lock specified by lockp is immediately available (can be acquired without sleeping) the SLEEP_TRYLOCK function acquires the lock. If the lock is not immediately available, SLEEP_TRYLOCK returns without acquiring the lock.

Arguments


lockp
Pointer to the sleep lock to be acquired.

Return values

SLEEP_TRYLOCK returns TRUE (a non-zero value) if the lock is successfully acquired or FALSE (zero) if the lock is not acquired.

Usage

Context and synchronization

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_LOCKOWNED(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