Chameleon

Chameleon Svn Source Tree

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

1#ifndef_exc_user_
2#define_exc_user_
3
4/* Module exc */
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#ifndefexc_MSG_COUNT
29#defineexc_MSG_COUNT3
30#endif/* exc_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 exception_raise */
46#ifdefmig_external
47mig_external
48#else
49extern
50#endif/* mig_external */
51kern_return_t exception_raise
52(
53mach_port_t exception_port,
54mach_port_t thread,
55mach_port_t task,
56exception_type_t exception,
57exception_data_t code,
58mach_msg_type_number_t codeCnt
59);
60
61/* Routine exception_raise_state */
62#ifdefmig_external
63mig_external
64#else
65extern
66#endif/* mig_external */
67kern_return_t exception_raise_state
68(
69mach_port_t exception_port,
70exception_type_t exception,
71const exception_data_t code,
72mach_msg_type_number_t codeCnt,
73int *flavor,
74const thread_state_t old_state,
75mach_msg_type_number_t old_stateCnt,
76thread_state_t new_state,
77mach_msg_type_number_t *new_stateCnt
78);
79
80/* Routine exception_raise_state_identity */
81#ifdefmig_external
82mig_external
83#else
84extern
85#endif/* mig_external */
86kern_return_t exception_raise_state_identity
87(
88mach_port_t exception_port,
89mach_port_t thread,
90mach_port_t task,
91exception_type_t exception,
92exception_data_t code,
93mach_msg_type_number_t codeCnt,
94int *flavor,
95thread_state_t old_state,
96mach_msg_type_number_t old_stateCnt,
97thread_state_t new_state,
98mach_msg_type_number_t *new_stateCnt
99);
100
101__END_DECLS
102
103/********************** Caution **************************/
104/* The following data types should be used to calculate */
105/* maximum message sizes only. The actual message may be */
106/* smaller, and the position of the arguments within the */
107/* message layout may vary from what is presented here. */
108/* For example, if any of the arguments are variable- */
109/* sized, and less than the maximum is sent, the data */
110/* will be packed tight in the actual message to reduce */
111/* the presence of holes. */
112/********************** Caution **************************/
113
114/* typedefs for all requests */
115
116#ifndef __Request__exc_subsystem__defined
117#define __Request__exc_subsystem__defined
118
119#ifdef __MigPackStructs
120#pragma pack(4)
121#endif
122typedef struct {
123mach_msg_header_t Head;
124/* start of the kernel processed data */
125mach_msg_body_t msgh_body;
126mach_msg_port_descriptor_t thread;
127mach_msg_port_descriptor_t task;
128/* end of the kernel processed data */
129NDR_record_t NDR;
130exception_type_t exception;
131mach_msg_type_number_t codeCnt;
132integer_t code[2];
133} __Request__exception_raise_t;
134#ifdef __MigPackStructs
135#pragma pack()
136#endif
137
138#ifdef __MigPackStructs
139#pragma pack(4)
140#endif
141typedef struct {
142mach_msg_header_t Head;
143NDR_record_t NDR;
144exception_type_t exception;
145mach_msg_type_number_t codeCnt;
146integer_t code[2];
147int flavor;
148mach_msg_type_number_t old_stateCnt;
149natural_t old_state[224];
150} __Request__exception_raise_state_t;
151#ifdef __MigPackStructs
152#pragma pack()
153#endif
154
155#ifdef __MigPackStructs
156#pragma pack(4)
157#endif
158typedef struct {
159mach_msg_header_t Head;
160/* start of the kernel processed data */
161mach_msg_body_t msgh_body;
162mach_msg_port_descriptor_t thread;
163mach_msg_port_descriptor_t task;
164/* end of the kernel processed data */
165NDR_record_t NDR;
166exception_type_t exception;
167mach_msg_type_number_t codeCnt;
168integer_t code[2];
169int flavor;
170mach_msg_type_number_t old_stateCnt;
171natural_t old_state[224];
172} __Request__exception_raise_state_identity_t;
173#ifdef __MigPackStructs
174#pragma pack()
175#endif
176#endif /* !__Request__exc_subsystem__defined */
177
178/* union of all requests */
179
180#ifndef __RequestUnion__exc_subsystem__defined
181#define __RequestUnion__exc_subsystem__defined
182union __RequestUnion__exc_subsystem {
183__Request__exception_raise_t Request_exception_raise;
184__Request__exception_raise_state_t Request_exception_raise_state;
185__Request__exception_raise_state_identity_t Request_exception_raise_state_identity;
186};
187#endif /* !__RequestUnion__exc_subsystem__defined */
188/* typedefs for all replies */
189
190#ifndef __Reply__exc_subsystem__defined
191#define __Reply__exc_subsystem__defined
192
193#ifdef __MigPackStructs
194#pragma pack(4)
195#endif
196typedef struct {
197mach_msg_header_t Head;
198NDR_record_t NDR;
199kern_return_t RetCode;
200} __Reply__exception_raise_t;
201#ifdef __MigPackStructs
202#pragma pack()
203#endif
204
205#ifdef __MigPackStructs
206#pragma pack(4)
207#endif
208typedef struct {
209mach_msg_header_t Head;
210NDR_record_t NDR;
211kern_return_t RetCode;
212int flavor;
213mach_msg_type_number_t new_stateCnt;
214natural_t new_state[224];
215} __Reply__exception_raise_state_t;
216#ifdef __MigPackStructs
217#pragma pack()
218#endif
219
220#ifdef __MigPackStructs
221#pragma pack(4)
222#endif
223typedef struct {
224mach_msg_header_t Head;
225NDR_record_t NDR;
226kern_return_t RetCode;
227int flavor;
228mach_msg_type_number_t new_stateCnt;
229natural_t new_state[224];
230} __Reply__exception_raise_state_identity_t;
231#ifdef __MigPackStructs
232#pragma pack()
233#endif
234#endif /* !__Reply__exc_subsystem__defined */
235
236/* union of all replies */
237
238#ifndef __ReplyUnion__exc_subsystem__defined
239#define __ReplyUnion__exc_subsystem__defined
240union __ReplyUnion__exc_subsystem {
241__Reply__exception_raise_t Reply_exception_raise;
242__Reply__exception_raise_state_t Reply_exception_raise_state;
243__Reply__exception_raise_state_identity_t Reply_exception_raise_state_identity;
244};
245#endif /* !__RequestUnion__exc_subsystem__defined */
246
247#ifndef subsystem_to_name_map_exc
248#define subsystem_to_name_map_exc \
249 { "exception_raise", 2401 },\
250 { "exception_raise_state", 2402 },\
251 { "exception_raise_state_identity", 2403 }
252#endif
253
254#ifdef __AfterMigUserHeader
255__AfterMigUserHeader
256#endif /* __AfterMigUserHeader */
257
258#endif /* _exc_user_ */
259

Archive Download this file

Revision: 2182