.TH RW_RDLOCK() "" "" "DDI/DKI Kernel Routine"
.PC "Acquire a read/write lock in read mode"
.B "#include <sys/ksynch.h>"
.B "#include <sys/types.h>"
\fBpl_t RW_RDLOCK(\fIlock\^\fB, \fIpriority\^\fB)\fR
\fBrwlock_t *\fIlock\^\fB; pl_t \fIpriority\^\fB;\fR
.PP
.B RW_RDLOCK()
sets the interrupt priority to
.I priority
and acquires
.IR lock .
If it is not available in read mode, the caller must wait until it is.
When it acquires the lock,
it returns the previous level of interrupt priority.
.SH "See Also"
.B
DDI/DKI kernel routines
.R
.SH Notes
.B RW_RDLOCK()
has base or interrupt level.
.PP
A driver can hold a
driver-defined sleep lock across a call to this function.
It can also hold a driver-defined basic lock or read/write locks;
however, note that attempting to acquire a lock that is already held
by the calling context can trigger a deadlock.
.PP
When this function is called from interrupt level,
.I priority
must not be below the level at which the interrupt handler is running.
