]>
Commit | Line | Data |
---|---|---|
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] | |
19 | The port for the task for which the information is to | |
20 | be returned. | |
21 | <p> | |
22 | <dt> <var>flavor</var> | |
23 | <dd> | |
24 | [in scalar] | |
25 | The type of information to be returned. Valid values are: | |
26 | <dl> | |
27 | <p> | |
28 | <dt> <strong>TASK_BASIC_INFO</strong> | |
29 | <dd> | |
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>. | |
33 | <p> | |
34 | <dt> <strong>TASK_THREAD_TIMES_INFO</strong> | |
35 | <dd> | |
36 | Returns system and user space run-times for live threads. The | |
37 | structure returned is <strong>task_thread_times_info</strong>. | |
38 | <p> | |
39 | <dt> <strong>TASK_SCHED_FIFO_INFO</strong> | |
40 | <dd> | |
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>. | |
43 | <p> | |
44 | <dt> <strong>TASK_SCHED_RR_INFO</strong> | |
45 | <dd> | |
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>. | |
49 | <p> | |
50 | <dt> <strong>TASK_SCHED_TIMESHARE_INFO</strong> | |
51 | <dd> | |
52 | Returns default timeshare scheduling policy attributes to be | |
53 | assigned to new threads. The structure returned is | |
54 | <strong>policy_timeshare_base</strong>. | |
55 | <p> | |
56 | <dt> <strong>TASK_SECURITY_TOKEN</strong> | |
57 | <dd> | |
58 | Returns the security token for the task. The value returned is of | |
59 | type <var>security_token_t</var>. | |
60 | <p> | |
61 | <dt> <strong>TASK_AUDIT_TOKEN</strong> | |
62 | <dd> | |
63 | Returns the security token for the task. The value returned is of | |
64 | type <var>audit_token_t</var>. | |
65 | <p> | |
66 | <dt> <strong>TASK_USER_DATA</strong> | |
67 | <dd> | |
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>. | |
71 | </dl> | |
72 | <p> | |
73 | <dt> <var>task_info</var> | |
74 | <dd> | |
75 | [out structure] | |
76 | Information about the specified task. | |
77 | <p> | |
78 | <dt> <var>task_info_count</var> | |
79 | <dd> | |
80 | [in/out scalar] | |
81 | On input, the maximum size of the buffer; on output, the | |
82 | size returned (in natural-sized units). | |
83 | </dl> | |
84 | <h3>DESCRIPTION</h3> | |
85 | <p> | |
86 | The <strong>task_info</strong> function returns an information structure | |
87 | of type <var>flavor</var>. | |
88 | <h3>NOTES</h3> | |
89 | <p> | |
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> | |
94 | <dl> | |
95 | <p> | |
96 | <dt> <strong>KERN_INVALID_POLICY</strong> | |
97 | <dd> | |
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. | |
100 | </dl> | |
101 | <h3>RELATED INFORMATION</h3> | |
102 | <p> | |
103 | Functions: | |
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> | |
112 | Data 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>. |