1processor_info(2) System Calls processor_info(2)
2
3
4
6 processor_info - determine type and status of a processor
7
9 #include <sys/types.h>
10 #include <sys/processor.h>
11
12 int processor_info(processorid_t processorid, processor_info_t *infop);
13
14
16 The processor_info() function returns the status of the processor spec‐
17 ified by processorid in the processor_info_t structure pointed to by
18 infop.
19
20
21 The structure processor_info_t contains the following members:
22
23 int pi_state;
24 char pi_processor_type[PI_TYPELEN];
25 char pi_fputypes[PI_FPUTYPE];
26 int pi_clock;
27
28
29
30 The pi_state member is the current state of the processor, either
31 P_ONLINE, P_OFFLINE, P_NOINTR, P_FAULTED, P_SPARE, or P_POWEROFF.
32
33
34 The pi_processor_type member is a null-terminated ASCII string specify‐
35 ing the type of the processor.
36
37
38 The pi_fputypes member is a null-terminated ASCII string containing the
39 comma-separated types of floating-point units (FPUs) attached to the
40 processor. This string will be empty if no FPU is attached.
41
42
43 The pi_clock member is the processor clock frequency rounded to the
44 nearest megahertz. It may be 0 if not known.
45
47 Upon successful completion, 0 is returned. Otherwise, −1 is returned
48 and errno is set to indicate the error.
49
51 The processor_info() function will fail if:
52
53 EINVAL An non-existent processor ID was specified.
54
55 The caller is in a non-global zone, the pools facility is
56 active, and the processor is not a member of the zone's
57 pool's processor set.
58
59
60 EFAULT The processor_info_t structure pointed to by infop was not
61 writable by the user.
62
63
65 pooladm(1M), psradm(1M), psrinfo(1M), zoneadm(1M), p_online(2),
66 sysconf(3C)
67
68
69
70SunOS 5.11 28 Jun 2004 processor_info(2)