1 <h2>task_set_policy
</h2>
4 <strong>Function
</strong> - Set target task's default scheduling policy state. (Protected Interface.)
7 <strong>kern_return_t task_set_policy
</strong>
8 <strong>(task_t
</strong> <var>task
</var>,
9 <strong>processor_set_t
</strong> <var>processor_set
</var>,
10 <strong>policy_t
</strong> <var>policy
</var>,
11 <strong>policy_base_t
</strong> <var>base
</var>,
12 <strong>mach_msg_type_number_t
</strong> <var>base_count
</var>,
13 <strong>policy_limit_t
</strong> <var>limit
</var>,
14 <strong>mach_msg_type_number_t
</strong> <var>limit_count
</var>,
15 <strong>boolean_t
</strong> <var>change_threads
</var><strong>);
</strong>
22 The task whose scheduling policy is to be set.
23 <dt> <var>processor_set
</var>
25 [in processor-set-control send right]
26 The control port for the processor
27 set to which the task is currently assigned.
28 <dt> <var>policy
</var>
31 Policy to be set. The values currently defined are
<strong>POLICY_TIMESHARE
</strong>,
32 <strong>POLICY_RR
</strong> (round robin) and
<strong>POLICY_FIFO
</strong> (firstin, first-out).
35 [pointer to in structure]
36 Base policy specific data,
<strong>policy_fifo_base
</strong>,
37 <strong>policy_rr_base
</strong> or
<strong>policy_timeshare_base
</strong>.
38 <dt> <var>base_count
</var>
41 The size of the buffer (in natural-sized units).
44 [pointer to in structure]
45 Policy specific limits,
<strong>policy_fifo_limit
</strong>,
46 <strong>policy_rr_limit
</strong> or
<strong>policy_timeshare_limit
</strong>.
47 <dt> <var>limit_count
</var>
50 The size of the buffer (in natural-sized units).
51 <dt> <var>change_threads
</var>
54 True if the scheduling attributes for all contained threads
55 should be changed as well.
59 The
<strong>task_set_policy
</strong> function sets the scheduling attributes,
60 both base and limit, for
<var>task
</var>.
61 <var>policy
</var> may be any policy implemented by the processor set whether or
63 <h3>RETURN VALUES
</h3>
65 <dt> <strong>KERN_INVALID_PROCESSOR_SET
</strong>
67 <var>processor_set
</var> is not the task's processor set control port.
69 <h3>RELATED INFORMATION
</h3>
72 <a href=
"P_set_policy_control.html"><strong>processor_set_policy_control
</strong></a>,
73 <a href=
"thread_policy.html"><strong>thread_policy
</strong></a>,
74 <a href=
"thread_set_policy.html"><strong>thread_set_policy
</strong></a>,
75 <a href=
"task_policy.html"><strong>task_policy
</strong></a>.
78 <a href=
"policy_fifo_info.html"><strong>policy_fifo_info
</strong></a>,
79 <a href=
"policy_rr_info.html"><strong>policy_rr_info
</strong></a>,
80 <a href=
"policy_timeshare_info.html"><strong>policy_timeshare_info
</strong></a>.