#include <mach/policy.h> also included by <mach/mach.h>

mach/policy.h

25 typedefs · 15 macros · 12 structs

typedefpolicy_t

Old scheduling control interface
typedef int policy_t

typedefpolicy_info_t

typedef integer_t *policy_info_t

typedefpolicy_base_t

typedef integer_t *policy_base_t

typedefpolicy_limit_t

typedef integer_t *policy_limit_t

macroPOLICY_NULL

Policy definitions. Policies should be powers of 2, but cannot be or'd together other than to test for a policy 'class'.
#define POLICY_NULL 0
none

macroPOLICY_TIMESHARE

#define POLICY_TIMESHARE 1
timesharing

macroPOLICY_RR

#define POLICY_RR 2
fixed round robin

macroPOLICY_FIFO

#define POLICY_FIFO 4
fixed fifo

macroPOLICYCLASS_FIXEDPRI

Check if policy is of 'class' fixed-priority.
#define POLICYCLASS_FIXEDPRI (POLICY_RR | POLICY_FIFO)

macroinvalid_policy

Check if policy is valid.
#define invalid_policy(policy) ((policy) != POLICY_TIMESHARE &&
	 (policy) != POLICY_RR &&
	 (policy) != POLICY_FIFO)

structpolicy_timeshare_base

Types for TIMESHARE policy
size 4, align 4
integer_tbase_priority

structpolicy_timeshare_limit

size 4, align 4
integer_tmax_priority

structpolicy_timeshare_info

size 20, align 4
integer_tmax_priority
integer_tbase_priority
integer_tcur_priority
boolean_tdepressed
integer_tdepress_priority
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Specifies information associated with the system's Timeshare scheduling policy.
The policy_timeshare_info structure defines the timeshare scheduling policy information. Timeshare threads have three priorities associated with them by the system: A maximum priority value which can be raised only via privileged operation so that users may not unfairly compete with other users in their processor set. Newly created threads obtain their maximum priority from that of their assigned processor set. A priority value which can be set by the thread to any value up to a maximum priority. Newly created threads obtain their priority from their task. A scheduled priority value which is used to make scheduling decisions for the thread. This value is determined on the basis of the user priority value by the scheduling policy (for time-sharing, this means adding an increment derived from CPU usage).

typedefpolicy_timeshare_base_t

typedef struct policy_timeshare_base *policy_timeshare_base_t

typedefpolicy_timeshare_limit_t

typedef struct policy_timeshare_limit *policy_timeshare_limit_t

typedefpolicy_timeshare_info_t

typedef struct policy_timeshare_info *policy_timeshare_info_t

typedefpolicy_timeshare_base_data_t

typedef struct policy_timeshare_base policy_timeshare_base_data_t

typedefpolicy_timeshare_limit_data_t

typedef struct policy_timeshare_limit policy_timeshare_limit_data_t

typedefpolicy_timeshare_info_data_t

typedef struct policy_timeshare_info policy_timeshare_info_data_t

macroPOLICY_TIMESHARE_BASE_COUNT

#define POLICY_TIMESHARE_BASE_COUNT ((mach_msg_type_number_t)
	(sizeof(struct policy_timeshare_base)/sizeof(integer_t)))

macroPOLICY_TIMESHARE_LIMIT_COUNT

#define POLICY_TIMESHARE_LIMIT_COUNT ((mach_msg_type_number_t)
	(sizeof(struct policy_timeshare_limit)/sizeof(integer_t)))

macroPOLICY_TIMESHARE_INFO_COUNT

#define POLICY_TIMESHARE_INFO_COUNT ((mach_msg_type_number_t)
	(sizeof(struct policy_timeshare_info)/sizeof(integer_t)))

structpolicy_rr_base

Types for the ROUND ROBIN (RR) policy
size 8, align 4
integer_tbase_priority
integer_tquantum

structpolicy_rr_limit

size 4, align 4
integer_tmax_priority

structpolicy_rr_info

