Previous: Processors and Sets, Up: Processor Interface [Contents][Index]
The function processor_info returns the selected information array
for a processor, as specified by flavor.
host is set to the host on which the processor set resides. This is the non-privileged host port.
processor_info is an array of integers that is supplied by the
caller and returned filled with specified information.
processor_info_count is supplied as the maximum number of integers in
processor_info. On return, it contains the actual number of
integers in processor_info. The maximum number of integers
returned by any flavor is PROCESSOR_INFO_MAX.
The type of information returned is defined by flavor, which can be one of the following:
PROCESSOR_BASIC_INFOThe function returns basic information about the processor, as defined
by processor_basic_info_t. This includes the slot number of the
processor. The number of integers returned is
PROCESSOR_BASIC_INFO_COUNT.
Machines which require more configuration information beyond the slot number are expected to define additional (machine-dependent) flavors.
The function returns KERN_SUCCESS if the call succeeded and
KERN_INVALID_ARGUMENT if processor is not a processor or
flavor is not recognized. The function returns
MIG_ARRAY_TOO_LARGE if the returned info array is too large for
processor_info. In this case, processor_info is filled as
much as possible and processor_infoCnt is set to the number of
elements that would have been returned if there were enough room.
This structure is returned in processor_info by the
processor_info function and provides basic information about the
processor. You can cast a variable of type processor_info_t to a
pointer of this type if you provided it as the processor_info
parameter for the PROCESSOR_BASIC_INFO flavor of
processor_info. It has the following members:
cpu_type_t cpu_typecpu type
cpu_subtype_t cpu_subtypecpu subtype
boolean_t runningis processor running?
int slot_numslot number
boolean_t is_masteris this the master processor
This is a pointer to a struct processor_basic_info.
Previous: Processors and Sets, Up: Processor Interface [Contents][Index]