3 * stub generated Mon Oct 23 16:56:34 2006
4 * with a MiG generated Sat Jul 1 15:45:39 PDT 2006 by root@b15.apple.com
7 #define __MIG_check__Reply__exc_subsystem__ 1
8 #define __NDR_convert__Reply__exc_subsystem__ 1
9 #define __NDR_convert__mig_reply_error_subsystem__ 1
15 #define mig_internal static __inline__
16 #endif /* mig_internal */
20 #endif /* mig_external */
22 #if !defined(__MigTypeCheck) && defined(TypeCheck)
23 #define __MigTypeCheck TypeCheck /* Legacy setting */
24 #endif /* !defined(__MigTypeCheck) */
26 #if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_)
27 #define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */
28 #endif /* !defined(__MigKernelSpecificCode) */
32 #endif /* LimitCheck */
35 #define min(a,b) ( ((a) < (b))? (a): (b) )
38 #if !defined(_WALIGN_)
39 #define _WALIGN_(x) (((x) + 3) & ~3)
40 #endif /* !defined(_WALIGN_) */
42 #if !defined(_WALIGNSZ_)
43 #define _WALIGNSZ_(x) _WALIGN_(sizeof(x))
44 #endif /* !defined(_WALIGNSZ_) */
46 #ifndef UseStaticTemplates
47 #define UseStaticTemplates 0
48 #endif /* UseStaticTemplates */
50 #ifndef __MachMsgErrorWithTimeout
51 #define __MachMsgErrorWithTimeout(_R_) { \
53 case MACH_SEND_INVALID_REPLY: \
54 case MACH_RCV_INVALID_NAME: \
55 case MACH_RCV_PORT_DIED: \
56 case MACH_RCV_PORT_CHANGED: \
57 case MACH_RCV_TIMED_OUT: \
58 mig_dealloc_reply_port(InP->Head.msgh_reply_port); \
61 mig_put_reply_port(InP->Head.msgh_reply_port); \
64 #endif /* __MachMsgErrorWithTimeout */
66 #ifndef __MachMsgErrorWithoutTimeout
67 #define __MachMsgErrorWithoutTimeout(_R_) { \
69 case MACH_SEND_INVALID_REPLY: \
70 case MACH_RCV_INVALID_NAME: \
71 case MACH_RCV_PORT_DIED: \
72 case MACH_RCV_PORT_CHANGED: \
73 mig_dealloc_reply_port(InP->Head.msgh_reply_port); \
76 mig_put_reply_port(InP->Head.msgh_reply_port); \
79 #endif /* __MachMsgErrorWithoutTimeout */
81 #ifndef __DeclareSendRpc
82 #define __DeclareSendRpc(_NUM_, _NAME_)
83 #endif /* __DeclareSendRpc */
85 #ifndef __BeforeSendRpc
86 #define __BeforeSendRpc(_NUM_, _NAME_)
87 #endif /* __BeforeSendRpc */
89 #ifndef __AfterSendRpc
90 #define __AfterSendRpc(_NUM_, _NAME_)
91 #endif /* __AfterSendRpc */
93 #ifndef __DeclareSendSimple
94 #define __DeclareSendSimple(_NUM_, _NAME_)
95 #endif /* __DeclareSendSimple */
97 #ifndef __BeforeSendSimple
98 #define __BeforeSendSimple(_NUM_, _NAME_)
99 #endif /* __BeforeSendSimple */
101 #ifndef __AfterSendSimple
102 #define __AfterSendSimple(_NUM_, _NAME_)
103 #endif /* __AfterSendSimple */
105 #define msgh_request_port msgh_remote_port
106 #define msgh_reply_port msgh_local_port
110 #if ( __MigTypeCheck || __NDR_convert__ )
111 #if __MIG_check__Reply__exc_subsystem__
112 #if !defined(__MIG_check__Reply__exception_raise_t__defined)
113 #define __MIG_check__Reply__exception_raise_t__defined
114 #ifndef __NDR_convert__int_rep__Reply__exception_raise_t__RetCode__defined
115 #if defined(__NDR_convert__int_rep__exc__kern_return_t__defined)
116 #define __NDR_convert__int_rep__Reply__exception_raise_t__RetCode__defined
117 #define __NDR_convert__int_rep__Reply__exception_raise_t__RetCode(a, f) \
118 __NDR_convert__int_rep__exc__kern_return_t((kern_return_t *)(a), f)
119 #elif defined(__NDR_convert__int_rep__kern_return_t__defined)
120 #define __NDR_convert__int_rep__Reply__exception_raise_t__RetCode__defined
121 #define __NDR_convert__int_rep__Reply__exception_raise_t__RetCode(a, f) \
122 __NDR_convert__int_rep__kern_return_t((kern_return_t *)(a), f)
123 #endif /* defined(__NDR_convert__*__defined) */
124 #endif /* __NDR_convert__int_rep__Reply__exception_raise_t__RetCode__defined */
130 mig_internal kern_return_t __MIG_check__Reply__exception_raise_t(__Reply__exception_raise_t *Out0P)
133 typedef __Reply__exception_raise_t __Reply;
134 if (Out0P->Head.msgh_id != 2501) {
135 if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
136 { return MIG_SERVER_DIED; }
138 { return MIG_REPLY_MISMATCH; }
142 if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
143 (Out0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Reply)))
144 { return MIG_TYPE_ERROR ; }
145 #endif /* __MigTypeCheck */
147 #if defined(__NDR_convert__int_rep__Reply__exception_raise_t__RetCode__defined)
148 if (Out0P->NDR.int_rep != NDR_record.int_rep)
149 __NDR_convert__int_rep__Reply__exception_raise_t__RetCode(&Out0P->RetCode, Out0P->NDR.int_rep);
150 #endif /* __NDR_convert__int_rep__Reply__exception_raise_t__RetCode__defined */
151 { return Out0P->RetCode;
154 #endif /* !defined(__MIG_check__Reply__exception_raise_t__defined) */
155 #endif /* __MIG_check__Reply__exc_subsystem__ */
156 #endif /* ( __MigTypeCheck || __NDR_convert__ ) */
159 /* Routine exception_raise */
160 mig_external kern_return_t exception_raise
162 mach_port_t exception_port,
165 exception_type_t exception,
166 exception_data_t code,
167 mach_msg_type_number_t codeCnt
172 #ifdef __MigPackStructs
176 mach_msg_header_t Head;
177 /* start of the kernel processed data */
178 mach_msg_body_t msgh_body;
179 mach_msg_port_descriptor_t thread;
180 mach_msg_port_descriptor_t task;
181 /* end of the kernel processed data */
183 exception_type_t exception;
184 mach_msg_type_number_t codeCnt;
187 #ifdef __MigPackStructs
191 #ifdef __MigPackStructs
195 mach_msg_header_t Head;
197 kern_return_t RetCode;
198 mach_msg_trailer_t trailer;
200 #ifdef __MigPackStructs
204 #ifdef __MigPackStructs
208 mach_msg_header_t Head;
210 kern_return_t RetCode;
212 #ifdef __MigPackStructs
217 * mach_msg_header_t Head;
219 * kern_return_t RetCode;
220 * } mig_reply_error_t;
228 Request *InP = &Mess.In;
229 Reply *Out0P = &Mess.Out;
231 mach_msg_return_t msg_result;
232 unsigned int msgh_size;
234 #ifdef __MIG_check__Reply__exception_raise_t__defined
235 kern_return_t check_result;
236 #endif /* __MIG_check__Reply__exception_raise_t__defined */
238 __DeclareSendRpc(2401, "exception_raise")
240 #if UseStaticTemplates
241 const static mach_msg_port_descriptor_t threadTemplate = {
242 /* name = */ MACH_PORT_NULL,
246 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
248 #endif /* UseStaticTemplates */
250 #if UseStaticTemplates
251 const static mach_msg_port_descriptor_t taskTemplate = {
252 /* name = */ MACH_PORT_NULL,
256 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
258 #endif /* UseStaticTemplates */
260 InP->msgh_body.msgh_descriptor_count = 2;
261 #if UseStaticTemplates
262 InP->thread = threadTemplate;
263 InP->thread.name = thread;
264 #else /* UseStaticTemplates */
265 InP->thread.name = thread;
266 InP->thread.disposition = 19;
267 InP->thread.type = MACH_MSG_PORT_DESCRIPTOR;
268 #endif /* UseStaticTemplates */
270 #if UseStaticTemplates
271 InP->task = taskTemplate;
272 InP->task.name = task;
273 #else /* UseStaticTemplates */
274 InP->task.name = task;
275 InP->task.disposition = 19;
276 InP->task.type = MACH_MSG_PORT_DESCRIPTOR;
277 #endif /* UseStaticTemplates */
279 InP->NDR = NDR_record;
281 InP->exception = exception;
284 { return MIG_ARRAY_TOO_LARGE; }
286 (void)memcpy((char *) InP->code, (const char *) code, 4 * codeCnt);
288 InP->codeCnt = codeCnt;
290 msgh_size = (mach_msg_size_t)(sizeof(Request) - 8) + ((4 * codeCnt));
291 InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX|
292 MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
293 /* msgh_size passed as argument */
294 InP->Head.msgh_request_port = exception_port;
295 InP->Head.msgh_reply_port = mig_get_reply_port();
296 InP->Head.msgh_id = 2401;
298 __BeforeSendRpc(2401, "exception_raise")
299 msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, msgh_size, (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
300 __AfterSendRpc(2401, "exception_raise")
301 if (msg_result != MACH_MSG_SUCCESS) {
302 __MachMsgErrorWithoutTimeout(msg_result);
303 { return msg_result; }
307 #if defined(__MIG_check__Reply__exception_raise_t__defined)
308 check_result = __MIG_check__Reply__exception_raise_t((__Reply__exception_raise_t *)Out0P);
309 if (check_result != MACH_MSG_SUCCESS)
310 { return check_result; }
311 #endif /* defined(__MIG_check__Reply__exception_raise_t__defined) */
317 #if ( __MigTypeCheck || __NDR_convert__ )
318 #if __MIG_check__Reply__exc_subsystem__
319 #if !defined(__MIG_check__Reply__exception_raise_state_t__defined)
320 #define __MIG_check__Reply__exception_raise_state_t__defined
321 #ifndef __NDR_convert__int_rep__Reply__exception_raise_state_t__RetCode__defined
322 #if defined(__NDR_convert__int_rep__exc__kern_return_t__defined)
323 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__RetCode__defined
324 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__RetCode(a, f) \
325 __NDR_convert__int_rep__exc__kern_return_t((kern_return_t *)(a), f)
326 #elif defined(__NDR_convert__int_rep__kern_return_t__defined)
327 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__RetCode__defined
328 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__RetCode(a, f) \
329 __NDR_convert__int_rep__kern_return_t((kern_return_t *)(a), f)
330 #endif /* defined(__NDR_convert__*__defined) */
331 #endif /* __NDR_convert__int_rep__Reply__exception_raise_state_t__RetCode__defined */
334 #ifndef __NDR_convert__int_rep__Reply__exception_raise_state_t__flavor__defined
335 #if defined(__NDR_convert__int_rep__exc__int__defined)
336 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__flavor__defined
337 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__flavor(a, f) \
338 __NDR_convert__int_rep__exc__int((int *)(a), f)
339 #elif defined(__NDR_convert__int_rep__int__defined)
340 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__flavor__defined
341 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__flavor(a, f) \
342 __NDR_convert__int_rep__int((int *)(a), f)
343 #elif defined(__NDR_convert__int_rep__exc__int32_t__defined)
344 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__flavor__defined
345 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__flavor(a, f) \
346 __NDR_convert__int_rep__exc__int32_t((int32_t *)(a), f)
347 #elif defined(__NDR_convert__int_rep__int32_t__defined)
348 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__flavor__defined
349 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__flavor(a, f) \
350 __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
351 #endif /* defined(__NDR_convert__*__defined) */
352 #endif /* __NDR_convert__int_rep__Reply__exception_raise_state_t__flavor__defined */
355 #ifndef __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state__defined
356 #if defined(__NDR_convert__int_rep__exc__thread_state_t__defined)
357 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state__defined
358 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
359 __NDR_convert__int_rep__exc__thread_state_t((thread_state_t *)(a), f, c)
360 #elif defined(__NDR_convert__int_rep__thread_state_t__defined)
361 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state__defined
362 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
363 __NDR_convert__int_rep__thread_state_t((thread_state_t *)(a), f, c)
364 #elif defined(__NDR_convert__int_rep__exc__natural_t__defined)
365 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state__defined
366 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
367 __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__int_rep__exc__natural_t)
368 #elif defined(__NDR_convert__int_rep__natural_t__defined)
369 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state__defined
370 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
371 __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__int_rep__natural_t)
372 #elif defined(__NDR_convert__int_rep__exc__uint32_t__defined)
373 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state__defined
374 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
375 __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__int_rep__exc__uint32_t)
376 #elif defined(__NDR_convert__int_rep__uint32_t__defined)
377 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state__defined
378 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
379 __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__int_rep__uint32_t)
380 #endif /* defined(__NDR_convert__*__defined) */
381 #endif /* __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state__defined */
384 #ifndef __NDR_convert__int_rep__Reply__exception_raise_state_t__new_stateCnt__defined
385 #if defined(__NDR_convert__int_rep__exc__mach_msg_type_number_t__defined)
386 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_stateCnt__defined
387 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_stateCnt(a, f) \
388 __NDR_convert__int_rep__exc__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f)
389 #elif defined(__NDR_convert__int_rep__mach_msg_type_number_t__defined)
390 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_stateCnt__defined
391 #define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_stateCnt(a, f) \
392 __NDR_convert__int_rep__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f)
393 #endif /* defined(__NDR_convert__*__defined) */
394 #endif /* __NDR_convert__int_rep__Reply__exception_raise_state_t__new_stateCnt__defined */
398 #ifndef __NDR_convert__char_rep__Reply__exception_raise_state_t__flavor__defined
399 #if defined(__NDR_convert__char_rep__exc__int__defined)
400 #define __NDR_convert__char_rep__Reply__exception_raise_state_t__flavor__defined
401 #define __NDR_convert__char_rep__Reply__exception_raise_state_t__flavor(a, f) \
402 __NDR_convert__char_rep__exc__int((int *)(a), f)
403 #elif defined(__NDR_convert__char_rep__int__defined)
404 #define __NDR_convert__char_rep__Reply__exception_raise_state_t__flavor__defined
405 #define __NDR_convert__char_rep__Reply__exception_raise_state_t__flavor(a, f) \
406 __NDR_convert__char_rep__int((int *)(a), f)
407 #elif defined(__NDR_convert__char_rep__exc__int32_t__defined)
408 #define __NDR_convert__char_rep__Reply__exception_raise_state_t__flavor__defined
409 #define __NDR_convert__char_rep__Reply__exception_raise_state_t__flavor(a, f) \
410 __NDR_convert__char_rep__exc__int32_t((int32_t *)(a), f)
411 #elif defined(__NDR_convert__char_rep__int32_t__defined)
412 #define __NDR_convert__char_rep__Reply__exception_raise_state_t__flavor__defined
413 #define __NDR_convert__char_rep__Reply__exception_raise_state_t__flavor(a, f) \
414 __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
415 #endif /* defined(__NDR_convert__*__defined) */
416 #endif /* __NDR_convert__char_rep__Reply__exception_raise_state_t__flavor__defined */
419 #ifndef __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state__defined
420 #if defined(__NDR_convert__char_rep__exc__thread_state_t__defined)
421 #define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state__defined
422 #define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
423 __NDR_convert__char_rep__exc__thread_state_t((thread_state_t *)(a), f, c)
424 #elif defined(__NDR_convert__char_rep__thread_state_t__defined)
425 #define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state__defined
426 #define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
427 __NDR_convert__char_rep__thread_state_t((thread_state_t *)(a), f, c)
428 #elif defined(__NDR_convert__char_rep__exc__natural_t__defined)
429 #define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state__defined
430 #define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
431 __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__char_rep__exc__natural_t)
432 #elif defined(__NDR_convert__char_rep__natural_t__defined)
433 #define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state__defined
434 #define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
435 __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__char_rep__natural_t)
436 #elif defined(__NDR_convert__char_rep__exc__uint32_t__defined)
437 #define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state__defined
438 #define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
439 __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__char_rep__exc__uint32_t)
440 #elif defined(__NDR_convert__char_rep__uint32_t__defined)
441 #define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state__defined
442 #define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
443 __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__char_rep__uint32_t)
444 #endif /* defined(__NDR_convert__*__defined) */
445 #endif /* __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state__defined */
450 #ifndef __NDR_convert__float_rep__Reply__exception_raise_state_t__flavor__defined
451 #if defined(__NDR_convert__float_rep__exc__int__defined)
452 #define __NDR_convert__float_rep__Reply__exception_raise_state_t__flavor__defined
453 #define __NDR_convert__float_rep__Reply__exception_raise_state_t__flavor(a, f) \
454 __NDR_convert__float_rep__exc__int((int *)(a), f)
455 #elif defined(__NDR_convert__float_rep__int__defined)
456 #define __NDR_convert__float_rep__Reply__exception_raise_state_t__flavor__defined
457 #define __NDR_convert__float_rep__Reply__exception_raise_state_t__flavor(a, f) \
458 __NDR_convert__float_rep__int((int *)(a), f)
459 #elif defined(__NDR_convert__float_rep__exc__int32_t__defined)
460 #define __NDR_convert__float_rep__Reply__exception_raise_state_t__flavor__defined
461 #define __NDR_convert__float_rep__Reply__exception_raise_state_t__flavor(a, f) \
462 __NDR_convert__float_rep__exc__int32_t((int32_t *)(a), f)
463 #elif defined(__NDR_convert__float_rep__int32_t__defined)
464 #define __NDR_convert__float_rep__Reply__exception_raise_state_t__flavor__defined
465 #define __NDR_convert__float_rep__Reply__exception_raise_state_t__flavor(a, f) \
466 __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
467 #endif /* defined(__NDR_convert__*__defined) */
468 #endif /* __NDR_convert__float_rep__Reply__exception_raise_state_t__flavor__defined */
471 #ifndef __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state__defined
472 #if defined(__NDR_convert__float_rep__exc__thread_state_t__defined)
473 #define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state__defined
474 #define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
475 __NDR_convert__float_rep__exc__thread_state_t((thread_state_t *)(a), f, c)
476 #elif defined(__NDR_convert__float_rep__thread_state_t__defined)
477 #define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state__defined
478 #define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
479 __NDR_convert__float_rep__thread_state_t((thread_state_t *)(a), f, c)
480 #elif defined(__NDR_convert__float_rep__exc__natural_t__defined)
481 #define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state__defined
482 #define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
483 __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__float_rep__exc__natural_t)
484 #elif defined(__NDR_convert__float_rep__natural_t__defined)
485 #define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state__defined
486 #define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
487 __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__float_rep__natural_t)
488 #elif defined(__NDR_convert__float_rep__exc__uint32_t__defined)
489 #define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state__defined
490 #define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
491 __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__float_rep__exc__uint32_t)
492 #elif defined(__NDR_convert__float_rep__uint32_t__defined)
493 #define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state__defined
494 #define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
495 __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__float_rep__uint32_t)
496 #endif /* defined(__NDR_convert__*__defined) */
497 #endif /* __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state__defined */
502 mig_internal kern_return_t __MIG_check__Reply__exception_raise_state_t(__Reply__exception_raise_state_t *Out0P)
505 typedef __Reply__exception_raise_state_t __Reply;
507 unsigned int msgh_size;
508 #endif /* __MigTypeCheck */
510 if (Out0P->Head.msgh_id != 2502) {
511 if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
512 { return MIG_SERVER_DIED; }
514 { return MIG_REPLY_MISMATCH; }
518 msgh_size = Out0P->Head.msgh_size;
520 if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
521 ((msgh_size > (mach_msg_size_t)sizeof(__Reply) || msgh_size < (mach_msg_size_t)(sizeof(__Reply) - 576)) &&
522 (msgh_size != (mach_msg_size_t)sizeof(mig_reply_error_t) ||
523 Out0P->RetCode == KERN_SUCCESS)))
524 { return MIG_TYPE_ERROR ; }
525 #endif /* __MigTypeCheck */
527 if (Out0P->RetCode != KERN_SUCCESS) {
528 #ifdef __NDR_convert__mig_reply_error_t__defined
529 __NDR_convert__mig_reply_error_t((mig_reply_error_t *)Out0P);
530 #endif /* __NDR_convert__mig_reply_error_t__defined */
531 return ((mig_reply_error_t *)Out0P)->RetCode;
534 #if defined(__NDR_convert__int_rep__Reply__exception_raise_state_t__new_stateCnt__defined)
535 if (Out0P->NDR.int_rep != NDR_record.int_rep)
536 __NDR_convert__int_rep__Reply__exception_raise_state_t__new_stateCnt(&Out0P->new_stateCnt, Out0P->NDR.int_rep);
537 #endif /* __NDR_convert__int_rep__Reply__exception_raise_state_t__new_stateCnt__defined */
539 if (msgh_size != (mach_msg_size_t)(sizeof(__Reply) - 576) + ((4 * Out0P->new_stateCnt)))
540 { return MIG_TYPE_ERROR ; }
541 #endif /* __MigTypeCheck */
543 #if defined(__NDR_convert__int_rep__Reply__exception_raise_state_t__RetCode__defined) || \
544 defined(__NDR_convert__int_rep__Reply__exception_raise_state_t__flavor__defined) || \
545 defined(__NDR_convert__int_rep__Reply__exception_raise_state_t__new_state__defined) || \
546 defined(__NDR_convert__int_rep__Reply__exception_raise_state_t__new_stateCnt__defined)
547 if (Out0P->NDR.int_rep != NDR_record.int_rep) {
548 #if defined(__NDR_convert__int_rep__Reply__exception_raise_state_t__RetCode__defined)
549 __NDR_convert__int_rep__Reply__exception_raise_state_t__RetCode(&Out0P->RetCode, Out0P->NDR.int_rep);
550 #endif /* __NDR_convert__int_rep__Reply__exception_raise_state_t__RetCode__defined */
551 #if defined(__NDR_convert__int_rep__Reply__exception_raise_state_t__flavor__defined)
552 __NDR_convert__int_rep__Reply__exception_raise_state_t__flavor(&Out0P->flavor, Out0P->NDR.int_rep);
553 #endif /* __NDR_convert__int_rep__Reply__exception_raise_state_t__flavor__defined */
554 #if defined(__NDR_convert__int_rep__Reply__exception_raise_state_t__new_state__defined)
555 __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state(&Out0P->new_state, Out0P->NDR.int_rep, Out0P->new_stateCnt);
556 #endif /* __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state__defined */
558 #endif /* defined(__NDR_convert__int_rep...) */
561 defined(__NDR_convert__char_rep__Reply__exception_raise_state_t__flavor__defined) || \
562 defined(__NDR_convert__char_rep__Reply__exception_raise_state_t__new_state__defined) || \
564 if (Out0P->NDR.char_rep != NDR_record.char_rep) {
565 #if defined(__NDR_convert__char_rep__Reply__exception_raise_state_t__flavor__defined)
566 __NDR_convert__char_rep__Reply__exception_raise_state_t__flavor(&Out0P->flavor, Out0P->NDR.char_rep);
567 #endif /* __NDR_convert__char_rep__Reply__exception_raise_state_t__flavor__defined */
568 #if defined(__NDR_convert__char_rep__Reply__exception_raise_state_t__new_state__defined)
569 __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state(&Out0P->new_state, Out0P->NDR.char_rep, Out0P->new_stateCnt);
570 #endif /* __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state__defined */
572 #endif /* defined(__NDR_convert__char_rep...) */
575 defined(__NDR_convert__float_rep__Reply__exception_raise_state_t__flavor__defined) || \
576 defined(__NDR_convert__float_rep__Reply__exception_raise_state_t__new_state__defined) || \
578 if (Out0P->NDR.float_rep != NDR_record.float_rep) {
579 #if defined(__NDR_convert__float_rep__Reply__exception_raise_state_t__flavor__defined)
580 __NDR_convert__float_rep__Reply__exception_raise_state_t__flavor(&Out0P->flavor, Out0P->NDR.float_rep);
581 #endif /* __NDR_convert__float_rep__Reply__exception_raise_state_t__flavor__defined */
582 #if defined(__NDR_convert__float_rep__Reply__exception_raise_state_t__new_state__defined)
583 __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state(&Out0P->new_state, Out0P->NDR.float_rep, Out0P->new_stateCnt);
584 #endif /* __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state__defined */
586 #endif /* defined(__NDR_convert__float_rep...) */
588 return MACH_MSG_SUCCESS;
590 #endif /* !defined(__MIG_check__Reply__exception_raise_state_t__defined) */
591 #endif /* __MIG_check__Reply__exc_subsystem__ */
592 #endif /* ( __MigTypeCheck || __NDR_convert__ ) */
595 /* Routine exception_raise_state */
596 mig_external kern_return_t exception_raise_state
598 mach_port_t exception_port,
599 exception_type_t exception,
600 const exception_data_t code,
601 mach_msg_type_number_t codeCnt,
603 const thread_state_t old_state,
604 mach_msg_type_number_t old_stateCnt,
605 thread_state_t new_state,
606 mach_msg_type_number_t *new_stateCnt
611 #ifdef __MigPackStructs
615 mach_msg_header_t Head;
617 exception_type_t exception;
618 mach_msg_type_number_t codeCnt;
621 mach_msg_type_number_t old_stateCnt;
622 natural_t old_state[144];
624 #ifdef __MigPackStructs
628 #ifdef __MigPackStructs
632 mach_msg_header_t Head;
634 kern_return_t RetCode;
636 mach_msg_type_number_t new_stateCnt;
637 natural_t new_state[144];
638 mach_msg_trailer_t trailer;
640 #ifdef __MigPackStructs
644 #ifdef __MigPackStructs
648 mach_msg_header_t Head;
650 kern_return_t RetCode;
652 mach_msg_type_number_t new_stateCnt;
653 natural_t new_state[144];
655 #ifdef __MigPackStructs
660 * mach_msg_header_t Head;
662 * kern_return_t RetCode;
663 * } mig_reply_error_t;
671 Request *InP = &Mess.In;
672 Reply *Out0P = &Mess.Out;
674 mach_msg_return_t msg_result;
675 unsigned int msgh_size;
676 unsigned int msgh_size_delta;
679 #ifdef __MIG_check__Reply__exception_raise_state_t__defined
680 kern_return_t check_result;
681 #endif /* __MIG_check__Reply__exception_raise_state_t__defined */
683 __DeclareSendRpc(2402, "exception_raise_state")
685 InP->NDR = NDR_record;
687 InP->exception = exception;
690 { return MIG_ARRAY_TOO_LARGE; }
692 (void)memcpy((char *) InP->code, (const char *) code, 4 * codeCnt);
694 InP->codeCnt = codeCnt;
696 msgh_size_delta = (4 * codeCnt);
697 msgh_size = (mach_msg_size_t)(sizeof(Request) - 584) + msgh_size_delta;
698 InP = (Request *) ((pointer_t) InP + msgh_size_delta - 8);
700 InP->flavor = *flavor;
702 if (old_stateCnt > 144) {
703 { return MIG_ARRAY_TOO_LARGE; }
705 (void)memcpy((char *) InP->old_state, (const char *) old_state, 4 * old_stateCnt);
707 InP->old_stateCnt = old_stateCnt;
709 msgh_size += (4 * old_stateCnt);
711 InP->Head.msgh_bits =
712 MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
713 /* msgh_size passed as argument */
714 InP->Head.msgh_request_port = exception_port;
715 InP->Head.msgh_reply_port = mig_get_reply_port();
716 InP->Head.msgh_id = 2402;
718 __BeforeSendRpc(2402, "exception_raise_state")
719 msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, msgh_size, (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
720 __AfterSendRpc(2402, "exception_raise_state")
721 if (msg_result != MACH_MSG_SUCCESS) {
722 __MachMsgErrorWithoutTimeout(msg_result);
723 { return msg_result; }
727 #if defined(__MIG_check__Reply__exception_raise_state_t__defined)
728 check_result = __MIG_check__Reply__exception_raise_state_t((__Reply__exception_raise_state_t *)Out0P);
729 if (check_result != MACH_MSG_SUCCESS)
730 { return check_result; }
731 #endif /* defined(__MIG_check__Reply__exception_raise_state_t__defined) */
733 *flavor = Out0P->flavor;
735 if (Out0P->new_stateCnt > 144) {
736 (void)memcpy((char *) new_state, (const char *) Out0P->new_state, 4 * 144);
737 *new_stateCnt = Out0P->new_stateCnt;
738 { return MIG_ARRAY_TOO_LARGE; }
740 (void)memcpy((char *) new_state, (const char *) Out0P->new_state, 4 * Out0P->new_stateCnt);
742 *new_stateCnt = Out0P->new_stateCnt;
748 #if ( __MigTypeCheck || __NDR_convert__ )
749 #if __MIG_check__Reply__exc_subsystem__
750 #if !defined(__MIG_check__Reply__exception_raise_state_identity_t__defined)
751 #define __MIG_check__Reply__exception_raise_state_identity_t__defined
752 #ifndef __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__RetCode__defined
753 #if defined(__NDR_convert__int_rep__exc__kern_return_t__defined)
754 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__RetCode__defined
755 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__RetCode(a, f) \
756 __NDR_convert__int_rep__exc__kern_return_t((kern_return_t *)(a), f)
757 #elif defined(__NDR_convert__int_rep__kern_return_t__defined)
758 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__RetCode__defined
759 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__RetCode(a, f) \
760 __NDR_convert__int_rep__kern_return_t((kern_return_t *)(a), f)
761 #endif /* defined(__NDR_convert__*__defined) */
762 #endif /* __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__RetCode__defined */
765 #ifndef __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor__defined
766 #if defined(__NDR_convert__int_rep__exc__int__defined)
767 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor__defined
768 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
769 __NDR_convert__int_rep__exc__int((int *)(a), f)
770 #elif defined(__NDR_convert__int_rep__int__defined)
771 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor__defined
772 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
773 __NDR_convert__int_rep__int((int *)(a), f)
774 #elif defined(__NDR_convert__int_rep__exc__int32_t__defined)
775 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor__defined
776 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
777 __NDR_convert__int_rep__exc__int32_t((int32_t *)(a), f)
778 #elif defined(__NDR_convert__int_rep__int32_t__defined)
779 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor__defined
780 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
781 __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
782 #endif /* defined(__NDR_convert__*__defined) */
783 #endif /* __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor__defined */
786 #ifndef __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state__defined
787 #if defined(__NDR_convert__int_rep__exc__thread_state_t__defined)
788 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state__defined
789 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
790 __NDR_convert__int_rep__exc__thread_state_t((thread_state_t *)(a), f, c)
791 #elif defined(__NDR_convert__int_rep__thread_state_t__defined)
792 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state__defined
793 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
794 __NDR_convert__int_rep__thread_state_t((thread_state_t *)(a), f, c)
795 #elif defined(__NDR_convert__int_rep__exc__natural_t__defined)
796 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state__defined
797 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
798 __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__int_rep__exc__natural_t)
799 #elif defined(__NDR_convert__int_rep__natural_t__defined)
800 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state__defined
801 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
802 __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__int_rep__natural_t)
803 #elif defined(__NDR_convert__int_rep__exc__uint32_t__defined)
804 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state__defined
805 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
806 __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__int_rep__exc__uint32_t)
807 #elif defined(__NDR_convert__int_rep__uint32_t__defined)
808 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state__defined
809 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
810 __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__int_rep__uint32_t)
811 #endif /* defined(__NDR_convert__*__defined) */
812 #endif /* __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state__defined */
815 #ifndef __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_stateCnt__defined
816 #if defined(__NDR_convert__int_rep__exc__mach_msg_type_number_t__defined)
817 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_stateCnt__defined
818 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_stateCnt(a, f) \
819 __NDR_convert__int_rep__exc__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f)
820 #elif defined(__NDR_convert__int_rep__mach_msg_type_number_t__defined)
821 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_stateCnt__defined
822 #define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_stateCnt(a, f) \
823 __NDR_convert__int_rep__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f)
824 #endif /* defined(__NDR_convert__*__defined) */
825 #endif /* __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_stateCnt__defined */
829 #ifndef __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor__defined
830 #if defined(__NDR_convert__char_rep__exc__int__defined)
831 #define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor__defined
832 #define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
833 __NDR_convert__char_rep__exc__int((int *)(a), f)
834 #elif defined(__NDR_convert__char_rep__int__defined)
835 #define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor__defined
836 #define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
837 __NDR_convert__char_rep__int((int *)(a), f)
838 #elif defined(__NDR_convert__char_rep__exc__int32_t__defined)
839 #define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor__defined
840 #define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
841 __NDR_convert__char_rep__exc__int32_t((int32_t *)(a), f)
842 #elif defined(__NDR_convert__char_rep__int32_t__defined)
843 #define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor__defined
844 #define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
845 __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
846 #endif /* defined(__NDR_convert__*__defined) */
847 #endif /* __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor__defined */
850 #ifndef __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state__defined
851 #if defined(__NDR_convert__char_rep__exc__thread_state_t__defined)
852 #define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state__defined
853 #define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
854 __NDR_convert__char_rep__exc__thread_state_t((thread_state_t *)(a), f, c)
855 #elif defined(__NDR_convert__char_rep__thread_state_t__defined)
856 #define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state__defined
857 #define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
858 __NDR_convert__char_rep__thread_state_t((thread_state_t *)(a), f, c)
859 #elif defined(__NDR_convert__char_rep__exc__natural_t__defined)
860 #define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state__defined
861 #define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
862 __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__char_rep__exc__natural_t)
863 #elif defined(__NDR_convert__char_rep__natural_t__defined)
864 #define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state__defined
865 #define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
866 __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__char_rep__natural_t)
867 #elif defined(__NDR_convert__char_rep__exc__uint32_t__defined)
868 #define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state__defined
869 #define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
870 __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__char_rep__exc__uint32_t)
871 #elif defined(__NDR_convert__char_rep__uint32_t__defined)
872 #define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state__defined
873 #define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
874 __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__char_rep__uint32_t)
875 #endif /* defined(__NDR_convert__*__defined) */
876 #endif /* __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state__defined */
881 #ifndef __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor__defined
882 #if defined(__NDR_convert__float_rep__exc__int__defined)
883 #define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor__defined
884 #define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
885 __NDR_convert__float_rep__exc__int((int *)(a), f)
886 #elif defined(__NDR_convert__float_rep__int__defined)
887 #define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor__defined
888 #define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
889 __NDR_convert__float_rep__int((int *)(a), f)
890 #elif defined(__NDR_convert__float_rep__exc__int32_t__defined)
891 #define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor__defined
892 #define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
893 __NDR_convert__float_rep__exc__int32_t((int32_t *)(a), f)
894 #elif defined(__NDR_convert__float_rep__int32_t__defined)
895 #define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor__defined
896 #define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
897 __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
898 #endif /* defined(__NDR_convert__*__defined) */
899 #endif /* __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor__defined */
902 #ifndef __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state__defined
903 #if defined(__NDR_convert__float_rep__exc__thread_state_t__defined)
904 #define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state__defined
905 #define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
906 __NDR_convert__float_rep__exc__thread_state_t((thread_state_t *)(a), f, c)
907 #elif defined(__NDR_convert__float_rep__thread_state_t__defined)
908 #define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state__defined
909 #define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
910 __NDR_convert__float_rep__thread_state_t((thread_state_t *)(a), f, c)
911 #elif defined(__NDR_convert__float_rep__exc__natural_t__defined)
912 #define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state__defined
913 #define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
914 __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__float_rep__exc__natural_t)
915 #elif defined(__NDR_convert__float_rep__natural_t__defined)
916 #define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state__defined
917 #define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
918 __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__float_rep__natural_t)
919 #elif defined(__NDR_convert__float_rep__exc__uint32_t__defined)
920 #define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state__defined
921 #define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
922 __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__float_rep__exc__uint32_t)
923 #elif defined(__NDR_convert__float_rep__uint32_t__defined)
924 #define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state__defined
925 #define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
926 __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__float_rep__uint32_t)
927 #endif /* defined(__NDR_convert__*__defined) */
928 #endif /* __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state__defined */
933 mig_internal kern_return_t __MIG_check__Reply__exception_raise_state_identity_t(__Reply__exception_raise_state_identity_t *Out0P)
936 typedef __Reply__exception_raise_state_identity_t __Reply;
938 unsigned int msgh_size;
939 #endif /* __MigTypeCheck */
941 if (Out0P->Head.msgh_id != 2503) {
942 if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
943 { return MIG_SERVER_DIED; }
945 { return MIG_REPLY_MISMATCH; }
949 msgh_size = Out0P->Head.msgh_size;
951 if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
952 ((msgh_size > (mach_msg_size_t)sizeof(__Reply) || msgh_size < (mach_msg_size_t)(sizeof(__Reply) - 576)) &&
953 (msgh_size != (mach_msg_size_t)sizeof(mig_reply_error_t) ||
954 Out0P->RetCode == KERN_SUCCESS)))
955 { return MIG_TYPE_ERROR ; }
956 #endif /* __MigTypeCheck */
958 if (Out0P->RetCode != KERN_SUCCESS) {
959 #ifdef __NDR_convert__mig_reply_error_t__defined
960 __NDR_convert__mig_reply_error_t((mig_reply_error_t *)Out0P);
961 #endif /* __NDR_convert__mig_reply_error_t__defined */
962 return ((mig_reply_error_t *)Out0P)->RetCode;
965 #if defined(__NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_stateCnt__defined)
966 if (Out0P->NDR.int_rep != NDR_record.int_rep)
967 __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_stateCnt(&Out0P->new_stateCnt, Out0P->NDR.int_rep);
968 #endif /* __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_stateCnt__defined */
970 if (msgh_size != (mach_msg_size_t)(sizeof(__Reply) - 576) + ((4 * Out0P->new_stateCnt)))
971 { return MIG_TYPE_ERROR ; }
972 #endif /* __MigTypeCheck */
974 #if defined(__NDR_convert__int_rep__Reply__exception_raise_state_identity_t__RetCode__defined) || \
975 defined(__NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor__defined) || \
976 defined(__NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state__defined) || \
977 defined(__NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_stateCnt__defined)
978 if (Out0P->NDR.int_rep != NDR_record.int_rep) {
979 #if defined(__NDR_convert__int_rep__Reply__exception_raise_state_identity_t__RetCode__defined)
980 __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__RetCode(&Out0P->RetCode, Out0P->NDR.int_rep);
981 #endif /* __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__RetCode__defined */
982 #if defined(__NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor__defined)
983 __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor(&Out0P->flavor, Out0P->NDR.int_rep);
984 #endif /* __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor__defined */
985 #if defined(__NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state__defined)
986 __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state(&Out0P->new_state, Out0P->NDR.int_rep, Out0P->new_stateCnt);
987 #endif /* __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state__defined */
989 #endif /* defined(__NDR_convert__int_rep...) */
992 defined(__NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor__defined) || \
993 defined(__NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state__defined) || \
995 if (Out0P->NDR.char_rep != NDR_record.char_rep) {
996 #if defined(__NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor__defined)
997 __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor(&Out0P->flavor, Out0P->NDR.char_rep);
998 #endif /* __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor__defined */
999 #if defined(__NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state__defined)
1000 __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state(&Out0P->new_state, Out0P->NDR.char_rep, Out0P->new_stateCnt);
1001 #endif /* __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state__defined */
1003 #endif /* defined(__NDR_convert__char_rep...) */
1006 defined(__NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor__defined) || \
1007 defined(__NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state__defined) || \
1009 if (Out0P->NDR.float_rep != NDR_record.float_rep) {
1010 #if defined(__NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor__defined)
1011 __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor(&Out0P->flavor, Out0P->NDR.float_rep);
1012 #endif /* __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor__defined */
1013 #if defined(__NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state__defined)
1014 __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state(&Out0P->new_state, Out0P->NDR.float_rep, Out0P->new_stateCnt);
1015 #endif /* __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state__defined */
1017 #endif /* defined(__NDR_convert__float_rep...) */
1019 return MACH_MSG_SUCCESS;
1021 #endif /* !defined(__MIG_check__Reply__exception_raise_state_identity_t__defined) */
1022 #endif /* __MIG_check__Reply__exc_subsystem__ */
1023 #endif /* ( __MigTypeCheck || __NDR_convert__ ) */
1026 /* Routine exception_raise_state_identity */
1027 mig_external kern_return_t exception_raise_state_identity
1029 mach_port_t exception_port,
1032 exception_type_t exception,
1033 exception_data_t code,
1034 mach_msg_type_number_t codeCnt,
1036 thread_state_t old_state,
1037 mach_msg_type_number_t old_stateCnt,
1038 thread_state_t new_state,
1039 mach_msg_type_number_t *new_stateCnt
1044 #ifdef __MigPackStructs
1048 mach_msg_header_t Head;
1049 /* start of the kernel processed data */
1050 mach_msg_body_t msgh_body;
1051 mach_msg_port_descriptor_t thread;
1052 mach_msg_port_descriptor_t task;
1053 /* end of the kernel processed data */
1055 exception_type_t exception;
1056 mach_msg_type_number_t codeCnt;
1059 mach_msg_type_number_t old_stateCnt;
1060 natural_t old_state[144];
1062 #ifdef __MigPackStructs
1066 #ifdef __MigPackStructs
1070 mach_msg_header_t Head;
1072 kern_return_t RetCode;
1074 mach_msg_type_number_t new_stateCnt;
1075 natural_t new_state[144];
1076 mach_msg_trailer_t trailer;
1078 #ifdef __MigPackStructs
1082 #ifdef __MigPackStructs
1086 mach_msg_header_t Head;
1088 kern_return_t RetCode;
1090 mach_msg_type_number_t new_stateCnt;
1091 natural_t new_state[144];
1093 #ifdef __MigPackStructs
1098 * mach_msg_header_t Head;
1100 * kern_return_t RetCode;
1101 * } mig_reply_error_t;
1109 Request *InP = &Mess.In;
1110 Reply *Out0P = &Mess.Out;
1112 mach_msg_return_t msg_result;
1113 unsigned int msgh_size;
1114 unsigned int msgh_size_delta;
1117 #ifdef __MIG_check__Reply__exception_raise_state_identity_t__defined
1118 kern_return_t check_result;
1119 #endif /* __MIG_check__Reply__exception_raise_state_identity_t__defined */
1121 __DeclareSendRpc(2403, "exception_raise_state_identity")
1123 #if UseStaticTemplates
1124 const static mach_msg_port_descriptor_t threadTemplate = {
1125 /* name = */ MACH_PORT_NULL,
1129 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
1131 #endif /* UseStaticTemplates */
1133 #if UseStaticTemplates
1134 const static mach_msg_port_descriptor_t taskTemplate = {
1135 /* name = */ MACH_PORT_NULL,
1139 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
1141 #endif /* UseStaticTemplates */
1143 InP->msgh_body.msgh_descriptor_count = 2;
1144 #if UseStaticTemplates
1145 InP->thread = threadTemplate;
1146 InP->thread.name = thread;
1147 #else /* UseStaticTemplates */
1148 InP->thread.name = thread;
1149 InP->thread.disposition = 19;
1150 InP->thread.type = MACH_MSG_PORT_DESCRIPTOR;
1151 #endif /* UseStaticTemplates */
1153 #if UseStaticTemplates
1154 InP->task = taskTemplate;
1155 InP->task.name = task;
1156 #else /* UseStaticTemplates */
1157 InP->task.name = task;
1158 InP->task.disposition = 19;
1159 InP->task.type = MACH_MSG_PORT_DESCRIPTOR;
1160 #endif /* UseStaticTemplates */
1162 InP->NDR = NDR_record;
1164 InP->exception = exception;
1167 { return MIG_ARRAY_TOO_LARGE; }
1169 (void)memcpy((char *) InP->code, (const char *) code, 4 * codeCnt);
1171 InP->codeCnt = codeCnt;
1173 msgh_size_delta = (4 * codeCnt);
1174 msgh_size = (mach_msg_size_t)(sizeof(Request) - 584) + msgh_size_delta;
1175 InP = (Request *) ((pointer_t) InP + msgh_size_delta - 8);
1177 InP->flavor = *flavor;
1179 if (old_stateCnt > 144) {
1180 { return MIG_ARRAY_TOO_LARGE; }
1182 (void)memcpy((char *) InP->old_state, (const char *) old_state, 4 * old_stateCnt);
1184 InP->old_stateCnt = old_stateCnt;
1186 msgh_size += (4 * old_stateCnt);
1188 InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX|
1189 MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
1190 /* msgh_size passed as argument */
1191 InP->Head.msgh_request_port = exception_port;
1192 InP->Head.msgh_reply_port = mig_get_reply_port();
1193 InP->Head.msgh_id = 2403;
1195 __BeforeSendRpc(2403, "exception_raise_state_identity")
1196 msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, msgh_size, (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
1197 __AfterSendRpc(2403, "exception_raise_state_identity")
1198 if (msg_result != MACH_MSG_SUCCESS) {
1199 __MachMsgErrorWithoutTimeout(msg_result);
1200 { return msg_result; }
1204 #if defined(__MIG_check__Reply__exception_raise_state_identity_t__defined)
1205 check_result = __MIG_check__Reply__exception_raise_state_identity_t((__Reply__exception_raise_state_identity_t *)Out0P);
1206 if (check_result != MACH_MSG_SUCCESS)
1207 { return check_result; }
1208 #endif /* defined(__MIG_check__Reply__exception_raise_state_identity_t__defined) */
1210 *flavor = Out0P->flavor;
1212 if (Out0P->new_stateCnt > 144) {
1213 (void)memcpy((char *) new_state, (const char *) Out0P->new_state, 4 * 144);
1214 *new_stateCnt = Out0P->new_stateCnt;
1215 { return MIG_ARRAY_TOO_LARGE; }
1217 (void)memcpy((char *) new_state, (const char *) Out0P->new_state, 4 * Out0P->new_stateCnt);
1219 *new_stateCnt = Out0P->new_stateCnt;
1221 return KERN_SUCCESS;