Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143267315
D794.id1667.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D794.id1667.diff
View Options
Index: share/man/man9/Makefile
===================================================================
--- share/man/man9/Makefile
+++ share/man/man9/Makefile
@@ -1253,8 +1253,6 @@
sleepqueue.9 sleepq_add.9 \
sleepqueue.9 sleepq_alloc.9 \
sleepqueue.9 sleepq_broadcast.9 \
- sleepqueue.9 sleepq_calc_signal_retval.9 \
- sleepqueue.9 sleepq_catch_signals.9 \
sleepqueue.9 sleepq_free.9 \
sleepqueue.9 sleepq_lookup.9 \
sleepqueue.9 sleepq_release.9 \
Index: share/man/man9/sleepqueue.9
===================================================================
--- share/man/man9/sleepqueue.9
+++ share/man/man9/sleepqueue.9
@@ -32,8 +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 ,
.Nm sleepq_lookup ,
@@ -62,10 +60,6 @@
.Fn sleepq_alloc "void"
.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"
.Ft void
.Fn sleepq_free "struct sleepqueue *sq"
.Ft struct sleepqueue *
@@ -86,15 +80,15 @@
.Ft u_int
.Fn sleepq_sleepcnt "void *wchan" "int queue"
.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 int
.Fn sleepq_type "void *wchan"
.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.
@@ -252,17 +246,6 @@
.Fn callout_reset_sbt
flags.
.Pp
-The current thread may be marked interruptible by calling
-.Fn sleepq_catch_signals
-with
-.Fa wchan
-set to the wait channel.
-This function returns a signal number if there are any pending signals for
-the current thread and 0 if there is not a pending signal.
-The sleep queue chain associated with argument
-.Fa wchan
-should have been locked by a prior call to
-.Fn sleepq_lock .
.Pp
Once the thread is ready to suspend,
one of the wait functions is called to put the current thread to sleep
@@ -288,13 +271,6 @@
.Fa wchan
needs to have been locked with a prior call to
.Fn sleepq_lock .
-The
-.Fa signal_caught
-parameter to
-.Fn sleepq_timedwait_sig
-specifies if a previous call to
-.Fn sleepq_catch_signals
-found a pending signal.
.Pp
When the thread is resumed,
the wait functions return a non-zero value if the thread was awakened due to
@@ -304,20 +280,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
Index: sys/sys/sleepqueue.h
===================================================================
--- sys/sys/sleepqueue.h
+++ sys/sys/sleepqueue.h
@@ -46,13 +46,6 @@
* call sleepq_set_timeout() after sleepq_add() to setup a timeout. It
* should then use one of the sleepq_timedwait() functions to block.
*
- * If the thread wants the sleep to be interruptible by signals, it can
- * call sleepq_catch_signals() after sleepq_add(). It should then use
- * one of the sleepq_wait_sig() functions to block. After the thread has
- * been resumed, it should call sleepq_calc_signal_retval() to determine
- * if it should return EINTR or ERESTART passing in the value returned from
- * the earlier call to sleepq_catch_signals().
- *
* A thread is normally resumed from a sleep queue by either the
* sleepq_signal() or sleepq_broadcast() functions. Sleepq_signal() wakes
* the thread with the highest priority that is sleeping on the specified
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 29, 7:10 AM (1 h, 43 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28075381
Default Alt Text
D794.id1667.diff (4 KB)
Attached To
Mode
D794: Reflect the chanages in sleepqueue.h and subr_sleepqueue.c
Attached
Detach File
Event Timeline
Log In to Comment