]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/task_info.html
xnu-517.tar.gz
[apple/xnu.git] / osfmk / man / task_info.html
1 <h2>task_info</h2> <hr> <p> <strong>Function</strong> - Return per-task information according to specified flavor. <h3>SYNOPSIS</h3> <pre> <strong>kern_return_t task_info</strong> <strong>(task_t</strong> <var>task</var>, <strong>task_flavor_t</strong> <var>flavor</var>, <strong>task_info_t</strong> <var>task_info</var>, <strong>mach_msg_type_number_t</strong> <var>task_info_count</var><strong>);</strong> </pre> <h3>PARAMETERS</h3> <dl> <p> <dt> <var>task</var> <dd> [in task send right] The port for the task for which the information is to be returned. <p> <dt> <var>flavor</var> <dd> [in scalar] The type of information to be returned. Valid values are: <dl> <p> <dt> <strong>TASK_BASIC_INFO</strong> <dd> Returns basic information about the task, such as the task's suspend count and number of resident pages. The structure returned is <strong>task_basic_info</strong>. <p> <dt> <strong>TASK_THREAD_TIMES_INFO</strong> <dd> Returns system and user space run-times for live threads. The structure returned is <strong>task_thread_times_info</strong>. <p> <dt> <strong>TASK_SCHED_FIFO_INFO</strong> <dd> Returns default <strong>FIFO</strong> scheduling policy attributes to be assigned to new threads. The structure returned is <strong>policy_fifo_base</strong>. <p> <dt> <strong>TASK_SCHED_RR_INFO</strong> <dd> Returns default round-robin scheduling policy attributes to be assigned to new threads. The structure returned is <strong>policy_rr_base</strong>. <p> <dt> <strong>TASK_SCHED_TIMESHARE_INFO</strong> <dd> Returns default timeshare scheduling policy attributes to be assigned to new threads. The structure returned is <strong>policy_timeshare_base</strong>. <p> <dt> <strong>TASK_SECURITY_TOKEN</strong> <dd> Returns the security token for the task. The value returned is of type <var>security_token_t</var>. <p> <dt> <strong>TASK_AUDIT_TOKEN</strong> <dd> Returns the security token for the task. The value returned is of type <var>audit_token_t</var>. <p> <dt> <strong>TASK_USER_DATA</strong> <dd> Returns user-specified information previously established via the <strong>task_set_info</strong> interface. The structure returned is <strong>task_user_data</strong>. </dl> <p> <dt> <var>task_info</var> <dd> [out structure] Information about the specified task. <p> <dt> <var>task_info_count</var> <dd> [in/out scalar] On input, the maximum size of the buffer; on output, the size returned (in natural-sized units). </dl> <h3>DESCRIPTION</h3> <p> The <strong>task_info</strong> function returns an information structure of type <var>flavor</var>. <h3>NOTES</h3> <p> At any given time, a task has one default scheduling policy assigned to it (as returned by <strong>TASK_BASIC_INFO</strong>). As such, only one of the scheduling flavors will return valid information. <h3>RETURN VALUES</h3> <dl> <p> <dt> <strong>KERN_INVALID_POLICY</strong> <dd> A request was made for the default scheduling policy attributes for the task but the requested policy is not the task's default policy. </dl> <h3>RELATED INFORMATION</h3> <p> Functions: <a href="task_get_special_port.html"><strong>task_get_special_port</strong></a>, <a href="task_set_special_port.html"><strong>task_set_special_port</strong></a>, <a href="task_set_info.html"><strong>task_set_info</strong></a>, <a href="task_threads.html"><strong>task_threads</strong></a>, <a href="thread_info.html"><strong>thread_info</strong></a>, <a href="thread_get_state.html"><strong>thread_get_state</strong></a>, <a href="thread_set_state.html"><strong>thread_set_state</strong></a>. <p> Data Structures: <a href="task_basic_info.html"><strong>task_basic_info</strong></a>, <a href="policy_timeshare_info.html"><strong>policy_timeshare_info</strong></a>, <a href="policy_fifo_info.html"><strong>policy_fifo_info</strong></a>, <a href="policy_rr_info.html"><strong>policy_rr_info</strong></a>, <a href="task_thread_times_info.html"><strong>task_thread_times_info</strong></a>.