diff options
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/condvar.9 | 18 | ||||
-rw-r--r-- | share/man/man9/sleep.9 | 6 |
2 files changed, 24 insertions, 0 deletions
diff --git a/share/man/man9/condvar.9 b/share/man/man9/condvar.9 index 2ac8906..db3eab1 100644 --- a/share/man/man9/condvar.9 +++ b/share/man/man9/condvar.9 @@ -136,9 +136,27 @@ When a thread waits on a condition, .Fa lock is atomically released before the thread is blocked, then reacquired before the function call returns. +In addition, the thread will fully drop the +.Va Giant +mutex +(even if recursed) +while the it is suspended and will reacquire the +.Va Giant +mutex before the function returns. The .Fn cv_wait_unlock function does not reacquire the lock before returning. +Note that the +.Va Giant +mutex may be specified as +.Fa lock . +However, +.Va Giant +may not be used as +.Fa lock +for the +.Fn cv_wait_unlock +function. All waiters must pass the same .Fa lock in conjunction with diff --git a/share/man/man9/sleep.9 b/share/man/man9/sleep.9 index aa87642..a9f0873 100644 --- a/share/man/man9/sleep.9 +++ b/share/man/man9/sleep.9 @@ -157,6 +157,12 @@ mutex while the thread is suspended and will reacquire the .Va Giant mutex before the function returns. +Note that the +.Va Giant +mutex may be specified as the lock to drop. +In that case, however, the +.Dv PDROP +flag is not allowed. .Pp To avoid lost wakeups, either a lock should be used to protect against races, |