processor_info(2)
NAME
processor_info − determine type and status of a processor
SYNOPSIS
#include <sys/types.h>
#include <sys/processor.h>
int processor_info(processorid_t processorid, processor_info_t ∗infop);
DESCRIPTION
The status of the processor specified by processorid is returned in the processor_info_t structure pointed to by infop.
The structure contains the following members:
intpi_state;/∗ P_ONLINE or P_OFFLINE∗/
charpi_processor_type[PI_TYPELEN];
charpi_fputypes[PI_FPUTYPE];
intpi_clock;/∗ CPU clock freq in MHz ∗/
The fields have the following meanings:
pi_state is the current state of the processor, either P_ONLINE or P_OFFLINE.
pi_processor_type is a NULL-terminated ASCII string specifying the type of the processor.
pi_fputypes is a NULL-terminated ASCII string containing the comma-separated types of floating-point units (FPUs) attached to the processor. This string will be empty if no FPU is attached.
pi_clock is the processor clock frequency rounded to the nearest megahertz. It may be 0 if not known.
RETURN VALUES
processor_info returns 0 if successful. Otherwise -1 is returned and errno is set to reflect the error.
ERRORS
EINVAL An non-existent processor ID was specified.
EFAULT The processor_info_t structure pointed to by infop was not writable by the user.
SEE ALSO
psradm(1M), psrinfo(1M), p_online(2), sysconf(3C)
SunOS 5.5.1 — Last change: 23 Sep 1992