From ab9fe4e1fee677d89452eb952e58856b96deb363 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 24 Feb 2004 21:36:39 +0000 Subject: [PATCH] - Clarify ambiguous statement about not being able to both slock and xlock a single lock at the same time. - Avoid using "own" to refer to holding either a shared or exclusive lock as it is only really correct for exclusive locks. - Reword the sentence about sleep-ability to read easier. Requested by: truckman (1) --- share/man/man9/sx.9 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/share/man/man9/sx.9 b/share/man/man9/sx.9 index 5dce1bea942..0ff91c7be25 100644 --- a/share/man/man9/sx.9 +++ b/share/man/man9/sx.9 @@ -105,10 +105,10 @@ or .Fn sx_try_xlock and .Fn sx_xunlock . -A thread can attempt to upgrade a currently owned shared lock to an exclusive +A thread can attempt to upgrade a currently held shared lock to an exclusive lock by calling .Fn sx_try_upgrade . -A thread that owns an exclusive lock can downgrade it to a shared lock by +A thread that has an exclusive lock can downgrade it to a shared lock by calling .Fn sx_downgrade . .Pp @@ -172,10 +172,13 @@ but with an additional argument, that is used in generating unique variable names for the related structures associated with the lock and the sysinit routine. .Pp -A thread may not own a shared lock and an exclusive lock simultaneously; +A thread may not hold both a shared lock and an exclusive lock on the same +lock simultaneously; attempting to do so will result in deadlock. .Sh CONTEXT -It is allowed to own a shared lock or an exclusive lock while sleeping. +A thread may hold a shared or exclusive lock on an +.Nm +lock while sleeping. .Sh SEE ALSO .Xr condvar 9 , .Xr mtx_pool 9 ,