P_set_policy_disable.html   [plain text]

<strong>Function</strong> - Disables a scheduling policy for a processor set.
<strong>#include&lt mach/mach_host.h&gt</strong>

<strong>kern_return_t	processor_set_policy_disable</strong>
		<strong>(processor_set_t</strong>	<var>processor_set</var>,
		<strong>int</strong>	<var>policy</var>,
		<strong>boolean_t</strong>	<var>change_threads</var><strong>);</strong>
<dt> <var>processor_set</var>
[in processor-set-control port] The control port for the processor set for which a scheduling policy is to be disabled.
<dt> <var>policy</var>
[in scalar] Policy to be disabled. The values currently defined are POLICY_TIMESHARE and POLICY_FIXEDPRI.
<dt> <var>change_threads</var>
[in scalar] If true, causes the scheduling policy for all threads currently running with policy to POLICY_TIMESHARE.
The <strong>processor_set_policy_disable</strong>
function restricts the set of scheduling policies allowed for
<var>processor_set</var>. The set of scheduling policies allowed for a
processor set is the set of policies allowed to be set for threads
assigned to that processor set. The current set of permitted policies
can be obtained from <strong>processor_set_info</strong>. Timesharing may
not be forbidden for any processor set. This is a compromise to reduce
the complexity of the assign operation; any thread whose
<var>policy</var> is forbidden by its target processor set has its
<var>policy</var> reset to timesharing. Disabling a scheduling
<var>policy</var> for a processor set has no effect on threads
currently assigned to that processor set unless
<var>change_threads</var> is TRUE, in which case their policies will
be reset to timesharing.
Only generic errors apply.
<a href="P_set_policy_enable.html">processor_set_policy_enable</a>,
<a href="processor_set_info.html">processor_set_info</a>,
<a href="thread_policy.html">thread_policy</a>.