]> git.saurik.com Git - apple/xnu.git/blame_incremental - osfmk/man/thread_set_policy.html
xnu-517.tar.gz
[apple/xnu.git] / osfmk / man / thread_set_policy.html
... / ...
CommitLineData
1<h2>thread_set_policy</h2>\r<hr>\r<p>\r<strong>Function</strong> - Set target thread's scheduling policy state. (Protected Interface.)\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>kern_return_t thread_set_policy</strong>\r <strong>(thread_act_t</strong> <var>thread</var>,\r <strong>processor_set_t</strong> <var>processor_set</var>,\r <strong>policy_t</strong> <var>policy</var>,\r <strong>policy_base_t</strong> <var>base</var>,\r <strong>mach_msg_type_number_t</strong> <var>base_count</var>,\r <strong>policy_limit_t</strong> <var>limit</var>,\r <strong>mach_msg_type_number_</strong> <var>limit_count</var><strong>);</strong>\r</pre>\r<h3>PARAMETERS</h3>\r<dl>\r<p>\r<dt> <var>thread</var> \r<dd>\r[in thread send right]\rThe thread scheduling policy is to be set.\r<p>\r<dt> <var>processor_set</var> \r<dd>\r[in processor-set-control send right]\rThe control port for the processor \rset to which the thread is currently assigned.\r<p>\r<dt> <var>policy</var> \r<dd>\r[in scalar]\rPolicy to be set. The values currently defined are <strong>POLICY_TIMESHARE</strong>, \r<strong>POLICY_RR</strong> (round robin) and <strong>POLICY_FIFO</strong> (firstin, first-out).\r<p>\r<dt> <var>base</var> \r<dd>\r[pointer to in structure]\rBase policy specific data, <strong>policy_fifo_base</strong>, \r<strong>policy_rr_base</strong> or <strong>policy_timeshare_base</strong>.\r<p>\r<dt> <var>base_count</var> \r<dd>\r[in scalar]\rThe size of the buffer (in natural-sized units).\r<p>\r<dt> <var>limit</var> \r<dd>\r[pointer to in structure]\rPolicy specific limits, <strong>policy_fifo_limit</strong>,\r<strong>policy_rr_limit</strong> or <strong>policy_timeshare_limit</strong>.\r<p>\r<dt> <var>limit_count</var> \r<dd>\r[in scalar]\rThe size of the buffer (in natural-sized units).\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>thread_set_policy</strong> function sets the scheduling\rattributes, both base and limit, for <var>thread</var>. \r<var>policy</var> may be any policy implemented by the processor set \rwhether or not it is enabled.\r<h3>RETURN VALUES</h3>\r<dl>\r<p>\r<dt> <strong>KERN_INVALID_PROCESSOR_SET</strong>\r<dd>\r<var>processor_set</var> is not the thread's processor set control port.\r</dl>\r<h3>RELATED INFORMATION</h3>\r<p>\rFunctions:\r<a href="P_set_policy_control.html"><strong>processor_set_policy_control</strong></a>,\r<a href="thread_policy.html"><strong>thread_policy</strong></a>,\r<a href="task_policy.html"><strong>task_policy</strong></a>,\r<a href="task_set_policy.html"><strong>task_set_policy</strong></a>.\r<p>\rData Structures:\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="policy_timeshare_info.html"><strong>policy_timeshare_info</strong></a>.\r