.TH SLEEP_TRYLOCK() "" "" "DDI/DKI Kernel Routine"
.PC "Try to acquire a sleep lock"
.B "#include <sys/ksynch.h>"
.B "#include <sys/types.h>"
\fBbool_t SLEEP_TRYLOCK(\fIlockptr\^\fB)\fR
\fBsleep_t *\fIlockptr\^\fB;\fR
.PP
.B SLEEP_TRYLOCK()
attempts to acquire the sleep lock
.BR lock .
If it succeeds, it returns a non-zero value.
However, unlike the related function
.BR SLEEP_LOCK() ,
it fails and returns zero if it cannot acquire
.IR lock .
.SH "See Also"
.B
DDI/DKI kernel routines
.R
.SH Notes
.B SLEEP_TRYLOCK()
has base or interrupt level.
It does not sleep.
.PP
A driver can hold a
driver-defined basic lock, read/write lock, or sleep lock
across a call to this function.
