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