1 .\"
2 .\" Mach Operating System
3 .\" Copyright (c) 1991,1990 Carnegie Mellon University
4 .\" All Rights Reserved.
5 .\"
6 .\" Permission to use, copy, modify and distribute this software and its
7 .\" documentation is hereby granted, provided that both the copyright
8 .\" notice and this permission notice appear in all copies of the
9 .\" software, derivative works or modified versions, and any portions
10 .\" thereof, and that both notices appear in supporting documentation.
11 .\"
12 .\" CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 .\" CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 .\" ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 .\"
16 .\" Carnegie Mellon requests users of this software to return to
17 .\"
18 .\" Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 .\" School of Computer Science
20 .\" Carnegie Mellon University
21 .\" Pittsburgh PA 15213-3890
22 .\"
23 .\" any improvements or extensions that they make and grant Carnegie Mellon
24 .\" the rights to redistribute these changes.
25 .\"
26 .\"
27 .\" HISTORY
28 .\" $Log: processor_info.man,v $
29 .\" Revision 2.5 93/03/18 15:14:08 mrt
30 .\" corrected types
31 .\" [93/03/11 12:53:50 lli]
32 .\"
33 .\" Revision 2.4 91/05/14 17:11:07 mrt
34 .\" Correcting copyright
35 .\"
36 .\" Revision 2.3 91/02/14 14:13:49 mrt
37 .\" Changed to new Mach copyright
38 .\" [91/02/12 18:14:34 mrt]
39 .\"
40 .\" Revision 2.2 90/08/07 18:42:10 rpd
41 .\" Created.
42 .\"
43 .TH processor_info 2 8/13/89
44 .CM 4
45 .SH NAME
46 .nf
47 processor_info \- gets information about processor
48 .SH SYNOPSIS
49 .nf
50 .ft B
51 #include <mach.h>
52
53 .nf
54 .ft B
55 /* the definition of processor_info_t from mach.h - sys/processor_info.h is */
56
57 typedef int *processor_info_t; /* variable length array of int */
58
59 /* one interpretation of info is */
60
61 struct processor_basic_info {
62 cpu_type_t cpu_type; /* cpu type */
63 cpu_subtype_t cpu_subtype; /* cpu subtype */
64 boolean_t running; /* is processor running? */
65 int slot_num; /* slot number */
66 boolean_t is_master; /* is this the master processor */
67 };
68 typedef struct processor_basic_info *processor_basic_info_t;
69
70
71
72 kern_return_t
73 processor_info(processor, flavor, host, processor_info, processor_infoCnt)
74 mach_port_t processor;
75 int flavor;
76 mach_port_t *host;
77 processor_info_t processor_info; /* in and out */
78 mach_msg_type_number_t *processor_infoCnt; /* in and out */
79
80
81 .fi
82 .ft P
83 .SH ARGUMENTS
84 .TP 15
85 .B
86 processor
87 The processor for which information is to be obtained
88 .TP 15
89 .B
90 flavor
91 The type of information that is wanted. Currently only
92 .B PROCESSOR_BASIC_INFO
93 is implemented.
94 .TP 15
95 .B
96 host
97 The host on which the processor resides. This is the non-privileged
98 host port.
99 .TP 15
100 .B
101 processor_info
102 Information about the processor specified by
103 .B processor.
104 .TP 15
105 .B
106 processor_infoCnt
107 Size of the info structure. Should be
108 .B PROCESSOR_BASIC_INFO_COUNT
109 for flavor
110 .B PROCESSOR_BASIC_INFO.
111
112 .SH DESCRIPTION
113
114 Returns the selected information array for a processor, as specified
115 by
116 .B flavor.
117
118 .B processor_info
119 is an array of integers that is supplied
120 by the caller, and filled with specified information.
121 .B processor_infoCnt
122 is supplied as the maximum number of integers in
123 .B processor_info.
124 On return,
125 it contains the actual number of integers in
126 .B processor_info.
127
128 Basic information is defined by
129 .B PROCESSOR_BASIC_INFO.
130 The size of this information is defined by
131 .B PROCESSOR_BASIC_INFO_COUNT.
132 Machines which require more configuration information beyond the slot
133 number are expected to define additional (machine-dependent) flavors.
134
135 .SH DIAGNOSTICS
136 .TP 25
137 KERN_SUCCESS
138 The call succeeded.
139 .TP 25
140 KERN_INVALID_ARGUMENT
141 .B processor
142 is not a processor or
143 .B flavor
144 is not recognized.
145 .TP 25
146 MIG_ARRAY_TOO_LARGE
147 Returned info array is too large for
148 .B processor_info.
149
150 .B processor_info
151 is filled as much as possible.
152 .B processor_infoCnt
153 is set to the number of elements that would
154 be returned if there were enough room.
155
156 .SH BUGS
157 Availability limited.
158
159 .SH SEE ALSO
160 .B processor_start, processor_exit, processor_control, host_processors
161 .B host_info
162
Cache object: 29e2a20e2e100956c452f66cfceb11bf
|