Back to Darwin Xnu

P Set Policy Control

osfmk/man/P_set_policy_control.html

latest2.6 KB
Original Source

processor_set_policy_control


Function - Set target processor set's scheduling policy state.

SYNOPSIS

**kern\_return\_t processor\_set\_policy\_control**** (processor\_set\_t **processor\_set\_control,** processor\_set\_flavor\_t **flavor,** processor\_set\_info\_t **policy\_info,** mach\_msg\_type\_number\_t\ ***policy\_info\_count,** boolean\_t **change\_tasks\_threads** );**

PARAMETERS

processor_set_control[in processor-set-control send right] A processor set control port. flavor[in scalar] The type of policy change to make. PROCESSOR_SET_TIMESHARE_DEFAULT Change the base attributes for the timeshare scheduling policy, making timeshare the default policy. The structure is policy_timeshare_base. PROCESSOR_SET_FIFO_DEFAULT Change the base attributes for the FIFO (first-in, first-out) scheduling policy, making FIFO the default policy. The structure is policy_fifo_base. PROCESSOR_SET_RR_DEFAULT Changed the base attributes for the round-robin scheduling policy, making round robin the default policy. The structure is policy_rr_base. PROCESSOR_SET_TIMESHARE_LIMITS Change the limits on the allowed timeshare policy attributes. The structure is defined by policy_timeshare_limit. PROCESSOR_SET_RR_LIMITS Change the limits on the allowed round robin policy attributes. The structure is defined by policy_rr_limit. PROCESSOR_SET_FIFO_LIMITS Change the limits on the allowed first-in, first-out policy attributes. The structure is defined by policy_fifo_limit. PROCESSOR_SET_ENABLED_POLICIES Change the set of enabled policies. The data is a bit-vector. policy_info[in structure] The relevant policy information. policy_info_count[in scalar] The size of the buffer (in natural-sized units). change_tasks_threads[in scalar] If true, any assigned task or thread whose policy is no longer enabled or whose scheduling attributes exceed the current limits will have their limits adjusted or their policy set to the default as appropriate.

DESCRIPTION

The processor_set_policy_control function controls scheduling attributes governing the processor set.

RETURN VALUES

Only generic errors apply.

Functions: processor_set_statistics, processor_set_create, processor_set_default, processor_assign, processor_set_info.

Data Structures: policy_timeshare_info, policy_rr_info, policy_fifo_info.