Author: bdrewery Date: Tue Mar 29 16:07:51 2016 New Revision: 297394 URL: https://svnweb.freebsd.org/changeset/base/297394
Log: Reword descriptions of asserting locks held without WITNESS. This corrects an error in r296947 in that it is not possible to assert which thread holds a shared (or read) lock, but it is possible to assert that one is held. Just not very useful. MFC after: 1 week Submitted by: wblock, jhb Reviewed by: kib (earlier version), jhb, wblock Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D5659 Modified: head/share/man/man9/rwlock.9 head/share/man/man9/sx.9 Modified: head/share/man/man9/rwlock.9 ============================================================================== --- head/share/man/man9/rwlock.9 Tue Mar 29 15:26:53 2016 (r297393) +++ head/share/man/man9/rwlock.9 Tue Mar 29 16:07:51 2016 (r297394) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 13, 2014 +.Dd March 28, 2016 .Dt RWLOCK 9 .Os .Sh NAME @@ -313,18 +313,19 @@ facility was written by This manual page was written by .An "Gleb Smirnoff" . .Sh BUGS -If +A kernel without .Dv WITNESS -is not included in the kernel, -then it is impossible to assert that the current thread does or does not -hold a read lock. -In the -.Pf non- Dv WITNESS -case, the +cannot assert whether the current thread does or does not hold a read lock. .Dv RA_LOCKED and .Dv RA_RLOCKED -assertions merely check that some thread holds a read lock. +can only assert that +.Em any +thread holds a read lock. +They cannot ensure that the current thread holds a read lock. +Further, +.Dv RA_UNLOCKED +can only assert that the current thread does not hold a write lock. .Pp Reader/writer is a bit of an awkward name. An Modified: head/share/man/man9/sx.9 ============================================================================== --- head/share/man/man9/sx.9 Tue Mar 29 15:26:53 2016 (r297393) +++ head/share/man/man9/sx.9 Tue Mar 29 16:07:51 2016 (r297394) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 16, 2016 +.Dd March 28, 2016 .Dt SX 9 .Os .Sh NAME @@ -320,11 +320,16 @@ end up sleeping while holding a mutex, w .Xr rwlock 9 , .Xr sema 9 .Sh BUGS -In the -.No non- Ns Dv WITNESS -case, the +A kernel without +.Dv WITNESS +cannot assert whether the current thread does or does not hold a shared lock. .Dv SA_LOCKED and .Dv SA_SLOCKED -assertions merely check that some thread holds a shared lock. -They do not ensure that the current thread holds a shared lock. +can only assert that +.Em any +thread holds a shared lock. +They cannot ensure that the current thread holds a shared lock. +Further, +.Dv SA_UNLOCKED +can only assert that the current thread does not hold an exclusive lock. _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"