Chameleon

Chameleon Svn Source Tree

Root/branches/JrCs/i386/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/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#ifdefmig_external
46mig_external
47#else
48extern
49#endif/* mig_external */
50kern_return_t processor_start
51(
52processor_t processor
53);
54
55/* Routine processor_exit */
56#ifdefmig_external
57mig_external
58#else
59extern
60#endif/* mig_external */
61kern_return_t processor_exit
62(
63processor_t processor
64);
65
66/* Routine processor_info */
67#ifdefmig_external
68mig_external
69#else
70extern
71#endif/* mig_external */
72kern_return_t processor_info
73(
74processor_t processor,
75processor_flavor_t flavor,
76host_t *host,
77processor_info_t processor_info_out,
78mach_msg_type_number_t *processor_info_outCnt
79);
80
81/* Routine processor_control */
82#ifdefmig_external
83mig_external
84#else
85extern
86#endif/* mig_external */
87kern_return_t processor_control
88(
89processor_t processor,
90processor_info_t processor_cmd,
91mach_msg_type_number_t processor_cmdCnt
92);
93
94/* Routine processor_assign */
95#ifdefmig_external
96mig_external
97#else
98extern
99#endif/* mig_external */
100kern_return_t processor_assign
101(
102processor_t processor,
103processor_set_t new_set,
104boolean_t wait
105);
106
107/* Routine processor_get_assignment */
108#ifdefmig_external
109mig_external
110#else
111extern
112#endif/* mig_external */
113kern_return_t processor_get_assignment
114(
115processor_t processor,
116processor_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
140typedef struct {
141mach_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
150typedef struct {
151mach_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
160typedef struct {
161mach_msg_header_t Head;
162NDR_record_t NDR;
163processor_flavor_t flavor;
164mach_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
173typedef struct {
174mach_msg_header_t Head;
175NDR_record_t NDR;
176mach_msg_type_number_t processor_cmdCnt;
177integer_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
186typedef struct {
187mach_msg_header_t Head;
188/* start of the kernel processed data */
189mach_msg_body_t msgh_body;
190mach_msg_port_descriptor_t new_set;
191/* end of the kernel processed data */
192NDR_record_t NDR;
193boolean_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
202typedef struct {
203mach_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
214union __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
231typedef struct {
232mach_msg_header_t Head;
233NDR_record_t NDR;
234kern_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
243typedef struct {
244mach_msg_header_t Head;
245NDR_record_t NDR;
246kern_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
255typedef struct {
256mach_msg_header_t Head;
257/* start of the kernel processed data */
258mach_msg_body_t msgh_body;
259mach_msg_port_descriptor_t host;
260/* end of the kernel processed data */
261NDR_record_t NDR;
262mach_msg_type_number_t processor_info_outCnt;
263integer_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
272typedef struct {
273mach_msg_header_t Head;
274NDR_record_t NDR;
275kern_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
284typedef struct {
285mach_msg_header_t Head;
286NDR_record_t NDR;
287kern_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
296typedef struct {
297mach_msg_header_t Head;
298/* start of the kernel processed data */
299mach_msg_body_t msgh_body;
300mach_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
312union __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

Archive Download this file

Revision: 1466