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