-# $OpenBSD: Makefile,v 1.156 2009/09/08 06:01:41 deraadt Exp $
+# $OpenBSD: Makefile,v 1.157 2010/08/01 14:21:10 blambert Exp $
# $NetBSD: Makefile,v 1.4 1996/01/09 03:23:01 thorpej Exp $
# Makefile for section 9 (kernel function and variable) manual pages.
rssadapt.9 ieee80211_rssadapt_updatestats.9
MLINKS+=rwlock.9 rw_init.9 rwlock.9 rw_enter.9 rwlock.9 rw_exit.9 \
rwlock.9 rw_enter_read.9 rwlock.9 rw_enter_write.9 \
- rwlock.9 rw_exit_read.9 rwlock.9 rw_exit_write.9
+ rwlock.9 rw_exit_read.9 rwlock.9 rw_exit_write.9 \
+ rwlock.9 rw_assert_wrlock.9 rwlock.9 rw_assert_rdlock.9 \
+ rwlock.9 rw_assert_unlocked.9
MLINKS+=sensor_attach.9 sensordev_install.9 \
sensor_attach.9 sensordev_deinstall.9 \
-.\" $OpenBSD: rwlock.9,v 1.8 2007/12/09 20:54:01 jmc Exp $
+.\" $OpenBSD: rwlock.9,v 1.9 2010/08/01 14:21:10 blambert Exp $
.\"
.\" Copyright (c) 2006 Pedro Martelletto <pedro@ambientworks.net>
.\" All rights reserved.
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: December 9 2007 $
+.Dd $Mdocdate: August 1 2010 $
.Dt RWLOCK 9
.Os
.Sh NAME
.Fn rw_exit_read "struct rwlock *rwl"
.Ft void
.Fn rw_exit_write "struct rwlock *rwl"
+.Ft void
+.Fn rw_assert_wrlock "struct rwlock *rwl"
+.Ft void
+.Fn rw_assert_rdlock "struct rwlock *rwl"
+.Ft void
+.Fn rw_assert_unlocked "struct rwlock *rwl"
.Sh DESCRIPTION
The
.Nm
distinct processes at any time.
A write lock, however, can only be acquired when there are no read locks held,
granting exclusive access to a single process.
+.Pp
+The
+.Fn rw_assert_wrlock ,
+.Fn rw_assert_rdlock ,
+and
+.Fn rw_assert_unlocked
+functions check the status
+.Fa rwl ,
+panicking if it is not write-, read-, or unlocked, respectively.
.Sh SEE ALSO
.Xr lockmgr 9 ,
.Xr mutex 9 ,