Previous: Processor Set Policy, Up: Processor Set Interface
The function
processor_set_info
returns the selected information array for a processor set, as specified by flavor.host is set to the host on which the processor set resides. This is the non-privileged host port.
processor_set_info is an array of integers that is supplied by the caller and returned filled with specified information. processor_set_info_count is supplied as the maximum number of integers in processor_set_info. On return, it contains the actual number of integers in processor_set_info. The maximum number of integers returned by any flavor is
PROCESSOR_SET_INFO_MAX
.The type of information returned is defined by flavor, which can be one of the following:
PROCESSOR_SET_BASIC_INFO
- The function returns basic information about the processor set, as defined by
processor_set_basic_info_t
. This includes the number of tasks and threads assigned to the processor set. The number of integers returned isPROCESSOR_SET_BASIC_INFO_COUNT
.PROCESSOR_SET_SCHED_INFO
- The function returns information about the scheduling policy for the processor set as defined by
processor_set_sched_info_t
. The number of integers returned isPROCESSOR_SET_SCHED_INFO_COUNT
.Some machines may define additional (machine-dependent) flavors.
The function returns
KERN_SUCCESS
if the call succeeded andKERN_INVALID_ARGUMENT
if processor_set is not a processor set or flavor is not recognized. The function returnsMIG_ARRAY_TOO_LARGE
if the returned info array is too large for processor_set_info. In this case, processor_set_info is filled as much as possible and processor_set_info_count is set to the number of elements that would have been returned if there were enough room.
This structure is returned in processor_set_info by the
processor_set_info
function and provides basic information about the processor set. You can cast a variable of typeprocessor_set_info_t
to a pointer of this type if you provided it as the processor_set_info parameter for thePROCESSOR_SET_BASIC_INFO
flavor ofprocessor_set_info
. It has the following members:
int processor_count
- number of processors
int task_count
- number of tasks
int thread_count
- number of threads
int load_average
- scaled load average
int mach_factor
- scaled mach factor
This structure is returned in processor_set_info by the
processor_set_info
function and provides schedule information about the processor set. You can cast a variable of typeprocessor_set_info_t
to a pointer of this type if you provided it as the processor_set_info parameter for thePROCESSOR_SET_SCHED_INFO
flavor ofprocessor_set_info
. It has the following members:
int policies
- allowed policies
int max_priority
- max priority for new threads