#include <mach/thread_policy.h> also included by
<mach/mach.h>mach/thread_policy.h
These are the calls for accessing the policy parameters
of a particular thread.
The extra 'get_default' parameter to the second call is
IN/OUT as follows:
1) if asserted on the way in it indicates that the default
values should be returned, not the ones currently set, in
this case 'get_default' will always be asserted on return;
2) if unasserted on the way in, the current settings are
desired and if still unasserted on return, then the info
returned reflects the current settings, otherwise if
'get_default' returns asserted, it means that there are no
current settings due to other parameters taking precedence,
and the default ones are being returned instead.
typedefthread_policy_flavor_t
typedef natural_t thread_policy_flavor_t
typedefthread_policy_t
typedef integer_t *thread_policy_t
macroTHREAD_STANDARD_POLICY
#define THREAD_STANDARD_POLICY 1
structthread_standard_policy
| natural_t | no_data |
typedefthread_standard_policy_data_t
typedef struct thread_standard_policy thread_standard_policy_data_t
typedefthread_standard_policy_t
typedef struct thread_standard_policy *thread_standard_policy_t
macroTHREAD_STANDARD_POLICY_COUNT
#define THREAD_STANDARD_POLICY_COUNT 0
macroTHREAD_EXTENDED_POLICY
#define THREAD_EXTENDED_POLICY 1
structthread_extended_policy
| boolean_t | timeshare |
typedefthread_extended_policy_data_t
typedef struct thread_extended_policy thread_extended_policy_data_t
typedefthread_extended_policy_t
typedef struct thread_extended_policy *thread_extended_policy_t
macroTHREAD_EXTENDED_POLICY_COUNT
#define THREAD_EXTENDED_POLICY_COUNT ((mach_msg_type_number_t) (sizeof (thread_extended_policy_data_t) / sizeof (integer_t)))
macroTHREAD_TIME_CONSTRAINT_POLICY
#define THREAD_TIME_CONSTRAINT_POLICY 2
structthread_time_constraint_policy
| uint32_t | period | |
| uint32_t | computation | |
| uint32_t | constraint | |
| boolean_t | preemptible |
typedefthread_time_constraint_policy_data_t
typedef struct thread_time_constraint_policy thread_time_constraint_policy_data_t;
typedefthread_time_constraint_policy_t
typedef struct thread_time_constraint_policy * thread_time_constraint_policy_t;
macroTHREAD_TIME_CONSTRAINT_POLICY_COUNT
#define THREAD_TIME_CONSTRAINT_POLICY_COUNT ((mach_msg_type_number_t) (sizeof (thread_time_constraint_policy_data_t) / sizeof (integer_t)))
macroTHREAD_PRECEDENCE_POLICY
#define THREAD_PRECEDENCE_POLICY 3
structthread_precedence_policy
| integer_t | importance |
typedefthread_precedence_policy_data_t
typedef struct thread_precedence_policy thread_precedence_policy_data_t
typedefthread_precedence_policy_t
typedef struct thread_precedence_policy *thread_precedence_policy_t
macroTHREAD_PRECEDENCE_POLICY_COUNT
#define THREAD_PRECEDENCE_POLICY_COUNT ((mach_msg_type_number_t) (sizeof (thread_precedence_policy_data_t) / sizeof (integer_t)))
macroTHREAD_AFFINITY_POLICY
#define THREAD_AFFINITY_POLICY 4
structthread_affinity_policy
| integer_t | affinity_tag |
macroTHREAD_AFFINITY_TAG_NULL
#define THREAD_AFFINITY_TAG_NULL 0
typedefthread_affinity_policy_data_t
typedef struct thread_affinity_policy thread_affinity_policy_data_t
typedefthread_affinity_policy_t
typedef struct thread_affinity_policy *thread_affinity_policy_t
macroTHREAD_AFFINITY_POLICY_COUNT
#define THREAD_AFFINITY_POLICY_COUNT ((mach_msg_type_number_t) (sizeof (thread_affinity_policy_data_t) / sizeof (integer_t)))
macroTHREAD_BACKGROUND_POLICY
#define THREAD_BACKGROUND_POLICY 5
structthread_background_policy
| integer_t | priority |
macroTHREAD_BACKGROUND_POLICY_DARWIN_BG
#define THREAD_BACKGROUND_POLICY_DARWIN_BG 0x1000
typedefthread_background_policy_data_t
typedef struct thread_background_policy thread_background_policy_data_t
typedefthread_background_policy_t
typedef struct thread_background_policy *thread_background_policy_t
macroTHREAD_BACKGROUND_POLICY_COUNT
#define THREAD_BACKGROUND_POLICY_COUNT ((mach_msg_type_number_t) (sizeof (thread_background_policy_data_t) / sizeof (integer_t)))
macroTHREAD_LATENCY_QOS_POLICY
#define THREAD_LATENCY_QOS_POLICY 7
typedefthread_latency_qos_t
typedef integer_t thread_latency_qos_t
structthread_latency_qos_policy
| thread_latency_qos_t | thread_latency_qos_tier |
typedefthread_latency_qos_policy_data_t
typedef struct thread_latency_qos_policy thread_latency_qos_policy_data_t
typedefthread_latency_qos_policy_t
typedef struct thread_latency_qos_policy *thread_latency_qos_policy_t
macroTHREAD_LATENCY_QOS_POLICY_COUNT
#define THREAD_LATENCY_QOS_POLICY_COUNT ((mach_msg_type_number_t) (sizeof (thread_latency_qos_policy_data_t) / sizeof (integer_t)))
macroTHREAD_THROUGHPUT_QOS_POLICY
#define THREAD_THROUGHPUT_QOS_POLICY 8
typedefthread_throughput_qos_t
typedef integer_t thread_throughput_qos_t
structthread_throughput_qos_policy
| thread_throughput_qos_t | thread_throughput_qos_tier |
typedefthread_throughput_qos_policy_data_t
typedef struct thread_throughput_qos_policy thread_throughput_qos_policy_data_t
typedefthread_throughput_qos_policy_t
typedef struct thread_throughput_qos_policy *thread_throughput_qos_policy_t
macroTHREAD_THROUGHPUT_QOS_POLICY_COUNT
#define THREAD_THROUGHPUT_QOS_POLICY_COUNT ((mach_msg_type_number_t) (sizeof (thread_throughput_qos_policy_data_t) / sizeof (integer_t)))