4 <strong>Function
</strong> - Return per-task information according to specified flavor.
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>
19 The port for the task for which the information is to
22 <dt> <var>flavor
</var>
25 The type of information to be returned. Valid values are:
28 <dt> <strong>TASK_BASIC_INFO
</strong>
30 Returns basic information about the task, such as the task's
31 suspend count and number of resident pages. The structure
32 returned is
<strong>task_basic_info
</strong>.
34 <dt> <strong>TASK_THREAD_TIMES_INFO
</strong>
36 Returns system and user space run-times for live threads. The
37 structure returned is
<strong>task_thread_times_info
</strong>.
39 <dt> <strong>TASK_SCHED_FIFO_INFO
</strong>
41 Returns default
<strong>FIFO
</strong> scheduling policy attributes to be
42 assigned to new threads. The structure returned is
<strong>policy_fifo_base
</strong>.
44 <dt> <strong>TASK_SCHED_RR_INFO
</strong>
46 Returns default round-robin scheduling policy attributes to be
47 assigned to new threads. The structure returned is
48 <strong>policy_rr_base
</strong>.
50 <dt> <strong>TASK_SCHED_TIMESHARE_INFO
</strong>
52 Returns default timeshare scheduling policy attributes to be
53 assigned to new threads. The structure returned is
54 <strong>policy_timeshare_base
</strong>.
56 <dt> <strong>TASK_SECURITY_TOKEN
</strong>
58 Returns the security token for the task. The value returned is of
59 type
<var>security_token_t
</var>.
61 <dt> <strong>TASK_AUDIT_TOKEN
</strong>
63 Returns the security token for the task. The value returned is of
64 type
<var>audit_token_t
</var>.
66 <dt> <strong>TASK_USER_DATA
</strong>
68 Returns user-specified information previously established via the
69 <strong>task_set_info
</strong> interface. The structure returned is
70 <strong>task_user_data
</strong>.
73 <dt> <var>task_info
</var>
76 Information about the specified task.
78 <dt> <var>task_info_count
</var>
81 On input, the maximum size of the buffer; on output, the
82 size returned (in natural-sized units).
86 The
<strong>task_info
</strong> function returns an information structure
87 of type
<var>flavor
</var>.
90 At any given time, a task has one default scheduling policy assigned to it (as
91 returned by
<strong>TASK_BASIC_INFO
</strong>). As such, only one of the scheduling flavors
92 will return valid information.
93 <h3>RETURN VALUES
</h3>
96 <dt> <strong>KERN_INVALID_POLICY
</strong>
98 A request was made for the default scheduling policy attributes for the
99 task but the requested policy is not the task's default policy.
101 <h3>RELATED INFORMATION
</h3>
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>.
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>.