summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2007-02-04 19:44:37 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:27:02 +0200
commita8a675309ffbd1eb03c710c3e580dd4476bf6565 (patch)
treeb4baa92a2a540d338ccc74510f67d521d1ac1399 /doc
parent1c89885db15e0a761639b90c02978b5db82292f6 (diff)
2007-02-04 Thomas Schwinge <tschwinge@gnu.org>
* doc/mach.texi (thread_switch): Enhance a bit.
Diffstat (limited to 'doc')
-rw-r--r--doc/mach.texi16
1 files changed, 9 insertions, 7 deletions
diff --git a/doc/mach.texi b/doc/mach.texi
index 13e09275..93c5eaef 100644
--- a/doc/mach.texi
+++ b/doc/mach.texi
@@ -4550,14 +4550,15 @@ whose control port was presented.
The function @code{thread_switch} provides low-level access to the
scheduler's context switching code. @var{new_thread} is a hint that
implements hand-off scheduling. The operating system will attempt to
-switch directly to the new thread (by passing the normal logic that
+switch directly to the new thread (bypassing the normal logic that
selects the next thread to run) if possible. Since this is a hint, it
may be incorrect; it is ignored if it doesn't specify a thread on the
same host as the current thread or if that thread can't be switched to
-(i.e., not runnable or already running on another processor). In this
-case, the normal logic to select the next thread to run is used; the
-current thread may continue running if there is no other appropriate
-thread to run.
+(i.e., not runnable or already running on another processor or giving
+a plainly invalid hint, such as @code{MACH_PORT_NULL}). In this case,
+the normal logic to select the next thread to run is used; the current
+thread may continue running if there is no other appropriate thread to
+run.
Options for @var{option} are defined in @file{mach/thread_switch.h} and
specify the interpretation of @var{time}. The possible values for
@@ -4568,8 +4569,9 @@ specify the interpretation of @var{time}. The possible values for
No options, the time argument is ignored.
@item SWITCH_OPTION_WAIT
-The thread is blocked for the specified time. This can be aborted by
-@code{thread_abort}.
+The thread is blocked for the specified time (in milliseconds;
+specifying @code{0} will wait for the next tick). This can be aborted
+by @code{thread_abort}.
@item SWITCH_OPTION_DEPRESS
The thread's priority is depressed to the lowest possible value for the