summaryrefslogtreecommitdiffstats
path: root/share/man/man9/sleepqueue.9
diff options
context:
space:
mode:
authorgabor <gabor@FreeBSD.org>2007-09-28 11:13:40 +0000
committergabor <gabor@FreeBSD.org>2007-09-28 11:13:40 +0000
commit7283a7a1fc6d275eec3f47a8b6deead5b178c6c1 (patch)
tree8401895e9eba4809a15d070aa2f4c40da8e902c5 /share/man/man9/sleepqueue.9
parenta947d503156d99f0c775e19946e40c413ef41242 (diff)
downloadFreeBSD-src-7283a7a1fc6d275eec3f47a8b6deead5b178c6c1.zip
FreeBSD-src-7283a7a1fc6d275eec3f47a8b6deead5b178c6c1.tar.gz
- Change the description of sleepq_add(), sleepq_broadcast() and
sleepq_signal() to reflect recent changes Submitted by: attilio Approved by: re (bmah)
Diffstat (limited to 'share/man/man9/sleepqueue.9')
-rw-r--r--share/man/man9/sleepqueue.917
1 files changed, 13 insertions, 4 deletions
diff --git a/share/man/man9/sleepqueue.9 b/share/man/man9/sleepqueue.9
index c381539..f0654d5 100644
--- a/share/man/man9/sleepqueue.9
+++ b/share/man/man9/sleepqueue.9
@@ -23,7 +23,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd March 10, 2004
+.Dd August 13, 2007
.Dt SLEEPQUEUE 9
.Os
.Sh NAME
@@ -54,11 +54,11 @@
.Ft void
.Fn sleepq_abort "struct thread *td"
.Ft void
-.Fn sleepq_add "void *wchan" "struct lock_object *lock" "const char *wmesg" "int flags"
+.Fn sleepq_add "void *wchan" "struct lock_object *lock" "const char *wmesg" "int flags" "int queue"
.Ft struct sleepqueue *
.Fn sleepq_alloc "void"
.Ft void
-.Fn sleepq_broadcast "void *wchan" "int flags" "int pri"
+.Fn sleepq_broadcast "void *wchan" "int flags" "int pri" "int queue"
.Ft int
.Fn sleepq_calc_signal_retval "int sig"
.Ft int
@@ -74,7 +74,7 @@
.Ft void
.Fn sleepq_remove "struct thread *td" "void *wchan"
.Ft void
-.Fn sleepq_signal "void *wchan" "int flags" "int pri"
+.Fn sleepq_signal "void *wchan" "int flags" "int pri" "int queue"
.Ft void
.Fn sleepq_set_timeout "void *wchan" "int timo"
.Ft int
@@ -91,6 +91,8 @@ some condition is met.
Each queue is associated with a specific wait channel when it is active,
and only one queue may be associated with a wait channel at any given point
in time.
+The implementation of each wait channel splits its sleepqueue into 2 sub-queues
+in order to enable some optimizations on threads' wakeups.
An active queue holds a list of threads that are blocked on the associated
wait channel.
Threads that are not blocked on a wait channel have an associated inactive
@@ -172,6 +174,10 @@ The
.Fa flags
parameter is a bitmask consisting of the type of sleep queue being slept on
and zero or more optional flags.
+The
+.Fa queue
+parameter specifies the sub-queue, in which the contending thread will be
+inserted.
.Pp
There are currently three types of sleep queues:
.Pp
@@ -310,6 +316,9 @@ The sleep queue chain associated with argument
must be locked by a prior call to
.Fn sleepq_lock
before calling any of these functions.
+The
+.Fa queue
+argument specifies the sub-queue, from which threads need to be woken up.
.Pp
A thread in an interruptible sleep can be interrupted by another thread via
the
OpenPOWER on IntegriCloud