xref: /xnu-10002.1.13/osfmk/man/P_set_policy_control.html (revision 1031c584a5e37aff177559b9f69dbd3c8c3fd30a)
1*1031c584SApple OSS Distributions<h2>processor_set_policy_control</h2>
2*1031c584SApple OSS Distributions<hr>
3*1031c584SApple OSS Distributions<p>
4*1031c584SApple OSS Distributions<strong>Function</strong> - Set target processor set's scheduling policy state.
5*1031c584SApple OSS Distributions<h3>SYNOPSIS</h3>
6*1031c584SApple OSS Distributions<pre>
7*1031c584SApple OSS Distributions<strong>kern_return_t	processor_set_policy_control</strong>
8*1031c584SApple OSS Distributions		<strong>(processor_set_t</strong>	<var>processor_set_control</var>,
9*1031c584SApple OSS Distributions		<strong>processor_set_flavor_t</strong>	<var>flavor</var>,
10*1031c584SApple OSS Distributions		<strong>processor_set_info_t</strong>	<var>policy_info</var>,
11*1031c584SApple OSS Distributions		<strong>mach_msg_type_number_t*</strong>	<var>policy_info_count</var>,
12*1031c584SApple OSS Distributions		<strong>boolean_t</strong>	<var>change_tasks_threads</var><strong>);</strong>
13*1031c584SApple OSS Distributions</pre>
14*1031c584SApple OSS Distributions<h3>PARAMETERS</h3>
15*1031c584SApple OSS Distributions<dl>
16*1031c584SApple OSS Distributions<dt> <var>processor_set_control</var>
17*1031c584SApple OSS Distributions<dd>
18*1031c584SApple OSS Distributions[in processor-set-control send right]
19*1031c584SApple OSS DistributionsA processor set control port.
20*1031c584SApple OSS Distributions<dt> <var>flavor</var>
21*1031c584SApple OSS Distributions<dd>
22*1031c584SApple OSS Distributions[in scalar]
23*1031c584SApple OSS DistributionsThe type of policy change to make.
24*1031c584SApple OSS Distributions<dl>
25*1031c584SApple OSS Distributions<dt> <strong>PROCESSOR_SET_TIMESHARE_DEFAULT</strong>
26*1031c584SApple OSS Distributions<dd>
27*1031c584SApple OSS DistributionsChange the base attributes for the timeshare scheduling
28*1031c584SApple OSS Distributionspolicy, making timeshare the default policy.  The structure is
29*1031c584SApple OSS Distributions<strong>policy_timeshare_base</strong>.
30*1031c584SApple OSS Distributions<dt> <strong>PROCESSOR_SET_FIFO_DEFAULT</strong>
31*1031c584SApple OSS Distributions<dd>
32*1031c584SApple OSS DistributionsChange the base attributes for the FIFO (first-in, first-out)
33*1031c584SApple OSS Distributionsscheduling policy, making FIFO the default policy.  The
34*1031c584SApple OSS Distributionsstructure is <strong>policy_fifo_base</strong>.
35*1031c584SApple OSS Distributions<dt> <strong>PROCESSOR_SET_RR_DEFAULT</strong>
36*1031c584SApple OSS Distributions<dd>
37*1031c584SApple OSS DistributionsChanged the base attributes for the round-robin scheduling
38*1031c584SApple OSS Distributionspolicy, making round robin the default policy.  The structure is
39*1031c584SApple OSS Distributions<strong>policy_rr_base</strong>.
40*1031c584SApple OSS Distributions<dt> <strong>PROCESSOR_SET_TIMESHARE_LIMITS</strong>
41*1031c584SApple OSS Distributions<dd>
42*1031c584SApple OSS DistributionsChange the limits on the allowed timeshare policy attributes.
43*1031c584SApple OSS DistributionsThe structure is defined by <strong>policy_timeshare_limit</strong>.
44*1031c584SApple OSS Distributions<dt> <strong>PROCESSOR_SET_RR_LIMITS</strong>
45*1031c584SApple OSS Distributions<dd>
46*1031c584SApple OSS DistributionsChange the limits on the allowed round robin policy
47*1031c584SApple OSS Distributionsattributes.  The structure is defined by <strong>policy_rr_limit</strong>.
48*1031c584SApple OSS Distributions<dt> <strong>PROCESSOR_SET_FIFO_LIMITS</strong>
49*1031c584SApple OSS Distributions<dd>
50*1031c584SApple OSS DistributionsChange the limits on the allowed first-in, first-out policy
51*1031c584SApple OSS Distributionsattributes.  The structure is defined by <strong>policy_fifo_limit</strong>.
52*1031c584SApple OSS Distributions<dt> <strong>PROCESSOR_SET_ENABLED_POLICIES</strong>
53*1031c584SApple OSS Distributions<dd>
54*1031c584SApple OSS DistributionsChange the set of enabled policies.  The data is a bit-vector.
55*1031c584SApple OSS Distributions</dl>
56*1031c584SApple OSS Distributions<dt> <var>policy_info</var>
57*1031c584SApple OSS Distributions<dd>
58*1031c584SApple OSS Distributions[in structure]
59*1031c584SApple OSS DistributionsThe relevant policy information.
60*1031c584SApple OSS Distributions<dt> <var>policy_info_count</var>
61*1031c584SApple OSS Distributions<dd>
62*1031c584SApple OSS Distributions[in scalar]
63*1031c584SApple OSS DistributionsThe size of the buffer (in natural-sized units).
64*1031c584SApple OSS Distributions<dt> <var>change_tasks_threads</var>
65*1031c584SApple OSS Distributions<dd>
66*1031c584SApple OSS Distributions[in scalar]
67*1031c584SApple OSS DistributionsIf true, any assigned task or thread whose policy is no
68*1031c584SApple OSS Distributionslonger enabled or whose scheduling attributes exceed the current limits will
69*1031c584SApple OSS Distributionshave their limits adjusted or their policy set to the default as
70*1031c584SApple OSS Distributionsappropriate.
71*1031c584SApple OSS Distributions</dl>
72*1031c584SApple OSS Distributions<h3>DESCRIPTION</h3>
73*1031c584SApple OSS Distributions<p>
74*1031c584SApple OSS DistributionsThe <strong>processor_set_policy_control</strong> function controls
75*1031c584SApple OSS Distributionsscheduling attributes governing the processor set.
76*1031c584SApple OSS Distributions<h3>RETURN VALUES</h3>
77*1031c584SApple OSS Distributions<p>
78*1031c584SApple OSS DistributionsOnly generic errors apply.
79*1031c584SApple OSS Distributions<h3>RELATED INFORMATION</h3>
80*1031c584SApple OSS Distributions<p>
81*1031c584SApple OSS DistributionsFunctions:
82*1031c584SApple OSS Distributions<a href="processor_set_statistics.html">processor_set_statistics</a>,
83*1031c584SApple OSS Distributions<a href="processor_set_create.html">processor_set_create</a>,
84*1031c584SApple OSS Distributions<a href="processor_set_default.html">processor_set_default</a>,
85*1031c584SApple OSS Distributions<a href="processor_assign.html">processor_assign</a>,
86*1031c584SApple OSS Distributions<a href="processor_set_info.html">processor_set_info</a>.
87*1031c584SApple OSS Distributions<p>
88*1031c584SApple OSS DistributionsData Structures:
89*1031c584SApple OSS Distributions<a href="policy_timeshare_info.html">policy_timeshare_info</a>,
90*1031c584SApple OSS Distributions<a href="policy_rr_info.html">policy_rr_info</a>,
91*1031c584SApple OSS Distributions<a href="policy_fifo_info.html">policy_fifo_info</a>.
92