xref: /xnu-11215/osfmk/man/task_assign.html (revision 186b8fce)
1*e13b1fa5SApple OSS Distributions<h2>task_assign</h2>
2*e13b1fa5SApple OSS Distributions<hr>
3*e13b1fa5SApple OSS Distributions<p>
4*e13b1fa5SApple OSS Distributions<strong>Function</strong> - Assign a task to a processor set.
5*e13b1fa5SApple OSS Distributions<h3>SYNOPSIS</h3>
6*e13b1fa5SApple OSS Distributions<pre>
7*e13b1fa5SApple OSS Distributions<strong>kern_return_t   task_assign</strong>
8*e13b1fa5SApple OSS Distributions                <strong>(task_t</strong>                                    <var>task</var>,
9*e13b1fa5SApple OSS Distributions                 <strong>processor_set_t</strong>                  <var>processor_set</var>,
10*e13b1fa5SApple OSS Distributions                 <strong>boolean_t</strong>                       <var>assign_threads</var><strong>);</strong>
11*e13b1fa5SApple OSS Distributions</pre>
12*e13b1fa5SApple OSS Distributions<h3>PARAMETERS</h3>
13*e13b1fa5SApple OSS Distributions<dl>
14*e13b1fa5SApple OSS Distributions<dt> <var>task</var>
15*e13b1fa5SApple OSS Distributions<dd>
16*e13b1fa5SApple OSS Distributions[in task send right]
17*e13b1fa5SApple OSS DistributionsThe port for the task to be assigned.
18*e13b1fa5SApple OSS Distributions<dt> <var>processor_set</var>
19*e13b1fa5SApple OSS Distributions<dd>
20*e13b1fa5SApple OSS Distributions[in processor-set-control send right]
21*e13b1fa5SApple OSS DistributionsThe control port for the processor
22*e13b1fa5SApple OSS Distributionsset into which the task is to be assigned.
23*e13b1fa5SApple OSS Distributions<dt> <var>assign_threads</var>
24*e13b1fa5SApple OSS Distributions<dd>
25*e13b1fa5SApple OSS Distributions[in scalar]
26*e13b1fa5SApple OSS DistributionsTrue if this assignment should apply as well to the threads
27*e13b1fa5SApple OSS Distributionswithin the task.
28*e13b1fa5SApple OSS Distributions</dl>
29*e13b1fa5SApple OSS Distributions<h3>DESCRIPTION</h3>
30*e13b1fa5SApple OSS Distributions<p>
31*e13b1fa5SApple OSS DistributionsThe <strong>task_assign</strong> function assigns <var>task</var> to the set
32*e13b1fa5SApple OSS Distributions<var>processor_set</var>.
33*e13b1fa5SApple OSS DistributionsAfter the assignment is completed, newly created threads within this task
34*e13b1fa5SApple OSS Distributionswill be assigned to
35*e13b1fa5SApple OSS Distributionsthis processor set.  Any previous assignment of the task is nullified.
36*e13b1fa5SApple OSS Distributions<p>
37*e13b1fa5SApple OSS DistributionsIf <var>assign_threads</var> is <strong>TRUE</strong>, existing threads within the task
38*e13b1fa5SApple OSS Distributionswill also be assigned to the processor set.
39*e13b1fa5SApple OSS Distributions<h3>RETURN VALUES</h3>
40*e13b1fa5SApple OSS Distributions<p>
41*e13b1fa5SApple OSS DistributionsOnly generic errors apply.
42*e13b1fa5SApple OSS Distributions<h3>RELATED INFORMATION</h3>
43*e13b1fa5SApple OSS Distributions<p>
44*e13b1fa5SApple OSS DistributionsFunctions:
45*e13b1fa5SApple OSS Distributions<a href="task_assign_default.html"><strong>task_assign_default</strong></a>,
46*e13b1fa5SApple OSS Distributions<a href="task_get_assignment.html"><strong>task_get_assignment</strong></a>,
47*e13b1fa5SApple OSS Distributions<a href="processor_set_create.html"><strong>processor_set_create</strong></a>,
48*e13b1fa5SApple OSS Distributions<a href="processor_set_info.html"><strong>processor_set_info</strong></a>,
49*e13b1fa5SApple OSS Distributions<a href="thread_assign.html"><strong>thread_assign</strong></a>.
50