]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/task_info.html
xnu-4903.221.2.tar.gz
[apple/xnu.git] / osfmk / man / task_info.html
CommitLineData
13fec989
A
1<h2>task_info</h2>
2<hr>
3<p>
4<strong>Function</strong> - Return per-task information according to specified flavor.
5<h3>SYNOPSIS</h3>
6<pre>
7<strong>kern_return_t task_info</strong>
8 <strong>(task_t</strong> <var>task</var>,
9 <strong>task_flavor_t</strong> <var>flavor</var>,
10 <strong>task_info_t</strong> <var>task_info</var>,
11 <strong>mach_msg_type_number_t</strong> <var>task_info_count</var><strong>);</strong>
12</pre>
13<h3>PARAMETERS</h3>
14<dl>
15<p>
16<dt> <var>task</var>
17<dd>
18[in task send right]
19The port for the task for which the information is to
20be returned.
21<p>
22<dt> <var>flavor</var>
23<dd>
24[in scalar]
25The type of information to be returned. Valid values are:
26<dl>
27<p>
28<dt> <strong>TASK_BASIC_INFO</strong>
29<dd>
30Returns basic information about the task, such as the task's
31suspend count and number of resident pages. The structure
32returned is <strong>task_basic_info</strong>.
33<p>
34<dt> <strong>TASK_THREAD_TIMES_INFO</strong>
35<dd>
36Returns system and user space run-times for live threads. The
37structure returned is <strong>task_thread_times_info</strong>.
38<p>
39<dt> <strong>TASK_SCHED_FIFO_INFO</strong>
40<dd>
41Returns default <strong>FIFO</strong> scheduling policy attributes to be
42assigned to new threads. The structure returned is <strong>policy_fifo_base</strong>.
43<p>
44<dt> <strong>TASK_SCHED_RR_INFO</strong>
45<dd>
46Returns default round-robin scheduling policy attributes to be
47assigned to new threads. The structure returned is
48<strong>policy_rr_base</strong>.
49<p>
50<dt> <strong>TASK_SCHED_TIMESHARE_INFO</strong>
51<dd>
52Returns default timeshare scheduling policy attributes to be
53assigned to new threads. The structure returned is
54<strong>policy_timeshare_base</strong>.
55<p>
56<dt> <strong>TASK_SECURITY_TOKEN</strong>
57<dd>
58Returns the security token for the task. The value returned is of
59type <var>security_token_t</var>.
60<p>
61<dt> <strong>TASK_AUDIT_TOKEN</strong>
62<dd>
63Returns the security token for the task. The value returned is of
64type <var>audit_token_t</var>.
65<p>
66<dt> <strong>TASK_USER_DATA</strong>
67<dd>
68Returns user-specified information previously established via the
69<strong>task_set_info</strong> interface. The structure returned is
70<strong>task_user_data</strong>.
71</dl>
72<p>
73<dt> <var>task_info</var>
74<dd>
75[out structure]
76Information about the specified task.
77<p>
78<dt> <var>task_info_count</var>
79<dd>
80[in/out scalar]
81On input, the maximum size of the buffer; on output, the
82size returned (in natural-sized units).
83</dl>
84<h3>DESCRIPTION</h3>
85<p>
86The <strong>task_info</strong> function returns an information structure
87of type <var>flavor</var>.
88<h3>NOTES</h3>
89<p>
90At any given time, a task has one default scheduling policy assigned to it (as
91returned by <strong>TASK_BASIC_INFO</strong>). As such, only one of the scheduling flavors
92will return valid information.
93<h3>RETURN VALUES</h3>
94<dl>
95<p>
96<dt> <strong>KERN_INVALID_POLICY</strong>
97<dd>
98A request was made for the default scheduling policy attributes for the
99task but the requested policy is not the task's default policy.
100</dl>
101<h3>RELATED INFORMATION</h3>
102<p>
103Functions:
104<a href="task_get_special_port.html"><strong>task_get_special_port</strong></a>,
105<a href="task_set_special_port.html"><strong>task_set_special_port</strong></a>,
106<a href="task_set_info.html"><strong>task_set_info</strong></a>,
107<a href="task_threads.html"><strong>task_threads</strong></a>,
108<a href="thread_info.html"><strong>thread_info</strong></a>,
109<a href="thread_get_state.html"><strong>thread_get_state</strong></a>,
110<a href="thread_set_state.html"><strong>thread_set_state</strong></a>.
111<p>
112Data Structures:
113<a href="task_basic_info.html"><strong>task_basic_info</strong></a>,
114<a href="policy_timeshare_info.html"><strong>policy_timeshare_info</strong></a>,
115<a href="policy_fifo_info.html"><strong>policy_fifo_info</strong></a>,
116<a href="policy_rr_info.html"><strong>policy_rr_info</strong></a>,
117<a href="task_thread_times_info.html"><strong>task_thread_times_info</strong></a>.