xref: /xnu-8792.81.2/osfmk/man/processor_set_max_priority.html (revision 19c3b8c28c31cb8130e034cfb5df6bf9ba342d90)
1*19c3b8c2SApple OSS Distributions<h2>processor_set_max_priority</h2>
2*19c3b8c2SApple OSS Distributions<hr>
3*19c3b8c2SApple OSS Distributions<p>
4*19c3b8c2SApple OSS Distributions<strong>Function</strong> - Sets the maximum scheduling priority for a processor set.
5*19c3b8c2SApple OSS Distributions<h3>SYNOPSIS</h3>
6*19c3b8c2SApple OSS Distributions<pre>
7*19c3b8c2SApple OSS Distributions<strong>#include&lt mach/mach_host.h&gt</strong>
8*19c3b8c2SApple OSS Distributions
9*19c3b8c2SApple OSS Distributions<strong>kern_return_t	processor_set_max_priority</strong>
10*19c3b8c2SApple OSS Distributions		<strong>(processor_set_t</strong>	<var>processor_set</var>,
11*19c3b8c2SApple OSS Distributions		<strong>int</strong>	<var>priority</var>,
12*19c3b8c2SApple OSS Distributions		<strong>boolean_t</strong>	<var>change_threads</var><strong>);</strong>
13*19c3b8c2SApple OSS Distributions</pre>
14*19c3b8c2SApple OSS Distributions<h3>PARAMETERS</h3>
15*19c3b8c2SApple OSS Distributions<dl>
16*19c3b8c2SApple OSS Distributions<dt> <var>processor_set</var>
17*19c3b8c2SApple OSS Distributions<dd>
18*19c3b8c2SApple OSS Distributions[in processor-set-control port] The control port for the processor set whose maximum scheduling priority is to be set.
19*19c3b8c2SApple OSS Distributions<dt> <var>priority</var>
20*19c3b8c2SApple OSS Distributions<dd>
21*19c3b8c2SApple OSS Distributions[in scalar] The new priority for the processor set.
22*19c3b8c2SApple OSS Distributions<dt> <var>change_threads</var>
23*19c3b8c2SApple OSS Distributions<dd>
24*19c3b8c2SApple OSS Distributions[in scalar] True if the maximum priority of existing threads assigned to this processor set should also be changed.
25*19c3b8c2SApple OSS Distributions</dl>
26*19c3b8c2SApple OSS Distributions<h3>DESCRIPTION</h3>
27*19c3b8c2SApple OSS Distributions<p>
28*19c3b8c2SApple OSS DistributionsThe <strong>processor_set_max_priority</strong>
29*19c3b8c2SApple OSS Distributionsfunction sets the maximum scheduling <var>priority</var> for
30*19c3b8c2SApple OSS Distributions<var>processor_set</var>. The maximum <var>priority</var> of a
31*19c3b8c2SApple OSS Distributionsprocessor set is used only when creating new threads. A new thread's
32*19c3b8c2SApple OSS Distributionsmaximum <var>priority</var> is set to that of its assigned processor
33*19c3b8c2SApple OSS Distributionsset. When assigned to a processor set, a thread's maximum
34*19c3b8c2SApple OSS Distributions<var>priority</var> is reduced, if necessary, to that of its new
35*19c3b8c2SApple OSS Distributionsprocessor set; its current <var>priority</var> is also reduced, as
36*19c3b8c2SApple OSS Distributionsneeded. Changing the maximum <var>priority</var> of a processor set
37*19c3b8c2SApple OSS Distributionsdoes not affect the <var>priority</var> of the currently assigned
38*19c3b8c2SApple OSS Distributionsthreads unless <var>change_threads</var> is TRUE. If this
39*19c3b8c2SApple OSS Distributions<var>priority</var> change violates the maximum <var>priority</var> of
40*19c3b8c2SApple OSS Distributionssome threads, their maximum priorities will be reduced to match.
41*19c3b8c2SApple OSS Distributions<h3>RETURN VALUES</h3>
42*19c3b8c2SApple OSS Distributions<p>
43*19c3b8c2SApple OSS DistributionsOnly generic errors apply.
44*19c3b8c2SApple OSS Distributions<h3>RELATED INFORMATION</h3>
45*19c3b8c2SApple OSS Distributions<p>
46*19c3b8c2SApple OSS DistributionsFunctions:
47*19c3b8c2SApple OSS Distributions<a href="thread_assign.html">thread_assign</a>.
48