task_set_policy
Function - Set target task's default scheduling policy state. (Protected Interface.)
SYNOPSIS
kern_return_t task_set_policy
(task_t task,
processor_set_t processor_set,
policy_t policy,
policy_base_t base,
mach_msg_type_number_t base_count,
policy_limit_t limit,
mach_msg_type_number_t limit_count,
boolean_t change_threads);
PARAMETERS
- task
-
[in task send right]
The task whose scheduling policy is to be set.
- processor_set
-
[in processor-set-control send right]
The control port for the processor
set to which the task is currently assigned.
- policy
-
[in scalar]
Policy to be set. The values currently defined are POLICY_TIMESHARE,
POLICY_RR (round robin) and POLICY_FIFO (firstin, first-out).
- base
-
[pointer to in structure]
Base policy specific data, policy_fifo_base,
policy_rr_base or policy_timeshare_base.
- base_count
-
[in scalar]
The size of the buffer (in natural-sized units).
- limit
-
[pointer to in structure]
Policy specific limits, policy_fifo_limit,
policy_rr_limit or policy_timeshare_limit.
- limit_count
-
[in scalar]
The size of the buffer (in natural-sized units).
- change_threads
-
[in scalar]
True if the scheduling attributes for all contained threads
should be changed as well.
DESCRIPTION
The task_set_policy function sets the scheduling attributes,
both base and limit, for task.
policy may be any policy implemented by the processor set whether or
not it is enabled.
RETURN VALUES
- KERN_INVALID_PROCESSOR_SET
-
processor_set is not the task's processor set control port.
RELATED INFORMATION
Functions:
processor_set_policy_control,
thread_policy,
thread_set_policy,
task_policy.
Data Structures:
policy_fifo_info,
policy_rr_info,
policy_timeshare_info.