sleepq(9) manpage is out of sync

pluknet pluknet at gmail.com
Wed May 13 10:07:07 UTC 2009


Hi.

The sleepq(9) man page became out of sync since 6.1-R.

Exactly, sleepq_calc_signal_retval() was removed before 6.1,
and many of sleep_*() functions now have an additional priority arg
since not very far -current.

Below is a draft of updated sleepq(9).
It lacks a description of the newly added "int pri" arg.
I hope, Jeff could add the missing peaces.

Also, removal of sleepq_calc_signal_retval() should be merged back into 7 and 6.

--- share/man/man9/sleepqueue.9.orig    Wed May 13 13:37:51 2009
+++ share/man/man9/sleepqueue.9 Wed May 13 13:55:03 2009
@@ -32,7 +32,6 @@
 .Nm sleepq_add ,
 .Nm sleepq_alloc ,
 .Nm sleepq_broadcast ,
-.Nm sleepq_calc_signal_retval ,
 .Nm sleepq_catch_signals ,
 .Nm sleepq_free ,
 .Nm sleepq_lock ,
@@ -52,7 +51,7 @@
 .Ft void
 .Fn init_sleepqueues "void"
 .Ft int
-.Fn sleepq_abort "struct thread *td"
+.Fn sleepq_abort "struct thread *td" "int intrval"
 .Ft void
 .Fn sleepq_add "void *wchan" "struct lock_object *lock" "const char
*wmesg" "in                t flags" "int queue"
 .Ft struct sleepqueue *
@@ -60,9 +59,7 @@
 .Ft int
 .Fn sleepq_broadcast "void *wchan" "int flags" "int pri" "int queue"
 .Ft int
-.Fn sleepq_calc_signal_retval "int sig"
-.Ft int
-.Fn sleepq_catch_signals "void *wchan"
+.Fn sleepq_catch_signals "void *wchan" "int pri"
 .Ft void
 .Fn sleepq_free "struct sleepqueue *sq"
 .Ft struct sleepqueue *
@@ -78,13 +75,13 @@
 .Ft void
 .Fn sleepq_set_timeout "void *wchan" "int timo"
 .Ft int
-.Fn sleepq_timedwait "void *wchan"
+.Fn sleepq_timedwait "void *wchan" "int pri"
 .Ft int
-.Fn sleepq_timedwait_sig "void *wchan" "int signal_caught"
+.Fn sleepq_timedwait_sig "void *wchan" "int pri"
 .Ft void
-.Fn sleepq_wait "void *wchan"
+.Fn sleepq_wait "void *wchan" "int pri"
 .Ft int
-.Fn sleepq_wait_sig "void *wchan"
+.Fn sleepq_wait_sig "void *wchan" "int pri"
 .Sh DESCRIPTION
 Sleep queues provide a mechanism for suspending execution of a thread until
 some condition is met.
@@ -270,20 +267,6 @@
 is returned.
 If the sleep was interrupted by something other than a signal,
 then some other return value will be returned.
-If zero is returned after resuming from an interruptible sleep,
-then
-.Fn sleepq_calc_signal_retval
-should be called to determine if the sleep was interrupted by a signal.
-If so,
-.Fn sleepq_calc_signal_retval
-returns
-.Er ERESTART
-if the interrupting signal is restartable and
-.Er EINTR
-otherwise.
-If the sleep was not interrupted by a signal,
-.Fn sleepq_calc_signal_retval
-will return 0.
 .Pp
 A sleeping thread is normally resumed by the
 .Fn sleepq_broadcast



-- 
wbr,
pluknet



More information about the freebsd-doc mailing list