Root/
Source at commit 1808 created 12 years 4 months ago. By blackosx, Revise layout of package installer 'Welcome' file so it looks cleaner. Change the copyright notice to begin from 2009 as seen in the Chameleon 2.0 r431 installer. Should this date be set earlier? | |
---|---|
1 | #ifndef␉_processor_user_␊ |
2 | #define␉_processor_user_␊ |
3 | ␊ |
4 | /* Module processor */␊ |
5 | ␊ |
6 | #include <string.h>␊ |
7 | #include <mach/ndr.h>␊ |
8 | #include <mach/boolean.h>␊ |
9 | #include <mach/kern_return.h>␊ |
10 | #include <mach/notify.h>␊ |
11 | #include <mach/mach_types.h>␊ |
12 | #include <mach/message.h>␊ |
13 | #include <mach/mig_errors.h>␊ |
14 | #include <mach/port.h>␊ |
15 | ␊ |
16 | #ifdef AUTOTEST␊ |
17 | #ifndef FUNCTION_PTR_T␊ |
18 | #define FUNCTION_PTR_T␊ |
19 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);␊ |
20 | typedef struct {␊ |
21 | char *name;␊ |
22 | function_ptr_t function;␊ |
23 | } function_table_entry;␊ |
24 | typedef function_table_entry *function_table_t;␊ |
25 | #endif /* FUNCTION_PTR_T */␊ |
26 | #endif /* AUTOTEST */␊ |
27 | ␊ |
28 | #ifndef␉processor_MSG_COUNT␊ |
29 | #define␉processor_MSG_COUNT␉6␊ |
30 | #endif␉/* processor_MSG_COUNT */␊ |
31 | ␊ |
32 | #include <mach/std_types.h>␊ |
33 | #include <mach/mig.h>␊ |
34 | #include <mach/mach_types.h>␊ |
35 | ␊ |
36 | #ifdef __BeforeMigUserHeader␊ |
37 | __BeforeMigUserHeader␊ |
38 | #endif /* __BeforeMigUserHeader */␊ |
39 | ␊ |
40 | #include <sys/cdefs.h>␊ |
41 | __BEGIN_DECLS␊ |
42 | ␊ |
43 | ␊ |
44 | /* Routine processor_start */␊ |
45 | #ifdef␉mig_external␊ |
46 | mig_external␊ |
47 | #else␊ |
48 | extern␊ |
49 | #endif␉/* mig_external */␊ |
50 | kern_return_t processor_start␊ |
51 | (␊ |
52 | ␉processor_t processor␊ |
53 | );␊ |
54 | ␊ |
55 | /* Routine processor_exit */␊ |
56 | #ifdef␉mig_external␊ |
57 | mig_external␊ |
58 | #else␊ |
59 | extern␊ |
60 | #endif␉/* mig_external */␊ |
61 | kern_return_t processor_exit␊ |
62 | (␊ |
63 | ␉processor_t processor␊ |
64 | );␊ |
65 | ␊ |
66 | /* Routine processor_info */␊ |
67 | #ifdef␉mig_external␊ |
68 | mig_external␊ |
69 | #else␊ |
70 | extern␊ |
71 | #endif␉/* mig_external */␊ |
72 | kern_return_t processor_info␊ |
73 | (␊ |
74 | ␉processor_t processor,␊ |
75 | ␉processor_flavor_t flavor,␊ |
76 | ␉host_t *host,␊ |
77 | ␉processor_info_t processor_info_out,␊ |
78 | ␉mach_msg_type_number_t *processor_info_outCnt␊ |
79 | );␊ |
80 | ␊ |
81 | /* Routine processor_control */␊ |
82 | #ifdef␉mig_external␊ |
83 | mig_external␊ |
84 | #else␊ |
85 | extern␊ |
86 | #endif␉/* mig_external */␊ |
87 | kern_return_t processor_control␊ |
88 | (␊ |
89 | ␉processor_t processor,␊ |
90 | ␉processor_info_t processor_cmd,␊ |
91 | ␉mach_msg_type_number_t processor_cmdCnt␊ |
92 | );␊ |
93 | ␊ |
94 | /* Routine processor_assign */␊ |
95 | #ifdef␉mig_external␊ |
96 | mig_external␊ |
97 | #else␊ |
98 | extern␊ |
99 | #endif␉/* mig_external */␊ |
100 | kern_return_t processor_assign␊ |
101 | (␊ |
102 | ␉processor_t processor,␊ |
103 | ␉processor_set_t new_set,␊ |
104 | ␉boolean_t wait␊ |
105 | );␊ |
106 | ␊ |
107 | /* Routine processor_get_assignment */␊ |
108 | #ifdef␉mig_external␊ |
109 | mig_external␊ |
110 | #else␊ |
111 | extern␊ |
112 | #endif␉/* mig_external */␊ |
113 | kern_return_t processor_get_assignment␊ |
114 | (␊ |
115 | ␉processor_t processor,␊ |
116 | ␉processor_set_name_t *assigned_set␊ |
117 | );␊ |
118 | ␊ |
119 | __END_DECLS␊ |
120 | ␊ |
121 | /********************** Caution **************************/␊ |
122 | /* The following data types should be used to calculate */␊ |
123 | /* maximum message sizes only. The actual message may be */␊ |
124 | /* smaller, and the position of the arguments within the */␊ |
125 | /* message layout may vary from what is presented here. */␊ |
126 | /* For example, if any of the arguments are variable- */␊ |
127 | /* sized, and less than the maximum is sent, the data */␊ |
128 | /* will be packed tight in the actual message to reduce */␊ |
129 | /* the presence of holes. */␊ |
130 | /********************** Caution **************************/␊ |
131 | ␊ |
132 | /* typedefs for all requests */␊ |
133 | ␊ |
134 | #ifndef __Request__processor_subsystem__defined␊ |
135 | #define __Request__processor_subsystem__defined␊ |
136 | ␊ |
137 | #ifdef __MigPackStructs␊ |
138 | #pragma pack(4)␊ |
139 | #endif␊ |
140 | ␉typedef struct {␊ |
141 | ␉␉mach_msg_header_t Head;␊ |
142 | ␉} __Request__processor_start_t;␊ |
143 | #ifdef __MigPackStructs␊ |
144 | #pragma pack()␊ |
145 | #endif␊ |
146 | ␊ |
147 | #ifdef __MigPackStructs␊ |
148 | #pragma pack(4)␊ |
149 | #endif␊ |
150 | ␉typedef struct {␊ |
151 | ␉␉mach_msg_header_t Head;␊ |
152 | ␉} __Request__processor_exit_t;␊ |
153 | #ifdef __MigPackStructs␊ |
154 | #pragma pack()␊ |
155 | #endif␊ |
156 | ␊ |
157 | #ifdef __MigPackStructs␊ |
158 | #pragma pack(4)␊ |
159 | #endif␊ |
160 | ␉typedef struct {␊ |
161 | ␉␉mach_msg_header_t Head;␊ |
162 | ␉␉NDR_record_t NDR;␊ |
163 | ␉␉processor_flavor_t flavor;␊ |
164 | ␉␉mach_msg_type_number_t processor_info_outCnt;␊ |
165 | ␉} __Request__processor_info_t;␊ |
166 | #ifdef __MigPackStructs␊ |
167 | #pragma pack()␊ |
168 | #endif␊ |
169 | ␊ |
170 | #ifdef __MigPackStructs␊ |
171 | #pragma pack(4)␊ |
172 | #endif␊ |
173 | ␉typedef struct {␊ |
174 | ␉␉mach_msg_header_t Head;␊ |
175 | ␉␉NDR_record_t NDR;␊ |
176 | ␉␉mach_msg_type_number_t processor_cmdCnt;␊ |
177 | ␉␉integer_t processor_cmd[12];␊ |
178 | ␉} __Request__processor_control_t;␊ |
179 | #ifdef __MigPackStructs␊ |
180 | #pragma pack()␊ |
181 | #endif␊ |
182 | ␊ |
183 | #ifdef __MigPackStructs␊ |
184 | #pragma pack(4)␊ |
185 | #endif␊ |
186 | ␉typedef struct {␊ |
187 | ␉␉mach_msg_header_t Head;␊ |
188 | ␉␉/* start of the kernel processed data */␊ |
189 | ␉␉mach_msg_body_t msgh_body;␊ |
190 | ␉␉mach_msg_port_descriptor_t new_set;␊ |
191 | ␉␉/* end of the kernel processed data */␊ |
192 | ␉␉NDR_record_t NDR;␊ |
193 | ␉␉boolean_t wait;␊ |
194 | ␉} __Request__processor_assign_t;␊ |
195 | #ifdef __MigPackStructs␊ |
196 | #pragma pack()␊ |
197 | #endif␊ |
198 | ␊ |
199 | #ifdef __MigPackStructs␊ |
200 | #pragma pack(4)␊ |
201 | #endif␊ |
202 | ␉typedef struct {␊ |
203 | ␉␉mach_msg_header_t Head;␊ |
204 | ␉} __Request__processor_get_assignment_t;␊ |
205 | #ifdef __MigPackStructs␊ |
206 | #pragma pack()␊ |
207 | #endif␊ |
208 | #endif /* !__Request__processor_subsystem__defined */␊ |
209 | ␊ |
210 | /* union of all requests */␊ |
211 | ␊ |
212 | #ifndef __RequestUnion__processor_subsystem__defined␊ |
213 | #define __RequestUnion__processor_subsystem__defined␊ |
214 | union __RequestUnion__processor_subsystem {␊ |
215 | ␉__Request__processor_start_t Request_processor_start;␊ |
216 | ␉__Request__processor_exit_t Request_processor_exit;␊ |
217 | ␉__Request__processor_info_t Request_processor_info;␊ |
218 | ␉__Request__processor_control_t Request_processor_control;␊ |
219 | ␉__Request__processor_assign_t Request_processor_assign;␊ |
220 | ␉__Request__processor_get_assignment_t Request_processor_get_assignment;␊ |
221 | };␊ |
222 | #endif /* !__RequestUnion__processor_subsystem__defined */␊ |
223 | /* typedefs for all replies */␊ |
224 | ␊ |
225 | #ifndef __Reply__processor_subsystem__defined␊ |
226 | #define __Reply__processor_subsystem__defined␊ |
227 | ␊ |
228 | #ifdef __MigPackStructs␊ |
229 | #pragma pack(4)␊ |
230 | #endif␊ |
231 | ␉typedef struct {␊ |
232 | ␉␉mach_msg_header_t Head;␊ |
233 | ␉␉NDR_record_t NDR;␊ |
234 | ␉␉kern_return_t RetCode;␊ |
235 | ␉} __Reply__processor_start_t;␊ |
236 | #ifdef __MigPackStructs␊ |
237 | #pragma pack()␊ |
238 | #endif␊ |
239 | ␊ |
240 | #ifdef __MigPackStructs␊ |
241 | #pragma pack(4)␊ |
242 | #endif␊ |
243 | ␉typedef struct {␊ |
244 | ␉␉mach_msg_header_t Head;␊ |
245 | ␉␉NDR_record_t NDR;␊ |
246 | ␉␉kern_return_t RetCode;␊ |
247 | ␉} __Reply__processor_exit_t;␊ |
248 | #ifdef __MigPackStructs␊ |
249 | #pragma pack()␊ |
250 | #endif␊ |
251 | ␊ |
252 | #ifdef __MigPackStructs␊ |
253 | #pragma pack(4)␊ |
254 | #endif␊ |
255 | ␉typedef struct {␊ |
256 | ␉␉mach_msg_header_t Head;␊ |
257 | ␉␉/* start of the kernel processed data */␊ |
258 | ␉␉mach_msg_body_t msgh_body;␊ |
259 | ␉␉mach_msg_port_descriptor_t host;␊ |
260 | ␉␉/* end of the kernel processed data */␊ |
261 | ␉␉NDR_record_t NDR;␊ |
262 | ␉␉mach_msg_type_number_t processor_info_outCnt;␊ |
263 | ␉␉integer_t processor_info_out[12];␊ |
264 | ␉} __Reply__processor_info_t;␊ |
265 | #ifdef __MigPackStructs␊ |
266 | #pragma pack()␊ |
267 | #endif␊ |
268 | ␊ |
269 | #ifdef __MigPackStructs␊ |
270 | #pragma pack(4)␊ |
271 | #endif␊ |
272 | ␉typedef struct {␊ |
273 | ␉␉mach_msg_header_t Head;␊ |
274 | ␉␉NDR_record_t NDR;␊ |
275 | ␉␉kern_return_t RetCode;␊ |
276 | ␉} __Reply__processor_control_t;␊ |
277 | #ifdef __MigPackStructs␊ |
278 | #pragma pack()␊ |
279 | #endif␊ |
280 | ␊ |
281 | #ifdef __MigPackStructs␊ |
282 | #pragma pack(4)␊ |
283 | #endif␊ |
284 | ␉typedef struct {␊ |
285 | ␉␉mach_msg_header_t Head;␊ |
286 | ␉␉NDR_record_t NDR;␊ |
287 | ␉␉kern_return_t RetCode;␊ |
288 | ␉} __Reply__processor_assign_t;␊ |
289 | #ifdef __MigPackStructs␊ |
290 | #pragma pack()␊ |
291 | #endif␊ |
292 | ␊ |
293 | #ifdef __MigPackStructs␊ |
294 | #pragma pack(4)␊ |
295 | #endif␊ |
296 | ␉typedef struct {␊ |
297 | ␉␉mach_msg_header_t Head;␊ |
298 | ␉␉/* start of the kernel processed data */␊ |
299 | ␉␉mach_msg_body_t msgh_body;␊ |
300 | ␉␉mach_msg_port_descriptor_t assigned_set;␊ |
301 | ␉␉/* end of the kernel processed data */␊ |
302 | ␉} __Reply__processor_get_assignment_t;␊ |
303 | #ifdef __MigPackStructs␊ |
304 | #pragma pack()␊ |
305 | #endif␊ |
306 | #endif /* !__Reply__processor_subsystem__defined */␊ |
307 | ␊ |
308 | /* union of all replies */␊ |
309 | ␊ |
310 | #ifndef __ReplyUnion__processor_subsystem__defined␊ |
311 | #define __ReplyUnion__processor_subsystem__defined␊ |
312 | union __ReplyUnion__processor_subsystem {␊ |
313 | ␉__Reply__processor_start_t Reply_processor_start;␊ |
314 | ␉__Reply__processor_exit_t Reply_processor_exit;␊ |
315 | ␉__Reply__processor_info_t Reply_processor_info;␊ |
316 | ␉__Reply__processor_control_t Reply_processor_control;␊ |
317 | ␉__Reply__processor_assign_t Reply_processor_assign;␊ |
318 | ␉__Reply__processor_get_assignment_t Reply_processor_get_assignment;␊ |
319 | };␊ |
320 | #endif /* !__RequestUnion__processor_subsystem__defined */␊ |
321 | ␊ |
322 | #ifndef subsystem_to_name_map_processor␊ |
323 | #define subsystem_to_name_map_processor \␊ |
324 | { "processor_start", 3000 },\␊ |
325 | { "processor_exit", 3001 },\␊ |
326 | { "processor_info", 3002 },\␊ |
327 | { "processor_control", 3003 },\␊ |
328 | { "processor_assign", 3004 },\␊ |
329 | { "processor_get_assignment", 3005 }␊ |
330 | #endif␊ |
331 | ␊ |
332 | #ifdef __AfterMigUserHeader␊ |
333 | __AfterMigUserHeader␊ |
334 | #endif /* __AfterMigUserHeader */␊ |
335 | ␊ |
336 | #endif␉ /* _processor_user_ */␊ |
337 |