summaryrefslogtreecommitdiff
path: root/share/man
diff options
context:
space:
mode:
Diffstat (limited to 'share/man')
-rw-r--r--share/man/man9/mutex.97
-rw-r--r--share/man/man9/rwlock.95
2 files changed, 10 insertions, 2 deletions
diff --git a/share/man/man9/mutex.9 b/share/man/man9/mutex.9
index b1b91b0aca9..416152d6c0d 100644
--- a/share/man/man9/mutex.9
+++ b/share/man/man9/mutex.9
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mutex.9,v 1.2 2007/05/13 11:34:25 jsg Exp $
+.\" $OpenBSD: mutex.9,v 1.3 2007/05/14 16:39:34 jsg Exp $
.\"
.\" Copyright (c) 2005 Pedro Martelletto <pedro@openbsd.org>
.\" All rights reserved.
@@ -71,6 +71,11 @@ functions were written by
.An Artur Grabowski
.Aq art@openbsd.org .
.Sh CAVEATS
+As these are spinning locks, don't sleep while holding one.
+.Pp
+If using a mutex in an interrupt handler, locks must be initialised
+with the correct IPL or deadlock will occur.
+.Pp
Multiple mutexes may be nested, but not interleaved.
This is okay:
.Bd -literal -offset indent
diff --git a/share/man/man9/rwlock.9 b/share/man/man9/rwlock.9
index d1773fab23a..1bc64e52155 100644
--- a/share/man/man9/rwlock.9
+++ b/share/man/man9/rwlock.9
@@ -1,4 +1,4 @@
-.\" $OpenBSD: rwlock.9,v 1.5 2007/04/10 21:07:48 art Exp $
+.\" $OpenBSD: rwlock.9,v 1.6 2007/05/14 16:39:34 jsg Exp $
.\"
.\" Copyright (c) 2006 Pedro Martelletto <pedro@openbsd.org>
.\" All rights reserved.
@@ -127,3 +127,6 @@ The
functions were written by
.An Artur Grabowski
.Aq art@openbsd.org .
+.Sh CAVEATS
+While it is safe to sleep with an rwlock held, they cannot
+be used in an interrupt handler as an rwlock is bound to a process.