xref: /xnu-10002.81.5/osfmk/man/P_set_policy_disable.html (revision 5e3eaea39dcf651e66cb99ba7d70e32cc4a99587)
1*5e3eaea3SApple OSS Distributions<h2>processor_set_policy_disable</h2>
2*5e3eaea3SApple OSS Distributions<hr>
3*5e3eaea3SApple OSS Distributions<p>
4*5e3eaea3SApple OSS Distributions<strong>Function</strong> - Disables a scheduling policy for a processor set.
5*5e3eaea3SApple OSS Distributions<h3>SYNOPSIS</h3>
6*5e3eaea3SApple OSS Distributions<pre>
7*5e3eaea3SApple OSS Distributions<strong>#include&lt mach/mach_host.h&gt</strong>
8*5e3eaea3SApple OSS Distributions
9*5e3eaea3SApple OSS Distributions<strong>kern_return_t	processor_set_policy_disable</strong>
10*5e3eaea3SApple OSS Distributions		<strong>(processor_set_t</strong>	<var>processor_set</var>,
11*5e3eaea3SApple OSS Distributions		<strong>int</strong>	<var>policy</var>,
12*5e3eaea3SApple OSS Distributions		<strong>boolean_t</strong>	<var>change_threads</var><strong>);</strong>
13*5e3eaea3SApple OSS Distributions</pre>
14*5e3eaea3SApple OSS Distributions<h3>PARAMETERS</h3>
15*5e3eaea3SApple OSS Distributions<dl>
16*5e3eaea3SApple OSS Distributions<dt> <var>processor_set</var>
17*5e3eaea3SApple OSS Distributions<dd>
18*5e3eaea3SApple OSS Distributions[in processor-set-control port] The control port for the processor set for which a scheduling policy is to be disabled.
19*5e3eaea3SApple OSS Distributions<dt> <var>policy</var>
20*5e3eaea3SApple OSS Distributions<dd>
21*5e3eaea3SApple OSS Distributions[in scalar] Policy to be disabled. The values currently defined are POLICY_TIMESHARE and POLICY_FIXEDPRI.
22*5e3eaea3SApple OSS Distributions<dt> <var>change_threads</var>
23*5e3eaea3SApple OSS Distributions<dd>
24*5e3eaea3SApple OSS Distributions[in scalar] If true, causes the scheduling policy for all threads currently running with policy to POLICY_TIMESHARE.
25*5e3eaea3SApple OSS Distributions</dl>
26*5e3eaea3SApple OSS Distributions<h3>DESCRIPTION</h3>
27*5e3eaea3SApple OSS Distributions<p>
28*5e3eaea3SApple OSS DistributionsThe <strong>processor_set_policy_disable</strong>
29*5e3eaea3SApple OSS Distributionsfunction restricts the set of scheduling policies allowed for
30*5e3eaea3SApple OSS Distributions<var>processor_set</var>. The set of scheduling policies allowed for a
31*5e3eaea3SApple OSS Distributionsprocessor set is the set of policies allowed to be set for threads
32*5e3eaea3SApple OSS Distributionsassigned to that processor set. The current set of permitted policies
33*5e3eaea3SApple OSS Distributionscan be obtained from <strong>processor_set_info</strong>. Timesharing may
34*5e3eaea3SApple OSS Distributionsnot be forbidden for any processor set. This is a compromise to reduce
35*5e3eaea3SApple OSS Distributionsthe complexity of the assign operation; any thread whose
36*5e3eaea3SApple OSS Distributions<var>policy</var> is forbidden by its target processor set has its
37*5e3eaea3SApple OSS Distributions<var>policy</var> reset to timesharing. Disabling a scheduling
38*5e3eaea3SApple OSS Distributions<var>policy</var> for a processor set has no effect on threads
39*5e3eaea3SApple OSS Distributionscurrently assigned to that processor set unless
40*5e3eaea3SApple OSS Distributions<var>change_threads</var> is TRUE, in which case their policies will
41*5e3eaea3SApple OSS Distributionsbe reset to timesharing.
42*5e3eaea3SApple OSS Distributions<h3>RETURN VALUES</h3>
43*5e3eaea3SApple OSS Distributions<p>
44*5e3eaea3SApple OSS DistributionsOnly generic errors apply.
45*5e3eaea3SApple OSS Distributions<h3>RELATED INFORMATION</h3>
46*5e3eaea3SApple OSS Distributions<p>
47*5e3eaea3SApple OSS DistributionsFunctions:
48*5e3eaea3SApple OSS Distributions<a href="P_set_policy_enable.html">processor_set_policy_enable</a>,
49*5e3eaea3SApple OSS Distributions<a href="processor_set_info.html">processor_set_info</a>,
50*5e3eaea3SApple OSS Distributions<a href="thread_policy.html">thread_policy</a>.
51