diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2010-08-07 20:30:22 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2010-08-07 20:30:22 +0000 |
commit | 3e725b1cdca742a1ed28bdf766a64223ab377bc5 (patch) | |
tree | 4e672158882b4d297aad198c18ae268d14db0745 /share/man/man9 | |
parent | e5971a4d4773efa7bc3dfc73ec239d36e5831e5d (diff) |
Document the mutex locking assert macros.
Requested by marco.
ok marco@, schwarze@ (who insists that manpages are still unlocked).
Diffstat (limited to 'share/man/man9')
-rw-r--r-- | share/man/man9/Makefile | 5 | ||||
-rw-r--r-- | share/man/man9/mutex.9 | 13 |
2 files changed, 14 insertions, 4 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index b87f594177b..4306e654399 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.157 2010/08/01 14:21:10 blambert Exp $ +# $OpenBSD: Makefile,v 1.158 2010/08/07 20:30:21 oga Exp $ # $NetBSD: Makefile,v 1.4 1996/01/09 03:23:01 thorpej Exp $ # Makefile for section 9 (kernel function and variable) manual pages. @@ -220,7 +220,8 @@ MLINKS+=microtime.9 getmicrotime.9 microtime.9 microuptime.9 \ microtime.9 getnanouptime.9 microtime.9 bintime.9 \ microtime.9 binuptime.9 MLINKS+=mountroothook_establish.9 mountroothook_disestablish.9 -MLINKS+=mutex.9 mtx_init.9 mutex.9 mtx_enter.9 mutex.9 mtx_leave.9 +MLINKS+=mutex.9 mtx_init.9 mutex.9 mtx_enter.9 mutex.9 mtx_leave.9 \ + mutex.9 MUTEX_ASSERT_LOCKED.9 mutex.9 MUTEX_ASSERT_UNLOCKED.9 MLINKS+=mutex.9 mtx_enter_try.9 MLINKS+=namei.9 lookup.9 namei.9 relookup.9 namei.9 NDINIT.9 MLINKS+=pci_conf_read.9 pci_conf_write.9 pci_conf_read.9 pci_make_tag.9 \ diff --git a/share/man/man9/mutex.9 b/share/man/man9/mutex.9 index 37ccd3d2253..55b6bd2856c 100644 --- a/share/man/man9/mutex.9 +++ b/share/man/man9/mutex.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mutex.9,v 1.12 2009/09/08 13:36:20 jmc Exp $ +.\" $OpenBSD: mutex.9,v 1.13 2010/08/07 20:30:21 oga Exp $ .\" .\" Copyright (c) 2005 Pedro Martelletto <pedro@ambientworks.net> .\" All rights reserved. @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: September 8 2009 $ +.Dd $Mdocdate: August 7 2010 $ .Dt MUTEX 9 .Os .Sh NAME @@ -35,6 +35,8 @@ .Fn mtx_enter_try "struct mutex *mtxp" .Ft void .Fn mtx_leave "struct mutex *mtxp" +.Fn MUTEX_ASSERT_LOCKED "struct mutex *mtxp" +.Fn MUTEX_ASSERT_UNLOCKED "struct mutex *mtxp" .Sh DESCRIPTION The .Nm @@ -65,6 +67,13 @@ The function releases a mutex. In case the acquisition of the mutex caused the interrupt level to be changed, it is then restored. +.Pp +The +.Fn MUTEX_ASSERT_LOCKED +and +.Fn MUTEX_ASSERT_UNLOCKED +macros may be used to assert that a mutex is held locked or unlocked by +the current cpu. .Sh SEE ALSO .Xr lockmgr 9 , .Xr rwlock 9 , |