size 20, align 4
integer_tmax_priority
integer_tbase_priority
integer_tquantum
boolean_tdepressed
integer_tdepress_priority
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Specifies information associated with the system's Round Robin scheduling policy.
The policy_rr_info structure defines the round-robin scheduling policy information. Round-robin threads have two priorities associated with them by the system: A maximum priority value which can be raised only via privileged operation so that users may not unfairly compete with other users in their processor set. Newly created threads obtain their maximum priority from that of their assigned processor set. A priority value which can be set by the thread to any value up to a maximum priority. Newly created threads obtain their priority from their task.

typedefpolicy_rr_base_t

typedef struct policy_rr_base *policy_rr_base_t

typedefpolicy_rr_limit_t

typedef struct policy_rr_limit *policy_rr_limit_t

typedefpolicy_rr_info_t

typedef struct policy_rr_info *policy_rr_info_t

typedefpolicy_rr_base_data_t

typedef struct policy_rr_base policy_rr_base_data_t

typedefpolicy_rr_limit_data_t

typedef struct policy_rr_limit policy_rr_limit_data_t

typedefpolicy_rr_info_data_t

typedef struct policy_rr_info policy_rr_info_data_t

macroPOLICY_RR_BASE_COUNT

#define POLICY_RR_BASE_COUNT ((mach_msg_type_number_t)
	(sizeof(struct policy_rr_base)/sizeof(integer_t)))

macroPOLICY_RR_LIMIT_COUNT

#define POLICY_RR_LIMIT_COUNT ((mach_msg_type_number_t)
	(sizeof(struct policy_rr_limit)/sizeof(integer_t)))

macroPOLICY_RR_INFO_COUNT

#define POLICY_RR_INFO_COUNT ((mach_msg_type_number_t)
	(sizeof(struct policy_rr_info)/sizeof(integer_t)))

structpolicy_fifo_base

Types for the FIRST-IN-FIRST-OUT (FIFO) policy
size 4, align 4
integer_tbase_priority

structpolicy_fifo_limit

size 4, align 4
integer_tmax_priority

structpolicy_fifo_info

size 16, align 4
integer_tmax_priority
integer_tbase_priority
boolean_tdepressed
integer_tdepress_priority
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Specifies information associated with the system's First-In-First-Out scheduling policy.
The policy_fifo_info structure defines the first-in-first-out scheduling policy information. FIFO threads have two priorities associated with them by the system: A maximum priority value which can be raised only via privileged operation so that users may not unfairly compete with other users in their processor set. Newly created threads obtain their maximum priority from that of their assigned processor set. A priority value which can be set by the thread to any value up to a maximum priority. Newly created threads obtain their priority from their task.

typedefpolicy_fifo_base_t

typedef struct policy_fifo_base *policy_fifo_base_t

typedefpolicy_fifo_limit_t

typedef struct policy_fifo_limit *policy_fifo_limit_t

typedefpolicy_fifo_info_t

typedef struct policy_fifo_info *policy_fifo_info_t

typedefpolicy_fifo_base_data_t

typedef struct policy_fifo_base policy_fifo_base_data_t

typedefpolicy_fifo_limit_data_t

typedef struct policy_fifo_limit policy_fifo_limit_data_t

typedefpolicy_fifo_info_data_t

typedef struct policy_fifo_info policy_fifo_info_data_t

macroPOLICY_FIFO_BASE_COUNT

#define POLICY_FIFO_BASE_COUNT ((mach_msg_type_number_t)
	(sizeof(struct policy_fifo_base)/sizeof(integer_t)))

macroPOLICY_FIFO_LIMIT_COUNT

#define POLICY_FIFO_LIMIT_COUNT ((mach_msg_type_number_t)
	(sizeof(struct policy_fifo_limit)/sizeof(integer_t)))

macroPOLICY_FIFO_INFO_COUNT

#define POLICY_FIFO_INFO_COUNT ((mach_msg_type_number_t)
	(sizeof(struct policy_fifo_info)/sizeof(integer_t)))

typedefpolicy_base_data_t

typedef struct policy_bases policy_base_data_t

typedefpolicy_limit_data_t

typedef struct policy_limits policy_limit_data_t

typedefpolicy_info_data_t

typedef struct policy_infos policy_info_data_t