#include <mach/processor_info.h> also included by
<mach/mach.h>mach/processor_info.h
typedefprocessor_info_t
Generic information structure to allow for expansion.
typedef integer_t *processor_info_t
varying array of int.
typedefprocessor_info_data_t
typedef integer_t processor_info_data_t[PROCESSOR_INFO_MAX]
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_INFO | Basic 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_PM_REGS_INFO
#define PROCESSOR_PM_REGS_INFO 0x10000001
performance monitor register info
structprocessor_basic_info
| cpu_type_t | cpu_type | type of cpu |
| cpu_subtype_t | cpu_subtype | subtype of cpu |
| boolean_t | running | is processor running |
| int | slot_num | slot 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
| 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)))
typedefprocessor_set_flavor_t
typedef int processor_set_flavor_t
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Defined values:
| 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. |
| PROCESSOR_SET_LOAD_INFO | Load 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.
structprocessor_set_basic_info
| int | processor_count | How many processors |
| int | default_policy | When 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
| int | task_count | How many tasks |
| int | thread_count | How many threads |
| integer_t | load_average | Scaled |
| integer_t | mach_factor | Scaled |
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)))