xref: /xnu-11215/osfmk/man/task_suspend.html (revision 186b8fce)
1*e13b1fa5SApple OSS Distributions<h2>task_suspend</h2>
2*e13b1fa5SApple OSS Distributions<hr>
3*e13b1fa5SApple OSS Distributions<p>
4*e13b1fa5SApple OSS Distributions<strong>Function</strong> - Suspend the target task.
5*e13b1fa5SApple OSS Distributions<h3>SYNOPSIS</h3>
6*e13b1fa5SApple OSS Distributions<pre>
7*e13b1fa5SApple OSS Distributions<strong>kern_return_t   task_suspend</strong>
8*e13b1fa5SApple OSS Distributions                <strong>(task_t</strong>          <var>task</var><strong>);</strong>
9*e13b1fa5SApple OSS Distributions</pre>
10*e13b1fa5SApple OSS Distributions<h3>PARAMETERS</h3>
11*e13b1fa5SApple OSS Distributions<dl>
12*e13b1fa5SApple OSS Distributions<p>
13*e13b1fa5SApple OSS Distributions<dt> <var>task</var>
14*e13b1fa5SApple OSS Distributions<dd>
15*e13b1fa5SApple OSS Distributions[in task send right]
16*e13b1fa5SApple OSS DistributionsThe port for the task to be suspended.
17*e13b1fa5SApple OSS Distributions</dl>
18*e13b1fa5SApple OSS Distributions<h3>DESCRIPTION</h3>
19*e13b1fa5SApple OSS Distributions<p>
20*e13b1fa5SApple OSS DistributionsThe <strong>task_suspend</strong> function increments the suspend count
21*e13b1fa5SApple OSS Distributionsfor task and stops all
22*e13b1fa5SApple OSS Distributionsthreads within the task.  As long as the suspend count is positive,
23*e13b1fa5SApple OSS Distributionsno newly-created threads can execute.  The function does not return until all
24*e13b1fa5SApple OSS Distributionsof the task's threads have been suspended.
25*e13b1fa5SApple OSS Distributions<h3>NOTES</h3>
26*e13b1fa5SApple OSS Distributions<p>
27*e13b1fa5SApple OSS DistributionsTo resume a suspended task and its threads, use <strong>task_resume</strong>.
28*e13b1fa5SApple OSS DistributionsIf the suspend
29*e13b1fa5SApple OSS Distributionscount is greater than one, <strong>task_resume</strong> must be repeated
30*e13b1fa5SApple OSS Distributionsthat number of times.
31*e13b1fa5SApple OSS Distributions<h3>RETURN VALUES</h3>
32*e13b1fa5SApple OSS Distributions<p>
33*e13b1fa5SApple OSS DistributionsOnly generic errors apply.
34*e13b1fa5SApple OSS Distributions<h3>RELATED INFORMATION</h3>
35*e13b1fa5SApple OSS Distributions<p>
36*e13b1fa5SApple OSS DistributionsFunctions:
37*e13b1fa5SApple OSS Distributions<a href="task_create.html"><strong>task_create</strong></a>,
38*e13b1fa5SApple OSS Distributions<a href="task_info.html"><strong>task_info</strong></a>,
39*e13b1fa5SApple OSS Distributions<a href="task_resume.html"><strong>task_resume</strong></a>,
40*e13b1fa5SApple OSS Distributions<a href="task_terminate.html"><strong>task_terminate</strong></a>,
41*e13b1fa5SApple OSS Distributions<a href="thread_suspend.html"><strong>thread_suspend</strong></a>.
42