diff options
author | jhb <jhb@FreeBSD.org> | 2008-08-07 20:47:01 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2008-08-07 20:47:01 +0000 |
commit | 97c033161b3dd307765e007a6cb2c7211de57d0f (patch) | |
tree | f390c0936964868db6d8b37a3f8266534c858565 /share/man/man9/sleepqueue.9 | |
parent | 33d0c4b593f378b812a80a267a106afcc107bdf9 (diff) | |
download | FreeBSD-src-97c033161b3dd307765e007a6cb2c7211de57d0f.zip FreeBSD-src-97c033161b3dd307765e007a6cb2c7211de57d0f.tar.gz |
Document the new return values for sleepq_abort(), sleepq_broadcast(), and
sleepq_signal().
Prodded by: attilio
Diffstat (limited to 'share/man/man9/sleepqueue.9')
-rw-r--r-- | share/man/man9/sleepqueue.9 | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/share/man/man9/sleepqueue.9 b/share/man/man9/sleepqueue.9 index f0654d5..e2e3a4b 100644 --- a/share/man/man9/sleepqueue.9 +++ b/share/man/man9/sleepqueue.9 @@ -51,13 +51,13 @@ .In sys/sleepqueue.h .Ft void .Fn init_sleepqueues "void" -.Ft void +.Ft int .Fn sleepq_abort "struct thread *td" .Ft void .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 +.Ft int .Fn sleepq_broadcast "void *wchan" "int flags" "int pri" "int queue" .Ft int .Fn sleepq_calc_signal_retval "int sig" @@ -73,7 +73,7 @@ .Fn sleepq_release "void *wchan" .Ft void .Fn sleepq_remove "struct thread *td" "void *wchan" -.Ft void +.Ft int .Fn sleepq_signal "void *wchan" "int flags" "int pri" "int queue" .Ft void .Fn sleepq_set_timeout "void *wchan" "int timo" @@ -347,6 +347,21 @@ sufficient. One possible use is waking up a specific thread from a widely shared sleep channel. .Pp +The +.Fn sleepq_abort , +.Fn sleepq_broadcast , +and +.Fn sleepq_signal +functions all return a boolean value. +If the return value is true, +then at least one thread was resumed that is currently swapped out. +The caller is responsible for awakening the scheduler process so that the +resumed thread will be swapped back in. +This is done by calling the +.Fn kick_proc0 +function after releasing the sleep queue chain lock via a call to +.Fn sleepq_release . +.Pp The sleep queue interface is currently used to implement the .Xr sleep 9 and |