]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/task_suspend.html
xnu-7195.60.75.tar.gz
[apple/xnu.git] / osfmk / man / task_suspend.html
1 <h2>task_suspend</h2>
2 <hr>
3 <p>
4 <strong>Function</strong> - Suspend the target task.
5 <h3>SYNOPSIS</h3>
6 <pre>
7 <strong>kern_return_t task_suspend</strong>
8 <strong>(task_t</strong> <var>task</var><strong>);</strong>
9 </pre>
10 <h3>PARAMETERS</h3>
11 <dl>
12 <p>
13 <dt> <var>task</var>
14 <dd>
15 [in task send right]
16 The port for the task to be suspended.
17 </dl>
18 <h3>DESCRIPTION</h3>
19 <p>
20 The <strong>task_suspend</strong> function increments the suspend count
21 for task and stops all
22 threads within the task. As long as the suspend count is positive,
23 no newly-created threads can execute. The function does not return until all
24 of the task's threads have been suspended.
25 <h3>NOTES</h3>
26 <p>
27 To resume a suspended task and its threads, use <strong>task_resume</strong>.
28 If the suspend
29 count is greater than one, <strong>task_resume</strong> must be repeated
30 that number of times.
31 <h3>RETURN VALUES</h3>
32 <p>
33 Only generic errors apply.
34 <h3>RELATED INFORMATION</h3>
35 <p>
36 Functions:
37 <a href="task_create.html"><strong>task_create</strong></a>,
38 <a href="task_info.html"><strong>task_info</strong></a>,
39 <a href="task_resume.html"><strong>task_resume</strong></a>,
40 <a href="task_terminate.html"><strong>task_terminate</strong></a>,
41 <a href="thread_suspend.html"><strong>thread_suspend</strong></a>.