Module Name:    src
Committed By:   jdolecek
Date:           Mon Dec 10 20:12:36 UTC 2018

Modified Files:
        src/share/man/man9: rwlock.9

Log Message:
upon further reflection, rw_write_held() actually seems to be safe
for check that the write lock is not currently held by current lwp - current
lwp can't acquire the rwlock even when preempted


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/share/man/man9/rwlock.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/rwlock.9
diff -u src/share/man/man9/rwlock.9:1.18 src/share/man/man9/rwlock.9:1.19
--- src/share/man/man9/rwlock.9:1.18	Mon Dec 10 19:21:56 2018
+++ src/share/man/man9/rwlock.9	Mon Dec 10 20:12:36 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: rwlock.9,v 1.18 2018/12/10 19:21:56 jdolecek Exp $
+.\"	$NetBSD: rwlock.9,v 1.19 2018/12/10 20:12:36 jdolecek Exp $
 .\"
 .\" Copyright (c) 2006, 2007, 2009 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -188,6 +188,10 @@ must never be used to make locking decis
 they are provided only for diagnostic purposes.
 They are also not atomic, hence they should only be used to assert
 that lock is held.
+The only exception is
+.Fn rw_write_held ,
+which can be also used safely to assert that write lock is NOT currently
+held by current lwp.
 .El
 .Sh PERFORMANCE CONSIDERATIONS
 RW locks are subject to high cache contention on multiprocessor systems,

Reply via email to