Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Mar 2016 20:45:45 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Bryan Drewery <bdrewery@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r296947 - head/share/man/man9
Message-ID:  <20160316184545.GN1741@kib.kiev.ua>
In-Reply-To: <201603161839.u2GIdm5C072960@repo.freebsd.org>
References:  <201603161839.u2GIdm5C072960@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 16, 2016 at 06:39:48PM +0000, Bryan Drewery wrote:
> Author: bdrewery
> Date: Wed Mar 16 18:39:48 2016
> New Revision: 296947
> URL: https://svnweb.freebsd.org/changeset/base/296947
> 
> Log:
>   Remove incorrect BUGS entry about asserting lock not held.
>   
>   For non-WITNESS< assertion support for SA_UNLOCKED was added in r125421 and
>   made to panic in r126316.
>   
>   MFC after:	1 week
> 
> Modified:
>   head/share/man/man9/sx.9
> 
> Modified: head/share/man/man9/sx.9
> ==============================================================================
> --- head/share/man/man9/sx.9	Wed Mar 16 17:35:55 2016	(r296946)
> +++ head/share/man/man9/sx.9	Wed Mar 16 18:39:48 2016	(r296947)
> @@ -26,7 +26,7 @@
>  .\"
>  .\" $FreeBSD$
>  .\"
> -.Dd March 13, 2016
> +.Dd March 16, 2016
>  .Dt SX 9
>  .Os
>  .Sh NAME
> @@ -320,11 +320,6 @@ end up sleeping while holding a mutex, w
>  .Xr rwlock 9 ,
>  .Xr sema 9
>  .Sh BUGS
> -Currently there is no way to assert that a lock is not held.
> -This is not possible in the
> -.No non- Ns Dv WITNESS
> -case for asserting that this thread
> -does not hold a shared lock.
>  In the
>  .No non- Ns Dv WITNESS
>  case, the
The removed text was not quite correct, but its removal is not quite correct
either.  sx (and rw) locks do not track shared owners, so in non-witness
case only exclusive ownership by curthread triggers panic for SA_UNLOCKED
case.  Shared ownership is silently ignored by the assert.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160316184545.GN1741>