processor_info(2)


processor_info -- get information about a processor

Synopsis

   #include <sys/types.h>
   #include <sys/processor.h>
   

int processor_info(processorid_t processorid, processor_info_t *infop);

Description

processor_info obtains information about a single processor in the system. The information is returned in the processor_info_t structure pointed to by infop. This structure contains the following fields:

int pi_state
Either P_ONLINE or P_OFFLINE. If the processor is offline, the other fields are meaningless.

char pi_processor_type[16]
A null terminated ASCII string specifying the type of processor; one of i386, i486, or i860.

char pi_fputypes[32]
A null terminated ASCII string specifying the type of floating point hardware available. The string consists of zero or more floating point identifier strings, separated by commas. Each of the floating point identifier strings may be one of i387, or w1167.

int pi_clock
In previous releases, this field contained the frequency of the processor clock, in megahertz. This field is no longer meaningful and is provided only for compatibility. Its value is always 16.

Return values

On success, processor_info returns 0. On failure, processor_info returns -1 and sets errno to identify the error.

Errors

In the following conditions, processor_info fails and sets errno to:

EFAULT
The infop pointer points to an invalid memory address.

EINVAL
The processorid does not refer to an existing processor.

EIO
The processor to which processorid refers is not operational.

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004