From owner-svn-src-all@freebsd.org Tue Mar 29 16:07:52 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B652AE2962; Tue, 29 Mar 2016 16:07:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23EDE1E0B; Tue, 29 Mar 2016 16:07:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2TG7p4i067045; Tue, 29 Mar 2016 16:07:51 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2TG7p9d067043; Tue, 29 Mar 2016 16:07:51 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201603291607.u2TG7p9d067043@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 29 Mar 2016 16:07:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297394 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Mar 2016 16:07:52 -0000 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.