summaryrefslogtreecommitdiffstats
path: root/share/man/man9/locking.9
diff options
context:
space:
mode:
authormlaier <mlaier@FreeBSD.org>2010-09-01 19:50:03 +0000
committermlaier <mlaier@FreeBSD.org>2010-09-01 19:50:03 +0000
commit2ef34e9086061a856551d8553806222b224ee13f (patch)
treed9a5617b3239cbe92a3581fdb4eb3dbcf7d29261 /share/man/man9/locking.9
parent0b65f62811c036da9558dd96e4d6cfe2b0eaf4a3 (diff)
downloadFreeBSD-src-2ef34e9086061a856551d8553806222b224ee13f.zip
FreeBSD-src-2ef34e9086061a856551d8553806222b224ee13f.tar.gz
rmlock(9) two additions and one change/fix:
- add rm_try_rlock(). - add RM_SLEEPABLE to use sx(9) as the back-end lock in order to sleep while holding the write lock. - change rm_noreadtoken to a cpu bitmask to indicate which CPUs need to go through the lock/unlock in order to synchronize. As a side effect, this also avoids IPI to CPUs without any readers during rm_wlock. Discussed with: ups@, rwatson@ on arch@ Sponsored by: Isilon Systems, Inc.
Diffstat (limited to 'share/man/man9/locking.9')
-rw-r--r--share/man/man9/locking.99
1 files changed, 8 insertions, 1 deletions
diff --git a/share/man/man9/locking.9 b/share/man/man9/locking.9
index bd8a233..f2ff906 100644
--- a/share/man/man9/locking.9
+++ b/share/man/man9/locking.9
@@ -301,7 +301,7 @@ one of the synchronization primitives discussed:
.It mutex Ta \&ok Ta \&ok-1 Ta \&no Ta \&ok Ta \&ok Ta \&no-3
.It sx Ta \&ok Ta \&ok Ta \&ok-2 Ta \&ok Ta \&ok Ta \&ok-4
.It rwlock Ta \&ok Ta \&ok Ta \&no Ta \&ok-2 Ta \&ok Ta \&no-3
-.It rmlock Ta \&ok Ta \&ok Ta \&no Ta \&ok Ta \&ok-2 Ta \&no
+.It rmlock Ta \&ok Ta \&ok Ta \&ok-5 Ta \&ok Ta \&ok-2 Ta \&ok-5
.El
.Pp
.Em *1
@@ -326,6 +326,13 @@ Though one can sleep holding an sx lock, one can also use
.Fn sx_sleep
which will atomically release this primitive when going to sleep and
reacquire it on wakeup.
+.Pp
+.Em *5
+.Em Read-mostly
+locks can be initialized to support sleeping while holding a write lock.
+See
+.Xr rmlock 9
+for details.
.Ss Context mode table
The next table shows what can be used in different contexts.
At this time this is a rather easy to remember table.
OpenPOWER on IntegriCloud