summaryrefslogtreecommitdiffstats
path: root/share/man/man9/sleep.9
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2008-08-07 21:00:13 +0000
committerjhb <jhb@FreeBSD.org>2008-08-07 21:00:13 +0000
commite306c86e1b6376905ae8d21091509cbe1f61fba8 (patch)
tree5341583d2eecb5e89baa3cba762d2f3739e4856a /share/man/man9/sleep.9
parent9f16e510b9a765d8caed7f31ebaf16b600540db4 (diff)
downloadFreeBSD-src-e306c86e1b6376905ae8d21091509cbe1f61fba8.zip
FreeBSD-src-e306c86e1b6376905ae8d21091509cbe1f61fba8.tar.gz
Permit Giant to be passed as the explicit interlock either to
msleep/mtx_sleep or the various cv_*wait*() routines. Currently, the "unlock" behavior of PDROP and cv_wait_unlock() with Giant is not permitted as it is will be confusing since Giant is fully unrecursed and unlocked during a thread sleep. This is handy for subsystems which wish to allow unlocked drivers to continue to use Giant such as CAM, the new TTY layer, and the new USB stack. CAM currently uses a hack that I told Scott to use because I really didn't want to permit this behavior, and the TTY and USB patches both have various patches to permit this. MFC after: 2 weeks
Diffstat (limited to 'share/man/man9/sleep.9')
-rw-r--r--share/man/man9/sleep.96
1 files changed, 6 insertions, 0 deletions
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,
OpenPOWER on IntegriCloud