Chameleon

Chameleon Svn Source Tree

Root/branches/cparm/i386/modules/include/mach/processor.h

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

Archive Download this file

Revision: 2182