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

mach/processor_info.h

15 typedefs · 13 macros · 4 structs

typedefprocessor_info_t

Generic information structure to allow for expansion.
typedef integer_t *processor_info_t
varying array of int.

typedefprocessor_info_array_t

typedef integer_t *processor_info_array_t
varying array of int

macroPROCESSOR_INFO_MAX

#define PROCESSOR_INFO_MAX (1024)
max array size

typedefprocessor_info_data_t

typedef integer_t processor_info_data_t[PROCESSOR_INFO_MAX]

typedefprocessor_set_info_t

typedef integer_t *processor_set_info_t
varying array of int.

macroPROCESSOR_SET_INFO_MAX

#define PROCESSOR_SET_INFO_MAX (1024)
max array size

typedefprocessor_set_info_data_t

typedef integer_t processor_set_info_data_t[PROCESSOR_SET_INFO_MAX]

typedefprocessor_flavor_t

Currently defined information.
typedef int processor_flavor_t
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Defined values:
PROCESSOR_BASIC_INFOBasic information, slot number, running status, etc. The returned structure is processor_basic_info.

macroPROCESSOR_BASIC_INFO

#define PROCESSOR_BASIC_INFO 1
basic information
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Basic information, slot number, running status, etc. The returned structure is processor_basic_info.

macroPROCESSOR_CPU_LOAD_INFO

#define PROCESSOR_CPU_LOAD_INFO 2
cpu load information

macroPROCESSOR_PM_REGS_INFO

#define PROCESSOR_PM_REGS_INFO 0x10000001
performance monitor register info

macroPROCESSOR_TEMPERATURE

#define PROCESSOR_TEMPERATURE 0x10000002
Processor core temperature

structprocessor_basic_info

size 20, align 4
cpu_type_tcpu_typetype of cpu
cpu_subtype_tcpu_subtypesubtype of cpu
boolean_trunningis processor running
intslot_numslot number
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Defines the basic information about a processor.
The processor_basic_info structure defines the information available about a processor slot.

typedefprocessor_basic_info_data_t

typedef struct processor_basic_info processor_basic_info_data_t

typedefprocessor_basic_info_t

typedef struct processor_basic_info *processor_basic_info_t

macroPROCESSOR_BASIC_INFO_COUNT

#define PROCESSOR_BASIC_INFO_COUNT ((mach_msg_type_number_t)
	        (sizeof(processor_basic_info_data_t)/sizeof(natural_t)))

structprocessor_cpu_load_info

size 16, align 4
unsigned int[4]cpu_ticks... in the given mode

typedefprocessor_cpu_load_info_data_t

typedef struct processor_cpu_load_info processor_cpu_load_info_data_t

typedefprocessor_cpu_load_info_t

typedef struct processor_cpu_load_info *processor_cpu_load_info_t

macroPROCESSOR_CPU_LOAD_INFO_COUNT

#define PROCESSOR_CPU_LOAD_INFO_COUNT ((mach_msg_type_number_t)
	        (sizeof(processor_cpu_load_info_data_t)/sizeof(natural_t)))

macroLOAD_SCALE

Scaling factor for load_average, mach_factor.
#define LOAD_SCALE 1000

typedefprocessor_set_flavor_t

typedef int processor_set_flavor_t
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Defined values:
PROCESSOR_SET_TIMESHARE_DEFAULTChange the base attributes for the timeshare scheduling policy, making timeshare the default policy. The structure is policy_timeshare_base.
PROCESSOR_SET_FIFO_DEFAULTChange 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_DEFAULTChanged the base attributes for the round-robin scheduling policy, making round robin the default policy. The structure is policy_rr_base.
PROCESSOR_SET_TIMESHARE_LIMITSChange the limits on the allowed timeshare policy attributes. The structure is defined by policy_timeshare_limit.
PROCESSOR_SET_RR_LIMITSChange the limits on the allowed round robin policy attributes. The structure is defined by policy_rr_limit.
PROCESSOR_SET_FIFO_LIMITSChange the limits on the allowed first-in, first-out policy attributes. The structure is defined by policy_fifo_limit.
PROCESSOR_SET_ENABLED_POLICIESChange the set of enabled policies. The data is a bit-vector.
PROCESSOR_SET_LOAD_INFOLoad statistics for the processor set. The returned structure is processor_set_load_info.

macroPROCESSOR_SET_BASIC_INFO

#define PROCESSOR_SET_BASIC_INFO 5
basic information
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Basic information concerning the processor set (number of assigned processors and default policy). The returned structure is defined by processor_set_basic_info.
a value of int

structprocessor_set_basic_info

size 8, align 4
intprocessor_countHow many processors
intdefault_policyWhen others not enabled
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Defines the basic information about a processor set.
The processor_set_basic_info structure defines the basic information available about a processor set.

typedefprocessor_set_basic_info_data_t

typedef struct processor_set_basic_info processor_set_basic_info_data_t

typedefprocessor_set_basic_info_t

typedef struct processor_set_basic_info *processor_set_basic_info_t

macroPROCESSOR_SET_BASIC_INFO_COUNT

#define PROCESSOR_SET_BASIC_INFO_COUNT ((mach_msg_type_number_t)
	        (sizeof(processor_set_basic_info_data_t)/sizeof(natural_t)))

macroPROCESSOR_SET_LOAD_INFO

#define PROCESSOR_SET_LOAD_INFO 4
scheduling statistics
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Load statistics for the processor set. The returned structure is processor_set_load_info.

structprocessor_set_load_info

size 16, align 4
inttask_countHow many tasks
intthread_countHow many threads
integer_tload_averageScaled
integer_tmach_factorScaled
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Defines the scheduling statistics for a processor set.
The processor_set_load_info structure defines the scheduling statistics maintained for a processor set.

typedefprocessor_set_load_info_data_t

typedef struct processor_set_load_info processor_set_load_info_data_t

typedefprocessor_set_load_info_t

typedef struct processor_set_load_info *processor_set_load_info_t

macroPROCESSOR_SET_LOAD_INFO_COUNT

#define PROCESSOR_SET_LOAD_INFO_COUNT ((mach_msg_type_number_t)
	        (sizeof(processor_set_load_info_data_t)/sizeof(natural_t)))