-<h2>thread_policy</h2>\r<hr>\r<p>\r<strong>Function</strong> - Set target thread's scheduling policy state.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>kern_return_t thread_policy</strong>\r <strong>(thread_act_t</strong> <var>thread</var>,\r <strong>policy_t</strong> <var>policy</var>,\r <strong>policy_base_t</strong> <var>base</var>,\r <strong>base</strong> <var>base_count</var>,\r <strong>boolean_t</strong> <var>set_limit</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>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 scheduling policy specific data,\r<strong>policy_fifo_base</strong>, <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>set_limit</var> \r<dd>\r[in scalar]\rTrue if the thread's scheduling limits should be restricted to \rallow no more service than specified by <var>base</var>.\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>thread_policy</strong> function sets the scheduling policy\rto be applied to thread. <var>policy</var> must be a scheduling policy \rcurrently "enabled" for the thread's assigned processor set.\r<h3>RETURN VALUES</h3>\r<dl>\r<p>\r<dt> <strong>KERN_INVALID_POLICY</strong>\r<dd>\rThe processor set to which <var>thread</var> is currently assigned does\rnot currently enable <var>policy</var>.\r<p>\r<dt> <strong>KERN_POLICY_LIMIT</strong>\r<dd>\rThe specified scheduling attributes exceeds the thread's limits.\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_set_policy.html"><strong>thread_set_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
\ No newline at end of file
+<h2>thread_policy</h2>
+<hr>
+<p>
+<strong>Function</strong> - Set target thread's scheduling policy state.
+<h3>SYNOPSIS</h3>
+<pre>
+<strong>kern_return_t thread_policy</strong>
+ <strong>(thread_act_t</strong> <var>thread</var>,
+ <strong>policy_t</strong> <var>policy</var>,
+ <strong>policy_base_t</strong> <var>base</var>,
+ <strong>base</strong> <var>base_count</var>,
+ <strong>boolean_t</strong> <var>set_limit</var><strong>);</strong>
+</pre>
+<h3>PARAMETERS</h3>
+<dl>
+<p>
+<dt> <var>thread</var>
+<dd>
+[in thread send right]
+The thread scheduling policy is to be set.
+<p>
+<dt> <var>policy</var>
+<dd>
+[in scalar]
+Policy to be set. The values currently defined are <strong>POLICY_TIMESHARE</strong>,
+<strong>POLICY_RR</strong> (round robin) and <strong>POLICY_FIFO</strong> (firstin, first-out).
+<p>
+<dt> <var>base</var>
+<dd>
+[pointer to in structure]
+Base scheduling policy specific data,
+<strong>policy_fifo_base</strong>, <strong>policy_rr_base</strong> or <strong>policy_timeshare_base</strong>.
+<p>
+<dt> <var>base_count</var>
+<dd>
+[in scalar]
+The size of the buffer (in natural-sized units).
+<p>
+<dt> <var>set_limit</var>
+<dd>
+[in scalar]
+True if the thread's scheduling limits should be restricted to
+allow no more service than specified by <var>base</var>.
+</dl>
+<h3>DESCRIPTION</h3>
+<p>
+The <strong>thread_policy</strong> function sets the scheduling policy
+to be applied to thread. <var>policy</var> must be a scheduling policy
+currently "enabled" for the thread's assigned processor set.
+<h3>RETURN VALUES</h3>
+<dl>
+<p>
+<dt> <strong>KERN_INVALID_POLICY</strong>
+<dd>
+The processor set to which <var>thread</var> is currently assigned does
+not currently enable <var>policy</var>.
+<p>
+<dt> <strong>KERN_POLICY_LIMIT</strong>
+<dd>
+The specified scheduling attributes exceeds the thread's limits.
+</dl>
+<h3>RELATED INFORMATION</h3>
+<p>
+Functions:
+<a href="P_set_policy_control.html"><strong>processor_set_policy_control</strong></a>,
+<a href="thread_set_policy.html"><strong>thread_set_policy</strong></a>,
+<a href="task_policy.html"><strong>task_policy</strong></a>,
+<a href="task_set_policy.html"><strong>task_set_policy</strong></a>.
+<p>
+Data Structures:
+<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="policy_timeshare_info.html"><strong>policy_timeshare_info</strong></a>.