Index: share/man/man9/rwlock.9 =================================================================== --- share/man/man9/rwlock.9 +++ share/man/man9/rwlock.9 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 13, 2014 +.Dd March 18, 2016 .Dt RWLOCK 9 .Os .Sh NAME @@ -324,7 +324,13 @@ .Dv RA_LOCKED and .Dv RA_RLOCKED -assertions merely check that some thread holds a read lock. +assertions merely check that any thread holds a read lock. +Similarly, +.Dv RA_UNLOCKED +in the +.No non- Ns Dv WITNESS +case is only able to assert that the current thread does not hold a write +lock. .Pp Reader/writer is a bit of an awkward name. An Index: share/man/man9/sx.9 =================================================================== --- share/man/man9/sx.9 +++ share/man/man9/sx.9 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 16, 2016 +.Dd March 18, 2016 .Dt SX 9 .Os .Sh NAME @@ -320,11 +320,21 @@ .Xr rwlock 9 , .Xr sema 9 .Sh BUGS +If +.Dv WITNESS +is not included in the kernel, +then it is impossible to assert whether the current thread does or does not +hold a shared lock. In the .No non- Ns Dv WITNESS case, the .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. +assertions merely check whether any thread holds a shared lock. +Similarly, +.Dv SA_UNLOCKED +in the +.No non- Ns Dv WITNESS +case is only able to assert that the current thread does not hold an exclusive +lock.