X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/9bccf70c0258c7cac2dcb80011b2a964d884c552..b7266188b87f3620ec3f9f717e57194a7dd989fe:/osfmk/man/thread_suspend.html?ds=sidebyside diff --git a/osfmk/man/thread_suspend.html b/osfmk/man/thread_suspend.html index 78c2dba35..72af9ba5c 100755 --- a/osfmk/man/thread_suspend.html +++ b/osfmk/man/thread_suspend.html @@ -1 +1,57 @@ -

thread_suspend


Function - Suspend a thread.

SYNOPSIS

kern_return_t   thread_suspend
                (thread_act_t                     target_thread);

PARAMETERS

target_thread
[in thread send right] The thread to be suspended.

DESCRIPTION

The thread_suspend function increments the suspend count for target_thread and prevents the thread from executing any more user-level instructions.

In this context, a user-level instruction can be either a machine instruction executed in user mode or a system trap instruction, including a page fault. If a thread is currently executing within a system trap, the kernel code may continue to execute until it reaches the system return code or it may suspend within the kernel code. In either case, the system trap returns when the thread resumes.

To resume a suspended thread, use thread_resume. If the suspend count is greater than one, thread_resume must be repeated that number of times.

CAUTIONS

Unpredictable results may occur if a program suspends a thread and alters its user state so that its direction is changed upon resuming. Note that the thread_abort function allows a system call to be aborted only if it is progressing in a predictable way.

RETURN VALUES

Only generic errors apply.

RELATED INFORMATION

Functions: task_resume, task_suspend, thread_abort, thread_get_state, thread_info, thread_resume, thread_set_state, thread_terminate. \ No newline at end of file +

thread_suspend

+
+

+Function - Suspend a thread. +

SYNOPSIS

+
+kern_return_t   thread_suspend
+                (thread_act_t                     target_thread);
+
+

PARAMETERS

+
+

+

target_thread +
+[in thread send right] +The thread to be suspended. +
+

DESCRIPTION

+

+The thread_suspend function increments the suspend +count for target_thread +and prevents the thread from executing any more user-level instructions. +

+In this context, a user-level instruction can be either a machine instruction +executed in user mode or a system trap instruction, including +a page fault. If a +thread is currently executing within a system trap, the kernel +code may continue +to execute until it reaches the system return code or it may +suspend within the +kernel code. In either case, the system trap returns when the thread resumes. +

+To resume a suspended thread, use thread_resume. If +the suspend count is +greater than one, thread_resume must be repeated that +number of times. +

CAUTIONS

+

+Unpredictable results may occur if a program suspends a thread and alters its +user state so that its direction is changed upon resuming. Note that the +thread_abort function allows a system call to be aborted +only if it is progressing in a +predictable way. +

RETURN VALUES

+

+Only generic errors apply. +

RELATED INFORMATION

+

+Functions: +task_resume, +task_suspend, +thread_abort, +thread_get_state, +thread_info, +thread_resume, +thread_set_state, +thread_terminate.