xref: /xnu-10002.81.5/osfmk/man/task_threads.html (revision 5e3eaea39dcf651e66cb99ba7d70e32cc4a99587)
1*5e3eaea3SApple OSS Distributions<h2>task_threads</h2>
2*5e3eaea3SApple OSS Distributions<hr>
3*5e3eaea3SApple OSS Distributions<p>
4*5e3eaea3SApple OSS Distributions<strong>Function</strong> - Return the target task's list of threads.
5*5e3eaea3SApple OSS Distributions<h3>SYNOPSIS</h3>
6*5e3eaea3SApple OSS Distributions<pre>
7*5e3eaea3SApple OSS Distributions<strong>kern_return_t   task_threads</strong>
8*5e3eaea3SApple OSS Distributions                <strong>(task_t</strong>                                    <var>task</var>,
9*5e3eaea3SApple OSS Distributions                 <strong>thread_act_port_array_t</strong>            <var>thread_list</var>,
10*5e3eaea3SApple OSS Distributions                 <strong>mach_msg_type_number_t*</strong>           <var>thread_count</var><strong>);</strong>
11*5e3eaea3SApple OSS Distributions</pre>
12*5e3eaea3SApple OSS Distributions<h3>PARAMETERS</h3>
13*5e3eaea3SApple OSS Distributions<dl>
14*5e3eaea3SApple OSS Distributions<p>
15*5e3eaea3SApple OSS Distributions<dt> <var>task</var>
16*5e3eaea3SApple OSS Distributions<dd>
17*5e3eaea3SApple OSS Distributions[in task send right]
18*5e3eaea3SApple OSS DistributionsThe port for the task for which the thread list is to
19*5e3eaea3SApple OSS Distributionsbe returned.
20*5e3eaea3SApple OSS Distributions<p>
21*5e3eaea3SApple OSS Distributions<dt> <var>thread_list</var>
22*5e3eaea3SApple OSS Distributions<dd>
23*5e3eaea3SApple OSS Distributions[out pointer to dynamic array of thread send rights]
24*5e3eaea3SApple OSS DistributionsThe returned list of
25*5e3eaea3SApple OSS Distributionsthreads within <var>task</var>, in no particular order.
26*5e3eaea3SApple OSS Distributions<p>
27*5e3eaea3SApple OSS Distributions<dt> <var>thread_count</var>
28*5e3eaea3SApple OSS Distributions<dd>
29*5e3eaea3SApple OSS Distributions[out scalar]
30*5e3eaea3SApple OSS DistributionsThe returned count of threads in <var>thread_list</var>.
31*5e3eaea3SApple OSS Distributions</dl>
32*5e3eaea3SApple OSS Distributions<h3>DESCRIPTION</h3>
33*5e3eaea3SApple OSS Distributions<p>
34*5e3eaea3SApple OSS DistributionsThe <strong>task_threads</strong> function returns a list of the threads
35*5e3eaea3SApple OSS Distributionswithin <var>task</var>.  The calling
36*5e3eaea3SApple OSS Distributionstask or thread also receives a send right to the kernel port
37*5e3eaea3SApple OSS Distributionsfor each listed thread.
38*5e3eaea3SApple OSS Distributions<h3>RETURN VALUES</h3>
39*5e3eaea3SApple OSS Distributions<p>
40*5e3eaea3SApple OSS DistributionsOnly generic errors apply.
41*5e3eaea3SApple OSS Distributions<h3>RELATED INFORMATION</h3>
42*5e3eaea3SApple OSS Distributions<p>
43*5e3eaea3SApple OSS DistributionsFunctions:
44*5e3eaea3SApple OSS Distributions<a href="thread_create.html"><strong>thread_create</strong></a>,
45*5e3eaea3SApple OSS Distributions<a href="thread_terminate.html"><strong>thread_terminate</strong></a>,
46*5e3eaea3SApple OSS Distributions<a href="thread_suspend.html"><strong>thread_suspend</strong></a>.
47