1/*
2 * IDENTIFICATION:
3 * stub generated by bootstrap_cmds-133
4 * OPTIONS:
5 * KernelServer
6 */
7
8/* Module task */
9
10#define __MIG_check__Request__task_subsystem__ 1
11
12#include "task_server.h"
13
14#ifndef mig_internal
15#define mig_internal static __inline__
16#endif /* mig_internal */
17
18#ifndef mig_external
19#define mig_external
20#endif /* mig_external */
21
22#if !defined(__MigTypeCheck) && defined(TypeCheck)
23#define __MigTypeCheck TypeCheck /* Legacy setting */
24#endif /* !defined(__MigTypeCheck) */
25
26#if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_)
27#define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */
28#endif /* !defined(__MigKernelSpecificCode) */
29
30#ifndef LimitCheck
31#define LimitCheck 0
32#endif /* LimitCheck */
33
34#ifndef min
35#define min(a,b) ( ((a) < (b))? (a): (b) )
36#endif /* min */
37
38#if !defined(_WALIGN_)
39#define _WALIGN_(x) (((x) + 3) & ~3)
40#endif /* !defined(_WALIGN_) */
41
42#if !defined(_WALIGNSZ_)
43#define _WALIGNSZ_(x) _WALIGN_(sizeof(x))
44#endif /* !defined(_WALIGNSZ_) */
45
46#ifndef UseStaticTemplates
47#define UseStaticTemplates 0
48#endif /* UseStaticTemplates */
49
50#ifndef MIG_SERVER_ROUTINE
51#define MIG_SERVER_ROUTINE
52#endif
53
54#ifndef __DeclareRcvRpc
55#define __DeclareRcvRpc(_NUM_, _NAME_)
56#endif /* __DeclareRcvRpc */
57
58#ifndef __BeforeRcvRpc
59#define __BeforeRcvRpc(_NUM_, _NAME_)
60#endif /* __BeforeRcvRpc */
61
62#ifndef __AfterRcvRpc
63#define __AfterRcvRpc(_NUM_, _NAME_)
64#endif /* __AfterRcvRpc */
65
66#ifndef __DeclareRcvSimple
67#define __DeclareRcvSimple(_NUM_, _NAME_)
68#endif /* __DeclareRcvSimple */
69
70#ifndef __BeforeRcvSimple
71#define __BeforeRcvSimple(_NUM_, _NAME_)
72#endif /* __BeforeRcvSimple */
73
74#ifndef __AfterRcvSimple
75#define __AfterRcvSimple(_NUM_, _NAME_)
76#endif /* __AfterRcvSimple */
77
78#define novalue void
79
80#if __MigKernelSpecificCode
81#define msgh_request_port msgh_remote_port
82#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_REMOTE(bits)
83#define msgh_reply_port msgh_local_port
84#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_LOCAL(bits)
85#else
86#define msgh_request_port msgh_local_port
87#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
88#define msgh_reply_port msgh_remote_port
89#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
90#endif /* __MigKernelSpecificCode */
91
92#define MIG_RETURN_ERROR(X, code) {\
93 ((mig_reply_error_t *)X)->RetCode = code;\
94 ((mig_reply_error_t *)X)->NDR = NDR_record;\
95 return;\
96 }
97
98/* Forward Declarations */
99
100
101mig_internal novalue _Xtask_terminate
102 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
103
104mig_internal novalue _Xtask_threads_from_user
105 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
106
107mig_internal novalue _Xmach_ports_register
108 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
109
110mig_internal novalue _Xmach_ports_lookup
111 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
112
113mig_internal novalue _Xtask_info_from_user
114 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
115
116mig_internal novalue _Xtask_set_info
117 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
118
119mig_internal novalue _Xtask_suspend
120 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
121
122mig_internal novalue _Xtask_resume
123 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
124
125mig_internal novalue _Xtask_get_special_port_from_user
126 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
127
128mig_internal novalue _Xtask_set_special_port_from_user
129 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
130
131mig_internal novalue _Xthread_create_from_user
132 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
133
134mig_internal novalue _Xthread_create_running_from_user
135 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
136
137mig_internal novalue _Xtask_set_exception_ports
138 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
139
140mig_internal novalue _Xtask_get_exception_ports_from_user
141 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
142
143mig_internal novalue _Xtask_swap_exception_ports
144 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
145
146mig_internal novalue _Xsemaphore_create
147 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
148
149mig_internal novalue _Xsemaphore_destroy
150 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
151
152mig_internal novalue _Xtask_policy_set
153 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
154
155mig_internal novalue _Xtask_policy_get
156 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
157
158mig_internal novalue _Xtask_get_state
159 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
160
161mig_internal novalue _Xtask_set_state
162 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
163
164mig_internal novalue _Xtask_set_phys_footprint_limit
165 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
166
167mig_internal novalue _Xtask_suspend2_mig
168 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
169
170mig_internal novalue _Xtask_resume2_mig
171 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
172
173mig_internal novalue _Xtask_purgable_info
174 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
175
176mig_internal novalue _Xtask_get_mach_voucher
177 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
178
179mig_internal novalue _Xtask_set_mach_voucher
180 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
181
182mig_internal novalue _Xtask_swap_mach_voucher
183 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
184
185mig_internal novalue _Xtask_generate_corpse
186 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
187
188mig_internal novalue _Xtask_map_corpse_info
189 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
190
191mig_internal novalue _Xtask_register_dyld_image_infos
192 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
193
194mig_internal novalue _Xtask_unregister_dyld_image_infos
195 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
196
197mig_internal novalue _Xtask_get_dyld_image_infos
198 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
199
200mig_internal novalue _Xtask_register_dyld_shared_cache_image_info
201 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
202
203mig_internal novalue _Xtask_register_dyld_set_dyld_state
204 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
205
206mig_internal novalue _Xtask_register_dyld_get_process_state
207 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
208
209mig_internal novalue _Xtask_map_corpse_info_64
210 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
211
212mig_internal novalue _Xtask_inspect
213 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
214
215mig_internal novalue _Xtask_get_exc_guard_behavior
216 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
217
218mig_internal novalue _Xtask_set_exc_guard_behavior
219 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
220
221mig_internal novalue _Xmach_task_is_self
222 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
223
224mig_internal novalue _Xtask_dyld_process_info_notify_register
225 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
226
227mig_internal novalue _Xtask_create_identity_token
228 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
229
230mig_internal novalue _Xtask_identity_token_get_task_port
231 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
232
233mig_internal novalue _Xtask_dyld_process_info_notify_deregister
234 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
235
236mig_internal novalue _Xtask_get_exception_ports_info
237 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
238
239mig_internal novalue _Xtask_test_sync_upcall
240 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
241
242mig_internal novalue _Xtask_set_corpse_forking_behavior
243 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
244
245mig_internal novalue _Xtask_test_async_upcall_propagation
246 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
247
248mig_internal novalue _Xtask_map_kcdata_object_64
249 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
250
251
252#if ( __MigTypeCheck )
253#if __MIG_check__Request__task_subsystem__
254#if !defined(__MIG_check__Request__task_terminate_t__defined)
255#define __MIG_check__Request__task_terminate_t__defined
256
257mig_internal kern_return_t __MIG_check__Request__task_terminate_t(
258 __attribute__((__unused__)) __RequestKData__task_terminate_t *InKP,
259 __attribute__((__unused__)) __RequestUData__task_terminate_t *In0UP,
260 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
261{
262
263 typedef __Request__task_terminate_t __Request;
264 typedef __RequestUData__task_terminate_t __RequestU __attribute__((unused));
265#if __MigTypeCheck
266 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
267 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
268 return MIG_BAD_ARGUMENTS;
269#endif /* __MigTypeCheck */
270
271 return MACH_MSG_SUCCESS;
272}
273#endif /* !defined(__MIG_check__Request__task_terminate_t__defined) */
274#endif /* __MIG_check__Request__task_subsystem__ */
275#endif /* ( __MigTypeCheck ) */
276
277
278/* Routine task_terminate */
279mig_internal novalue _Xtask_terminate
280 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
281 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
282 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
283{
284
285#ifdef __MigPackStructs
286#pragma pack(push, 4)
287#endif
288 typedef struct {
289 mach_msg_trailer_t trailer;
290 char padding[0]; /* Avoid generating empty UData structs */
291 } RequestU __attribute__((unused));
292#ifdef __MigPackStructs
293#pragma pack(pop)
294#endif
295 typedef __RequestKData__task_terminate_t RequestK;
296 typedef __RequestUData__task_terminate_t __RequestU;
297 typedef __ReplyKData__task_terminate_t ReplyK __attribute__((unused));
298 typedef __ReplyUData__task_terminate_t ReplyU __attribute__((unused));
299 typedef __Reply__task_terminate_t Reply __attribute__((unused));
300 typedef __Request__task_terminate_t __Request __attribute__((unused));
301
302 /*
303 * typedef struct {
304 * mach_msg_header_t Head;
305 * NDR_record_t NDR;
306 * kern_return_t RetCode;
307 * } mig_reply_error_t;
308 */
309
310 RequestK *InKP = (RequestK *) InHeadP;
311 RequestU *In0UP = (RequestU *) InDataP;
312 ReplyK *OutKP = (ReplyK *) OutHeadP;
313 ReplyU *OutUP = (ReplyU *) OutDataP;
314 (void)OutUP;
315#ifdef __MIG_check__Request__task_terminate_t__defined
316 kern_return_t check_result;
317#endif /* __MIG_check__Request__task_terminate_t__defined */
318
319#if __MigKernelSpecificCode
320#else
321#endif /* __MigKernelSpecificCode */
322 task_t target_task;
323
324 __DeclareRcvRpc(3401, "task_terminate")
325 __BeforeRcvRpc(3401, "task_terminate")
326
327#if defined(__MIG_check__Request__task_terminate_t__defined)
328 check_result = __MIG_check__Request__task_terminate_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
329 if (check_result != MACH_MSG_SUCCESS)
330 { MIG_RETURN_ERROR(OutKP, check_result); }
331#endif /* defined(__MIG_check__Request__task_terminate_t__defined) */
332
333 target_task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
334
335 OutUP->RetCode = task_terminate(target_task);
336 task_deallocate_mig(target_task);
337#if __MigKernelSpecificCode
338#endif /* __MigKernelSpecificCode */
339
340 OutUP->NDR = NDR_record;
341
342
343 __AfterRcvRpc(3401, "task_terminate")
344}
345
346#if ( __MigTypeCheck )
347#if __MIG_check__Request__task_subsystem__
348#if !defined(__MIG_check__Request__task_threads_from_user_t__defined)
349#define __MIG_check__Request__task_threads_from_user_t__defined
350
351mig_internal kern_return_t __MIG_check__Request__task_threads_from_user_t(
352 __attribute__((__unused__)) __RequestKData__task_threads_from_user_t *InKP,
353 __attribute__((__unused__)) __RequestUData__task_threads_from_user_t *In0UP,
354 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
355{
356
357 typedef __Request__task_threads_from_user_t __Request;
358 typedef __RequestUData__task_threads_from_user_t __RequestU __attribute__((unused));
359#if __MigTypeCheck
360 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
361 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
362 return MIG_BAD_ARGUMENTS;
363#endif /* __MigTypeCheck */
364
365 return MACH_MSG_SUCCESS;
366}
367#endif /* !defined(__MIG_check__Request__task_threads_from_user_t__defined) */
368#endif /* __MIG_check__Request__task_subsystem__ */
369#endif /* ( __MigTypeCheck ) */
370
371
372/* Routine task_threads_from_user */
373mig_internal novalue _Xtask_threads_from_user
374 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
375 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
376 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
377{
378
379#ifdef __MigPackStructs
380#pragma pack(push, 4)
381#endif
382 typedef struct {
383 mach_msg_trailer_t trailer;
384 char padding[0]; /* Avoid generating empty UData structs */
385 } RequestU __attribute__((unused));
386#ifdef __MigPackStructs
387#pragma pack(pop)
388#endif
389 typedef __RequestKData__task_threads_from_user_t RequestK;
390 typedef __RequestUData__task_threads_from_user_t __RequestU;
391 typedef __ReplyKData__task_threads_from_user_t ReplyK __attribute__((unused));
392 typedef __ReplyUData__task_threads_from_user_t ReplyU __attribute__((unused));
393 typedef __Reply__task_threads_from_user_t Reply __attribute__((unused));
394 typedef __Request__task_threads_from_user_t __Request __attribute__((unused));
395
396 /*
397 * typedef struct {
398 * mach_msg_header_t Head;
399 * NDR_record_t NDR;
400 * kern_return_t RetCode;
401 * } mig_reply_error_t;
402 */
403
404 RequestK *InKP = (RequestK *) InHeadP;
405 RequestU *In0UP = (RequestU *) InDataP;
406 ReplyK *OutKP = (ReplyK *) OutHeadP;
407 ReplyU *OutUP = (ReplyU *) OutDataP;
408 (void)OutUP;
409#ifdef __MIG_check__Request__task_threads_from_user_t__defined
410 kern_return_t check_result;
411#endif /* __MIG_check__Request__task_threads_from_user_t__defined */
412
413#if __MigKernelSpecificCode
414#if UseStaticTemplates
415 const static mach_msg_ool_ports_descriptor_t act_listTemplate = {
416 /* addr = */ (void *)0,
417 /* coun = */ 0,
418 /* deal = */ FALSE,
419 /* copy is meaningful only in overwrite mode */
420 /* copy = */ MACH_MSG_PHYSICAL_COPY,
421 /* disp = */ 17,
422 /* type = */ MACH_MSG_OOL_PORTS_DESCRIPTOR,
423 };
424#endif /* UseStaticTemplates */
425
426#else
427#if UseStaticTemplates
428 const static mach_msg_ool_ports_descriptor_t act_listTemplate = {
429 /* addr = */ (void *)0,
430 /* coun = */ 0,
431 /* deal = */ FALSE,
432 /* copy is meaningful only in overwrite mode */
433 /* copy = */ MACH_MSG_PHYSICAL_COPY,
434 /* disp = */ 19,
435 /* type = */ MACH_MSG_OOL_PORTS_DESCRIPTOR,
436 };
437#endif /* UseStaticTemplates */
438
439#endif /* __MigKernelSpecificCode */
440 kern_return_t RetCode;
441 __DeclareRcvRpc(3402, "task_threads_from_user")
442 __BeforeRcvRpc(3402, "task_threads_from_user")
443
444#if defined(__MIG_check__Request__task_threads_from_user_t__defined)
445 check_result = __MIG_check__Request__task_threads_from_user_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
446 if (check_result != MACH_MSG_SUCCESS)
447 { MIG_RETURN_ERROR(OutKP, check_result); }
448#endif /* defined(__MIG_check__Request__task_threads_from_user_t__defined) */
449
450#if UseStaticTemplates
451 OutKP->act_list = act_listTemplate;
452#else /* UseStaticTemplates */
453#if __MigKernelSpecificCode
454 OutKP->act_list.disposition = 17;
455#else
456 OutKP->act_list.disposition = 19;
457#endif /* __MigKernelSpecificCode */
458 OutKP->act_list.deallocate = FALSE;
459 OutKP->act_list.type = MACH_MSG_OOL_PORTS_DESCRIPTOR;
460#endif /* UseStaticTemplates */
461
462
463 RetCode = task_threads_from_user(port: InKP->Head.msgh_request_port, act_list: (thread_act_array_t *)&(OutKP->act_list.address), act_listCnt: &OutUP->act_listCnt);
464 if (RetCode != KERN_SUCCESS) {
465 MIG_RETURN_ERROR(OutKP, RetCode);
466 }
467#if __MigKernelSpecificCode
468#endif /* __MigKernelSpecificCode */
469 OutKP->act_list.count = OutUP->act_listCnt;
470
471
472 OutUP->NDR = NDR_record;
473
474
475 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
476 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
477 OutKP->msgh_body.msgh_descriptor_count = 1;
478 __AfterRcvRpc(3402, "task_threads_from_user")
479}
480
481#if ( __MigTypeCheck )
482#if __MIG_check__Request__task_subsystem__
483#if !defined(__MIG_check__Request__mach_ports_register_t__defined)
484#define __MIG_check__Request__mach_ports_register_t__defined
485
486mig_internal kern_return_t __MIG_check__Request__mach_ports_register_t(
487 __attribute__((__unused__)) __RequestKData__mach_ports_register_t *InKP,
488 __attribute__((__unused__)) __RequestUData__mach_ports_register_t *In0UP,
489 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
490{
491
492 typedef __Request__mach_ports_register_t __Request;
493 typedef __RequestUData__mach_ports_register_t __RequestU __attribute__((unused));
494#if __MigTypeCheck
495 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
496 (InKP->msgh_body.msgh_descriptor_count != 1) ||
497 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
498 return MIG_BAD_ARGUMENTS;
499#endif /* __MigTypeCheck */
500
501#if __MigTypeCheck
502 if (InKP->init_port_set.type != MACH_MSG_OOL_PORTS_DESCRIPTOR ||
503 InKP->init_port_set.disposition != 17)
504 return MIG_TYPE_ERROR;
505#endif /* __MigTypeCheck */
506
507#if __MigTypeCheck
508 if (InKP->init_port_set.count != In0UP->init_port_setCnt)
509 return MIG_TYPE_ERROR;
510#endif /* __MigTypeCheck */
511
512 return MACH_MSG_SUCCESS;
513}
514#endif /* !defined(__MIG_check__Request__mach_ports_register_t__defined) */
515#endif /* __MIG_check__Request__task_subsystem__ */
516#endif /* ( __MigTypeCheck ) */
517
518
519/* Routine mach_ports_register */
520mig_internal novalue _Xmach_ports_register
521 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
522 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
523 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
524{
525
526#ifdef __MigPackStructs
527#pragma pack(push, 4)
528#endif
529 typedef struct {
530 NDR_record_t NDR;
531 mach_msg_type_number_t init_port_setCnt;
532 mach_msg_trailer_t trailer;
533 char padding[0]; /* Avoid generating empty UData structs */
534 } RequestU __attribute__((unused));
535#ifdef __MigPackStructs
536#pragma pack(pop)
537#endif
538 typedef __RequestKData__mach_ports_register_t RequestK;
539 typedef __RequestUData__mach_ports_register_t __RequestU;
540 typedef __ReplyKData__mach_ports_register_t ReplyK __attribute__((unused));
541 typedef __ReplyUData__mach_ports_register_t ReplyU __attribute__((unused));
542 typedef __Reply__mach_ports_register_t Reply __attribute__((unused));
543 typedef __Request__mach_ports_register_t __Request __attribute__((unused));
544
545 /*
546 * typedef struct {
547 * mach_msg_header_t Head;
548 * NDR_record_t NDR;
549 * kern_return_t RetCode;
550 * } mig_reply_error_t;
551 */
552
553 RequestK *InKP = (RequestK *) InHeadP;
554 RequestU *In0UP = (RequestU *) InDataP;
555 ReplyK *OutKP = (ReplyK *) OutHeadP;
556 ReplyU *OutUP = (ReplyU *) OutDataP;
557 (void)OutUP;
558#ifdef __MIG_check__Request__mach_ports_register_t__defined
559 kern_return_t check_result;
560#endif /* __MIG_check__Request__mach_ports_register_t__defined */
561
562#if __MigKernelSpecificCode
563#else
564#endif /* __MigKernelSpecificCode */
565 task_t target_task;
566
567 __DeclareRcvRpc(3403, "mach_ports_register")
568 __BeforeRcvRpc(3403, "mach_ports_register")
569
570#if defined(__MIG_check__Request__mach_ports_register_t__defined)
571 check_result = __MIG_check__Request__mach_ports_register_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
572 if (check_result != MACH_MSG_SUCCESS)
573 { MIG_RETURN_ERROR(OutKP, check_result); }
574#endif /* defined(__MIG_check__Request__mach_ports_register_t__defined) */
575
576 target_task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
577
578 OutUP->RetCode = mach_ports_register(target_task, init_port_set: (mach_port_array_t)(InKP->init_port_set.address), init_port_setCnt: InKP->init_port_set.count);
579 task_deallocate_mig(target_task);
580#if __MigKernelSpecificCode
581#endif /* __MigKernelSpecificCode */
582
583 OutUP->NDR = NDR_record;
584
585
586 __AfterRcvRpc(3403, "mach_ports_register")
587}
588
589#if ( __MigTypeCheck )
590#if __MIG_check__Request__task_subsystem__
591#if !defined(__MIG_check__Request__mach_ports_lookup_t__defined)
592#define __MIG_check__Request__mach_ports_lookup_t__defined
593
594mig_internal kern_return_t __MIG_check__Request__mach_ports_lookup_t(
595 __attribute__((__unused__)) __RequestKData__mach_ports_lookup_t *InKP,
596 __attribute__((__unused__)) __RequestUData__mach_ports_lookup_t *In0UP,
597 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
598{
599
600 typedef __Request__mach_ports_lookup_t __Request;
601 typedef __RequestUData__mach_ports_lookup_t __RequestU __attribute__((unused));
602#if __MigTypeCheck
603 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
604 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
605 return MIG_BAD_ARGUMENTS;
606#endif /* __MigTypeCheck */
607
608 return MACH_MSG_SUCCESS;
609}
610#endif /* !defined(__MIG_check__Request__mach_ports_lookup_t__defined) */
611#endif /* __MIG_check__Request__task_subsystem__ */
612#endif /* ( __MigTypeCheck ) */
613
614
615/* Routine mach_ports_lookup */
616mig_internal novalue _Xmach_ports_lookup
617 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
618 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
619 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
620{
621
622#ifdef __MigPackStructs
623#pragma pack(push, 4)
624#endif
625 typedef struct {
626 mach_msg_trailer_t trailer;
627 char padding[0]; /* Avoid generating empty UData structs */
628 } RequestU __attribute__((unused));
629#ifdef __MigPackStructs
630#pragma pack(pop)
631#endif
632 typedef __RequestKData__mach_ports_lookup_t RequestK;
633 typedef __RequestUData__mach_ports_lookup_t __RequestU;
634 typedef __ReplyKData__mach_ports_lookup_t ReplyK __attribute__((unused));
635 typedef __ReplyUData__mach_ports_lookup_t ReplyU __attribute__((unused));
636 typedef __Reply__mach_ports_lookup_t Reply __attribute__((unused));
637 typedef __Request__mach_ports_lookup_t __Request __attribute__((unused));
638
639 /*
640 * typedef struct {
641 * mach_msg_header_t Head;
642 * NDR_record_t NDR;
643 * kern_return_t RetCode;
644 * } mig_reply_error_t;
645 */
646
647 RequestK *InKP = (RequestK *) InHeadP;
648 RequestU *In0UP = (RequestU *) InDataP;
649 ReplyK *OutKP = (ReplyK *) OutHeadP;
650 ReplyU *OutUP = (ReplyU *) OutDataP;
651 (void)OutUP;
652#ifdef __MIG_check__Request__mach_ports_lookup_t__defined
653 kern_return_t check_result;
654#endif /* __MIG_check__Request__mach_ports_lookup_t__defined */
655
656#if __MigKernelSpecificCode
657#if UseStaticTemplates
658 const static mach_msg_ool_ports_descriptor_t init_port_setTemplate = {
659 /* addr = */ (void *)0,
660 /* coun = */ 0,
661 /* deal = */ FALSE,
662 /* copy is meaningful only in overwrite mode */
663 /* copy = */ MACH_MSG_PHYSICAL_COPY,
664 /* disp = */ 17,
665 /* type = */ MACH_MSG_OOL_PORTS_DESCRIPTOR,
666 };
667#endif /* UseStaticTemplates */
668
669#else
670#if UseStaticTemplates
671 const static mach_msg_ool_ports_descriptor_t init_port_setTemplate = {
672 /* addr = */ (void *)0,
673 /* coun = */ 0,
674 /* deal = */ FALSE,
675 /* copy is meaningful only in overwrite mode */
676 /* copy = */ MACH_MSG_PHYSICAL_COPY,
677 /* disp = */ 19,
678 /* type = */ MACH_MSG_OOL_PORTS_DESCRIPTOR,
679 };
680#endif /* UseStaticTemplates */
681
682#endif /* __MigKernelSpecificCode */
683 kern_return_t RetCode;
684 task_t target_task;
685
686 __DeclareRcvRpc(3404, "mach_ports_lookup")
687 __BeforeRcvRpc(3404, "mach_ports_lookup")
688
689#if defined(__MIG_check__Request__mach_ports_lookup_t__defined)
690 check_result = __MIG_check__Request__mach_ports_lookup_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
691 if (check_result != MACH_MSG_SUCCESS)
692 { MIG_RETURN_ERROR(OutKP, check_result); }
693#endif /* defined(__MIG_check__Request__mach_ports_lookup_t__defined) */
694
695#if UseStaticTemplates
696 OutKP->init_port_set = init_port_setTemplate;
697#else /* UseStaticTemplates */
698#if __MigKernelSpecificCode
699 OutKP->init_port_set.disposition = 17;
700#else
701 OutKP->init_port_set.disposition = 19;
702#endif /* __MigKernelSpecificCode */
703 OutKP->init_port_set.deallocate = FALSE;
704 OutKP->init_port_set.type = MACH_MSG_OOL_PORTS_DESCRIPTOR;
705#endif /* UseStaticTemplates */
706
707
708 target_task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
709
710 RetCode = mach_ports_lookup(target_task, init_port_set: (mach_port_array_t *)&(OutKP->init_port_set.address), init_port_setCnt: &OutUP->init_port_setCnt);
711 task_deallocate_mig(target_task);
712 if (RetCode != KERN_SUCCESS) {
713 MIG_RETURN_ERROR(OutKP, RetCode);
714 }
715#if __MigKernelSpecificCode
716#endif /* __MigKernelSpecificCode */
717 OutKP->init_port_set.count = OutUP->init_port_setCnt;
718
719
720 OutUP->NDR = NDR_record;
721
722
723 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
724 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
725 OutKP->msgh_body.msgh_descriptor_count = 1;
726 __AfterRcvRpc(3404, "mach_ports_lookup")
727}
728
729#if ( __MigTypeCheck )
730#if __MIG_check__Request__task_subsystem__
731#if !defined(__MIG_check__Request__task_info_from_user_t__defined)
732#define __MIG_check__Request__task_info_from_user_t__defined
733
734mig_internal kern_return_t __MIG_check__Request__task_info_from_user_t(
735 __attribute__((__unused__)) __RequestKData__task_info_from_user_t *InKP,
736 __attribute__((__unused__)) __RequestUData__task_info_from_user_t *In0UP,
737 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
738{
739
740 typedef __Request__task_info_from_user_t __Request;
741 typedef __RequestUData__task_info_from_user_t __RequestU __attribute__((unused));
742#if __MigTypeCheck
743 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
744 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
745 return MIG_BAD_ARGUMENTS;
746#endif /* __MigTypeCheck */
747
748 return MACH_MSG_SUCCESS;
749}
750#endif /* !defined(__MIG_check__Request__task_info_from_user_t__defined) */
751#endif /* __MIG_check__Request__task_subsystem__ */
752#endif /* ( __MigTypeCheck ) */
753
754
755/* Routine task_info_from_user */
756mig_internal novalue _Xtask_info_from_user
757 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
758 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
759 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
760{
761
762#ifdef __MigPackStructs
763#pragma pack(push, 4)
764#endif
765 typedef struct {
766 NDR_record_t NDR;
767 task_flavor_t flavor;
768 mach_msg_type_number_t task_info_outCnt;
769 mach_msg_trailer_t trailer;
770 char padding[0]; /* Avoid generating empty UData structs */
771 } RequestU __attribute__((unused));
772#ifdef __MigPackStructs
773#pragma pack(pop)
774#endif
775 typedef __RequestKData__task_info_from_user_t RequestK;
776 typedef __RequestUData__task_info_from_user_t __RequestU;
777 typedef __ReplyKData__task_info_from_user_t ReplyK __attribute__((unused));
778 typedef __ReplyUData__task_info_from_user_t ReplyU __attribute__((unused));
779 typedef __Reply__task_info_from_user_t Reply __attribute__((unused));
780 typedef __Request__task_info_from_user_t __Request __attribute__((unused));
781
782 /*
783 * typedef struct {
784 * mach_msg_header_t Head;
785 * NDR_record_t NDR;
786 * kern_return_t RetCode;
787 * } mig_reply_error_t;
788 */
789
790 RequestK *InKP = (RequestK *) InHeadP;
791 RequestU *In0UP = (RequestU *) InDataP;
792 ReplyK *OutKP = (ReplyK *) OutHeadP;
793 ReplyU *OutUP = (ReplyU *) OutDataP;
794 (void)OutUP;
795#ifdef __MIG_check__Request__task_info_from_user_t__defined
796 kern_return_t check_result;
797#endif /* __MIG_check__Request__task_info_from_user_t__defined */
798
799#if __MigKernelSpecificCode
800#else
801#endif /* __MigKernelSpecificCode */
802 __DeclareRcvRpc(3405, "task_info_from_user")
803 __BeforeRcvRpc(3405, "task_info_from_user")
804
805#if defined(__MIG_check__Request__task_info_from_user_t__defined)
806 check_result = __MIG_check__Request__task_info_from_user_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
807 if (check_result != MACH_MSG_SUCCESS)
808 { MIG_RETURN_ERROR(OutKP, check_result); }
809#endif /* defined(__MIG_check__Request__task_info_from_user_t__defined) */
810
811 OutUP->task_info_outCnt = 90;
812 if (In0UP->task_info_outCnt < OutUP->task_info_outCnt)
813 OutUP->task_info_outCnt = In0UP->task_info_outCnt;
814
815 OutUP->RetCode = task_info_from_user(target_task: InKP->Head.msgh_request_port, flavor: In0UP->flavor, task_info_out: OutUP->task_info_out, task_info_outCnt: &OutUP->task_info_outCnt);
816 if (OutUP->RetCode != KERN_SUCCESS) {
817 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
818 }
819#if __MigKernelSpecificCode
820#endif /* __MigKernelSpecificCode */
821
822 OutUP->NDR = NDR_record;
823
824 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 360) + (((4 * OutUP->task_info_outCnt)));
825
826 __AfterRcvRpc(3405, "task_info_from_user")
827}
828
829#if ( __MigTypeCheck )
830#if __MIG_check__Request__task_subsystem__
831#if !defined(__MIG_check__Request__task_set_info_t__defined)
832#define __MIG_check__Request__task_set_info_t__defined
833
834mig_internal kern_return_t __MIG_check__Request__task_set_info_t(
835 __attribute__((__unused__)) __RequestKData__task_set_info_t *InKP,
836 __attribute__((__unused__)) __RequestUData__task_set_info_t *In0UP,
837 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
838{
839
840 typedef __Request__task_set_info_t __Request;
841 typedef __RequestUData__task_set_info_t __RequestU __attribute__((unused));
842#if __MigTypeCheck
843 unsigned int msgh_size;
844#endif /* __MigTypeCheck */
845
846#if __MigTypeCheck
847 msgh_size = InKP->Head.msgh_size;
848 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
849 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 360)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
850 return MIG_BAD_ARGUMENTS;
851#endif /* __MigTypeCheck */
852
853#if defined(__NDR_convert__int_rep__Request__task_set_info_t__task_info_inCnt__defined)
854 if (In0UP->NDR.int_rep != NDR_record.int_rep)
855 __NDR_convert__int_rep__Request__task_set_info_t__task_info_inCnt(&In0UP->task_info_inCnt, In0UP->NDR.int_rep);
856#endif /* __NDR_convert__int_rep__Request__task_set_info_t__task_info_inCnt__defined */
857#if __MigTypeCheck
858 if (In0UP->task_info_inCnt > 90)
859 return MIG_BAD_ARGUMENTS;
860 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 360)) / 4 < In0UP->task_info_inCnt) ||
861 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 360) + (4 * In0UP->task_info_inCnt)))
862 return MIG_BAD_ARGUMENTS;
863#endif /* __MigTypeCheck */
864
865 return MACH_MSG_SUCCESS;
866}
867#endif /* !defined(__MIG_check__Request__task_set_info_t__defined) */
868#endif /* __MIG_check__Request__task_subsystem__ */
869#endif /* ( __MigTypeCheck ) */
870
871
872/* Routine task_set_info */
873mig_internal novalue _Xtask_set_info
874 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
875 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
876 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
877{
878
879#ifdef __MigPackStructs
880#pragma pack(push, 4)
881#endif
882 typedef struct {
883 NDR_record_t NDR;
884 task_flavor_t flavor;
885 mach_msg_type_number_t task_info_inCnt;
886 integer_t task_info_in[90];
887 mach_msg_trailer_t trailer;
888 char padding[0]; /* Avoid generating empty UData structs */
889 } RequestU __attribute__((unused));
890#ifdef __MigPackStructs
891#pragma pack(pop)
892#endif
893 typedef __RequestKData__task_set_info_t RequestK;
894 typedef __RequestUData__task_set_info_t __RequestU;
895 typedef __ReplyKData__task_set_info_t ReplyK __attribute__((unused));
896 typedef __ReplyUData__task_set_info_t ReplyU __attribute__((unused));
897 typedef __Reply__task_set_info_t Reply __attribute__((unused));
898 typedef __Request__task_set_info_t __Request __attribute__((unused));
899
900 /*
901 * typedef struct {
902 * mach_msg_header_t Head;
903 * NDR_record_t NDR;
904 * kern_return_t RetCode;
905 * } mig_reply_error_t;
906 */
907
908 RequestK *InKP = (RequestK *) InHeadP;
909 RequestU *In0UP = (RequestU *) InDataP;
910 ReplyK *OutKP = (ReplyK *) OutHeadP;
911 ReplyU *OutUP = (ReplyU *) OutDataP;
912 (void)OutUP;
913#ifdef __MIG_check__Request__task_set_info_t__defined
914 kern_return_t check_result;
915#endif /* __MIG_check__Request__task_set_info_t__defined */
916
917#if __MigKernelSpecificCode
918#else
919#endif /* __MigKernelSpecificCode */
920 task_t target_task;
921
922 __DeclareRcvRpc(3406, "task_set_info")
923 __BeforeRcvRpc(3406, "task_set_info")
924
925#if defined(__MIG_check__Request__task_set_info_t__defined)
926 check_result = __MIG_check__Request__task_set_info_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
927 if (check_result != MACH_MSG_SUCCESS)
928 { MIG_RETURN_ERROR(OutKP, check_result); }
929#endif /* defined(__MIG_check__Request__task_set_info_t__defined) */
930
931 target_task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
932
933 OutUP->RetCode = task_set_info(target_task, flavor: In0UP->flavor, task_info_in: In0UP->task_info_in, task_info_inCnt: In0UP->task_info_inCnt);
934 task_deallocate_mig(target_task);
935#if __MigKernelSpecificCode
936#endif /* __MigKernelSpecificCode */
937
938 OutUP->NDR = NDR_record;
939
940
941 __AfterRcvRpc(3406, "task_set_info")
942}
943
944#if ( __MigTypeCheck )
945#if __MIG_check__Request__task_subsystem__
946#if !defined(__MIG_check__Request__task_suspend_t__defined)
947#define __MIG_check__Request__task_suspend_t__defined
948
949mig_internal kern_return_t __MIG_check__Request__task_suspend_t(
950 __attribute__((__unused__)) __RequestKData__task_suspend_t *InKP,
951 __attribute__((__unused__)) __RequestUData__task_suspend_t *In0UP,
952 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
953{
954
955 typedef __Request__task_suspend_t __Request;
956 typedef __RequestUData__task_suspend_t __RequestU __attribute__((unused));
957#if __MigTypeCheck
958 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
959 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
960 return MIG_BAD_ARGUMENTS;
961#endif /* __MigTypeCheck */
962
963 return MACH_MSG_SUCCESS;
964}
965#endif /* !defined(__MIG_check__Request__task_suspend_t__defined) */
966#endif /* __MIG_check__Request__task_subsystem__ */
967#endif /* ( __MigTypeCheck ) */
968
969
970/* Routine task_suspend */
971mig_internal novalue _Xtask_suspend
972 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
973 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
974 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
975{
976
977#ifdef __MigPackStructs
978#pragma pack(push, 4)
979#endif
980 typedef struct {
981 mach_msg_trailer_t trailer;
982 char padding[0]; /* Avoid generating empty UData structs */
983 } RequestU __attribute__((unused));
984#ifdef __MigPackStructs
985#pragma pack(pop)
986#endif
987 typedef __RequestKData__task_suspend_t RequestK;
988 typedef __RequestUData__task_suspend_t __RequestU;
989 typedef __ReplyKData__task_suspend_t ReplyK __attribute__((unused));
990 typedef __ReplyUData__task_suspend_t ReplyU __attribute__((unused));
991 typedef __Reply__task_suspend_t Reply __attribute__((unused));
992 typedef __Request__task_suspend_t __Request __attribute__((unused));
993
994 /*
995 * typedef struct {
996 * mach_msg_header_t Head;
997 * NDR_record_t NDR;
998 * kern_return_t RetCode;
999 * } mig_reply_error_t;
1000 */
1001
1002 RequestK *InKP = (RequestK *) InHeadP;
1003 RequestU *In0UP = (RequestU *) InDataP;
1004 ReplyK *OutKP = (ReplyK *) OutHeadP;
1005 ReplyU *OutUP = (ReplyU *) OutDataP;
1006 (void)OutUP;
1007#ifdef __MIG_check__Request__task_suspend_t__defined
1008 kern_return_t check_result;
1009#endif /* __MIG_check__Request__task_suspend_t__defined */
1010
1011#if __MigKernelSpecificCode
1012#else
1013#endif /* __MigKernelSpecificCode */
1014 task_read_t target_task;
1015
1016 __DeclareRcvRpc(3407, "task_suspend")
1017 __BeforeRcvRpc(3407, "task_suspend")
1018
1019#if defined(__MIG_check__Request__task_suspend_t__defined)
1020 check_result = __MIG_check__Request__task_suspend_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
1021 if (check_result != MACH_MSG_SUCCESS)
1022 { MIG_RETURN_ERROR(OutKP, check_result); }
1023#endif /* defined(__MIG_check__Request__task_suspend_t__defined) */
1024
1025 target_task = convert_port_to_task_read_mig(port: InKP->Head.msgh_request_port);
1026
1027 OutUP->RetCode = task_suspend(target_task);
1028 task_read_deallocate_mig(task_read: target_task);
1029#if __MigKernelSpecificCode
1030#endif /* __MigKernelSpecificCode */
1031
1032 OutUP->NDR = NDR_record;
1033
1034
1035 __AfterRcvRpc(3407, "task_suspend")
1036}
1037
1038#if ( __MigTypeCheck )
1039#if __MIG_check__Request__task_subsystem__
1040#if !defined(__MIG_check__Request__task_resume_t__defined)
1041#define __MIG_check__Request__task_resume_t__defined
1042
1043mig_internal kern_return_t __MIG_check__Request__task_resume_t(
1044 __attribute__((__unused__)) __RequestKData__task_resume_t *InKP,
1045 __attribute__((__unused__)) __RequestUData__task_resume_t *In0UP,
1046 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
1047{
1048
1049 typedef __Request__task_resume_t __Request;
1050 typedef __RequestUData__task_resume_t __RequestU __attribute__((unused));
1051#if __MigTypeCheck
1052 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1053 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1054 return MIG_BAD_ARGUMENTS;
1055#endif /* __MigTypeCheck */
1056
1057 return MACH_MSG_SUCCESS;
1058}
1059#endif /* !defined(__MIG_check__Request__task_resume_t__defined) */
1060#endif /* __MIG_check__Request__task_subsystem__ */
1061#endif /* ( __MigTypeCheck ) */
1062
1063
1064/* Routine task_resume */
1065mig_internal novalue _Xtask_resume
1066 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1067 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1068 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1069{
1070
1071#ifdef __MigPackStructs
1072#pragma pack(push, 4)
1073#endif
1074 typedef struct {
1075 mach_msg_trailer_t trailer;
1076 char padding[0]; /* Avoid generating empty UData structs */
1077 } RequestU __attribute__((unused));
1078#ifdef __MigPackStructs
1079#pragma pack(pop)
1080#endif
1081 typedef __RequestKData__task_resume_t RequestK;
1082 typedef __RequestUData__task_resume_t __RequestU;
1083 typedef __ReplyKData__task_resume_t ReplyK __attribute__((unused));
1084 typedef __ReplyUData__task_resume_t ReplyU __attribute__((unused));
1085 typedef __Reply__task_resume_t Reply __attribute__((unused));
1086 typedef __Request__task_resume_t __Request __attribute__((unused));
1087
1088 /*
1089 * typedef struct {
1090 * mach_msg_header_t Head;
1091 * NDR_record_t NDR;
1092 * kern_return_t RetCode;
1093 * } mig_reply_error_t;
1094 */
1095
1096 RequestK *InKP = (RequestK *) InHeadP;
1097 RequestU *In0UP = (RequestU *) InDataP;
1098 ReplyK *OutKP = (ReplyK *) OutHeadP;
1099 ReplyU *OutUP = (ReplyU *) OutDataP;
1100 (void)OutUP;
1101#ifdef __MIG_check__Request__task_resume_t__defined
1102 kern_return_t check_result;
1103#endif /* __MIG_check__Request__task_resume_t__defined */
1104
1105#if __MigKernelSpecificCode
1106#else
1107#endif /* __MigKernelSpecificCode */
1108 task_read_t target_task;
1109
1110 __DeclareRcvRpc(3408, "task_resume")
1111 __BeforeRcvRpc(3408, "task_resume")
1112
1113#if defined(__MIG_check__Request__task_resume_t__defined)
1114 check_result = __MIG_check__Request__task_resume_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
1115 if (check_result != MACH_MSG_SUCCESS)
1116 { MIG_RETURN_ERROR(OutKP, check_result); }
1117#endif /* defined(__MIG_check__Request__task_resume_t__defined) */
1118
1119 target_task = convert_port_to_task_read_mig(port: InKP->Head.msgh_request_port);
1120
1121 OutUP->RetCode = task_resume(target_task);
1122 task_read_deallocate_mig(task_read: target_task);
1123#if __MigKernelSpecificCode
1124#endif /* __MigKernelSpecificCode */
1125
1126 OutUP->NDR = NDR_record;
1127
1128
1129 __AfterRcvRpc(3408, "task_resume")
1130}
1131
1132#if ( __MigTypeCheck )
1133#if __MIG_check__Request__task_subsystem__
1134#if !defined(__MIG_check__Request__task_get_special_port_from_user_t__defined)
1135#define __MIG_check__Request__task_get_special_port_from_user_t__defined
1136
1137mig_internal kern_return_t __MIG_check__Request__task_get_special_port_from_user_t(
1138 __attribute__((__unused__)) __RequestKData__task_get_special_port_from_user_t *InKP,
1139 __attribute__((__unused__)) __RequestUData__task_get_special_port_from_user_t *In0UP,
1140 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
1141{
1142
1143 typedef __Request__task_get_special_port_from_user_t __Request;
1144 typedef __RequestUData__task_get_special_port_from_user_t __RequestU __attribute__((unused));
1145#if __MigTypeCheck
1146 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1147 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1148 return MIG_BAD_ARGUMENTS;
1149#endif /* __MigTypeCheck */
1150
1151 return MACH_MSG_SUCCESS;
1152}
1153#endif /* !defined(__MIG_check__Request__task_get_special_port_from_user_t__defined) */
1154#endif /* __MIG_check__Request__task_subsystem__ */
1155#endif /* ( __MigTypeCheck ) */
1156
1157
1158/* Routine task_get_special_port_from_user */
1159mig_internal novalue _Xtask_get_special_port_from_user
1160 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1161 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1162 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1163{
1164
1165#ifdef __MigPackStructs
1166#pragma pack(push, 4)
1167#endif
1168 typedef struct {
1169 NDR_record_t NDR;
1170 int which_port;
1171 mach_msg_trailer_t trailer;
1172 char padding[0]; /* Avoid generating empty UData structs */
1173 } RequestU __attribute__((unused));
1174#ifdef __MigPackStructs
1175#pragma pack(pop)
1176#endif
1177 typedef __RequestKData__task_get_special_port_from_user_t RequestK;
1178 typedef __RequestUData__task_get_special_port_from_user_t __RequestU;
1179 typedef __ReplyKData__task_get_special_port_from_user_t ReplyK __attribute__((unused));
1180 typedef __ReplyUData__task_get_special_port_from_user_t ReplyU __attribute__((unused));
1181 typedef __Reply__task_get_special_port_from_user_t Reply __attribute__((unused));
1182 typedef __Request__task_get_special_port_from_user_t __Request __attribute__((unused));
1183
1184 /*
1185 * typedef struct {
1186 * mach_msg_header_t Head;
1187 * NDR_record_t NDR;
1188 * kern_return_t RetCode;
1189 * } mig_reply_error_t;
1190 */
1191
1192 RequestK *InKP = (RequestK *) InHeadP;
1193 RequestU *In0UP = (RequestU *) InDataP;
1194 ReplyK *OutKP = (ReplyK *) OutHeadP;
1195 ReplyU *OutUP = (ReplyU *) OutDataP;
1196 (void)OutUP;
1197#ifdef __MIG_check__Request__task_get_special_port_from_user_t__defined
1198 kern_return_t check_result;
1199#endif /* __MIG_check__Request__task_get_special_port_from_user_t__defined */
1200
1201#if __MigKernelSpecificCode
1202#if UseStaticTemplates
1203 const static mach_msg_port_descriptor_t special_portTemplate = {
1204 /* name = */ MACH_PORT_NULL,
1205 /* pad1 = */ 0,
1206 /* pad2 = */ 0,
1207 /* disp = */ 17,
1208 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
1209 };
1210#endif /* UseStaticTemplates */
1211
1212#else
1213#if UseStaticTemplates
1214 const static mach_msg_port_descriptor_t special_portTemplate = {
1215 /* name = */ MACH_PORT_NULL,
1216 /* pad1 = */ 0,
1217 /* pad2 = */ 0,
1218 /* disp = */ 19,
1219 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
1220 };
1221#endif /* UseStaticTemplates */
1222
1223#endif /* __MigKernelSpecificCode */
1224 kern_return_t RetCode;
1225 __DeclareRcvRpc(3409, "task_get_special_port_from_user")
1226 __BeforeRcvRpc(3409, "task_get_special_port_from_user")
1227
1228#if defined(__MIG_check__Request__task_get_special_port_from_user_t__defined)
1229 check_result = __MIG_check__Request__task_get_special_port_from_user_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
1230 if (check_result != MACH_MSG_SUCCESS)
1231 { MIG_RETURN_ERROR(OutKP, check_result); }
1232#endif /* defined(__MIG_check__Request__task_get_special_port_from_user_t__defined) */
1233
1234#if UseStaticTemplates
1235 OutKP->special_port = special_portTemplate;
1236#else /* UseStaticTemplates */
1237#if __MigKernelSpecificCode
1238 OutKP->special_port.disposition = 17;
1239#else
1240 OutKP->special_port.disposition = 19;
1241#endif /* __MigKernelSpecificCode */
1242#if !(defined(KERNEL) && defined(__LP64__))
1243 OutKP->special_port.pad1 = 0;
1244#endif
1245 OutKP->special_port.pad2 = 0;
1246 OutKP->special_port.type = MACH_MSG_PORT_DESCRIPTOR;
1247#if defined(KERNEL)
1248 OutKP->special_port.pad_end = 0;
1249#endif
1250#endif /* UseStaticTemplates */
1251
1252
1253 RetCode = task_get_special_port_from_user(port: InKP->Head.msgh_request_port, which_port: In0UP->which_port, special_port: &OutKP->special_port.name);
1254 if (RetCode != KERN_SUCCESS) {
1255 MIG_RETURN_ERROR(OutKP, RetCode);
1256 }
1257#if __MigKernelSpecificCode
1258#endif /* __MigKernelSpecificCode */
1259
1260 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
1261 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
1262 OutKP->msgh_body.msgh_descriptor_count = 1;
1263 __AfterRcvRpc(3409, "task_get_special_port_from_user")
1264}
1265
1266#if ( __MigTypeCheck )
1267#if __MIG_check__Request__task_subsystem__
1268#if !defined(__MIG_check__Request__task_set_special_port_from_user_t__defined)
1269#define __MIG_check__Request__task_set_special_port_from_user_t__defined
1270
1271mig_internal kern_return_t __MIG_check__Request__task_set_special_port_from_user_t(
1272 __attribute__((__unused__)) __RequestKData__task_set_special_port_from_user_t *InKP,
1273 __attribute__((__unused__)) __RequestUData__task_set_special_port_from_user_t *In0UP,
1274 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
1275{
1276
1277 typedef __Request__task_set_special_port_from_user_t __Request;
1278 typedef __RequestUData__task_set_special_port_from_user_t __RequestU __attribute__((unused));
1279#if __MigTypeCheck
1280 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1281 (InKP->msgh_body.msgh_descriptor_count != 1) ||
1282 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1283 return MIG_BAD_ARGUMENTS;
1284#endif /* __MigTypeCheck */
1285
1286#if __MigTypeCheck
1287 if (InKP->special_port.type != MACH_MSG_PORT_DESCRIPTOR ||
1288 InKP->special_port.disposition != 17)
1289 return MIG_TYPE_ERROR;
1290#endif /* __MigTypeCheck */
1291
1292 return MACH_MSG_SUCCESS;
1293}
1294#endif /* !defined(__MIG_check__Request__task_set_special_port_from_user_t__defined) */
1295#endif /* __MIG_check__Request__task_subsystem__ */
1296#endif /* ( __MigTypeCheck ) */
1297
1298
1299/* Routine task_set_special_port_from_user */
1300mig_internal novalue _Xtask_set_special_port_from_user
1301 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1302 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1303 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1304{
1305
1306#ifdef __MigPackStructs
1307#pragma pack(push, 4)
1308#endif
1309 typedef struct {
1310 NDR_record_t NDR;
1311 int which_port;
1312 mach_msg_trailer_t trailer;
1313 char padding[0]; /* Avoid generating empty UData structs */
1314 } RequestU __attribute__((unused));
1315#ifdef __MigPackStructs
1316#pragma pack(pop)
1317#endif
1318 typedef __RequestKData__task_set_special_port_from_user_t RequestK;
1319 typedef __RequestUData__task_set_special_port_from_user_t __RequestU;
1320 typedef __ReplyKData__task_set_special_port_from_user_t ReplyK __attribute__((unused));
1321 typedef __ReplyUData__task_set_special_port_from_user_t ReplyU __attribute__((unused));
1322 typedef __Reply__task_set_special_port_from_user_t Reply __attribute__((unused));
1323 typedef __Request__task_set_special_port_from_user_t __Request __attribute__((unused));
1324
1325 /*
1326 * typedef struct {
1327 * mach_msg_header_t Head;
1328 * NDR_record_t NDR;
1329 * kern_return_t RetCode;
1330 * } mig_reply_error_t;
1331 */
1332
1333 RequestK *InKP = (RequestK *) InHeadP;
1334 RequestU *In0UP = (RequestU *) InDataP;
1335 ReplyK *OutKP = (ReplyK *) OutHeadP;
1336 ReplyU *OutUP = (ReplyU *) OutDataP;
1337 (void)OutUP;
1338#ifdef __MIG_check__Request__task_set_special_port_from_user_t__defined
1339 kern_return_t check_result;
1340#endif /* __MIG_check__Request__task_set_special_port_from_user_t__defined */
1341
1342#if __MigKernelSpecificCode
1343#else
1344#endif /* __MigKernelSpecificCode */
1345 task_t task;
1346
1347 __DeclareRcvRpc(3410, "task_set_special_port_from_user")
1348 __BeforeRcvRpc(3410, "task_set_special_port_from_user")
1349
1350#if defined(__MIG_check__Request__task_set_special_port_from_user_t__defined)
1351 check_result = __MIG_check__Request__task_set_special_port_from_user_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
1352 if (check_result != MACH_MSG_SUCCESS)
1353 { MIG_RETURN_ERROR(OutKP, check_result); }
1354#endif /* defined(__MIG_check__Request__task_set_special_port_from_user_t__defined) */
1355
1356 task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
1357
1358 OutUP->RetCode = task_set_special_port_from_user(task, which_port: In0UP->which_port, special_port: InKP->special_port.name);
1359 task_deallocate_mig(task);
1360#if __MigKernelSpecificCode
1361#endif /* __MigKernelSpecificCode */
1362
1363 OutUP->NDR = NDR_record;
1364
1365
1366 __AfterRcvRpc(3410, "task_set_special_port_from_user")
1367}
1368
1369#if ( __MigTypeCheck )
1370#if __MIG_check__Request__task_subsystem__
1371#if !defined(__MIG_check__Request__thread_create_from_user_t__defined)
1372#define __MIG_check__Request__thread_create_from_user_t__defined
1373
1374mig_internal kern_return_t __MIG_check__Request__thread_create_from_user_t(
1375 __attribute__((__unused__)) __RequestKData__thread_create_from_user_t *InKP,
1376 __attribute__((__unused__)) __RequestUData__thread_create_from_user_t *In0UP,
1377 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
1378{
1379
1380 typedef __Request__thread_create_from_user_t __Request;
1381 typedef __RequestUData__thread_create_from_user_t __RequestU __attribute__((unused));
1382#if __MigTypeCheck
1383 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1384 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1385 return MIG_BAD_ARGUMENTS;
1386#endif /* __MigTypeCheck */
1387
1388 return MACH_MSG_SUCCESS;
1389}
1390#endif /* !defined(__MIG_check__Request__thread_create_from_user_t__defined) */
1391#endif /* __MIG_check__Request__task_subsystem__ */
1392#endif /* ( __MigTypeCheck ) */
1393
1394
1395/* Routine thread_create_from_user */
1396mig_internal novalue _Xthread_create_from_user
1397 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1398 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1399 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1400{
1401
1402#ifdef __MigPackStructs
1403#pragma pack(push, 4)
1404#endif
1405 typedef struct {
1406 mach_msg_trailer_t trailer;
1407 char padding[0]; /* Avoid generating empty UData structs */
1408 } RequestU __attribute__((unused));
1409#ifdef __MigPackStructs
1410#pragma pack(pop)
1411#endif
1412 typedef __RequestKData__thread_create_from_user_t RequestK;
1413 typedef __RequestUData__thread_create_from_user_t __RequestU;
1414 typedef __ReplyKData__thread_create_from_user_t ReplyK __attribute__((unused));
1415 typedef __ReplyUData__thread_create_from_user_t ReplyU __attribute__((unused));
1416 typedef __Reply__thread_create_from_user_t Reply __attribute__((unused));
1417 typedef __Request__thread_create_from_user_t __Request __attribute__((unused));
1418
1419 /*
1420 * typedef struct {
1421 * mach_msg_header_t Head;
1422 * NDR_record_t NDR;
1423 * kern_return_t RetCode;
1424 * } mig_reply_error_t;
1425 */
1426
1427 RequestK *InKP = (RequestK *) InHeadP;
1428 RequestU *In0UP = (RequestU *) InDataP;
1429 ReplyK *OutKP = (ReplyK *) OutHeadP;
1430 ReplyU *OutUP = (ReplyU *) OutDataP;
1431 (void)OutUP;
1432#ifdef __MIG_check__Request__thread_create_from_user_t__defined
1433 kern_return_t check_result;
1434#endif /* __MIG_check__Request__thread_create_from_user_t__defined */
1435
1436#if __MigKernelSpecificCode
1437#if UseStaticTemplates
1438 const static mach_msg_port_descriptor_t child_actTemplate = {
1439 /* name = */ MACH_PORT_NULL,
1440 /* pad1 = */ 0,
1441 /* pad2 = */ 0,
1442 /* disp = */ 17,
1443 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
1444 };
1445#endif /* UseStaticTemplates */
1446
1447#else
1448#if UseStaticTemplates
1449 const static mach_msg_port_descriptor_t child_actTemplate = {
1450 /* name = */ MACH_PORT_NULL,
1451 /* pad1 = */ 0,
1452 /* pad2 = */ 0,
1453 /* disp = */ 19,
1454 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
1455 };
1456#endif /* UseStaticTemplates */
1457
1458#endif /* __MigKernelSpecificCode */
1459 kern_return_t RetCode;
1460 task_t parent_task;
1461 thread_act_t child_act;
1462
1463 __DeclareRcvRpc(3411, "thread_create_from_user")
1464 __BeforeRcvRpc(3411, "thread_create_from_user")
1465
1466#if defined(__MIG_check__Request__thread_create_from_user_t__defined)
1467 check_result = __MIG_check__Request__thread_create_from_user_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
1468 if (check_result != MACH_MSG_SUCCESS)
1469 { MIG_RETURN_ERROR(OutKP, check_result); }
1470#endif /* defined(__MIG_check__Request__thread_create_from_user_t__defined) */
1471
1472#if UseStaticTemplates
1473 OutKP->child_act = child_actTemplate;
1474#else /* UseStaticTemplates */
1475#if __MigKernelSpecificCode
1476 OutKP->child_act.disposition = 17;
1477#else
1478 OutKP->child_act.disposition = 19;
1479#endif /* __MigKernelSpecificCode */
1480#if !(defined(KERNEL) && defined(__LP64__))
1481 OutKP->child_act.pad1 = 0;
1482#endif
1483 OutKP->child_act.pad2 = 0;
1484 OutKP->child_act.type = MACH_MSG_PORT_DESCRIPTOR;
1485#if defined(KERNEL)
1486 OutKP->child_act.pad_end = 0;
1487#endif
1488#endif /* UseStaticTemplates */
1489
1490
1491 parent_task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
1492
1493 RetCode = thread_create_from_user(parent_task, child_act: &child_act);
1494 task_deallocate_mig(parent_task);
1495 if (RetCode != KERN_SUCCESS) {
1496 MIG_RETURN_ERROR(OutKP, RetCode);
1497 }
1498#if __MigKernelSpecificCode
1499#endif /* __MigKernelSpecificCode */
1500 OutKP->child_act.name = (mach_port_t)convert_thread_to_port(child_act);
1501
1502
1503 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
1504 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
1505 OutKP->msgh_body.msgh_descriptor_count = 1;
1506 __AfterRcvRpc(3411, "thread_create_from_user")
1507}
1508
1509#if ( __MigTypeCheck )
1510#if __MIG_check__Request__task_subsystem__
1511#if !defined(__MIG_check__Request__thread_create_running_from_user_t__defined)
1512#define __MIG_check__Request__thread_create_running_from_user_t__defined
1513
1514mig_internal kern_return_t __MIG_check__Request__thread_create_running_from_user_t(
1515 __attribute__((__unused__)) __RequestKData__thread_create_running_from_user_t *InKP,
1516 __attribute__((__unused__)) __RequestUData__thread_create_running_from_user_t *In0UP,
1517 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
1518{
1519
1520 typedef __Request__thread_create_running_from_user_t __Request;
1521 typedef __RequestUData__thread_create_running_from_user_t __RequestU __attribute__((unused));
1522#if __MigTypeCheck
1523 unsigned int msgh_size;
1524#endif /* __MigTypeCheck */
1525
1526#if __MigTypeCheck
1527 msgh_size = InKP->Head.msgh_size;
1528 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1529 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 5184)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
1530 return MIG_BAD_ARGUMENTS;
1531#endif /* __MigTypeCheck */
1532
1533#if defined(__NDR_convert__int_rep__Request__thread_create_running_from_user_t__new_stateCnt__defined)
1534 if (In0UP->NDR.int_rep != NDR_record.int_rep)
1535 __NDR_convert__int_rep__Request__thread_create_running_from_user_t__new_stateCnt(&In0UP->new_stateCnt, In0UP->NDR.int_rep);
1536#endif /* __NDR_convert__int_rep__Request__thread_create_running_from_user_t__new_stateCnt__defined */
1537#if __MigTypeCheck
1538 if (In0UP->new_stateCnt > 1296)
1539 return MIG_BAD_ARGUMENTS;
1540 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 5184)) / 4 < In0UP->new_stateCnt) ||
1541 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 5184) + (4 * In0UP->new_stateCnt)))
1542 return MIG_BAD_ARGUMENTS;
1543#endif /* __MigTypeCheck */
1544
1545 return MACH_MSG_SUCCESS;
1546}
1547#endif /* !defined(__MIG_check__Request__thread_create_running_from_user_t__defined) */
1548#endif /* __MIG_check__Request__task_subsystem__ */
1549#endif /* ( __MigTypeCheck ) */
1550
1551
1552/* Routine thread_create_running_from_user */
1553mig_internal novalue _Xthread_create_running_from_user
1554 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1555 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1556 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1557{
1558
1559#ifdef __MigPackStructs
1560#pragma pack(push, 4)
1561#endif
1562 typedef struct {
1563 NDR_record_t NDR;
1564 thread_state_flavor_t flavor;
1565 mach_msg_type_number_t new_stateCnt;
1566 natural_t new_state[1296];
1567 mach_msg_trailer_t trailer;
1568 char padding[0]; /* Avoid generating empty UData structs */
1569 } RequestU __attribute__((unused));
1570#ifdef __MigPackStructs
1571#pragma pack(pop)
1572#endif
1573 typedef __RequestKData__thread_create_running_from_user_t RequestK;
1574 typedef __RequestUData__thread_create_running_from_user_t __RequestU;
1575 typedef __ReplyKData__thread_create_running_from_user_t ReplyK __attribute__((unused));
1576 typedef __ReplyUData__thread_create_running_from_user_t ReplyU __attribute__((unused));
1577 typedef __Reply__thread_create_running_from_user_t Reply __attribute__((unused));
1578 typedef __Request__thread_create_running_from_user_t __Request __attribute__((unused));
1579
1580 /*
1581 * typedef struct {
1582 * mach_msg_header_t Head;
1583 * NDR_record_t NDR;
1584 * kern_return_t RetCode;
1585 * } mig_reply_error_t;
1586 */
1587
1588 RequestK *InKP = (RequestK *) InHeadP;
1589 RequestU *In0UP = (RequestU *) InDataP;
1590 ReplyK *OutKP = (ReplyK *) OutHeadP;
1591 ReplyU *OutUP = (ReplyU *) OutDataP;
1592 (void)OutUP;
1593#ifdef __MIG_check__Request__thread_create_running_from_user_t__defined
1594 kern_return_t check_result;
1595#endif /* __MIG_check__Request__thread_create_running_from_user_t__defined */
1596
1597#if __MigKernelSpecificCode
1598#if UseStaticTemplates
1599 const static mach_msg_port_descriptor_t child_actTemplate = {
1600 /* name = */ MACH_PORT_NULL,
1601 /* pad1 = */ 0,
1602 /* pad2 = */ 0,
1603 /* disp = */ 17,
1604 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
1605 };
1606#endif /* UseStaticTemplates */
1607
1608#else
1609#if UseStaticTemplates
1610 const static mach_msg_port_descriptor_t child_actTemplate = {
1611 /* name = */ MACH_PORT_NULL,
1612 /* pad1 = */ 0,
1613 /* pad2 = */ 0,
1614 /* disp = */ 19,
1615 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
1616 };
1617#endif /* UseStaticTemplates */
1618
1619#endif /* __MigKernelSpecificCode */
1620 kern_return_t RetCode;
1621 task_t parent_task;
1622 thread_act_t child_act;
1623
1624 __DeclareRcvRpc(3412, "thread_create_running_from_user")
1625 __BeforeRcvRpc(3412, "thread_create_running_from_user")
1626
1627#if defined(__MIG_check__Request__thread_create_running_from_user_t__defined)
1628 check_result = __MIG_check__Request__thread_create_running_from_user_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
1629 if (check_result != MACH_MSG_SUCCESS)
1630 { MIG_RETURN_ERROR(OutKP, check_result); }
1631#endif /* defined(__MIG_check__Request__thread_create_running_from_user_t__defined) */
1632
1633#if UseStaticTemplates
1634 OutKP->child_act = child_actTemplate;
1635#else /* UseStaticTemplates */
1636#if __MigKernelSpecificCode
1637 OutKP->child_act.disposition = 17;
1638#else
1639 OutKP->child_act.disposition = 19;
1640#endif /* __MigKernelSpecificCode */
1641#if !(defined(KERNEL) && defined(__LP64__))
1642 OutKP->child_act.pad1 = 0;
1643#endif
1644 OutKP->child_act.pad2 = 0;
1645 OutKP->child_act.type = MACH_MSG_PORT_DESCRIPTOR;
1646#if defined(KERNEL)
1647 OutKP->child_act.pad_end = 0;
1648#endif
1649#endif /* UseStaticTemplates */
1650
1651
1652 parent_task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
1653
1654 RetCode = thread_create_running_from_user(parent_task, flavor: In0UP->flavor, new_state: In0UP->new_state, new_stateCnt: In0UP->new_stateCnt, child_act: &child_act);
1655 task_deallocate_mig(parent_task);
1656 if (RetCode != KERN_SUCCESS) {
1657 MIG_RETURN_ERROR(OutKP, RetCode);
1658 }
1659#if __MigKernelSpecificCode
1660#endif /* __MigKernelSpecificCode */
1661 OutKP->child_act.name = (mach_port_t)convert_thread_to_port(child_act);
1662
1663
1664 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
1665 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
1666 OutKP->msgh_body.msgh_descriptor_count = 1;
1667 __AfterRcvRpc(3412, "thread_create_running_from_user")
1668}
1669
1670#if ( __MigTypeCheck )
1671#if __MIG_check__Request__task_subsystem__
1672#if !defined(__MIG_check__Request__task_set_exception_ports_t__defined)
1673#define __MIG_check__Request__task_set_exception_ports_t__defined
1674
1675mig_internal kern_return_t __MIG_check__Request__task_set_exception_ports_t(
1676 __attribute__((__unused__)) __RequestKData__task_set_exception_ports_t *InKP,
1677 __attribute__((__unused__)) __RequestUData__task_set_exception_ports_t *In0UP,
1678 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
1679{
1680
1681 typedef __Request__task_set_exception_ports_t __Request;
1682 typedef __RequestUData__task_set_exception_ports_t __RequestU __attribute__((unused));
1683#if __MigTypeCheck
1684 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1685 (InKP->msgh_body.msgh_descriptor_count != 1) ||
1686 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1687 return MIG_BAD_ARGUMENTS;
1688#endif /* __MigTypeCheck */
1689
1690#if __MigTypeCheck
1691 if (InKP->new_port.type != MACH_MSG_PORT_DESCRIPTOR ||
1692 InKP->new_port.disposition != 17)
1693 return MIG_TYPE_ERROR;
1694#endif /* __MigTypeCheck */
1695
1696 return MACH_MSG_SUCCESS;
1697}
1698#endif /* !defined(__MIG_check__Request__task_set_exception_ports_t__defined) */
1699#endif /* __MIG_check__Request__task_subsystem__ */
1700#endif /* ( __MigTypeCheck ) */
1701
1702
1703/* Routine task_set_exception_ports */
1704mig_internal novalue _Xtask_set_exception_ports
1705 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1706 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1707 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1708{
1709
1710#ifdef __MigPackStructs
1711#pragma pack(push, 4)
1712#endif
1713 typedef struct {
1714 NDR_record_t NDR;
1715 exception_mask_t exception_mask;
1716 exception_behavior_t behavior;
1717 thread_state_flavor_t new_flavor;
1718 mach_msg_trailer_t trailer;
1719 char padding[0]; /* Avoid generating empty UData structs */
1720 } RequestU __attribute__((unused));
1721#ifdef __MigPackStructs
1722#pragma pack(pop)
1723#endif
1724 typedef __RequestKData__task_set_exception_ports_t RequestK;
1725 typedef __RequestUData__task_set_exception_ports_t __RequestU;
1726 typedef __ReplyKData__task_set_exception_ports_t ReplyK __attribute__((unused));
1727 typedef __ReplyUData__task_set_exception_ports_t ReplyU __attribute__((unused));
1728 typedef __Reply__task_set_exception_ports_t Reply __attribute__((unused));
1729 typedef __Request__task_set_exception_ports_t __Request __attribute__((unused));
1730
1731 /*
1732 * typedef struct {
1733 * mach_msg_header_t Head;
1734 * NDR_record_t NDR;
1735 * kern_return_t RetCode;
1736 * } mig_reply_error_t;
1737 */
1738
1739 RequestK *InKP = (RequestK *) InHeadP;
1740 RequestU *In0UP = (RequestU *) InDataP;
1741 ReplyK *OutKP = (ReplyK *) OutHeadP;
1742 ReplyU *OutUP = (ReplyU *) OutDataP;
1743 (void)OutUP;
1744#ifdef __MIG_check__Request__task_set_exception_ports_t__defined
1745 kern_return_t check_result;
1746#endif /* __MIG_check__Request__task_set_exception_ports_t__defined */
1747
1748#if __MigKernelSpecificCode
1749#else
1750#endif /* __MigKernelSpecificCode */
1751 task_t task;
1752
1753 __DeclareRcvRpc(3413, "task_set_exception_ports")
1754 __BeforeRcvRpc(3413, "task_set_exception_ports")
1755
1756#if defined(__MIG_check__Request__task_set_exception_ports_t__defined)
1757 check_result = __MIG_check__Request__task_set_exception_ports_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
1758 if (check_result != MACH_MSG_SUCCESS)
1759 { MIG_RETURN_ERROR(OutKP, check_result); }
1760#endif /* defined(__MIG_check__Request__task_set_exception_ports_t__defined) */
1761
1762 task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
1763
1764 OutUP->RetCode = task_set_exception_ports(task, exception_mask: In0UP->exception_mask, new_port: InKP->new_port.name, behavior: In0UP->behavior, new_flavor: In0UP->new_flavor);
1765 task_deallocate_mig(task);
1766#if __MigKernelSpecificCode
1767#endif /* __MigKernelSpecificCode */
1768
1769 OutUP->NDR = NDR_record;
1770
1771
1772 __AfterRcvRpc(3413, "task_set_exception_ports")
1773}
1774
1775#if ( __MigTypeCheck )
1776#if __MIG_check__Request__task_subsystem__
1777#if !defined(__MIG_check__Request__task_get_exception_ports_from_user_t__defined)
1778#define __MIG_check__Request__task_get_exception_ports_from_user_t__defined
1779
1780mig_internal kern_return_t __MIG_check__Request__task_get_exception_ports_from_user_t(
1781 __attribute__((__unused__)) __RequestKData__task_get_exception_ports_from_user_t *InKP,
1782 __attribute__((__unused__)) __RequestUData__task_get_exception_ports_from_user_t *In0UP,
1783 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
1784{
1785
1786 typedef __Request__task_get_exception_ports_from_user_t __Request;
1787 typedef __RequestUData__task_get_exception_ports_from_user_t __RequestU __attribute__((unused));
1788#if __MigTypeCheck
1789 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1790 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1791 return MIG_BAD_ARGUMENTS;
1792#endif /* __MigTypeCheck */
1793
1794 return MACH_MSG_SUCCESS;
1795}
1796#endif /* !defined(__MIG_check__Request__task_get_exception_ports_from_user_t__defined) */
1797#endif /* __MIG_check__Request__task_subsystem__ */
1798#endif /* ( __MigTypeCheck ) */
1799
1800
1801/* Routine task_get_exception_ports_from_user */
1802mig_internal novalue _Xtask_get_exception_ports_from_user
1803 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1804 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1805 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1806{
1807
1808#ifdef __MigPackStructs
1809#pragma pack(push, 4)
1810#endif
1811 typedef struct {
1812 NDR_record_t NDR;
1813 exception_mask_t exception_mask;
1814 mach_msg_trailer_t trailer;
1815 char padding[0]; /* Avoid generating empty UData structs */
1816 } RequestU __attribute__((unused));
1817#ifdef __MigPackStructs
1818#pragma pack(pop)
1819#endif
1820 typedef __RequestKData__task_get_exception_ports_from_user_t RequestK;
1821 typedef __RequestUData__task_get_exception_ports_from_user_t __RequestU;
1822 typedef __ReplyKData__task_get_exception_ports_from_user_t ReplyK __attribute__((unused));
1823 typedef __ReplyUData__task_get_exception_ports_from_user_t ReplyU __attribute__((unused));
1824 typedef __Reply__task_get_exception_ports_from_user_t Reply __attribute__((unused));
1825 typedef __Request__task_get_exception_ports_from_user_t __Request __attribute__((unused));
1826
1827 /*
1828 * typedef struct {
1829 * mach_msg_header_t Head;
1830 * NDR_record_t NDR;
1831 * kern_return_t RetCode;
1832 * } mig_reply_error_t;
1833 */
1834
1835 RequestK *InKP = (RequestK *) InHeadP;
1836 RequestU *In0UP = (RequestU *) InDataP;
1837 ReplyK *OutKP = (ReplyK *) OutHeadP;
1838 ReplyU *OutUP = (ReplyU *) OutDataP;
1839 (void)OutUP;
1840 unsigned int msgh_size;
1841 unsigned int msgh_size_delta;
1842
1843#ifdef __MIG_check__Request__task_get_exception_ports_from_user_t__defined
1844 kern_return_t check_result;
1845#endif /* __MIG_check__Request__task_get_exception_ports_from_user_t__defined */
1846
1847#if __MigKernelSpecificCode
1848#if UseStaticTemplates
1849 const static mach_msg_port_descriptor_t old_handlersTemplate = {
1850 /* name = */ MACH_PORT_NULL,
1851 /* pad1 = */ 0,
1852 /* pad2 = */ 0,
1853 /* disp = */ 17,
1854 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
1855 };
1856#endif /* UseStaticTemplates */
1857
1858#else
1859#if UseStaticTemplates
1860 const static mach_msg_port_descriptor_t old_handlersTemplate = {
1861 /* name = */ MACH_PORT_NULL,
1862 /* pad1 = */ 0,
1863 /* pad2 = */ 0,
1864 /* disp = */ 19,
1865 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
1866 };
1867#endif /* UseStaticTemplates */
1868
1869#endif /* __MigKernelSpecificCode */
1870 kern_return_t RetCode;
1871 mach_msg_type_number_t masksCnt;
1872 exception_handler_t old_handlers[32];
1873 exception_behavior_t old_behaviors[32];
1874 thread_state_flavor_t old_flavors[32];
1875
1876 __DeclareRcvRpc(3414, "task_get_exception_ports_from_user")
1877 __BeforeRcvRpc(3414, "task_get_exception_ports_from_user")
1878
1879#if defined(__MIG_check__Request__task_get_exception_ports_from_user_t__defined)
1880 check_result = __MIG_check__Request__task_get_exception_ports_from_user_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
1881 if (check_result != MACH_MSG_SUCCESS)
1882 { MIG_RETURN_ERROR(OutKP, check_result); }
1883#endif /* defined(__MIG_check__Request__task_get_exception_ports_from_user_t__defined) */
1884
1885 {
1886 mach_msg_port_descriptor_t *ptr;
1887 int i;
1888
1889 ptr = &OutKP->old_handlers[0];
1890 for (i = 0; i < 32; ptr++, i++) {
1891#if UseStaticTemplates
1892 *ptr = old_handlersTemplate;
1893#else /* UseStaticTemplates */
1894 ptr->name = MACH_PORT_NULL;
1895#if __MigKernelSpecificCode
1896 ptr->disposition = 17;
1897#else
1898 ptr->disposition = 19;
1899#endif /* __MigKernelSpecificCode */
1900#if !(defined(KERNEL) && defined(__LP64__))
1901 ptr->pad1 = 0;
1902#endif
1903 ptr->pad2 = 0;
1904 ptr->type = MACH_MSG_PORT_DESCRIPTOR;
1905#if defined(KERNEL)
1906 ptr->pad_end = 0;
1907#endif
1908#endif /* UseStaticTemplates */
1909 }
1910 }
1911
1912
1913 masksCnt = 32;
1914
1915 RetCode = task_get_exception_ports_from_user(port: InKP->Head.msgh_request_port, exception_mask: In0UP->exception_mask, masks: OutUP->masks, masksCnt: &masksCnt, old_handlers, old_behaviors, old_flavors);
1916 if (RetCode != KERN_SUCCESS) {
1917 MIG_RETURN_ERROR(OutKP, RetCode);
1918 }
1919#if __MigKernelSpecificCode
1920#endif /* __MigKernelSpecificCode */
1921 {
1922 mach_msg_port_descriptor_t *ptr;
1923 int i, j;
1924
1925 ptr = &OutKP->old_handlers[0];
1926 j = min(32, masksCnt);
1927 for (i = 0; i < j; ptr++, i++) {
1928 ptr->name = old_handlers[i];
1929 }
1930 }
1931
1932
1933 OutUP->NDR = NDR_record;
1934
1935 OutUP->masksCnt = masksCnt;
1936 msgh_size_delta = ((4 * masksCnt));
1937 msgh_size = (mach_msg_size_t)(sizeof(Reply) - 384) + msgh_size_delta;
1938 OutUP = (ReplyU *) ((pointer_t) OutUP + msgh_size_delta - 128);
1939 (void)memcpy(dst: (char *) OutUP->old_behaviors, src: (const char *) old_behaviors, n: 4 * masksCnt);
1940 msgh_size_delta = ((4 * masksCnt));
1941 msgh_size += msgh_size_delta;
1942 OutUP = (ReplyU *) ((pointer_t) OutUP + msgh_size_delta - 128);
1943 (void)memcpy(dst: (char *) OutUP->old_flavors, src: (const char *) old_flavors, n: 4 * masksCnt);
1944 msgh_size += ((4 * masksCnt));
1945
1946 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
1947 OutKP->Head.msgh_size = msgh_size;
1948 OutKP->msgh_body.msgh_descriptor_count = 32;
1949 __AfterRcvRpc(3414, "task_get_exception_ports_from_user")
1950}
1951
1952#if ( __MigTypeCheck )
1953#if __MIG_check__Request__task_subsystem__
1954#if !defined(__MIG_check__Request__task_swap_exception_ports_t__defined)
1955#define __MIG_check__Request__task_swap_exception_ports_t__defined
1956
1957mig_internal kern_return_t __MIG_check__Request__task_swap_exception_ports_t(
1958 __attribute__((__unused__)) __RequestKData__task_swap_exception_ports_t *InKP,
1959 __attribute__((__unused__)) __RequestUData__task_swap_exception_ports_t *In0UP,
1960 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
1961{
1962
1963 typedef __Request__task_swap_exception_ports_t __Request;
1964 typedef __RequestUData__task_swap_exception_ports_t __RequestU __attribute__((unused));
1965#if __MigTypeCheck
1966 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1967 (InKP->msgh_body.msgh_descriptor_count != 1) ||
1968 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1969 return MIG_BAD_ARGUMENTS;
1970#endif /* __MigTypeCheck */
1971
1972#if __MigTypeCheck
1973 if (InKP->new_port.type != MACH_MSG_PORT_DESCRIPTOR ||
1974 InKP->new_port.disposition != 17)
1975 return MIG_TYPE_ERROR;
1976#endif /* __MigTypeCheck */
1977
1978 return MACH_MSG_SUCCESS;
1979}
1980#endif /* !defined(__MIG_check__Request__task_swap_exception_ports_t__defined) */
1981#endif /* __MIG_check__Request__task_subsystem__ */
1982#endif /* ( __MigTypeCheck ) */
1983
1984
1985/* Routine task_swap_exception_ports */
1986mig_internal novalue _Xtask_swap_exception_ports
1987 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1988 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1989 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1990{
1991
1992#ifdef __MigPackStructs
1993#pragma pack(push, 4)
1994#endif
1995 typedef struct {
1996 NDR_record_t NDR;
1997 exception_mask_t exception_mask;
1998 exception_behavior_t behavior;
1999 thread_state_flavor_t new_flavor;
2000 mach_msg_trailer_t trailer;
2001 char padding[0]; /* Avoid generating empty UData structs */
2002 } RequestU __attribute__((unused));
2003#ifdef __MigPackStructs
2004#pragma pack(pop)
2005#endif
2006 typedef __RequestKData__task_swap_exception_ports_t RequestK;
2007 typedef __RequestUData__task_swap_exception_ports_t __RequestU;
2008 typedef __ReplyKData__task_swap_exception_ports_t ReplyK __attribute__((unused));
2009 typedef __ReplyUData__task_swap_exception_ports_t ReplyU __attribute__((unused));
2010 typedef __Reply__task_swap_exception_ports_t Reply __attribute__((unused));
2011 typedef __Request__task_swap_exception_ports_t __Request __attribute__((unused));
2012
2013 /*
2014 * typedef struct {
2015 * mach_msg_header_t Head;
2016 * NDR_record_t NDR;
2017 * kern_return_t RetCode;
2018 * } mig_reply_error_t;
2019 */
2020
2021 RequestK *InKP = (RequestK *) InHeadP;
2022 RequestU *In0UP = (RequestU *) InDataP;
2023 ReplyK *OutKP = (ReplyK *) OutHeadP;
2024 ReplyU *OutUP = (ReplyU *) OutDataP;
2025 (void)OutUP;
2026 unsigned int msgh_size;
2027 unsigned int msgh_size_delta;
2028
2029#ifdef __MIG_check__Request__task_swap_exception_ports_t__defined
2030 kern_return_t check_result;
2031#endif /* __MIG_check__Request__task_swap_exception_ports_t__defined */
2032
2033#if __MigKernelSpecificCode
2034#if UseStaticTemplates
2035 const static mach_msg_port_descriptor_t old_handlersTemplate = {
2036 /* name = */ MACH_PORT_NULL,
2037 /* pad1 = */ 0,
2038 /* pad2 = */ 0,
2039 /* disp = */ 17,
2040 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
2041 };
2042#endif /* UseStaticTemplates */
2043
2044#else
2045#if UseStaticTemplates
2046 const static mach_msg_port_descriptor_t old_handlersTemplate = {
2047 /* name = */ MACH_PORT_NULL,
2048 /* pad1 = */ 0,
2049 /* pad2 = */ 0,
2050 /* disp = */ 19,
2051 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
2052 };
2053#endif /* UseStaticTemplates */
2054
2055#endif /* __MigKernelSpecificCode */
2056 kern_return_t RetCode;
2057 task_t task;
2058 mach_msg_type_number_t masksCnt;
2059 exception_handler_t old_handlers[32];
2060 exception_behavior_t old_behaviors[32];
2061 thread_state_flavor_t old_flavors[32];
2062
2063 __DeclareRcvRpc(3415, "task_swap_exception_ports")
2064 __BeforeRcvRpc(3415, "task_swap_exception_ports")
2065
2066#if defined(__MIG_check__Request__task_swap_exception_ports_t__defined)
2067 check_result = __MIG_check__Request__task_swap_exception_ports_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
2068 if (check_result != MACH_MSG_SUCCESS)
2069 { MIG_RETURN_ERROR(OutKP, check_result); }
2070#endif /* defined(__MIG_check__Request__task_swap_exception_ports_t__defined) */
2071
2072 {
2073 mach_msg_port_descriptor_t *ptr;
2074 int i;
2075
2076 ptr = &OutKP->old_handlers[0];
2077 for (i = 0; i < 32; ptr++, i++) {
2078#if UseStaticTemplates
2079 *ptr = old_handlersTemplate;
2080#else /* UseStaticTemplates */
2081 ptr->name = MACH_PORT_NULL;
2082#if __MigKernelSpecificCode
2083 ptr->disposition = 17;
2084#else
2085 ptr->disposition = 19;
2086#endif /* __MigKernelSpecificCode */
2087#if !(defined(KERNEL) && defined(__LP64__))
2088 ptr->pad1 = 0;
2089#endif
2090 ptr->pad2 = 0;
2091 ptr->type = MACH_MSG_PORT_DESCRIPTOR;
2092#if defined(KERNEL)
2093 ptr->pad_end = 0;
2094#endif
2095#endif /* UseStaticTemplates */
2096 }
2097 }
2098
2099
2100 task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
2101
2102 masksCnt = 32;
2103
2104 RetCode = task_swap_exception_ports(task, exception_mask: In0UP->exception_mask, new_port: InKP->new_port.name, behavior: In0UP->behavior, new_flavor: In0UP->new_flavor, masks: OutUP->masks, masksCnt: &masksCnt, old_handlers, old_behaviors, old_flavors);
2105 task_deallocate_mig(task);
2106 if (RetCode != KERN_SUCCESS) {
2107 MIG_RETURN_ERROR(OutKP, RetCode);
2108 }
2109#if __MigKernelSpecificCode
2110#endif /* __MigKernelSpecificCode */
2111 {
2112 mach_msg_port_descriptor_t *ptr;
2113 int i, j;
2114
2115 ptr = &OutKP->old_handlers[0];
2116 j = min(32, masksCnt);
2117 for (i = 0; i < j; ptr++, i++) {
2118 ptr->name = old_handlers[i];
2119 }
2120 }
2121
2122
2123 OutUP->NDR = NDR_record;
2124
2125 OutUP->masksCnt = masksCnt;
2126 msgh_size_delta = ((4 * masksCnt));
2127 msgh_size = (mach_msg_size_t)(sizeof(Reply) - 384) + msgh_size_delta;
2128 OutUP = (ReplyU *) ((pointer_t) OutUP + msgh_size_delta - 128);
2129 (void)memcpy(dst: (char *) OutUP->old_behaviors, src: (const char *) old_behaviors, n: 4 * masksCnt);
2130 msgh_size_delta = ((4 * masksCnt));
2131 msgh_size += msgh_size_delta;
2132 OutUP = (ReplyU *) ((pointer_t) OutUP + msgh_size_delta - 128);
2133 (void)memcpy(dst: (char *) OutUP->old_flavors, src: (const char *) old_flavors, n: 4 * masksCnt);
2134 msgh_size += ((4 * masksCnt));
2135
2136 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
2137 OutKP->Head.msgh_size = msgh_size;
2138 OutKP->msgh_body.msgh_descriptor_count = 32;
2139 __AfterRcvRpc(3415, "task_swap_exception_ports")
2140}
2141
2142#if ( __MigTypeCheck )
2143#if __MIG_check__Request__task_subsystem__
2144#if !defined(__MIG_check__Request__semaphore_create_t__defined)
2145#define __MIG_check__Request__semaphore_create_t__defined
2146
2147mig_internal kern_return_t __MIG_check__Request__semaphore_create_t(
2148 __attribute__((__unused__)) __RequestKData__semaphore_create_t *InKP,
2149 __attribute__((__unused__)) __RequestUData__semaphore_create_t *In0UP,
2150 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2151{
2152
2153 typedef __Request__semaphore_create_t __Request;
2154 typedef __RequestUData__semaphore_create_t __RequestU __attribute__((unused));
2155#if __MigTypeCheck
2156 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2157 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2158 return MIG_BAD_ARGUMENTS;
2159#endif /* __MigTypeCheck */
2160
2161 return MACH_MSG_SUCCESS;
2162}
2163#endif /* !defined(__MIG_check__Request__semaphore_create_t__defined) */
2164#endif /* __MIG_check__Request__task_subsystem__ */
2165#endif /* ( __MigTypeCheck ) */
2166
2167
2168/* Routine semaphore_create */
2169mig_internal novalue _Xsemaphore_create
2170 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2171 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2172 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2173{
2174
2175#ifdef __MigPackStructs
2176#pragma pack(push, 4)
2177#endif
2178 typedef struct {
2179 NDR_record_t NDR;
2180 int policy;
2181 int value;
2182 mach_msg_trailer_t trailer;
2183 char padding[0]; /* Avoid generating empty UData structs */
2184 } RequestU __attribute__((unused));
2185#ifdef __MigPackStructs
2186#pragma pack(pop)
2187#endif
2188 typedef __RequestKData__semaphore_create_t RequestK;
2189 typedef __RequestUData__semaphore_create_t __RequestU;
2190 typedef __ReplyKData__semaphore_create_t ReplyK __attribute__((unused));
2191 typedef __ReplyUData__semaphore_create_t ReplyU __attribute__((unused));
2192 typedef __Reply__semaphore_create_t Reply __attribute__((unused));
2193 typedef __Request__semaphore_create_t __Request __attribute__((unused));
2194
2195 /*
2196 * typedef struct {
2197 * mach_msg_header_t Head;
2198 * NDR_record_t NDR;
2199 * kern_return_t RetCode;
2200 * } mig_reply_error_t;
2201 */
2202
2203 RequestK *InKP = (RequestK *) InHeadP;
2204 RequestU *In0UP = (RequestU *) InDataP;
2205 ReplyK *OutKP = (ReplyK *) OutHeadP;
2206 ReplyU *OutUP = (ReplyU *) OutDataP;
2207 (void)OutUP;
2208#ifdef __MIG_check__Request__semaphore_create_t__defined
2209 kern_return_t check_result;
2210#endif /* __MIG_check__Request__semaphore_create_t__defined */
2211
2212#if __MigKernelSpecificCode
2213#if UseStaticTemplates
2214 const static mach_msg_port_descriptor_t semaphoreTemplate = {
2215 /* name = */ MACH_PORT_NULL,
2216 /* pad1 = */ 0,
2217 /* pad2 = */ 0,
2218 /* disp = */ 17,
2219 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
2220 };
2221#endif /* UseStaticTemplates */
2222
2223#else
2224#if UseStaticTemplates
2225 const static mach_msg_port_descriptor_t semaphoreTemplate = {
2226 /* name = */ MACH_PORT_NULL,
2227 /* pad1 = */ 0,
2228 /* pad2 = */ 0,
2229 /* disp = */ 19,
2230 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
2231 };
2232#endif /* UseStaticTemplates */
2233
2234#endif /* __MigKernelSpecificCode */
2235 kern_return_t RetCode;
2236 task_t task;
2237 semaphore_t semaphore;
2238
2239 __DeclareRcvRpc(3418, "semaphore_create")
2240 __BeforeRcvRpc(3418, "semaphore_create")
2241
2242#if defined(__MIG_check__Request__semaphore_create_t__defined)
2243 check_result = __MIG_check__Request__semaphore_create_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
2244 if (check_result != MACH_MSG_SUCCESS)
2245 { MIG_RETURN_ERROR(OutKP, check_result); }
2246#endif /* defined(__MIG_check__Request__semaphore_create_t__defined) */
2247
2248#if UseStaticTemplates
2249 OutKP->semaphore = semaphoreTemplate;
2250#else /* UseStaticTemplates */
2251#if __MigKernelSpecificCode
2252 OutKP->semaphore.disposition = 17;
2253#else
2254 OutKP->semaphore.disposition = 19;
2255#endif /* __MigKernelSpecificCode */
2256#if !(defined(KERNEL) && defined(__LP64__))
2257 OutKP->semaphore.pad1 = 0;
2258#endif
2259 OutKP->semaphore.pad2 = 0;
2260 OutKP->semaphore.type = MACH_MSG_PORT_DESCRIPTOR;
2261#if defined(KERNEL)
2262 OutKP->semaphore.pad_end = 0;
2263#endif
2264#endif /* UseStaticTemplates */
2265
2266
2267 task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
2268
2269 RetCode = semaphore_create(task, semaphore: &semaphore, policy: In0UP->policy, value: In0UP->value);
2270 task_deallocate_mig(task);
2271 if (RetCode != KERN_SUCCESS) {
2272 MIG_RETURN_ERROR(OutKP, RetCode);
2273 }
2274#if __MigKernelSpecificCode
2275#endif /* __MigKernelSpecificCode */
2276 OutKP->semaphore.name = (mach_port_t)convert_semaphore_to_port(semaphore);
2277
2278
2279 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
2280 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
2281 OutKP->msgh_body.msgh_descriptor_count = 1;
2282 __AfterRcvRpc(3418, "semaphore_create")
2283}
2284
2285#if ( __MigTypeCheck )
2286#if __MIG_check__Request__task_subsystem__
2287#if !defined(__MIG_check__Request__semaphore_destroy_t__defined)
2288#define __MIG_check__Request__semaphore_destroy_t__defined
2289
2290mig_internal kern_return_t __MIG_check__Request__semaphore_destroy_t(
2291 __attribute__((__unused__)) __RequestKData__semaphore_destroy_t *InKP,
2292 __attribute__((__unused__)) __RequestUData__semaphore_destroy_t *In0UP,
2293 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2294{
2295
2296 typedef __Request__semaphore_destroy_t __Request;
2297 typedef __RequestUData__semaphore_destroy_t __RequestU __attribute__((unused));
2298#if __MigTypeCheck
2299 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2300 (InKP->msgh_body.msgh_descriptor_count != 1) ||
2301 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2302 return MIG_BAD_ARGUMENTS;
2303#endif /* __MigTypeCheck */
2304
2305#if __MigTypeCheck
2306 if (InKP->semaphore.type != MACH_MSG_PORT_DESCRIPTOR ||
2307 InKP->semaphore.disposition != 17)
2308 return MIG_TYPE_ERROR;
2309#endif /* __MigTypeCheck */
2310
2311 return MACH_MSG_SUCCESS;
2312}
2313#endif /* !defined(__MIG_check__Request__semaphore_destroy_t__defined) */
2314#endif /* __MIG_check__Request__task_subsystem__ */
2315#endif /* ( __MigTypeCheck ) */
2316
2317
2318/* Routine semaphore_destroy */
2319mig_internal novalue _Xsemaphore_destroy
2320 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2321 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2322 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2323{
2324
2325#ifdef __MigPackStructs
2326#pragma pack(push, 4)
2327#endif
2328 typedef struct {
2329 mach_msg_trailer_t trailer;
2330 char padding[0]; /* Avoid generating empty UData structs */
2331 } RequestU __attribute__((unused));
2332#ifdef __MigPackStructs
2333#pragma pack(pop)
2334#endif
2335 typedef __RequestKData__semaphore_destroy_t RequestK;
2336 typedef __RequestUData__semaphore_destroy_t __RequestU;
2337 typedef __ReplyKData__semaphore_destroy_t ReplyK __attribute__((unused));
2338 typedef __ReplyUData__semaphore_destroy_t ReplyU __attribute__((unused));
2339 typedef __Reply__semaphore_destroy_t Reply __attribute__((unused));
2340 typedef __Request__semaphore_destroy_t __Request __attribute__((unused));
2341
2342 /*
2343 * typedef struct {
2344 * mach_msg_header_t Head;
2345 * NDR_record_t NDR;
2346 * kern_return_t RetCode;
2347 * } mig_reply_error_t;
2348 */
2349
2350 RequestK *InKP = (RequestK *) InHeadP;
2351 RequestU *In0UP = (RequestU *) InDataP;
2352 ReplyK *OutKP = (ReplyK *) OutHeadP;
2353 ReplyU *OutUP = (ReplyU *) OutDataP;
2354 (void)OutUP;
2355#ifdef __MIG_check__Request__semaphore_destroy_t__defined
2356 kern_return_t check_result;
2357#endif /* __MIG_check__Request__semaphore_destroy_t__defined */
2358
2359#if __MigKernelSpecificCode
2360#else
2361#endif /* __MigKernelSpecificCode */
2362 task_t task;
2363
2364 __DeclareRcvRpc(3419, "semaphore_destroy")
2365 __BeforeRcvRpc(3419, "semaphore_destroy")
2366
2367#if defined(__MIG_check__Request__semaphore_destroy_t__defined)
2368 check_result = __MIG_check__Request__semaphore_destroy_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
2369 if (check_result != MACH_MSG_SUCCESS)
2370 { MIG_RETURN_ERROR(OutKP, check_result); }
2371#endif /* defined(__MIG_check__Request__semaphore_destroy_t__defined) */
2372
2373 task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
2374
2375 OutUP->RetCode = semaphore_destroy(task, semaphore: convert_port_to_semaphore(port: InKP->semaphore.name));
2376 task_deallocate_mig(task);
2377#if __MigKernelSpecificCode
2378 if (OutUP->RetCode != KERN_SUCCESS) {
2379 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
2380 }
2381 ipc_port_release_send(port: (ipc_port_t)InKP->semaphore.name);
2382#endif /* __MigKernelSpecificCode */
2383
2384 OutUP->NDR = NDR_record;
2385
2386
2387 __AfterRcvRpc(3419, "semaphore_destroy")
2388}
2389
2390#if ( __MigTypeCheck )
2391#if __MIG_check__Request__task_subsystem__
2392#if !defined(__MIG_check__Request__task_policy_set_t__defined)
2393#define __MIG_check__Request__task_policy_set_t__defined
2394
2395mig_internal kern_return_t __MIG_check__Request__task_policy_set_t(
2396 __attribute__((__unused__)) __RequestKData__task_policy_set_t *InKP,
2397 __attribute__((__unused__)) __RequestUData__task_policy_set_t *In0UP,
2398 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2399{
2400
2401 typedef __Request__task_policy_set_t __Request;
2402 typedef __RequestUData__task_policy_set_t __RequestU __attribute__((unused));
2403#if __MigTypeCheck
2404 unsigned int msgh_size;
2405#endif /* __MigTypeCheck */
2406
2407#if __MigTypeCheck
2408 msgh_size = InKP->Head.msgh_size;
2409 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2410 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 64)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
2411 return MIG_BAD_ARGUMENTS;
2412#endif /* __MigTypeCheck */
2413
2414#if defined(__NDR_convert__int_rep__Request__task_policy_set_t__policy_infoCnt__defined)
2415 if (In0UP->NDR.int_rep != NDR_record.int_rep)
2416 __NDR_convert__int_rep__Request__task_policy_set_t__policy_infoCnt(&In0UP->policy_infoCnt, In0UP->NDR.int_rep);
2417#endif /* __NDR_convert__int_rep__Request__task_policy_set_t__policy_infoCnt__defined */
2418#if __MigTypeCheck
2419 if (In0UP->policy_infoCnt > 16)
2420 return MIG_BAD_ARGUMENTS;
2421 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 64)) / 4 < In0UP->policy_infoCnt) ||
2422 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 64) + (4 * In0UP->policy_infoCnt)))
2423 return MIG_BAD_ARGUMENTS;
2424#endif /* __MigTypeCheck */
2425
2426 return MACH_MSG_SUCCESS;
2427}
2428#endif /* !defined(__MIG_check__Request__task_policy_set_t__defined) */
2429#endif /* __MIG_check__Request__task_subsystem__ */
2430#endif /* ( __MigTypeCheck ) */
2431
2432
2433/* Routine task_policy_set */
2434mig_internal novalue _Xtask_policy_set
2435 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2436 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2437 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2438{
2439
2440#ifdef __MigPackStructs
2441#pragma pack(push, 4)
2442#endif
2443 typedef struct {
2444 NDR_record_t NDR;
2445 task_policy_flavor_t flavor;
2446 mach_msg_type_number_t policy_infoCnt;
2447 integer_t policy_info[16];
2448 mach_msg_trailer_t trailer;
2449 char padding[0]; /* Avoid generating empty UData structs */
2450 } RequestU __attribute__((unused));
2451#ifdef __MigPackStructs
2452#pragma pack(pop)
2453#endif
2454 typedef __RequestKData__task_policy_set_t RequestK;
2455 typedef __RequestUData__task_policy_set_t __RequestU;
2456 typedef __ReplyKData__task_policy_set_t ReplyK __attribute__((unused));
2457 typedef __ReplyUData__task_policy_set_t ReplyU __attribute__((unused));
2458 typedef __Reply__task_policy_set_t Reply __attribute__((unused));
2459 typedef __Request__task_policy_set_t __Request __attribute__((unused));
2460
2461 /*
2462 * typedef struct {
2463 * mach_msg_header_t Head;
2464 * NDR_record_t NDR;
2465 * kern_return_t RetCode;
2466 * } mig_reply_error_t;
2467 */
2468
2469 RequestK *InKP = (RequestK *) InHeadP;
2470 RequestU *In0UP = (RequestU *) InDataP;
2471 ReplyK *OutKP = (ReplyK *) OutHeadP;
2472 ReplyU *OutUP = (ReplyU *) OutDataP;
2473 (void)OutUP;
2474#ifdef __MIG_check__Request__task_policy_set_t__defined
2475 kern_return_t check_result;
2476#endif /* __MIG_check__Request__task_policy_set_t__defined */
2477
2478#if __MigKernelSpecificCode
2479#else
2480#endif /* __MigKernelSpecificCode */
2481 task_policy_set_t task;
2482
2483 __DeclareRcvRpc(3420, "task_policy_set")
2484 __BeforeRcvRpc(3420, "task_policy_set")
2485
2486#if defined(__MIG_check__Request__task_policy_set_t__defined)
2487 check_result = __MIG_check__Request__task_policy_set_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
2488 if (check_result != MACH_MSG_SUCCESS)
2489 { MIG_RETURN_ERROR(OutKP, check_result); }
2490#endif /* defined(__MIG_check__Request__task_policy_set_t__defined) */
2491
2492 task = convert_port_to_task_policy_set_mig(port: InKP->Head.msgh_request_port);
2493
2494 OutUP->RetCode = task_policy_set(task, flavor: In0UP->flavor, policy_info: In0UP->policy_info, policy_infoCnt: In0UP->policy_infoCnt);
2495 task_policy_set_deallocate_mig(task_policy_set: task);
2496#if __MigKernelSpecificCode
2497#endif /* __MigKernelSpecificCode */
2498
2499 OutUP->NDR = NDR_record;
2500
2501
2502 __AfterRcvRpc(3420, "task_policy_set")
2503}
2504
2505#if ( __MigTypeCheck )
2506#if __MIG_check__Request__task_subsystem__
2507#if !defined(__MIG_check__Request__task_policy_get_t__defined)
2508#define __MIG_check__Request__task_policy_get_t__defined
2509
2510mig_internal kern_return_t __MIG_check__Request__task_policy_get_t(
2511 __attribute__((__unused__)) __RequestKData__task_policy_get_t *InKP,
2512 __attribute__((__unused__)) __RequestUData__task_policy_get_t *In0UP,
2513 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2514{
2515
2516 typedef __Request__task_policy_get_t __Request;
2517 typedef __RequestUData__task_policy_get_t __RequestU __attribute__((unused));
2518#if __MigTypeCheck
2519 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2520 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2521 return MIG_BAD_ARGUMENTS;
2522#endif /* __MigTypeCheck */
2523
2524 return MACH_MSG_SUCCESS;
2525}
2526#endif /* !defined(__MIG_check__Request__task_policy_get_t__defined) */
2527#endif /* __MIG_check__Request__task_subsystem__ */
2528#endif /* ( __MigTypeCheck ) */
2529
2530
2531/* Routine task_policy_get */
2532mig_internal novalue _Xtask_policy_get
2533 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2534 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2535 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2536{
2537
2538#ifdef __MigPackStructs
2539#pragma pack(push, 4)
2540#endif
2541 typedef struct {
2542 NDR_record_t NDR;
2543 task_policy_flavor_t flavor;
2544 mach_msg_type_number_t policy_infoCnt;
2545 boolean_t get_default;
2546 mach_msg_trailer_t trailer;
2547 char padding[0]; /* Avoid generating empty UData structs */
2548 } RequestU __attribute__((unused));
2549#ifdef __MigPackStructs
2550#pragma pack(pop)
2551#endif
2552 typedef __RequestKData__task_policy_get_t RequestK;
2553 typedef __RequestUData__task_policy_get_t __RequestU;
2554 typedef __ReplyKData__task_policy_get_t ReplyK __attribute__((unused));
2555 typedef __ReplyUData__task_policy_get_t ReplyU __attribute__((unused));
2556 typedef __Reply__task_policy_get_t Reply __attribute__((unused));
2557 typedef __Request__task_policy_get_t __Request __attribute__((unused));
2558
2559 /*
2560 * typedef struct {
2561 * mach_msg_header_t Head;
2562 * NDR_record_t NDR;
2563 * kern_return_t RetCode;
2564 * } mig_reply_error_t;
2565 */
2566
2567 RequestK *InKP = (RequestK *) InHeadP;
2568 RequestU *In0UP = (RequestU *) InDataP;
2569 ReplyK *OutKP = (ReplyK *) OutHeadP;
2570 ReplyU *OutUP = (ReplyU *) OutDataP;
2571 (void)OutUP;
2572 unsigned int msgh_size_delta;
2573
2574#ifdef __MIG_check__Request__task_policy_get_t__defined
2575 kern_return_t check_result;
2576#endif /* __MIG_check__Request__task_policy_get_t__defined */
2577
2578#if __MigKernelSpecificCode
2579#else
2580#endif /* __MigKernelSpecificCode */
2581 task_policy_get_t task;
2582
2583 __DeclareRcvRpc(3421, "task_policy_get")
2584 __BeforeRcvRpc(3421, "task_policy_get")
2585
2586#if defined(__MIG_check__Request__task_policy_get_t__defined)
2587 check_result = __MIG_check__Request__task_policy_get_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
2588 if (check_result != MACH_MSG_SUCCESS)
2589 { MIG_RETURN_ERROR(OutKP, check_result); }
2590#endif /* defined(__MIG_check__Request__task_policy_get_t__defined) */
2591
2592 task = convert_port_to_task_policy_get_mig(port: InKP->Head.msgh_request_port);
2593
2594 OutUP->policy_infoCnt = 16;
2595 if (In0UP->policy_infoCnt < OutUP->policy_infoCnt)
2596 OutUP->policy_infoCnt = In0UP->policy_infoCnt;
2597
2598 OutUP->RetCode = task_policy_get(task, flavor: In0UP->flavor, policy_info: OutUP->policy_info, policy_infoCnt: &OutUP->policy_infoCnt, get_default: &In0UP->get_default);
2599 task_policy_get_deallocate_mig(task_policy_get: task);
2600 if (OutUP->RetCode != KERN_SUCCESS) {
2601 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
2602 }
2603#if __MigKernelSpecificCode
2604#endif /* __MigKernelSpecificCode */
2605
2606 OutUP->NDR = NDR_record;
2607
2608 msgh_size_delta = ((4 * OutUP->policy_infoCnt));
2609 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 64) + msgh_size_delta;
2610 OutUP = (ReplyU *) ((pointer_t) OutUP + msgh_size_delta - 64);
2611
2612 OutUP->get_default = In0UP->get_default;
2613
2614 __AfterRcvRpc(3421, "task_policy_get")
2615}
2616
2617#if ( __MigTypeCheck )
2618#if __MIG_check__Request__task_subsystem__
2619#if !defined(__MIG_check__Request__task_get_state_t__defined)
2620#define __MIG_check__Request__task_get_state_t__defined
2621
2622mig_internal kern_return_t __MIG_check__Request__task_get_state_t(
2623 __attribute__((__unused__)) __RequestKData__task_get_state_t *InKP,
2624 __attribute__((__unused__)) __RequestUData__task_get_state_t *In0UP,
2625 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2626{
2627
2628 typedef __Request__task_get_state_t __Request;
2629 typedef __RequestUData__task_get_state_t __RequestU __attribute__((unused));
2630#if __MigTypeCheck
2631 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2632 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2633 return MIG_BAD_ARGUMENTS;
2634#endif /* __MigTypeCheck */
2635
2636 return MACH_MSG_SUCCESS;
2637}
2638#endif /* !defined(__MIG_check__Request__task_get_state_t__defined) */
2639#endif /* __MIG_check__Request__task_subsystem__ */
2640#endif /* ( __MigTypeCheck ) */
2641
2642
2643/* Routine task_get_state */
2644mig_internal novalue _Xtask_get_state
2645 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2646 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2647 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2648{
2649
2650#ifdef __MigPackStructs
2651#pragma pack(push, 4)
2652#endif
2653 typedef struct {
2654 NDR_record_t NDR;
2655 thread_state_flavor_t flavor;
2656 mach_msg_type_number_t old_stateCnt;
2657 mach_msg_trailer_t trailer;
2658 char padding[0]; /* Avoid generating empty UData structs */
2659 } RequestU __attribute__((unused));
2660#ifdef __MigPackStructs
2661#pragma pack(pop)
2662#endif
2663 typedef __RequestKData__task_get_state_t RequestK;
2664 typedef __RequestUData__task_get_state_t __RequestU;
2665 typedef __ReplyKData__task_get_state_t ReplyK __attribute__((unused));
2666 typedef __ReplyUData__task_get_state_t ReplyU __attribute__((unused));
2667 typedef __Reply__task_get_state_t Reply __attribute__((unused));
2668 typedef __Request__task_get_state_t __Request __attribute__((unused));
2669
2670 /*
2671 * typedef struct {
2672 * mach_msg_header_t Head;
2673 * NDR_record_t NDR;
2674 * kern_return_t RetCode;
2675 * } mig_reply_error_t;
2676 */
2677
2678 RequestK *InKP = (RequestK *) InHeadP;
2679 RequestU *In0UP = (RequestU *) InDataP;
2680 ReplyK *OutKP = (ReplyK *) OutHeadP;
2681 ReplyU *OutUP = (ReplyU *) OutDataP;
2682 (void)OutUP;
2683#ifdef __MIG_check__Request__task_get_state_t__defined
2684 kern_return_t check_result;
2685#endif /* __MIG_check__Request__task_get_state_t__defined */
2686
2687#if __MigKernelSpecificCode
2688#else
2689#endif /* __MigKernelSpecificCode */
2690 task_read_t task;
2691
2692 __DeclareRcvRpc(3433, "task_get_state")
2693 __BeforeRcvRpc(3433, "task_get_state")
2694
2695#if defined(__MIG_check__Request__task_get_state_t__defined)
2696 check_result = __MIG_check__Request__task_get_state_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
2697 if (check_result != MACH_MSG_SUCCESS)
2698 { MIG_RETURN_ERROR(OutKP, check_result); }
2699#endif /* defined(__MIG_check__Request__task_get_state_t__defined) */
2700
2701 task = convert_port_to_task_read_mig(port: InKP->Head.msgh_request_port);
2702
2703 OutUP->old_stateCnt = 1296;
2704 if (In0UP->old_stateCnt < OutUP->old_stateCnt)
2705 OutUP->old_stateCnt = In0UP->old_stateCnt;
2706
2707 OutUP->RetCode = task_get_state(task, flavor: In0UP->flavor, old_state: OutUP->old_state, old_stateCnt: &OutUP->old_stateCnt);
2708 task_read_deallocate_mig(task_read: task);
2709 if (OutUP->RetCode != KERN_SUCCESS) {
2710 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
2711 }
2712#if __MigKernelSpecificCode
2713#endif /* __MigKernelSpecificCode */
2714
2715 OutUP->NDR = NDR_record;
2716
2717 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 5184) + (((4 * OutUP->old_stateCnt)));
2718
2719 __AfterRcvRpc(3433, "task_get_state")
2720}
2721
2722#if ( __MigTypeCheck )
2723#if __MIG_check__Request__task_subsystem__
2724#if !defined(__MIG_check__Request__task_set_state_t__defined)
2725#define __MIG_check__Request__task_set_state_t__defined
2726
2727mig_internal kern_return_t __MIG_check__Request__task_set_state_t(
2728 __attribute__((__unused__)) __RequestKData__task_set_state_t *InKP,
2729 __attribute__((__unused__)) __RequestUData__task_set_state_t *In0UP,
2730 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2731{
2732
2733 typedef __Request__task_set_state_t __Request;
2734 typedef __RequestUData__task_set_state_t __RequestU __attribute__((unused));
2735#if __MigTypeCheck
2736 unsigned int msgh_size;
2737#endif /* __MigTypeCheck */
2738
2739#if __MigTypeCheck
2740 msgh_size = InKP->Head.msgh_size;
2741 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2742 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 5184)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
2743 return MIG_BAD_ARGUMENTS;
2744#endif /* __MigTypeCheck */
2745
2746#if defined(__NDR_convert__int_rep__Request__task_set_state_t__new_stateCnt__defined)
2747 if (In0UP->NDR.int_rep != NDR_record.int_rep)
2748 __NDR_convert__int_rep__Request__task_set_state_t__new_stateCnt(&In0UP->new_stateCnt, In0UP->NDR.int_rep);
2749#endif /* __NDR_convert__int_rep__Request__task_set_state_t__new_stateCnt__defined */
2750#if __MigTypeCheck
2751 if (In0UP->new_stateCnt > 1296)
2752 return MIG_BAD_ARGUMENTS;
2753 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 5184)) / 4 < In0UP->new_stateCnt) ||
2754 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 5184) + (4 * In0UP->new_stateCnt)))
2755 return MIG_BAD_ARGUMENTS;
2756#endif /* __MigTypeCheck */
2757
2758 return MACH_MSG_SUCCESS;
2759}
2760#endif /* !defined(__MIG_check__Request__task_set_state_t__defined) */
2761#endif /* __MIG_check__Request__task_subsystem__ */
2762#endif /* ( __MigTypeCheck ) */
2763
2764
2765/* Routine task_set_state */
2766mig_internal novalue _Xtask_set_state
2767 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2768 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2769 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2770{
2771
2772#ifdef __MigPackStructs
2773#pragma pack(push, 4)
2774#endif
2775 typedef struct {
2776 NDR_record_t NDR;
2777 thread_state_flavor_t flavor;
2778 mach_msg_type_number_t new_stateCnt;
2779 natural_t new_state[1296];
2780 mach_msg_trailer_t trailer;
2781 char padding[0]; /* Avoid generating empty UData structs */
2782 } RequestU __attribute__((unused));
2783#ifdef __MigPackStructs
2784#pragma pack(pop)
2785#endif
2786 typedef __RequestKData__task_set_state_t RequestK;
2787 typedef __RequestUData__task_set_state_t __RequestU;
2788 typedef __ReplyKData__task_set_state_t ReplyK __attribute__((unused));
2789 typedef __ReplyUData__task_set_state_t ReplyU __attribute__((unused));
2790 typedef __Reply__task_set_state_t Reply __attribute__((unused));
2791 typedef __Request__task_set_state_t __Request __attribute__((unused));
2792
2793 /*
2794 * typedef struct {
2795 * mach_msg_header_t Head;
2796 * NDR_record_t NDR;
2797 * kern_return_t RetCode;
2798 * } mig_reply_error_t;
2799 */
2800
2801 RequestK *InKP = (RequestK *) InHeadP;
2802 RequestU *In0UP = (RequestU *) InDataP;
2803 ReplyK *OutKP = (ReplyK *) OutHeadP;
2804 ReplyU *OutUP = (ReplyU *) OutDataP;
2805 (void)OutUP;
2806#ifdef __MIG_check__Request__task_set_state_t__defined
2807 kern_return_t check_result;
2808#endif /* __MIG_check__Request__task_set_state_t__defined */
2809
2810#if __MigKernelSpecificCode
2811#else
2812#endif /* __MigKernelSpecificCode */
2813 task_t task;
2814
2815 __DeclareRcvRpc(3434, "task_set_state")
2816 __BeforeRcvRpc(3434, "task_set_state")
2817
2818#if defined(__MIG_check__Request__task_set_state_t__defined)
2819 check_result = __MIG_check__Request__task_set_state_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
2820 if (check_result != MACH_MSG_SUCCESS)
2821 { MIG_RETURN_ERROR(OutKP, check_result); }
2822#endif /* defined(__MIG_check__Request__task_set_state_t__defined) */
2823
2824 task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
2825
2826 OutUP->RetCode = task_set_state(task, flavor: In0UP->flavor, new_state: In0UP->new_state, new_stateCnt: In0UP->new_stateCnt);
2827 task_deallocate_mig(task);
2828#if __MigKernelSpecificCode
2829#endif /* __MigKernelSpecificCode */
2830
2831 OutUP->NDR = NDR_record;
2832
2833
2834 __AfterRcvRpc(3434, "task_set_state")
2835}
2836
2837#if ( __MigTypeCheck )
2838#if __MIG_check__Request__task_subsystem__
2839#if !defined(__MIG_check__Request__task_set_phys_footprint_limit_t__defined)
2840#define __MIG_check__Request__task_set_phys_footprint_limit_t__defined
2841
2842mig_internal kern_return_t __MIG_check__Request__task_set_phys_footprint_limit_t(
2843 __attribute__((__unused__)) __RequestKData__task_set_phys_footprint_limit_t *InKP,
2844 __attribute__((__unused__)) __RequestUData__task_set_phys_footprint_limit_t *In0UP,
2845 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2846{
2847
2848 typedef __Request__task_set_phys_footprint_limit_t __Request;
2849 typedef __RequestUData__task_set_phys_footprint_limit_t __RequestU __attribute__((unused));
2850#if __MigTypeCheck
2851 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2852 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2853 return MIG_BAD_ARGUMENTS;
2854#endif /* __MigTypeCheck */
2855
2856 return MACH_MSG_SUCCESS;
2857}
2858#endif /* !defined(__MIG_check__Request__task_set_phys_footprint_limit_t__defined) */
2859#endif /* __MIG_check__Request__task_subsystem__ */
2860#endif /* ( __MigTypeCheck ) */
2861
2862
2863/* Routine task_set_phys_footprint_limit */
2864mig_internal novalue _Xtask_set_phys_footprint_limit
2865 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2866 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2867 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2868{
2869
2870#ifdef __MigPackStructs
2871#pragma pack(push, 4)
2872#endif
2873 typedef struct {
2874 NDR_record_t NDR;
2875 int new_limit;
2876 mach_msg_trailer_t trailer;
2877 char padding[0]; /* Avoid generating empty UData structs */
2878 } RequestU __attribute__((unused));
2879#ifdef __MigPackStructs
2880#pragma pack(pop)
2881#endif
2882 typedef __RequestKData__task_set_phys_footprint_limit_t RequestK;
2883 typedef __RequestUData__task_set_phys_footprint_limit_t __RequestU;
2884 typedef __ReplyKData__task_set_phys_footprint_limit_t ReplyK __attribute__((unused));
2885 typedef __ReplyUData__task_set_phys_footprint_limit_t ReplyU __attribute__((unused));
2886 typedef __Reply__task_set_phys_footprint_limit_t Reply __attribute__((unused));
2887 typedef __Request__task_set_phys_footprint_limit_t __Request __attribute__((unused));
2888
2889 /*
2890 * typedef struct {
2891 * mach_msg_header_t Head;
2892 * NDR_record_t NDR;
2893 * kern_return_t RetCode;
2894 * } mig_reply_error_t;
2895 */
2896
2897 RequestK *InKP = (RequestK *) InHeadP;
2898 RequestU *In0UP = (RequestU *) InDataP;
2899 ReplyK *OutKP = (ReplyK *) OutHeadP;
2900 ReplyU *OutUP = (ReplyU *) OutDataP;
2901 (void)OutUP;
2902#ifdef __MIG_check__Request__task_set_phys_footprint_limit_t__defined
2903 kern_return_t check_result;
2904#endif /* __MIG_check__Request__task_set_phys_footprint_limit_t__defined */
2905
2906#if __MigKernelSpecificCode
2907#else
2908#endif /* __MigKernelSpecificCode */
2909 task_t task;
2910
2911 __DeclareRcvRpc(3435, "task_set_phys_footprint_limit")
2912 __BeforeRcvRpc(3435, "task_set_phys_footprint_limit")
2913
2914#if defined(__MIG_check__Request__task_set_phys_footprint_limit_t__defined)
2915 check_result = __MIG_check__Request__task_set_phys_footprint_limit_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
2916 if (check_result != MACH_MSG_SUCCESS)
2917 { MIG_RETURN_ERROR(OutKP, check_result); }
2918#endif /* defined(__MIG_check__Request__task_set_phys_footprint_limit_t__defined) */
2919
2920 task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
2921
2922 OutUP->RetCode = task_set_phys_footprint_limit(task, new_limit: In0UP->new_limit, old_limit: &OutUP->old_limit);
2923 task_deallocate_mig(task);
2924 if (OutUP->RetCode != KERN_SUCCESS) {
2925 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
2926 }
2927#if __MigKernelSpecificCode
2928#endif /* __MigKernelSpecificCode */
2929
2930 OutUP->NDR = NDR_record;
2931
2932
2933 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
2934 __AfterRcvRpc(3435, "task_set_phys_footprint_limit")
2935}
2936
2937#if ( __MigTypeCheck )
2938#if __MIG_check__Request__task_subsystem__
2939#if !defined(__MIG_check__Request__task_suspend2_mig_t__defined)
2940#define __MIG_check__Request__task_suspend2_mig_t__defined
2941
2942mig_internal kern_return_t __MIG_check__Request__task_suspend2_mig_t(
2943 __attribute__((__unused__)) __RequestKData__task_suspend2_mig_t *InKP,
2944 __attribute__((__unused__)) __RequestUData__task_suspend2_mig_t *In0UP,
2945 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2946{
2947
2948 typedef __Request__task_suspend2_mig_t __Request;
2949 typedef __RequestUData__task_suspend2_mig_t __RequestU __attribute__((unused));
2950#if __MigTypeCheck
2951 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2952 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2953 return MIG_BAD_ARGUMENTS;
2954#endif /* __MigTypeCheck */
2955
2956 return MACH_MSG_SUCCESS;
2957}
2958#endif /* !defined(__MIG_check__Request__task_suspend2_mig_t__defined) */
2959#endif /* __MIG_check__Request__task_subsystem__ */
2960#endif /* ( __MigTypeCheck ) */
2961
2962
2963/* Routine task_suspend2_mig */
2964mig_internal novalue _Xtask_suspend2_mig
2965 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2966 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2967 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2968{
2969
2970#ifdef __MigPackStructs
2971#pragma pack(push, 4)
2972#endif
2973 typedef struct {
2974 mach_msg_trailer_t trailer;
2975 char padding[0]; /* Avoid generating empty UData structs */
2976 } RequestU __attribute__((unused));
2977#ifdef __MigPackStructs
2978#pragma pack(pop)
2979#endif
2980 typedef __RequestKData__task_suspend2_mig_t RequestK;
2981 typedef __RequestUData__task_suspend2_mig_t __RequestU;
2982 typedef __ReplyKData__task_suspend2_mig_t ReplyK __attribute__((unused));
2983 typedef __ReplyUData__task_suspend2_mig_t ReplyU __attribute__((unused));
2984 typedef __Reply__task_suspend2_mig_t Reply __attribute__((unused));
2985 typedef __Request__task_suspend2_mig_t __Request __attribute__((unused));
2986
2987 /*
2988 * typedef struct {
2989 * mach_msg_header_t Head;
2990 * NDR_record_t NDR;
2991 * kern_return_t RetCode;
2992 * } mig_reply_error_t;
2993 */
2994
2995 RequestK *InKP = (RequestK *) InHeadP;
2996 RequestU *In0UP = (RequestU *) InDataP;
2997 ReplyK *OutKP = (ReplyK *) OutHeadP;
2998 ReplyU *OutUP = (ReplyU *) OutDataP;
2999 (void)OutUP;
3000#ifdef __MIG_check__Request__task_suspend2_mig_t__defined
3001 kern_return_t check_result;
3002#endif /* __MIG_check__Request__task_suspend2_mig_t__defined */
3003
3004#if __MigKernelSpecificCode
3005#if UseStaticTemplates
3006 const static mach_msg_port_descriptor_t suspend_tokenTemplate = {
3007 /* name = */ MACH_PORT_NULL,
3008 /* pad1 = */ 0,
3009 /* pad2 = */ 0,
3010 /* disp = */ 18,
3011 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
3012 };
3013#endif /* UseStaticTemplates */
3014
3015#else
3016#if UseStaticTemplates
3017 const static mach_msg_port_descriptor_t suspend_tokenTemplate = {
3018 /* name = */ MACH_PORT_NULL,
3019 /* pad1 = */ 0,
3020 /* pad2 = */ 0,
3021 /* disp = */ 18,
3022 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
3023 };
3024#endif /* UseStaticTemplates */
3025
3026#endif /* __MigKernelSpecificCode */
3027 kern_return_t RetCode;
3028 task_read_t target_task;
3029 task_suspension_token_t suspend_token;
3030
3031 __DeclareRcvRpc(3436, "task_suspend2_mig")
3032 __BeforeRcvRpc(3436, "task_suspend2_mig")
3033
3034#if defined(__MIG_check__Request__task_suspend2_mig_t__defined)
3035 check_result = __MIG_check__Request__task_suspend2_mig_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
3036 if (check_result != MACH_MSG_SUCCESS)
3037 { MIG_RETURN_ERROR(OutKP, check_result); }
3038#endif /* defined(__MIG_check__Request__task_suspend2_mig_t__defined) */
3039
3040#if UseStaticTemplates
3041 OutKP->suspend_token = suspend_tokenTemplate;
3042#else /* UseStaticTemplates */
3043#if __MigKernelSpecificCode
3044 OutKP->suspend_token.disposition = 18;
3045#else
3046 OutKP->suspend_token.disposition = 18;
3047#endif /* __MigKernelSpecificCode */
3048#if !(defined(KERNEL) && defined(__LP64__))
3049 OutKP->suspend_token.pad1 = 0;
3050#endif
3051 OutKP->suspend_token.pad2 = 0;
3052 OutKP->suspend_token.type = MACH_MSG_PORT_DESCRIPTOR;
3053#if defined(KERNEL)
3054 OutKP->suspend_token.pad_end = 0;
3055#endif
3056#endif /* UseStaticTemplates */
3057
3058
3059 target_task = convert_port_to_task_read_mig(port: InKP->Head.msgh_request_port);
3060
3061 RetCode = task_suspend2_mig(target_task, suspend_token: &suspend_token);
3062 task_read_deallocate_mig(task_read: target_task);
3063 if (RetCode != KERN_SUCCESS) {
3064 MIG_RETURN_ERROR(OutKP, RetCode);
3065 }
3066#if __MigKernelSpecificCode
3067#endif /* __MigKernelSpecificCode */
3068 OutKP->suspend_token.name = (mach_port_t)convert_task_suspension_token_to_port_mig(task: suspend_token);
3069
3070
3071 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
3072 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
3073 OutKP->msgh_body.msgh_descriptor_count = 1;
3074 __AfterRcvRpc(3436, "task_suspend2_mig")
3075}
3076
3077#if ( __MigTypeCheck )
3078#if __MIG_check__Request__task_subsystem__
3079#if !defined(__MIG_check__Request__task_resume2_mig_t__defined)
3080#define __MIG_check__Request__task_resume2_mig_t__defined
3081
3082mig_internal kern_return_t __MIG_check__Request__task_resume2_mig_t(
3083 __attribute__((__unused__)) __RequestKData__task_resume2_mig_t *InKP,
3084 __attribute__((__unused__)) __RequestUData__task_resume2_mig_t *In0UP,
3085 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
3086{
3087
3088 typedef __Request__task_resume2_mig_t __Request;
3089 typedef __RequestUData__task_resume2_mig_t __RequestU __attribute__((unused));
3090#if __MigTypeCheck
3091 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3092 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
3093 return MIG_BAD_ARGUMENTS;
3094#endif /* __MigTypeCheck */
3095
3096 return MACH_MSG_SUCCESS;
3097}
3098#endif /* !defined(__MIG_check__Request__task_resume2_mig_t__defined) */
3099#endif /* __MIG_check__Request__task_subsystem__ */
3100#endif /* ( __MigTypeCheck ) */
3101
3102
3103/* Routine task_resume2_mig */
3104mig_internal novalue _Xtask_resume2_mig
3105 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3106 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3107 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3108{
3109
3110#ifdef __MigPackStructs
3111#pragma pack(push, 4)
3112#endif
3113 typedef struct {
3114 mach_msg_trailer_t trailer;
3115 char padding[0]; /* Avoid generating empty UData structs */
3116 } RequestU __attribute__((unused));
3117#ifdef __MigPackStructs
3118#pragma pack(pop)
3119#endif
3120 typedef __RequestKData__task_resume2_mig_t RequestK;
3121 typedef __RequestUData__task_resume2_mig_t __RequestU;
3122 typedef __ReplyKData__task_resume2_mig_t ReplyK __attribute__((unused));
3123 typedef __ReplyUData__task_resume2_mig_t ReplyU __attribute__((unused));
3124 typedef __Reply__task_resume2_mig_t Reply __attribute__((unused));
3125 typedef __Request__task_resume2_mig_t __Request __attribute__((unused));
3126
3127 /*
3128 * typedef struct {
3129 * mach_msg_header_t Head;
3130 * NDR_record_t NDR;
3131 * kern_return_t RetCode;
3132 * } mig_reply_error_t;
3133 */
3134
3135 RequestK *InKP = (RequestK *) InHeadP;
3136 RequestU *In0UP = (RequestU *) InDataP;
3137 ReplyK *OutKP = (ReplyK *) OutHeadP;
3138 ReplyU *OutUP = (ReplyU *) OutDataP;
3139 (void)OutUP;
3140#ifdef __MIG_check__Request__task_resume2_mig_t__defined
3141 kern_return_t check_result;
3142#endif /* __MIG_check__Request__task_resume2_mig_t__defined */
3143
3144#if __MigKernelSpecificCode
3145#else
3146#endif /* __MigKernelSpecificCode */
3147 __DeclareRcvRpc(3437, "task_resume2_mig")
3148 __BeforeRcvRpc(3437, "task_resume2_mig")
3149
3150#if defined(__MIG_check__Request__task_resume2_mig_t__defined)
3151 check_result = __MIG_check__Request__task_resume2_mig_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
3152 if (check_result != MACH_MSG_SUCCESS)
3153 { MIG_RETURN_ERROR(OutKP, check_result); }
3154#endif /* defined(__MIG_check__Request__task_resume2_mig_t__defined) */
3155
3156 OutUP->RetCode = task_resume2_mig(suspend_token: convert_port_to_task_suspension_token_mig(port: InKP->Head.msgh_request_port));
3157#if __MigKernelSpecificCode
3158#endif /* __MigKernelSpecificCode */
3159
3160 OutUP->NDR = NDR_record;
3161
3162
3163 __AfterRcvRpc(3437, "task_resume2_mig")
3164}
3165
3166#if ( __MigTypeCheck )
3167#if __MIG_check__Request__task_subsystem__
3168#if !defined(__MIG_check__Request__task_purgable_info_t__defined)
3169#define __MIG_check__Request__task_purgable_info_t__defined
3170
3171mig_internal kern_return_t __MIG_check__Request__task_purgable_info_t(
3172 __attribute__((__unused__)) __RequestKData__task_purgable_info_t *InKP,
3173 __attribute__((__unused__)) __RequestUData__task_purgable_info_t *In0UP,
3174 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
3175{
3176
3177 typedef __Request__task_purgable_info_t __Request;
3178 typedef __RequestUData__task_purgable_info_t __RequestU __attribute__((unused));
3179#if __MigTypeCheck
3180 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3181 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
3182 return MIG_BAD_ARGUMENTS;
3183#endif /* __MigTypeCheck */
3184
3185 return MACH_MSG_SUCCESS;
3186}
3187#endif /* !defined(__MIG_check__Request__task_purgable_info_t__defined) */
3188#endif /* __MIG_check__Request__task_subsystem__ */
3189#endif /* ( __MigTypeCheck ) */
3190
3191
3192/* Routine task_purgable_info */
3193mig_internal novalue _Xtask_purgable_info
3194 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3195 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3196 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3197{
3198
3199#ifdef __MigPackStructs
3200#pragma pack(push, 4)
3201#endif
3202 typedef struct {
3203 mach_msg_trailer_t trailer;
3204 char padding[0]; /* Avoid generating empty UData structs */
3205 } RequestU __attribute__((unused));
3206#ifdef __MigPackStructs
3207#pragma pack(pop)
3208#endif
3209 typedef __RequestKData__task_purgable_info_t RequestK;
3210 typedef __RequestUData__task_purgable_info_t __RequestU;
3211 typedef __ReplyKData__task_purgable_info_t ReplyK __attribute__((unused));
3212 typedef __ReplyUData__task_purgable_info_t ReplyU __attribute__((unused));
3213 typedef __Reply__task_purgable_info_t Reply __attribute__((unused));
3214 typedef __Request__task_purgable_info_t __Request __attribute__((unused));
3215
3216 /*
3217 * typedef struct {
3218 * mach_msg_header_t Head;
3219 * NDR_record_t NDR;
3220 * kern_return_t RetCode;
3221 * } mig_reply_error_t;
3222 */
3223
3224 RequestK *InKP = (RequestK *) InHeadP;
3225 RequestU *In0UP = (RequestU *) InDataP;
3226 ReplyK *OutKP = (ReplyK *) OutHeadP;
3227 ReplyU *OutUP = (ReplyU *) OutDataP;
3228 (void)OutUP;
3229#ifdef __MIG_check__Request__task_purgable_info_t__defined
3230 kern_return_t check_result;
3231#endif /* __MIG_check__Request__task_purgable_info_t__defined */
3232
3233#if __MigKernelSpecificCode
3234#else
3235#endif /* __MigKernelSpecificCode */
3236 task_inspect_t task;
3237
3238 __DeclareRcvRpc(3438, "task_purgable_info")
3239 __BeforeRcvRpc(3438, "task_purgable_info")
3240
3241#if defined(__MIG_check__Request__task_purgable_info_t__defined)
3242 check_result = __MIG_check__Request__task_purgable_info_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
3243 if (check_result != MACH_MSG_SUCCESS)
3244 { MIG_RETURN_ERROR(OutKP, check_result); }
3245#endif /* defined(__MIG_check__Request__task_purgable_info_t__defined) */
3246
3247 task = convert_port_to_task_inspect_mig(port: InKP->Head.msgh_request_port);
3248
3249 OutUP->RetCode = task_purgable_info(task, stats: &OutUP->stats);
3250 task_inspect_deallocate_mig(task_inspect: task);
3251 if (OutUP->RetCode != KERN_SUCCESS) {
3252 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
3253 }
3254#if __MigKernelSpecificCode
3255#endif /* __MigKernelSpecificCode */
3256
3257 OutUP->NDR = NDR_record;
3258
3259
3260 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
3261 __AfterRcvRpc(3438, "task_purgable_info")
3262}
3263
3264#if ( __MigTypeCheck )
3265#if __MIG_check__Request__task_subsystem__
3266#if !defined(__MIG_check__Request__task_get_mach_voucher_t__defined)
3267#define __MIG_check__Request__task_get_mach_voucher_t__defined
3268
3269mig_internal kern_return_t __MIG_check__Request__task_get_mach_voucher_t(
3270 __attribute__((__unused__)) __RequestKData__task_get_mach_voucher_t *InKP,
3271 __attribute__((__unused__)) __RequestUData__task_get_mach_voucher_t *In0UP,
3272 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
3273{
3274
3275 typedef __Request__task_get_mach_voucher_t __Request;
3276 typedef __RequestUData__task_get_mach_voucher_t __RequestU __attribute__((unused));
3277#if __MigTypeCheck
3278 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3279 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
3280 return MIG_BAD_ARGUMENTS;
3281#endif /* __MigTypeCheck */
3282
3283 return MACH_MSG_SUCCESS;
3284}
3285#endif /* !defined(__MIG_check__Request__task_get_mach_voucher_t__defined) */
3286#endif /* __MIG_check__Request__task_subsystem__ */
3287#endif /* ( __MigTypeCheck ) */
3288
3289
3290/* Routine task_get_mach_voucher */
3291mig_internal novalue _Xtask_get_mach_voucher
3292 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3293 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3294 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3295{
3296
3297#ifdef __MigPackStructs
3298#pragma pack(push, 4)
3299#endif
3300 typedef struct {
3301 NDR_record_t NDR;
3302 mach_voucher_selector_t which;
3303 mach_msg_trailer_t trailer;
3304 char padding[0]; /* Avoid generating empty UData structs */
3305 } RequestU __attribute__((unused));
3306#ifdef __MigPackStructs
3307#pragma pack(pop)
3308#endif
3309 typedef __RequestKData__task_get_mach_voucher_t RequestK;
3310 typedef __RequestUData__task_get_mach_voucher_t __RequestU;
3311 typedef __ReplyKData__task_get_mach_voucher_t ReplyK __attribute__((unused));
3312 typedef __ReplyUData__task_get_mach_voucher_t ReplyU __attribute__((unused));
3313 typedef __Reply__task_get_mach_voucher_t Reply __attribute__((unused));
3314 typedef __Request__task_get_mach_voucher_t __Request __attribute__((unused));
3315
3316 /*
3317 * typedef struct {
3318 * mach_msg_header_t Head;
3319 * NDR_record_t NDR;
3320 * kern_return_t RetCode;
3321 * } mig_reply_error_t;
3322 */
3323
3324 RequestK *InKP = (RequestK *) InHeadP;
3325 RequestU *In0UP = (RequestU *) InDataP;
3326 ReplyK *OutKP = (ReplyK *) OutHeadP;
3327 ReplyU *OutUP = (ReplyU *) OutDataP;
3328 (void)OutUP;
3329#ifdef __MIG_check__Request__task_get_mach_voucher_t__defined
3330 kern_return_t check_result;
3331#endif /* __MIG_check__Request__task_get_mach_voucher_t__defined */
3332
3333#if __MigKernelSpecificCode
3334#if UseStaticTemplates
3335 const static mach_msg_port_descriptor_t voucherTemplate = {
3336 /* name = */ MACH_PORT_NULL,
3337 /* pad1 = */ 0,
3338 /* pad2 = */ 0,
3339 /* disp = */ 17,
3340 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
3341 };
3342#endif /* UseStaticTemplates */
3343
3344#else
3345#if UseStaticTemplates
3346 const static mach_msg_port_descriptor_t voucherTemplate = {
3347 /* name = */ MACH_PORT_NULL,
3348 /* pad1 = */ 0,
3349 /* pad2 = */ 0,
3350 /* disp = */ 19,
3351 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
3352 };
3353#endif /* UseStaticTemplates */
3354
3355#endif /* __MigKernelSpecificCode */
3356 kern_return_t RetCode;
3357 task_read_t task;
3358 ipc_voucher_t voucher;
3359
3360 __DeclareRcvRpc(3439, "task_get_mach_voucher")
3361 __BeforeRcvRpc(3439, "task_get_mach_voucher")
3362
3363#if defined(__MIG_check__Request__task_get_mach_voucher_t__defined)
3364 check_result = __MIG_check__Request__task_get_mach_voucher_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
3365 if (check_result != MACH_MSG_SUCCESS)
3366 { MIG_RETURN_ERROR(OutKP, check_result); }
3367#endif /* defined(__MIG_check__Request__task_get_mach_voucher_t__defined) */
3368
3369#if UseStaticTemplates
3370 OutKP->voucher = voucherTemplate;
3371#else /* UseStaticTemplates */
3372#if __MigKernelSpecificCode
3373 OutKP->voucher.disposition = 17;
3374#else
3375 OutKP->voucher.disposition = 19;
3376#endif /* __MigKernelSpecificCode */
3377#if !(defined(KERNEL) && defined(__LP64__))
3378 OutKP->voucher.pad1 = 0;
3379#endif
3380 OutKP->voucher.pad2 = 0;
3381 OutKP->voucher.type = MACH_MSG_PORT_DESCRIPTOR;
3382#if defined(KERNEL)
3383 OutKP->voucher.pad_end = 0;
3384#endif
3385#endif /* UseStaticTemplates */
3386
3387
3388 task = convert_port_to_task_read_mig(port: InKP->Head.msgh_request_port);
3389
3390 RetCode = task_get_mach_voucher(task, which: In0UP->which, voucher: &voucher);
3391 task_read_deallocate_mig(task_read: task);
3392 if (RetCode != KERN_SUCCESS) {
3393 MIG_RETURN_ERROR(OutKP, RetCode);
3394 }
3395#if __MigKernelSpecificCode
3396#endif /* __MigKernelSpecificCode */
3397 OutKP->voucher.name = (mach_port_t)convert_voucher_to_port(voucher);
3398
3399
3400 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
3401 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
3402 OutKP->msgh_body.msgh_descriptor_count = 1;
3403 __AfterRcvRpc(3439, "task_get_mach_voucher")
3404}
3405
3406#if ( __MigTypeCheck )
3407#if __MIG_check__Request__task_subsystem__
3408#if !defined(__MIG_check__Request__task_set_mach_voucher_t__defined)
3409#define __MIG_check__Request__task_set_mach_voucher_t__defined
3410
3411mig_internal kern_return_t __MIG_check__Request__task_set_mach_voucher_t(
3412 __attribute__((__unused__)) __RequestKData__task_set_mach_voucher_t *InKP,
3413 __attribute__((__unused__)) __RequestUData__task_set_mach_voucher_t *In0UP,
3414 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
3415{
3416
3417 typedef __Request__task_set_mach_voucher_t __Request;
3418 typedef __RequestUData__task_set_mach_voucher_t __RequestU __attribute__((unused));
3419#if __MigTypeCheck
3420 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3421 (InKP->msgh_body.msgh_descriptor_count != 1) ||
3422 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
3423 return MIG_BAD_ARGUMENTS;
3424#endif /* __MigTypeCheck */
3425
3426#if __MigTypeCheck
3427 if (InKP->voucher.type != MACH_MSG_PORT_DESCRIPTOR ||
3428 InKP->voucher.disposition != 17)
3429 return MIG_TYPE_ERROR;
3430#endif /* __MigTypeCheck */
3431
3432 return MACH_MSG_SUCCESS;
3433}
3434#endif /* !defined(__MIG_check__Request__task_set_mach_voucher_t__defined) */
3435#endif /* __MIG_check__Request__task_subsystem__ */
3436#endif /* ( __MigTypeCheck ) */
3437
3438
3439/* Routine task_set_mach_voucher */
3440mig_internal novalue _Xtask_set_mach_voucher
3441 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3442 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3443 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3444{
3445
3446#ifdef __MigPackStructs
3447#pragma pack(push, 4)
3448#endif
3449 typedef struct {
3450 mach_msg_trailer_t trailer;
3451 char padding[0]; /* Avoid generating empty UData structs */
3452 } RequestU __attribute__((unused));
3453#ifdef __MigPackStructs
3454#pragma pack(pop)
3455#endif
3456 typedef __RequestKData__task_set_mach_voucher_t RequestK;
3457 typedef __RequestUData__task_set_mach_voucher_t __RequestU;
3458 typedef __ReplyKData__task_set_mach_voucher_t ReplyK __attribute__((unused));
3459 typedef __ReplyUData__task_set_mach_voucher_t ReplyU __attribute__((unused));
3460 typedef __Reply__task_set_mach_voucher_t Reply __attribute__((unused));
3461 typedef __Request__task_set_mach_voucher_t __Request __attribute__((unused));
3462
3463 /*
3464 * typedef struct {
3465 * mach_msg_header_t Head;
3466 * NDR_record_t NDR;
3467 * kern_return_t RetCode;
3468 * } mig_reply_error_t;
3469 */
3470
3471 RequestK *InKP = (RequestK *) InHeadP;
3472 RequestU *In0UP = (RequestU *) InDataP;
3473 ReplyK *OutKP = (ReplyK *) OutHeadP;
3474 ReplyU *OutUP = (ReplyU *) OutDataP;
3475 (void)OutUP;
3476#ifdef __MIG_check__Request__task_set_mach_voucher_t__defined
3477 kern_return_t check_result;
3478#endif /* __MIG_check__Request__task_set_mach_voucher_t__defined */
3479
3480#if __MigKernelSpecificCode
3481#else
3482#endif /* __MigKernelSpecificCode */
3483 task_t task;
3484 ipc_voucher_t voucher;
3485
3486 __DeclareRcvRpc(3440, "task_set_mach_voucher")
3487 __BeforeRcvRpc(3440, "task_set_mach_voucher")
3488
3489#if defined(__MIG_check__Request__task_set_mach_voucher_t__defined)
3490 check_result = __MIG_check__Request__task_set_mach_voucher_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
3491 if (check_result != MACH_MSG_SUCCESS)
3492 { MIG_RETURN_ERROR(OutKP, check_result); }
3493#endif /* defined(__MIG_check__Request__task_set_mach_voucher_t__defined) */
3494
3495 task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
3496
3497 voucher = convert_port_to_voucher(port: InKP->voucher.name);
3498
3499 OutUP->RetCode = task_set_mach_voucher(task, voucher);
3500 ipc_voucher_release(voucher);
3501 task_deallocate_mig(task);
3502#if __MigKernelSpecificCode
3503 if (OutUP->RetCode != KERN_SUCCESS) {
3504 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
3505 }
3506 ipc_port_release_send(port: (ipc_port_t)InKP->voucher.name);
3507#endif /* __MigKernelSpecificCode */
3508
3509 OutUP->NDR = NDR_record;
3510
3511
3512 __AfterRcvRpc(3440, "task_set_mach_voucher")
3513}
3514
3515#if ( __MigTypeCheck )
3516#if __MIG_check__Request__task_subsystem__
3517#if !defined(__MIG_check__Request__task_swap_mach_voucher_t__defined)
3518#define __MIG_check__Request__task_swap_mach_voucher_t__defined
3519
3520mig_internal kern_return_t __MIG_check__Request__task_swap_mach_voucher_t(
3521 __attribute__((__unused__)) __RequestKData__task_swap_mach_voucher_t *InKP,
3522 __attribute__((__unused__)) __RequestUData__task_swap_mach_voucher_t *In0UP,
3523 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
3524{
3525
3526 typedef __Request__task_swap_mach_voucher_t __Request;
3527 typedef __RequestUData__task_swap_mach_voucher_t __RequestU __attribute__((unused));
3528#if __MigTypeCheck
3529 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3530 (InKP->msgh_body.msgh_descriptor_count != 2) ||
3531 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
3532 return MIG_BAD_ARGUMENTS;
3533#endif /* __MigTypeCheck */
3534
3535#if __MigTypeCheck
3536 if (InKP->new_voucher.type != MACH_MSG_PORT_DESCRIPTOR ||
3537 InKP->new_voucher.disposition != 17)
3538 return MIG_TYPE_ERROR;
3539#endif /* __MigTypeCheck */
3540
3541#if __MigTypeCheck
3542 if (InKP->old_voucher.type != MACH_MSG_PORT_DESCRIPTOR ||
3543 InKP->old_voucher.disposition != 17)
3544 return MIG_TYPE_ERROR;
3545#endif /* __MigTypeCheck */
3546
3547 return MACH_MSG_SUCCESS;
3548}
3549#endif /* !defined(__MIG_check__Request__task_swap_mach_voucher_t__defined) */
3550#endif /* __MIG_check__Request__task_subsystem__ */
3551#endif /* ( __MigTypeCheck ) */
3552
3553
3554/* Routine task_swap_mach_voucher */
3555mig_internal novalue _Xtask_swap_mach_voucher
3556 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3557 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3558 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3559{
3560
3561#ifdef __MigPackStructs
3562#pragma pack(push, 4)
3563#endif
3564 typedef struct {
3565 mach_msg_trailer_t trailer;
3566 char padding[0]; /* Avoid generating empty UData structs */
3567 } RequestU __attribute__((unused));
3568#ifdef __MigPackStructs
3569#pragma pack(pop)
3570#endif
3571 typedef __RequestKData__task_swap_mach_voucher_t RequestK;
3572 typedef __RequestUData__task_swap_mach_voucher_t __RequestU;
3573 typedef __ReplyKData__task_swap_mach_voucher_t ReplyK __attribute__((unused));
3574 typedef __ReplyUData__task_swap_mach_voucher_t ReplyU __attribute__((unused));
3575 typedef __Reply__task_swap_mach_voucher_t Reply __attribute__((unused));
3576 typedef __Request__task_swap_mach_voucher_t __Request __attribute__((unused));
3577
3578 /*
3579 * typedef struct {
3580 * mach_msg_header_t Head;
3581 * NDR_record_t NDR;
3582 * kern_return_t RetCode;
3583 * } mig_reply_error_t;
3584 */
3585
3586 RequestK *InKP = (RequestK *) InHeadP;
3587 RequestU *In0UP = (RequestU *) InDataP;
3588 ReplyK *OutKP = (ReplyK *) OutHeadP;
3589 ReplyU *OutUP = (ReplyU *) OutDataP;
3590 (void)OutUP;
3591#ifdef __MIG_check__Request__task_swap_mach_voucher_t__defined
3592 kern_return_t check_result;
3593#endif /* __MIG_check__Request__task_swap_mach_voucher_t__defined */
3594
3595#if __MigKernelSpecificCode
3596#if UseStaticTemplates
3597 const static mach_msg_port_descriptor_t old_voucherTemplate = {
3598 /* name = */ MACH_PORT_NULL,
3599 /* pad1 = */ 0,
3600 /* pad2 = */ 0,
3601 /* disp = */ 17,
3602 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
3603 };
3604#endif /* UseStaticTemplates */
3605
3606#else
3607#if UseStaticTemplates
3608 const static mach_msg_port_descriptor_t old_voucherTemplate = {
3609 /* name = */ MACH_PORT_NULL,
3610 /* pad1 = */ 0,
3611 /* pad2 = */ 0,
3612 /* disp = */ 19,
3613 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
3614 };
3615#endif /* UseStaticTemplates */
3616
3617#endif /* __MigKernelSpecificCode */
3618 kern_return_t RetCode;
3619 task_t task;
3620 ipc_voucher_t new_voucher;
3621 ipc_voucher_t old_voucher;
3622
3623 __DeclareRcvRpc(3441, "task_swap_mach_voucher")
3624 __BeforeRcvRpc(3441, "task_swap_mach_voucher")
3625
3626#if defined(__MIG_check__Request__task_swap_mach_voucher_t__defined)
3627 check_result = __MIG_check__Request__task_swap_mach_voucher_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
3628 if (check_result != MACH_MSG_SUCCESS)
3629 { MIG_RETURN_ERROR(OutKP, check_result); }
3630#endif /* defined(__MIG_check__Request__task_swap_mach_voucher_t__defined) */
3631
3632#if UseStaticTemplates
3633 OutKP->old_voucher = old_voucherTemplate;
3634#else /* UseStaticTemplates */
3635#if __MigKernelSpecificCode
3636 OutKP->old_voucher.disposition = 17;
3637#else
3638 OutKP->old_voucher.disposition = 19;
3639#endif /* __MigKernelSpecificCode */
3640#if !(defined(KERNEL) && defined(__LP64__))
3641 OutKP->old_voucher.pad1 = 0;
3642#endif
3643 OutKP->old_voucher.pad2 = 0;
3644 OutKP->old_voucher.type = MACH_MSG_PORT_DESCRIPTOR;
3645#if defined(KERNEL)
3646 OutKP->old_voucher.pad_end = 0;
3647#endif
3648#endif /* UseStaticTemplates */
3649
3650
3651 task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
3652
3653 new_voucher = convert_port_to_voucher(port: InKP->new_voucher.name);
3654
3655 old_voucher = convert_port_to_voucher(port: InKP->old_voucher.name);
3656
3657 RetCode = task_swap_mach_voucher(task, new_voucher, old_voucher: &old_voucher);
3658 ipc_voucher_release(voucher: new_voucher);
3659 task_deallocate_mig(task);
3660 if (RetCode != KERN_SUCCESS) {
3661 MIG_RETURN_ERROR(OutKP, RetCode);
3662 }
3663#if __MigKernelSpecificCode
3664 ipc_port_release_send(port: (ipc_port_t)InKP->old_voucher.name);
3665 ipc_port_release_send(port: (ipc_port_t)InKP->new_voucher.name);
3666#endif /* __MigKernelSpecificCode */
3667 OutKP->old_voucher.name = (mach_port_t)convert_voucher_to_port(voucher: old_voucher);
3668
3669
3670 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
3671 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
3672 OutKP->msgh_body.msgh_descriptor_count = 1;
3673 __AfterRcvRpc(3441, "task_swap_mach_voucher")
3674}
3675
3676#if ( __MigTypeCheck )
3677#if __MIG_check__Request__task_subsystem__
3678#if !defined(__MIG_check__Request__task_generate_corpse_t__defined)
3679#define __MIG_check__Request__task_generate_corpse_t__defined
3680
3681mig_internal kern_return_t __MIG_check__Request__task_generate_corpse_t(
3682 __attribute__((__unused__)) __RequestKData__task_generate_corpse_t *InKP,
3683 __attribute__((__unused__)) __RequestUData__task_generate_corpse_t *In0UP,
3684 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
3685{
3686
3687 typedef __Request__task_generate_corpse_t __Request;
3688 typedef __RequestUData__task_generate_corpse_t __RequestU __attribute__((unused));
3689#if __MigTypeCheck
3690 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3691 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
3692 return MIG_BAD_ARGUMENTS;
3693#endif /* __MigTypeCheck */
3694
3695 return MACH_MSG_SUCCESS;
3696}
3697#endif /* !defined(__MIG_check__Request__task_generate_corpse_t__defined) */
3698#endif /* __MIG_check__Request__task_subsystem__ */
3699#endif /* ( __MigTypeCheck ) */
3700
3701
3702/* Routine task_generate_corpse */
3703mig_internal novalue _Xtask_generate_corpse
3704 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3705 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3706 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3707{
3708
3709#ifdef __MigPackStructs
3710#pragma pack(push, 4)
3711#endif
3712 typedef struct {
3713 mach_msg_trailer_t trailer;
3714 char padding[0]; /* Avoid generating empty UData structs */
3715 } RequestU __attribute__((unused));
3716#ifdef __MigPackStructs
3717#pragma pack(pop)
3718#endif
3719 typedef __RequestKData__task_generate_corpse_t RequestK;
3720 typedef __RequestUData__task_generate_corpse_t __RequestU;
3721 typedef __ReplyKData__task_generate_corpse_t ReplyK __attribute__((unused));
3722 typedef __ReplyUData__task_generate_corpse_t ReplyU __attribute__((unused));
3723 typedef __Reply__task_generate_corpse_t Reply __attribute__((unused));
3724 typedef __Request__task_generate_corpse_t __Request __attribute__((unused));
3725
3726 /*
3727 * typedef struct {
3728 * mach_msg_header_t Head;
3729 * NDR_record_t NDR;
3730 * kern_return_t RetCode;
3731 * } mig_reply_error_t;
3732 */
3733
3734 RequestK *InKP = (RequestK *) InHeadP;
3735 RequestU *In0UP = (RequestU *) InDataP;
3736 ReplyK *OutKP = (ReplyK *) OutHeadP;
3737 ReplyU *OutUP = (ReplyU *) OutDataP;
3738 (void)OutUP;
3739#ifdef __MIG_check__Request__task_generate_corpse_t__defined
3740 kern_return_t check_result;
3741#endif /* __MIG_check__Request__task_generate_corpse_t__defined */
3742
3743#if __MigKernelSpecificCode
3744#if UseStaticTemplates
3745 const static mach_msg_port_descriptor_t corpse_task_portTemplate = {
3746 /* name = */ MACH_PORT_NULL,
3747 /* pad1 = */ 0,
3748 /* pad2 = */ 0,
3749 /* disp = */ 17,
3750 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
3751 };
3752#endif /* UseStaticTemplates */
3753
3754#else
3755#if UseStaticTemplates
3756 const static mach_msg_port_descriptor_t corpse_task_portTemplate = {
3757 /* name = */ MACH_PORT_NULL,
3758 /* pad1 = */ 0,
3759 /* pad2 = */ 0,
3760 /* disp = */ 19,
3761 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
3762 };
3763#endif /* UseStaticTemplates */
3764
3765#endif /* __MigKernelSpecificCode */
3766 kern_return_t RetCode;
3767 task_read_t task;
3768
3769 __DeclareRcvRpc(3442, "task_generate_corpse")
3770 __BeforeRcvRpc(3442, "task_generate_corpse")
3771
3772#if defined(__MIG_check__Request__task_generate_corpse_t__defined)
3773 check_result = __MIG_check__Request__task_generate_corpse_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
3774 if (check_result != MACH_MSG_SUCCESS)
3775 { MIG_RETURN_ERROR(OutKP, check_result); }
3776#endif /* defined(__MIG_check__Request__task_generate_corpse_t__defined) */
3777
3778#if UseStaticTemplates
3779 OutKP->corpse_task_port = corpse_task_portTemplate;
3780#else /* UseStaticTemplates */
3781#if __MigKernelSpecificCode
3782 OutKP->corpse_task_port.disposition = 17;
3783#else
3784 OutKP->corpse_task_port.disposition = 19;
3785#endif /* __MigKernelSpecificCode */
3786#if !(defined(KERNEL) && defined(__LP64__))
3787 OutKP->corpse_task_port.pad1 = 0;
3788#endif
3789 OutKP->corpse_task_port.pad2 = 0;
3790 OutKP->corpse_task_port.type = MACH_MSG_PORT_DESCRIPTOR;
3791#if defined(KERNEL)
3792 OutKP->corpse_task_port.pad_end = 0;
3793#endif
3794#endif /* UseStaticTemplates */
3795
3796
3797 task = convert_port_to_task_read_mig(port: InKP->Head.msgh_request_port);
3798
3799 RetCode = task_generate_corpse(task, corpse_task_port: &OutKP->corpse_task_port.name);
3800 task_read_deallocate_mig(task_read: task);
3801 if (RetCode != KERN_SUCCESS) {
3802 MIG_RETURN_ERROR(OutKP, RetCode);
3803 }
3804#if __MigKernelSpecificCode
3805#endif /* __MigKernelSpecificCode */
3806
3807 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
3808 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
3809 OutKP->msgh_body.msgh_descriptor_count = 1;
3810 __AfterRcvRpc(3442, "task_generate_corpse")
3811}
3812
3813#if ( __MigTypeCheck )
3814#if __MIG_check__Request__task_subsystem__
3815#if !defined(__MIG_check__Request__task_map_corpse_info_t__defined)
3816#define __MIG_check__Request__task_map_corpse_info_t__defined
3817
3818mig_internal kern_return_t __MIG_check__Request__task_map_corpse_info_t(
3819 __attribute__((__unused__)) __RequestKData__task_map_corpse_info_t *InKP,
3820 __attribute__((__unused__)) __RequestUData__task_map_corpse_info_t *In0UP,
3821 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
3822{
3823
3824 typedef __Request__task_map_corpse_info_t __Request;
3825 typedef __RequestUData__task_map_corpse_info_t __RequestU __attribute__((unused));
3826#if __MigTypeCheck
3827 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3828 (InKP->msgh_body.msgh_descriptor_count != 1) ||
3829 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
3830 return MIG_BAD_ARGUMENTS;
3831#endif /* __MigTypeCheck */
3832
3833#if __MigTypeCheck
3834 if (InKP->corspe_task.type != MACH_MSG_PORT_DESCRIPTOR ||
3835 InKP->corspe_task.disposition != 17)
3836 return MIG_TYPE_ERROR;
3837#endif /* __MigTypeCheck */
3838
3839 return MACH_MSG_SUCCESS;
3840}
3841#endif /* !defined(__MIG_check__Request__task_map_corpse_info_t__defined) */
3842#endif /* __MIG_check__Request__task_subsystem__ */
3843#endif /* ( __MigTypeCheck ) */
3844
3845
3846/* Routine task_map_corpse_info */
3847mig_internal novalue _Xtask_map_corpse_info
3848 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3849 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3850 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3851{
3852
3853#ifdef __MigPackStructs
3854#pragma pack(push, 4)
3855#endif
3856 typedef struct {
3857 mach_msg_trailer_t trailer;
3858 char padding[0]; /* Avoid generating empty UData structs */
3859 } RequestU __attribute__((unused));
3860#ifdef __MigPackStructs
3861#pragma pack(pop)
3862#endif
3863 typedef __RequestKData__task_map_corpse_info_t RequestK;
3864 typedef __RequestUData__task_map_corpse_info_t __RequestU;
3865 typedef __ReplyKData__task_map_corpse_info_t ReplyK __attribute__((unused));
3866 typedef __ReplyUData__task_map_corpse_info_t ReplyU __attribute__((unused));
3867 typedef __Reply__task_map_corpse_info_t Reply __attribute__((unused));
3868 typedef __Request__task_map_corpse_info_t __Request __attribute__((unused));
3869
3870 /*
3871 * typedef struct {
3872 * mach_msg_header_t Head;
3873 * NDR_record_t NDR;
3874 * kern_return_t RetCode;
3875 * } mig_reply_error_t;
3876 */
3877
3878 RequestK *InKP = (RequestK *) InHeadP;
3879 RequestU *In0UP = (RequestU *) InDataP;
3880 ReplyK *OutKP = (ReplyK *) OutHeadP;
3881 ReplyU *OutUP = (ReplyU *) OutDataP;
3882 (void)OutUP;
3883#ifdef __MIG_check__Request__task_map_corpse_info_t__defined
3884 kern_return_t check_result;
3885#endif /* __MIG_check__Request__task_map_corpse_info_t__defined */
3886
3887#if __MigKernelSpecificCode
3888#else
3889#endif /* __MigKernelSpecificCode */
3890 task_t task;
3891 task_read_t corspe_task;
3892
3893 __DeclareRcvRpc(3443, "task_map_corpse_info")
3894 __BeforeRcvRpc(3443, "task_map_corpse_info")
3895
3896#if defined(__MIG_check__Request__task_map_corpse_info_t__defined)
3897 check_result = __MIG_check__Request__task_map_corpse_info_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
3898 if (check_result != MACH_MSG_SUCCESS)
3899 { MIG_RETURN_ERROR(OutKP, check_result); }
3900#endif /* defined(__MIG_check__Request__task_map_corpse_info_t__defined) */
3901
3902 task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
3903
3904 corspe_task = convert_port_to_task_read_mig(port: InKP->corspe_task.name);
3905
3906 OutUP->RetCode = task_map_corpse_info(task, corspe_task, kcd_addr_begin: &OutUP->kcd_addr_begin, kcd_size: &OutUP->kcd_size);
3907 task_read_deallocate_mig(task_read: corspe_task);
3908 task_deallocate_mig(task);
3909 if (OutUP->RetCode != KERN_SUCCESS) {
3910 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
3911 }
3912#if __MigKernelSpecificCode
3913 ipc_port_release_send(port: (ipc_port_t)InKP->corspe_task.name);
3914#endif /* __MigKernelSpecificCode */
3915
3916 OutUP->NDR = NDR_record;
3917
3918
3919 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
3920 __AfterRcvRpc(3443, "task_map_corpse_info")
3921}
3922
3923#if ( __MigTypeCheck )
3924#if __MIG_check__Request__task_subsystem__
3925#if !defined(__MIG_check__Request__task_register_dyld_image_infos_t__defined)
3926#define __MIG_check__Request__task_register_dyld_image_infos_t__defined
3927
3928mig_internal kern_return_t __MIG_check__Request__task_register_dyld_image_infos_t(
3929 __attribute__((__unused__)) __RequestKData__task_register_dyld_image_infos_t *InKP,
3930 __attribute__((__unused__)) __RequestUData__task_register_dyld_image_infos_t *In0UP,
3931 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
3932{
3933
3934 typedef __Request__task_register_dyld_image_infos_t __Request;
3935 typedef __RequestUData__task_register_dyld_image_infos_t __RequestU __attribute__((unused));
3936#if __MigTypeCheck
3937 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3938 (InKP->msgh_body.msgh_descriptor_count != 1) ||
3939 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
3940 return MIG_BAD_ARGUMENTS;
3941#endif /* __MigTypeCheck */
3942
3943#if __MigTypeCheck
3944 if (InKP->dyld_images.type != MACH_MSG_OOL_DESCRIPTOR)
3945 return MIG_TYPE_ERROR;
3946#endif /* __MigTypeCheck */
3947
3948#if __MigTypeCheck
3949 if (InKP->dyld_images.size / 40 != In0UP->dyld_imagesCnt)
3950 return MIG_TYPE_ERROR;
3951#endif /* __MigTypeCheck */
3952
3953 return MACH_MSG_SUCCESS;
3954}
3955#endif /* !defined(__MIG_check__Request__task_register_dyld_image_infos_t__defined) */
3956#endif /* __MIG_check__Request__task_subsystem__ */
3957#endif /* ( __MigTypeCheck ) */
3958
3959
3960/* Routine task_register_dyld_image_infos */
3961mig_internal novalue _Xtask_register_dyld_image_infos
3962 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3963 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3964 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3965{
3966
3967#ifdef __MigPackStructs
3968#pragma pack(push, 4)
3969#endif
3970 typedef struct {
3971 NDR_record_t NDR;
3972 mach_msg_type_number_t dyld_imagesCnt;
3973 mach_msg_trailer_t trailer;
3974 char padding[0]; /* Avoid generating empty UData structs */
3975 } RequestU __attribute__((unused));
3976#ifdef __MigPackStructs
3977#pragma pack(pop)
3978#endif
3979 typedef __RequestKData__task_register_dyld_image_infos_t RequestK;
3980 typedef __RequestUData__task_register_dyld_image_infos_t __RequestU;
3981 typedef __ReplyKData__task_register_dyld_image_infos_t ReplyK __attribute__((unused));
3982 typedef __ReplyUData__task_register_dyld_image_infos_t ReplyU __attribute__((unused));
3983 typedef __Reply__task_register_dyld_image_infos_t Reply __attribute__((unused));
3984 typedef __Request__task_register_dyld_image_infos_t __Request __attribute__((unused));
3985
3986 /*
3987 * typedef struct {
3988 * mach_msg_header_t Head;
3989 * NDR_record_t NDR;
3990 * kern_return_t RetCode;
3991 * } mig_reply_error_t;
3992 */
3993
3994 RequestK *InKP = (RequestK *) InHeadP;
3995 RequestU *In0UP = (RequestU *) InDataP;
3996 ReplyK *OutKP = (ReplyK *) OutHeadP;
3997 ReplyU *OutUP = (ReplyU *) OutDataP;
3998 (void)OutUP;
3999#ifdef __MIG_check__Request__task_register_dyld_image_infos_t__defined
4000 kern_return_t check_result;
4001#endif /* __MIG_check__Request__task_register_dyld_image_infos_t__defined */
4002
4003#if __MigKernelSpecificCode
4004#else
4005#endif /* __MigKernelSpecificCode */
4006 task_t task;
4007
4008 __DeclareRcvRpc(3444, "task_register_dyld_image_infos")
4009 __BeforeRcvRpc(3444, "task_register_dyld_image_infos")
4010
4011#if defined(__MIG_check__Request__task_register_dyld_image_infos_t__defined)
4012 check_result = __MIG_check__Request__task_register_dyld_image_infos_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
4013 if (check_result != MACH_MSG_SUCCESS)
4014 { MIG_RETURN_ERROR(OutKP, check_result); }
4015#endif /* defined(__MIG_check__Request__task_register_dyld_image_infos_t__defined) */
4016
4017 task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
4018
4019 OutUP->RetCode = task_register_dyld_image_infos(task, dyld_images: (dyld_kernel_image_info_array_t)(InKP->dyld_images.address), dyld_imagesCnt: InKP->dyld_images.size / 40);
4020 task_deallocate_mig(task);
4021#if __MigKernelSpecificCode
4022#endif /* __MigKernelSpecificCode */
4023
4024 OutUP->NDR = NDR_record;
4025
4026
4027 __AfterRcvRpc(3444, "task_register_dyld_image_infos")
4028}
4029
4030#if ( __MigTypeCheck )
4031#if __MIG_check__Request__task_subsystem__
4032#if !defined(__MIG_check__Request__task_unregister_dyld_image_infos_t__defined)
4033#define __MIG_check__Request__task_unregister_dyld_image_infos_t__defined
4034
4035mig_internal kern_return_t __MIG_check__Request__task_unregister_dyld_image_infos_t(
4036 __attribute__((__unused__)) __RequestKData__task_unregister_dyld_image_infos_t *InKP,
4037 __attribute__((__unused__)) __RequestUData__task_unregister_dyld_image_infos_t *In0UP,
4038 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4039{
4040
4041 typedef __Request__task_unregister_dyld_image_infos_t __Request;
4042 typedef __RequestUData__task_unregister_dyld_image_infos_t __RequestU __attribute__((unused));
4043#if __MigTypeCheck
4044 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4045 (InKP->msgh_body.msgh_descriptor_count != 1) ||
4046 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
4047 return MIG_BAD_ARGUMENTS;
4048#endif /* __MigTypeCheck */
4049
4050#if __MigTypeCheck
4051 if (InKP->dyld_images.type != MACH_MSG_OOL_DESCRIPTOR)
4052 return MIG_TYPE_ERROR;
4053#endif /* __MigTypeCheck */
4054
4055#if __MigTypeCheck
4056 if (InKP->dyld_images.size / 40 != In0UP->dyld_imagesCnt)
4057 return MIG_TYPE_ERROR;
4058#endif /* __MigTypeCheck */
4059
4060 return MACH_MSG_SUCCESS;
4061}
4062#endif /* !defined(__MIG_check__Request__task_unregister_dyld_image_infos_t__defined) */
4063#endif /* __MIG_check__Request__task_subsystem__ */
4064#endif /* ( __MigTypeCheck ) */
4065
4066
4067/* Routine task_unregister_dyld_image_infos */
4068mig_internal novalue _Xtask_unregister_dyld_image_infos
4069 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
4070 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4071 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
4072{
4073
4074#ifdef __MigPackStructs
4075#pragma pack(push, 4)
4076#endif
4077 typedef struct {
4078 NDR_record_t NDR;
4079 mach_msg_type_number_t dyld_imagesCnt;
4080 mach_msg_trailer_t trailer;
4081 char padding[0]; /* Avoid generating empty UData structs */
4082 } RequestU __attribute__((unused));
4083#ifdef __MigPackStructs
4084#pragma pack(pop)
4085#endif
4086 typedef __RequestKData__task_unregister_dyld_image_infos_t RequestK;
4087 typedef __RequestUData__task_unregister_dyld_image_infos_t __RequestU;
4088 typedef __ReplyKData__task_unregister_dyld_image_infos_t ReplyK __attribute__((unused));
4089 typedef __ReplyUData__task_unregister_dyld_image_infos_t ReplyU __attribute__((unused));
4090 typedef __Reply__task_unregister_dyld_image_infos_t Reply __attribute__((unused));
4091 typedef __Request__task_unregister_dyld_image_infos_t __Request __attribute__((unused));
4092
4093 /*
4094 * typedef struct {
4095 * mach_msg_header_t Head;
4096 * NDR_record_t NDR;
4097 * kern_return_t RetCode;
4098 * } mig_reply_error_t;
4099 */
4100
4101 RequestK *InKP = (RequestK *) InHeadP;
4102 RequestU *In0UP = (RequestU *) InDataP;
4103 ReplyK *OutKP = (ReplyK *) OutHeadP;
4104 ReplyU *OutUP = (ReplyU *) OutDataP;
4105 (void)OutUP;
4106#ifdef __MIG_check__Request__task_unregister_dyld_image_infos_t__defined
4107 kern_return_t check_result;
4108#endif /* __MIG_check__Request__task_unregister_dyld_image_infos_t__defined */
4109
4110#if __MigKernelSpecificCode
4111#else
4112#endif /* __MigKernelSpecificCode */
4113 task_t task;
4114
4115 __DeclareRcvRpc(3445, "task_unregister_dyld_image_infos")
4116 __BeforeRcvRpc(3445, "task_unregister_dyld_image_infos")
4117
4118#if defined(__MIG_check__Request__task_unregister_dyld_image_infos_t__defined)
4119 check_result = __MIG_check__Request__task_unregister_dyld_image_infos_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
4120 if (check_result != MACH_MSG_SUCCESS)
4121 { MIG_RETURN_ERROR(OutKP, check_result); }
4122#endif /* defined(__MIG_check__Request__task_unregister_dyld_image_infos_t__defined) */
4123
4124 task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
4125
4126 OutUP->RetCode = task_unregister_dyld_image_infos(task, dyld_images: (dyld_kernel_image_info_array_t)(InKP->dyld_images.address), dyld_imagesCnt: InKP->dyld_images.size / 40);
4127 task_deallocate_mig(task);
4128#if __MigKernelSpecificCode
4129#endif /* __MigKernelSpecificCode */
4130
4131 OutUP->NDR = NDR_record;
4132
4133
4134 __AfterRcvRpc(3445, "task_unregister_dyld_image_infos")
4135}
4136
4137#if ( __MigTypeCheck )
4138#if __MIG_check__Request__task_subsystem__
4139#if !defined(__MIG_check__Request__task_get_dyld_image_infos_t__defined)
4140#define __MIG_check__Request__task_get_dyld_image_infos_t__defined
4141
4142mig_internal kern_return_t __MIG_check__Request__task_get_dyld_image_infos_t(
4143 __attribute__((__unused__)) __RequestKData__task_get_dyld_image_infos_t *InKP,
4144 __attribute__((__unused__)) __RequestUData__task_get_dyld_image_infos_t *In0UP,
4145 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4146{
4147
4148 typedef __Request__task_get_dyld_image_infos_t __Request;
4149 typedef __RequestUData__task_get_dyld_image_infos_t __RequestU __attribute__((unused));
4150#if __MigTypeCheck
4151 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4152 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
4153 return MIG_BAD_ARGUMENTS;
4154#endif /* __MigTypeCheck */
4155
4156 return MACH_MSG_SUCCESS;
4157}
4158#endif /* !defined(__MIG_check__Request__task_get_dyld_image_infos_t__defined) */
4159#endif /* __MIG_check__Request__task_subsystem__ */
4160#endif /* ( __MigTypeCheck ) */
4161
4162
4163/* Routine task_get_dyld_image_infos */
4164mig_internal novalue _Xtask_get_dyld_image_infos
4165 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
4166 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4167 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
4168{
4169
4170#ifdef __MigPackStructs
4171#pragma pack(push, 4)
4172#endif
4173 typedef struct {
4174 mach_msg_trailer_t trailer;
4175 char padding[0]; /* Avoid generating empty UData structs */
4176 } RequestU __attribute__((unused));
4177#ifdef __MigPackStructs
4178#pragma pack(pop)
4179#endif
4180 typedef __RequestKData__task_get_dyld_image_infos_t RequestK;
4181 typedef __RequestUData__task_get_dyld_image_infos_t __RequestU;
4182 typedef __ReplyKData__task_get_dyld_image_infos_t ReplyK __attribute__((unused));
4183 typedef __ReplyUData__task_get_dyld_image_infos_t ReplyU __attribute__((unused));
4184 typedef __Reply__task_get_dyld_image_infos_t Reply __attribute__((unused));
4185 typedef __Request__task_get_dyld_image_infos_t __Request __attribute__((unused));
4186
4187 /*
4188 * typedef struct {
4189 * mach_msg_header_t Head;
4190 * NDR_record_t NDR;
4191 * kern_return_t RetCode;
4192 * } mig_reply_error_t;
4193 */
4194
4195 RequestK *InKP = (RequestK *) InHeadP;
4196 RequestU *In0UP = (RequestU *) InDataP;
4197 ReplyK *OutKP = (ReplyK *) OutHeadP;
4198 ReplyU *OutUP = (ReplyU *) OutDataP;
4199 (void)OutUP;
4200#ifdef __MIG_check__Request__task_get_dyld_image_infos_t__defined
4201 kern_return_t check_result;
4202#endif /* __MIG_check__Request__task_get_dyld_image_infos_t__defined */
4203
4204#if __MigKernelSpecificCode
4205#if UseStaticTemplates
4206 const static mach_msg_ool_descriptor_t dyld_imagesTemplate = {
4207 /* addr = */ (void *)0,
4208 /* size = */ 0,
4209 /* deal = */ FALSE,
4210 /* copy = */ MACH_MSG_VIRTUAL_COPY,
4211 /* pad2 = */ 0,
4212 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
4213 };
4214#endif /* UseStaticTemplates */
4215
4216#else
4217#if UseStaticTemplates
4218 const static mach_msg_ool_descriptor_t dyld_imagesTemplate = {
4219 /* addr = */ (void *)0,
4220 /* size = */ 0,
4221 /* deal = */ FALSE,
4222 /* copy = */ MACH_MSG_VIRTUAL_COPY,
4223 /* pad2 = */ 0,
4224 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
4225 };
4226#endif /* UseStaticTemplates */
4227
4228#endif /* __MigKernelSpecificCode */
4229 kern_return_t RetCode;
4230 task_read_t task;
4231
4232 __DeclareRcvRpc(3446, "task_get_dyld_image_infos")
4233 __BeforeRcvRpc(3446, "task_get_dyld_image_infos")
4234
4235#if defined(__MIG_check__Request__task_get_dyld_image_infos_t__defined)
4236 check_result = __MIG_check__Request__task_get_dyld_image_infos_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
4237 if (check_result != MACH_MSG_SUCCESS)
4238 { MIG_RETURN_ERROR(OutKP, check_result); }
4239#endif /* defined(__MIG_check__Request__task_get_dyld_image_infos_t__defined) */
4240
4241#if UseStaticTemplates
4242 OutKP->dyld_images = dyld_imagesTemplate;
4243#else /* UseStaticTemplates */
4244 OutKP->dyld_images.deallocate = FALSE;
4245 OutKP->dyld_images.copy = MACH_MSG_VIRTUAL_COPY;
4246 OutKP->dyld_images.pad1 = 0;
4247 OutKP->dyld_images.type = MACH_MSG_OOL_DESCRIPTOR;
4248#if defined(KERNEL) && !defined(__LP64__)
4249 OutKP->dyld_images.pad_end = 0;
4250#endif
4251#endif /* UseStaticTemplates */
4252
4253
4254 task = convert_port_to_task_read_mig(port: InKP->Head.msgh_request_port);
4255
4256 RetCode = task_get_dyld_image_infos(task, dyld_images: (dyld_kernel_image_info_array_t *)&(OutKP->dyld_images.address), dyld_imagesCnt: &OutUP->dyld_imagesCnt);
4257 task_read_deallocate_mig(task_read: task);
4258 if (RetCode != KERN_SUCCESS) {
4259 MIG_RETURN_ERROR(OutKP, RetCode);
4260 }
4261#if __MigKernelSpecificCode
4262#endif /* __MigKernelSpecificCode */
4263 OutKP->dyld_images.size = OutUP->dyld_imagesCnt * 40;
4264
4265
4266 OutUP->NDR = NDR_record;
4267
4268
4269 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
4270 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
4271 OutKP->msgh_body.msgh_descriptor_count = 1;
4272 __AfterRcvRpc(3446, "task_get_dyld_image_infos")
4273}
4274
4275#if ( __MigTypeCheck )
4276#if __MIG_check__Request__task_subsystem__
4277#if !defined(__MIG_check__Request__task_register_dyld_shared_cache_image_info_t__defined)
4278#define __MIG_check__Request__task_register_dyld_shared_cache_image_info_t__defined
4279
4280mig_internal kern_return_t __MIG_check__Request__task_register_dyld_shared_cache_image_info_t(
4281 __attribute__((__unused__)) __RequestKData__task_register_dyld_shared_cache_image_info_t *InKP,
4282 __attribute__((__unused__)) __RequestUData__task_register_dyld_shared_cache_image_info_t *In0UP,
4283 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4284{
4285
4286 typedef __Request__task_register_dyld_shared_cache_image_info_t __Request;
4287 typedef __RequestUData__task_register_dyld_shared_cache_image_info_t __RequestU __attribute__((unused));
4288#if __MigTypeCheck
4289 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4290 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
4291 return MIG_BAD_ARGUMENTS;
4292#endif /* __MigTypeCheck */
4293
4294 return MACH_MSG_SUCCESS;
4295}
4296#endif /* !defined(__MIG_check__Request__task_register_dyld_shared_cache_image_info_t__defined) */
4297#endif /* __MIG_check__Request__task_subsystem__ */
4298#endif /* ( __MigTypeCheck ) */
4299
4300
4301/* Routine task_register_dyld_shared_cache_image_info */
4302mig_internal novalue _Xtask_register_dyld_shared_cache_image_info
4303 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
4304 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4305 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
4306{
4307
4308#ifdef __MigPackStructs
4309#pragma pack(push, 4)
4310#endif
4311 typedef struct {
4312 NDR_record_t NDR;
4313 dyld_kernel_image_info_t dyld_cache_image;
4314 boolean_t no_cache;
4315 boolean_t private_cache;
4316 mach_msg_trailer_t trailer;
4317 char padding[0]; /* Avoid generating empty UData structs */
4318 } RequestU __attribute__((unused));
4319#ifdef __MigPackStructs
4320#pragma pack(pop)
4321#endif
4322 typedef __RequestKData__task_register_dyld_shared_cache_image_info_t RequestK;
4323 typedef __RequestUData__task_register_dyld_shared_cache_image_info_t __RequestU;
4324 typedef __ReplyKData__task_register_dyld_shared_cache_image_info_t ReplyK __attribute__((unused));
4325 typedef __ReplyUData__task_register_dyld_shared_cache_image_info_t ReplyU __attribute__((unused));
4326 typedef __Reply__task_register_dyld_shared_cache_image_info_t Reply __attribute__((unused));
4327 typedef __Request__task_register_dyld_shared_cache_image_info_t __Request __attribute__((unused));
4328
4329 /*
4330 * typedef struct {
4331 * mach_msg_header_t Head;
4332 * NDR_record_t NDR;
4333 * kern_return_t RetCode;
4334 * } mig_reply_error_t;
4335 */
4336
4337 RequestK *InKP = (RequestK *) InHeadP;
4338 RequestU *In0UP = (RequestU *) InDataP;
4339 ReplyK *OutKP = (ReplyK *) OutHeadP;
4340 ReplyU *OutUP = (ReplyU *) OutDataP;
4341 (void)OutUP;
4342#ifdef __MIG_check__Request__task_register_dyld_shared_cache_image_info_t__defined
4343 kern_return_t check_result;
4344#endif /* __MIG_check__Request__task_register_dyld_shared_cache_image_info_t__defined */
4345
4346#if __MigKernelSpecificCode
4347#else
4348#endif /* __MigKernelSpecificCode */
4349 task_t task;
4350
4351 __DeclareRcvRpc(3447, "task_register_dyld_shared_cache_image_info")
4352 __BeforeRcvRpc(3447, "task_register_dyld_shared_cache_image_info")
4353
4354#if defined(__MIG_check__Request__task_register_dyld_shared_cache_image_info_t__defined)
4355 check_result = __MIG_check__Request__task_register_dyld_shared_cache_image_info_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
4356 if (check_result != MACH_MSG_SUCCESS)
4357 { MIG_RETURN_ERROR(OutKP, check_result); }
4358#endif /* defined(__MIG_check__Request__task_register_dyld_shared_cache_image_info_t__defined) */
4359
4360 task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
4361
4362 OutUP->RetCode = task_register_dyld_shared_cache_image_info(task, dyld_cache_image: In0UP->dyld_cache_image, no_cache: In0UP->no_cache, private_cache: In0UP->private_cache);
4363 task_deallocate_mig(task);
4364#if __MigKernelSpecificCode
4365#endif /* __MigKernelSpecificCode */
4366
4367 OutUP->NDR = NDR_record;
4368
4369
4370 __AfterRcvRpc(3447, "task_register_dyld_shared_cache_image_info")
4371}
4372
4373#if ( __MigTypeCheck )
4374#if __MIG_check__Request__task_subsystem__
4375#if !defined(__MIG_check__Request__task_register_dyld_set_dyld_state_t__defined)
4376#define __MIG_check__Request__task_register_dyld_set_dyld_state_t__defined
4377
4378mig_internal kern_return_t __MIG_check__Request__task_register_dyld_set_dyld_state_t(
4379 __attribute__((__unused__)) __RequestKData__task_register_dyld_set_dyld_state_t *InKP,
4380 __attribute__((__unused__)) __RequestUData__task_register_dyld_set_dyld_state_t *In0UP,
4381 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4382{
4383
4384 typedef __Request__task_register_dyld_set_dyld_state_t __Request;
4385 typedef __RequestUData__task_register_dyld_set_dyld_state_t __RequestU __attribute__((unused));
4386#if __MigTypeCheck
4387 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4388 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
4389 return MIG_BAD_ARGUMENTS;
4390#endif /* __MigTypeCheck */
4391
4392 return MACH_MSG_SUCCESS;
4393}
4394#endif /* !defined(__MIG_check__Request__task_register_dyld_set_dyld_state_t__defined) */
4395#endif /* __MIG_check__Request__task_subsystem__ */
4396#endif /* ( __MigTypeCheck ) */
4397
4398
4399/* Routine task_register_dyld_set_dyld_state */
4400mig_internal novalue _Xtask_register_dyld_set_dyld_state
4401 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
4402 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4403 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
4404{
4405
4406#ifdef __MigPackStructs
4407#pragma pack(push, 4)
4408#endif
4409 typedef struct {
4410 NDR_record_t NDR;
4411 uint8_t dyld_state;
4412 char dyld_statePad[3];
4413 mach_msg_trailer_t trailer;
4414 char padding[0]; /* Avoid generating empty UData structs */
4415 } RequestU __attribute__((unused));
4416#ifdef __MigPackStructs
4417#pragma pack(pop)
4418#endif
4419 typedef __RequestKData__task_register_dyld_set_dyld_state_t RequestK;
4420 typedef __RequestUData__task_register_dyld_set_dyld_state_t __RequestU;
4421 typedef __ReplyKData__task_register_dyld_set_dyld_state_t ReplyK __attribute__((unused));
4422 typedef __ReplyUData__task_register_dyld_set_dyld_state_t ReplyU __attribute__((unused));
4423 typedef __Reply__task_register_dyld_set_dyld_state_t Reply __attribute__((unused));
4424 typedef __Request__task_register_dyld_set_dyld_state_t __Request __attribute__((unused));
4425
4426 /*
4427 * typedef struct {
4428 * mach_msg_header_t Head;
4429 * NDR_record_t NDR;
4430 * kern_return_t RetCode;
4431 * } mig_reply_error_t;
4432 */
4433
4434 RequestK *InKP = (RequestK *) InHeadP;
4435 RequestU *In0UP = (RequestU *) InDataP;
4436 ReplyK *OutKP = (ReplyK *) OutHeadP;
4437 ReplyU *OutUP = (ReplyU *) OutDataP;
4438 (void)OutUP;
4439#ifdef __MIG_check__Request__task_register_dyld_set_dyld_state_t__defined
4440 kern_return_t check_result;
4441#endif /* __MIG_check__Request__task_register_dyld_set_dyld_state_t__defined */
4442
4443#if __MigKernelSpecificCode
4444#else
4445#endif /* __MigKernelSpecificCode */
4446 task_t task;
4447
4448 __DeclareRcvRpc(3448, "task_register_dyld_set_dyld_state")
4449 __BeforeRcvRpc(3448, "task_register_dyld_set_dyld_state")
4450
4451#if defined(__MIG_check__Request__task_register_dyld_set_dyld_state_t__defined)
4452 check_result = __MIG_check__Request__task_register_dyld_set_dyld_state_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
4453 if (check_result != MACH_MSG_SUCCESS)
4454 { MIG_RETURN_ERROR(OutKP, check_result); }
4455#endif /* defined(__MIG_check__Request__task_register_dyld_set_dyld_state_t__defined) */
4456
4457 task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
4458
4459 OutUP->RetCode = task_register_dyld_set_dyld_state(task, dyld_state: In0UP->dyld_state);
4460 task_deallocate_mig(task);
4461#if __MigKernelSpecificCode
4462#endif /* __MigKernelSpecificCode */
4463
4464 OutUP->NDR = NDR_record;
4465
4466
4467 __AfterRcvRpc(3448, "task_register_dyld_set_dyld_state")
4468}
4469
4470#if ( __MigTypeCheck )
4471#if __MIG_check__Request__task_subsystem__
4472#if !defined(__MIG_check__Request__task_register_dyld_get_process_state_t__defined)
4473#define __MIG_check__Request__task_register_dyld_get_process_state_t__defined
4474
4475mig_internal kern_return_t __MIG_check__Request__task_register_dyld_get_process_state_t(
4476 __attribute__((__unused__)) __RequestKData__task_register_dyld_get_process_state_t *InKP,
4477 __attribute__((__unused__)) __RequestUData__task_register_dyld_get_process_state_t *In0UP,
4478 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4479{
4480
4481 typedef __Request__task_register_dyld_get_process_state_t __Request;
4482 typedef __RequestUData__task_register_dyld_get_process_state_t __RequestU __attribute__((unused));
4483#if __MigTypeCheck
4484 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4485 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
4486 return MIG_BAD_ARGUMENTS;
4487#endif /* __MigTypeCheck */
4488
4489 return MACH_MSG_SUCCESS;
4490}
4491#endif /* !defined(__MIG_check__Request__task_register_dyld_get_process_state_t__defined) */
4492#endif /* __MIG_check__Request__task_subsystem__ */
4493#endif /* ( __MigTypeCheck ) */
4494
4495
4496/* Routine task_register_dyld_get_process_state */
4497mig_internal novalue _Xtask_register_dyld_get_process_state
4498 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
4499 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4500 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
4501{
4502
4503#ifdef __MigPackStructs
4504#pragma pack(push, 4)
4505#endif
4506 typedef struct {
4507 mach_msg_trailer_t trailer;
4508 char padding[0]; /* Avoid generating empty UData structs */
4509 } RequestU __attribute__((unused));
4510#ifdef __MigPackStructs
4511#pragma pack(pop)
4512#endif
4513 typedef __RequestKData__task_register_dyld_get_process_state_t RequestK;
4514 typedef __RequestUData__task_register_dyld_get_process_state_t __RequestU;
4515 typedef __ReplyKData__task_register_dyld_get_process_state_t ReplyK __attribute__((unused));
4516 typedef __ReplyUData__task_register_dyld_get_process_state_t ReplyU __attribute__((unused));
4517 typedef __Reply__task_register_dyld_get_process_state_t Reply __attribute__((unused));
4518 typedef __Request__task_register_dyld_get_process_state_t __Request __attribute__((unused));
4519
4520 /*
4521 * typedef struct {
4522 * mach_msg_header_t Head;
4523 * NDR_record_t NDR;
4524 * kern_return_t RetCode;
4525 * } mig_reply_error_t;
4526 */
4527
4528 RequestK *InKP = (RequestK *) InHeadP;
4529 RequestU *In0UP = (RequestU *) InDataP;
4530 ReplyK *OutKP = (ReplyK *) OutHeadP;
4531 ReplyU *OutUP = (ReplyU *) OutDataP;
4532 (void)OutUP;
4533#ifdef __MIG_check__Request__task_register_dyld_get_process_state_t__defined
4534 kern_return_t check_result;
4535#endif /* __MIG_check__Request__task_register_dyld_get_process_state_t__defined */
4536
4537#if __MigKernelSpecificCode
4538#else
4539#endif /* __MigKernelSpecificCode */
4540 task_t task;
4541
4542 __DeclareRcvRpc(3449, "task_register_dyld_get_process_state")
4543 __BeforeRcvRpc(3449, "task_register_dyld_get_process_state")
4544
4545#if defined(__MIG_check__Request__task_register_dyld_get_process_state_t__defined)
4546 check_result = __MIG_check__Request__task_register_dyld_get_process_state_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
4547 if (check_result != MACH_MSG_SUCCESS)
4548 { MIG_RETURN_ERROR(OutKP, check_result); }
4549#endif /* defined(__MIG_check__Request__task_register_dyld_get_process_state_t__defined) */
4550
4551 task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
4552
4553 OutUP->RetCode = task_register_dyld_get_process_state(task, dyld_process_state: &OutUP->dyld_process_state);
4554 task_deallocate_mig(task);
4555 if (OutUP->RetCode != KERN_SUCCESS) {
4556 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
4557 }
4558#if __MigKernelSpecificCode
4559#endif /* __MigKernelSpecificCode */
4560
4561 OutUP->NDR = NDR_record;
4562
4563
4564 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
4565 __AfterRcvRpc(3449, "task_register_dyld_get_process_state")
4566}
4567
4568#if ( __MigTypeCheck )
4569#if __MIG_check__Request__task_subsystem__
4570#if !defined(__MIG_check__Request__task_map_corpse_info_64_t__defined)
4571#define __MIG_check__Request__task_map_corpse_info_64_t__defined
4572
4573mig_internal kern_return_t __MIG_check__Request__task_map_corpse_info_64_t(
4574 __attribute__((__unused__)) __RequestKData__task_map_corpse_info_64_t *InKP,
4575 __attribute__((__unused__)) __RequestUData__task_map_corpse_info_64_t *In0UP,
4576 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4577{
4578
4579 typedef __Request__task_map_corpse_info_64_t __Request;
4580 typedef __RequestUData__task_map_corpse_info_64_t __RequestU __attribute__((unused));
4581#if __MigTypeCheck
4582 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4583 (InKP->msgh_body.msgh_descriptor_count != 1) ||
4584 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
4585 return MIG_BAD_ARGUMENTS;
4586#endif /* __MigTypeCheck */
4587
4588#if __MigTypeCheck
4589 if (InKP->corspe_task.type != MACH_MSG_PORT_DESCRIPTOR ||
4590 InKP->corspe_task.disposition != 17)
4591 return MIG_TYPE_ERROR;
4592#endif /* __MigTypeCheck */
4593
4594 return MACH_MSG_SUCCESS;
4595}
4596#endif /* !defined(__MIG_check__Request__task_map_corpse_info_64_t__defined) */
4597#endif /* __MIG_check__Request__task_subsystem__ */
4598#endif /* ( __MigTypeCheck ) */
4599
4600
4601/* Routine task_map_corpse_info_64 */
4602mig_internal novalue _Xtask_map_corpse_info_64
4603 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
4604 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4605 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
4606{
4607
4608#ifdef __MigPackStructs
4609#pragma pack(push, 4)
4610#endif
4611 typedef struct {
4612 mach_msg_trailer_t trailer;
4613 char padding[0]; /* Avoid generating empty UData structs */
4614 } RequestU __attribute__((unused));
4615#ifdef __MigPackStructs
4616#pragma pack(pop)
4617#endif
4618 typedef __RequestKData__task_map_corpse_info_64_t RequestK;
4619 typedef __RequestUData__task_map_corpse_info_64_t __RequestU;
4620 typedef __ReplyKData__task_map_corpse_info_64_t ReplyK __attribute__((unused));
4621 typedef __ReplyUData__task_map_corpse_info_64_t ReplyU __attribute__((unused));
4622 typedef __Reply__task_map_corpse_info_64_t Reply __attribute__((unused));
4623 typedef __Request__task_map_corpse_info_64_t __Request __attribute__((unused));
4624
4625 /*
4626 * typedef struct {
4627 * mach_msg_header_t Head;
4628 * NDR_record_t NDR;
4629 * kern_return_t RetCode;
4630 * } mig_reply_error_t;
4631 */
4632
4633 RequestK *InKP = (RequestK *) InHeadP;
4634 RequestU *In0UP = (RequestU *) InDataP;
4635 ReplyK *OutKP = (ReplyK *) OutHeadP;
4636 ReplyU *OutUP = (ReplyU *) OutDataP;
4637 (void)OutUP;
4638#ifdef __MIG_check__Request__task_map_corpse_info_64_t__defined
4639 kern_return_t check_result;
4640#endif /* __MIG_check__Request__task_map_corpse_info_64_t__defined */
4641
4642#if __MigKernelSpecificCode
4643#else
4644#endif /* __MigKernelSpecificCode */
4645 task_t task;
4646 task_read_t corspe_task;
4647
4648 __DeclareRcvRpc(3450, "task_map_corpse_info_64")
4649 __BeforeRcvRpc(3450, "task_map_corpse_info_64")
4650
4651#if defined(__MIG_check__Request__task_map_corpse_info_64_t__defined)
4652 check_result = __MIG_check__Request__task_map_corpse_info_64_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
4653 if (check_result != MACH_MSG_SUCCESS)
4654 { MIG_RETURN_ERROR(OutKP, check_result); }
4655#endif /* defined(__MIG_check__Request__task_map_corpse_info_64_t__defined) */
4656
4657 task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
4658
4659 corspe_task = convert_port_to_task_read_mig(port: InKP->corspe_task.name);
4660
4661 OutUP->RetCode = task_map_corpse_info_64(task, corspe_task, kcd_addr_begin: &OutUP->kcd_addr_begin, kcd_size: &OutUP->kcd_size);
4662 task_read_deallocate_mig(task_read: corspe_task);
4663 task_deallocate_mig(task);
4664 if (OutUP->RetCode != KERN_SUCCESS) {
4665 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
4666 }
4667#if __MigKernelSpecificCode
4668 ipc_port_release_send(port: (ipc_port_t)InKP->corspe_task.name);
4669#endif /* __MigKernelSpecificCode */
4670
4671 OutUP->NDR = NDR_record;
4672
4673
4674 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
4675 __AfterRcvRpc(3450, "task_map_corpse_info_64")
4676}
4677
4678#if ( __MigTypeCheck )
4679#if __MIG_check__Request__task_subsystem__
4680#if !defined(__MIG_check__Request__task_inspect_t__defined)
4681#define __MIG_check__Request__task_inspect_t__defined
4682
4683mig_internal kern_return_t __MIG_check__Request__task_inspect_t(
4684 __attribute__((__unused__)) __RequestKData__task_inspect_t *InKP,
4685 __attribute__((__unused__)) __RequestUData__task_inspect_t *In0UP,
4686 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4687{
4688
4689 typedef __Request__task_inspect_t __Request;
4690 typedef __RequestUData__task_inspect_t __RequestU __attribute__((unused));
4691#if __MigTypeCheck
4692 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4693 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
4694 return MIG_BAD_ARGUMENTS;
4695#endif /* __MigTypeCheck */
4696
4697 return MACH_MSG_SUCCESS;
4698}
4699#endif /* !defined(__MIG_check__Request__task_inspect_t__defined) */
4700#endif /* __MIG_check__Request__task_subsystem__ */
4701#endif /* ( __MigTypeCheck ) */
4702
4703
4704/* Routine task_inspect */
4705mig_internal novalue _Xtask_inspect
4706 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
4707 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4708 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
4709{
4710
4711#ifdef __MigPackStructs
4712#pragma pack(push, 4)
4713#endif
4714 typedef struct {
4715 NDR_record_t NDR;
4716 task_inspect_flavor_t flavor;
4717 mach_msg_type_number_t info_outCnt;
4718 mach_msg_trailer_t trailer;
4719 char padding[0]; /* Avoid generating empty UData structs */
4720 } RequestU __attribute__((unused));
4721#ifdef __MigPackStructs
4722#pragma pack(pop)
4723#endif
4724 typedef __RequestKData__task_inspect_t RequestK;
4725 typedef __RequestUData__task_inspect_t __RequestU;
4726 typedef __ReplyKData__task_inspect_t ReplyK __attribute__((unused));
4727 typedef __ReplyUData__task_inspect_t ReplyU __attribute__((unused));
4728 typedef __Reply__task_inspect_t Reply __attribute__((unused));
4729 typedef __Request__task_inspect_t __Request __attribute__((unused));
4730
4731 /*
4732 * typedef struct {
4733 * mach_msg_header_t Head;
4734 * NDR_record_t NDR;
4735 * kern_return_t RetCode;
4736 * } mig_reply_error_t;
4737 */
4738
4739 RequestK *InKP = (RequestK *) InHeadP;
4740 RequestU *In0UP = (RequestU *) InDataP;
4741 ReplyK *OutKP = (ReplyK *) OutHeadP;
4742 ReplyU *OutUP = (ReplyU *) OutDataP;
4743 (void)OutUP;
4744#ifdef __MIG_check__Request__task_inspect_t__defined
4745 kern_return_t check_result;
4746#endif /* __MIG_check__Request__task_inspect_t__defined */
4747
4748#if __MigKernelSpecificCode
4749#else
4750#endif /* __MigKernelSpecificCode */
4751 task_inspect_t task;
4752
4753 __DeclareRcvRpc(3451, "task_inspect")
4754 __BeforeRcvRpc(3451, "task_inspect")
4755
4756#if defined(__MIG_check__Request__task_inspect_t__defined)
4757 check_result = __MIG_check__Request__task_inspect_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
4758 if (check_result != MACH_MSG_SUCCESS)
4759 { MIG_RETURN_ERROR(OutKP, check_result); }
4760#endif /* defined(__MIG_check__Request__task_inspect_t__defined) */
4761
4762 task = convert_port_to_task_inspect_mig(port: InKP->Head.msgh_request_port);
4763
4764 OutUP->info_outCnt = 4;
4765 if (In0UP->info_outCnt < OutUP->info_outCnt)
4766 OutUP->info_outCnt = In0UP->info_outCnt;
4767
4768 OutUP->RetCode = task_inspect(task, flavor: In0UP->flavor, info_out: OutUP->info_out, info_outCnt: &OutUP->info_outCnt);
4769 task_inspect_deallocate_mig(task_inspect: task);
4770 if (OutUP->RetCode != KERN_SUCCESS) {
4771 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
4772 }
4773#if __MigKernelSpecificCode
4774#endif /* __MigKernelSpecificCode */
4775
4776 OutUP->NDR = NDR_record;
4777
4778 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 16) + (((4 * OutUP->info_outCnt)));
4779
4780 __AfterRcvRpc(3451, "task_inspect")
4781}
4782
4783#if ( __MigTypeCheck )
4784#if __MIG_check__Request__task_subsystem__
4785#if !defined(__MIG_check__Request__task_get_exc_guard_behavior_t__defined)
4786#define __MIG_check__Request__task_get_exc_guard_behavior_t__defined
4787
4788mig_internal kern_return_t __MIG_check__Request__task_get_exc_guard_behavior_t(
4789 __attribute__((__unused__)) __RequestKData__task_get_exc_guard_behavior_t *InKP,
4790 __attribute__((__unused__)) __RequestUData__task_get_exc_guard_behavior_t *In0UP,
4791 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4792{
4793
4794 typedef __Request__task_get_exc_guard_behavior_t __Request;
4795 typedef __RequestUData__task_get_exc_guard_behavior_t __RequestU __attribute__((unused));
4796#if __MigTypeCheck
4797 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4798 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
4799 return MIG_BAD_ARGUMENTS;
4800#endif /* __MigTypeCheck */
4801
4802 return MACH_MSG_SUCCESS;
4803}
4804#endif /* !defined(__MIG_check__Request__task_get_exc_guard_behavior_t__defined) */
4805#endif /* __MIG_check__Request__task_subsystem__ */
4806#endif /* ( __MigTypeCheck ) */
4807
4808
4809/* Routine task_get_exc_guard_behavior */
4810mig_internal novalue _Xtask_get_exc_guard_behavior
4811 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
4812 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4813 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
4814{
4815
4816#ifdef __MigPackStructs
4817#pragma pack(push, 4)
4818#endif
4819 typedef struct {
4820 mach_msg_trailer_t trailer;
4821 char padding[0]; /* Avoid generating empty UData structs */
4822 } RequestU __attribute__((unused));
4823#ifdef __MigPackStructs
4824#pragma pack(pop)
4825#endif
4826 typedef __RequestKData__task_get_exc_guard_behavior_t RequestK;
4827 typedef __RequestUData__task_get_exc_guard_behavior_t __RequestU;
4828 typedef __ReplyKData__task_get_exc_guard_behavior_t ReplyK __attribute__((unused));
4829 typedef __ReplyUData__task_get_exc_guard_behavior_t ReplyU __attribute__((unused));
4830 typedef __Reply__task_get_exc_guard_behavior_t Reply __attribute__((unused));
4831 typedef __Request__task_get_exc_guard_behavior_t __Request __attribute__((unused));
4832
4833 /*
4834 * typedef struct {
4835 * mach_msg_header_t Head;
4836 * NDR_record_t NDR;
4837 * kern_return_t RetCode;
4838 * } mig_reply_error_t;
4839 */
4840
4841 RequestK *InKP = (RequestK *) InHeadP;
4842 RequestU *In0UP = (RequestU *) InDataP;
4843 ReplyK *OutKP = (ReplyK *) OutHeadP;
4844 ReplyU *OutUP = (ReplyU *) OutDataP;
4845 (void)OutUP;
4846#ifdef __MIG_check__Request__task_get_exc_guard_behavior_t__defined
4847 kern_return_t check_result;
4848#endif /* __MIG_check__Request__task_get_exc_guard_behavior_t__defined */
4849
4850#if __MigKernelSpecificCode
4851#else
4852#endif /* __MigKernelSpecificCode */
4853 task_inspect_t task;
4854
4855 __DeclareRcvRpc(3452, "task_get_exc_guard_behavior")
4856 __BeforeRcvRpc(3452, "task_get_exc_guard_behavior")
4857
4858#if defined(__MIG_check__Request__task_get_exc_guard_behavior_t__defined)
4859 check_result = __MIG_check__Request__task_get_exc_guard_behavior_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
4860 if (check_result != MACH_MSG_SUCCESS)
4861 { MIG_RETURN_ERROR(OutKP, check_result); }
4862#endif /* defined(__MIG_check__Request__task_get_exc_guard_behavior_t__defined) */
4863
4864 task = convert_port_to_task_inspect_mig(port: InKP->Head.msgh_request_port);
4865
4866 OutUP->RetCode = task_get_exc_guard_behavior(task, behavior: &OutUP->behavior);
4867 task_inspect_deallocate_mig(task_inspect: task);
4868 if (OutUP->RetCode != KERN_SUCCESS) {
4869 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
4870 }
4871#if __MigKernelSpecificCode
4872#endif /* __MigKernelSpecificCode */
4873
4874 OutUP->NDR = NDR_record;
4875
4876
4877 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
4878 __AfterRcvRpc(3452, "task_get_exc_guard_behavior")
4879}
4880
4881#if ( __MigTypeCheck )
4882#if __MIG_check__Request__task_subsystem__
4883#if !defined(__MIG_check__Request__task_set_exc_guard_behavior_t__defined)
4884#define __MIG_check__Request__task_set_exc_guard_behavior_t__defined
4885
4886mig_internal kern_return_t __MIG_check__Request__task_set_exc_guard_behavior_t(
4887 __attribute__((__unused__)) __RequestKData__task_set_exc_guard_behavior_t *InKP,
4888 __attribute__((__unused__)) __RequestUData__task_set_exc_guard_behavior_t *In0UP,
4889 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4890{
4891
4892 typedef __Request__task_set_exc_guard_behavior_t __Request;
4893 typedef __RequestUData__task_set_exc_guard_behavior_t __RequestU __attribute__((unused));
4894#if __MigTypeCheck
4895 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4896 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
4897 return MIG_BAD_ARGUMENTS;
4898#endif /* __MigTypeCheck */
4899
4900 return MACH_MSG_SUCCESS;
4901}
4902#endif /* !defined(__MIG_check__Request__task_set_exc_guard_behavior_t__defined) */
4903#endif /* __MIG_check__Request__task_subsystem__ */
4904#endif /* ( __MigTypeCheck ) */
4905
4906
4907/* Routine task_set_exc_guard_behavior */
4908mig_internal novalue _Xtask_set_exc_guard_behavior
4909 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
4910 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4911 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
4912{
4913
4914#ifdef __MigPackStructs
4915#pragma pack(push, 4)
4916#endif
4917 typedef struct {
4918 NDR_record_t NDR;
4919 task_exc_guard_behavior_t behavior;
4920 mach_msg_trailer_t trailer;
4921 char padding[0]; /* Avoid generating empty UData structs */
4922 } RequestU __attribute__((unused));
4923#ifdef __MigPackStructs
4924#pragma pack(pop)
4925#endif
4926 typedef __RequestKData__task_set_exc_guard_behavior_t RequestK;
4927 typedef __RequestUData__task_set_exc_guard_behavior_t __RequestU;
4928 typedef __ReplyKData__task_set_exc_guard_behavior_t ReplyK __attribute__((unused));
4929 typedef __ReplyUData__task_set_exc_guard_behavior_t ReplyU __attribute__((unused));
4930 typedef __Reply__task_set_exc_guard_behavior_t Reply __attribute__((unused));
4931 typedef __Request__task_set_exc_guard_behavior_t __Request __attribute__((unused));
4932
4933 /*
4934 * typedef struct {
4935 * mach_msg_header_t Head;
4936 * NDR_record_t NDR;
4937 * kern_return_t RetCode;
4938 * } mig_reply_error_t;
4939 */
4940
4941 RequestK *InKP = (RequestK *) InHeadP;
4942 RequestU *In0UP = (RequestU *) InDataP;
4943 ReplyK *OutKP = (ReplyK *) OutHeadP;
4944 ReplyU *OutUP = (ReplyU *) OutDataP;
4945 (void)OutUP;
4946#ifdef __MIG_check__Request__task_set_exc_guard_behavior_t__defined
4947 kern_return_t check_result;
4948#endif /* __MIG_check__Request__task_set_exc_guard_behavior_t__defined */
4949
4950#if __MigKernelSpecificCode
4951#else
4952#endif /* __MigKernelSpecificCode */
4953 task_t task;
4954
4955 __DeclareRcvRpc(3453, "task_set_exc_guard_behavior")
4956 __BeforeRcvRpc(3453, "task_set_exc_guard_behavior")
4957
4958#if defined(__MIG_check__Request__task_set_exc_guard_behavior_t__defined)
4959 check_result = __MIG_check__Request__task_set_exc_guard_behavior_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
4960 if (check_result != MACH_MSG_SUCCESS)
4961 { MIG_RETURN_ERROR(OutKP, check_result); }
4962#endif /* defined(__MIG_check__Request__task_set_exc_guard_behavior_t__defined) */
4963
4964 task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
4965
4966 OutUP->RetCode = task_set_exc_guard_behavior(task, behavior: In0UP->behavior);
4967 task_deallocate_mig(task);
4968#if __MigKernelSpecificCode
4969#endif /* __MigKernelSpecificCode */
4970
4971 OutUP->NDR = NDR_record;
4972
4973
4974 __AfterRcvRpc(3453, "task_set_exc_guard_behavior")
4975}
4976
4977#if ( __MigTypeCheck )
4978#if __MIG_check__Request__task_subsystem__
4979#if !defined(__MIG_check__Request__mach_task_is_self_t__defined)
4980#define __MIG_check__Request__mach_task_is_self_t__defined
4981
4982mig_internal kern_return_t __MIG_check__Request__mach_task_is_self_t(
4983 __attribute__((__unused__)) __RequestKData__mach_task_is_self_t *InKP,
4984 __attribute__((__unused__)) __RequestUData__mach_task_is_self_t *In0UP,
4985 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4986{
4987
4988 typedef __Request__mach_task_is_self_t __Request;
4989 typedef __RequestUData__mach_task_is_self_t __RequestU __attribute__((unused));
4990#if __MigTypeCheck
4991 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4992 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
4993 return MIG_BAD_ARGUMENTS;
4994#endif /* __MigTypeCheck */
4995
4996 return MACH_MSG_SUCCESS;
4997}
4998#endif /* !defined(__MIG_check__Request__mach_task_is_self_t__defined) */
4999#endif /* __MIG_check__Request__task_subsystem__ */
5000#endif /* ( __MigTypeCheck ) */
5001
5002
5003/* Routine mach_task_is_self */
5004mig_internal novalue _Xmach_task_is_self
5005 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
5006 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
5007 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
5008{
5009
5010#ifdef __MigPackStructs
5011#pragma pack(push, 4)
5012#endif
5013 typedef struct {
5014 mach_msg_trailer_t trailer;
5015 char padding[0]; /* Avoid generating empty UData structs */
5016 } RequestU __attribute__((unused));
5017#ifdef __MigPackStructs
5018#pragma pack(pop)
5019#endif
5020 typedef __RequestKData__mach_task_is_self_t RequestK;
5021 typedef __RequestUData__mach_task_is_self_t __RequestU;
5022 typedef __ReplyKData__mach_task_is_self_t ReplyK __attribute__((unused));
5023 typedef __ReplyUData__mach_task_is_self_t ReplyU __attribute__((unused));
5024 typedef __Reply__mach_task_is_self_t Reply __attribute__((unused));
5025 typedef __Request__mach_task_is_self_t __Request __attribute__((unused));
5026
5027 /*
5028 * typedef struct {
5029 * mach_msg_header_t Head;
5030 * NDR_record_t NDR;
5031 * kern_return_t RetCode;
5032 * } mig_reply_error_t;
5033 */
5034
5035 RequestK *InKP = (RequestK *) InHeadP;
5036 RequestU *In0UP = (RequestU *) InDataP;
5037 ReplyK *OutKP = (ReplyK *) OutHeadP;
5038 ReplyU *OutUP = (ReplyU *) OutDataP;
5039 (void)OutUP;
5040#ifdef __MIG_check__Request__mach_task_is_self_t__defined
5041 kern_return_t check_result;
5042#endif /* __MIG_check__Request__mach_task_is_self_t__defined */
5043
5044#if __MigKernelSpecificCode
5045#else
5046#endif /* __MigKernelSpecificCode */
5047 task_name_t task;
5048
5049 __DeclareRcvRpc(3455, "mach_task_is_self")
5050 __BeforeRcvRpc(3455, "mach_task_is_self")
5051
5052#if defined(__MIG_check__Request__mach_task_is_self_t__defined)
5053 check_result = __MIG_check__Request__mach_task_is_self_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
5054 if (check_result != MACH_MSG_SUCCESS)
5055 { MIG_RETURN_ERROR(OutKP, check_result); }
5056#endif /* defined(__MIG_check__Request__mach_task_is_self_t__defined) */
5057
5058 task = convert_port_to_task_name_mig(port: InKP->Head.msgh_request_port);
5059
5060 OutUP->RetCode = mach_task_is_self(task, is_self: &OutUP->is_self);
5061 task_name_deallocate_mig(task_name: task);
5062 if (OutUP->RetCode != KERN_SUCCESS) {
5063 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
5064 }
5065#if __MigKernelSpecificCode
5066#endif /* __MigKernelSpecificCode */
5067
5068 OutUP->NDR = NDR_record;
5069
5070
5071 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
5072 __AfterRcvRpc(3455, "mach_task_is_self")
5073}
5074
5075#if ( __MigTypeCheck )
5076#if __MIG_check__Request__task_subsystem__
5077#if !defined(__MIG_check__Request__task_dyld_process_info_notify_register_t__defined)
5078#define __MIG_check__Request__task_dyld_process_info_notify_register_t__defined
5079
5080mig_internal kern_return_t __MIG_check__Request__task_dyld_process_info_notify_register_t(
5081 __attribute__((__unused__)) __RequestKData__task_dyld_process_info_notify_register_t *InKP,
5082 __attribute__((__unused__)) __RequestUData__task_dyld_process_info_notify_register_t *In0UP,
5083 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
5084{
5085
5086 typedef __Request__task_dyld_process_info_notify_register_t __Request;
5087 typedef __RequestUData__task_dyld_process_info_notify_register_t __RequestU __attribute__((unused));
5088#if __MigTypeCheck
5089 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
5090 (InKP->msgh_body.msgh_descriptor_count != 1) ||
5091 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
5092 return MIG_BAD_ARGUMENTS;
5093#endif /* __MigTypeCheck */
5094
5095#if __MigTypeCheck
5096 if (InKP->notify.type != MACH_MSG_PORT_DESCRIPTOR ||
5097 InKP->notify.disposition != 17)
5098 return MIG_TYPE_ERROR;
5099#endif /* __MigTypeCheck */
5100
5101 return MACH_MSG_SUCCESS;
5102}
5103#endif /* !defined(__MIG_check__Request__task_dyld_process_info_notify_register_t__defined) */
5104#endif /* __MIG_check__Request__task_subsystem__ */
5105#endif /* ( __MigTypeCheck ) */
5106
5107
5108/* Routine task_dyld_process_info_notify_register */
5109mig_internal novalue _Xtask_dyld_process_info_notify_register
5110 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
5111 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
5112 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
5113{
5114
5115#ifdef __MigPackStructs
5116#pragma pack(push, 4)
5117#endif
5118 typedef struct {
5119 mach_msg_trailer_t trailer;
5120 char padding[0]; /* Avoid generating empty UData structs */
5121 } RequestU __attribute__((unused));
5122#ifdef __MigPackStructs
5123#pragma pack(pop)
5124#endif
5125 typedef __RequestKData__task_dyld_process_info_notify_register_t RequestK;
5126 typedef __RequestUData__task_dyld_process_info_notify_register_t __RequestU;
5127 typedef __ReplyKData__task_dyld_process_info_notify_register_t ReplyK __attribute__((unused));
5128 typedef __ReplyUData__task_dyld_process_info_notify_register_t ReplyU __attribute__((unused));
5129 typedef __Reply__task_dyld_process_info_notify_register_t Reply __attribute__((unused));
5130 typedef __Request__task_dyld_process_info_notify_register_t __Request __attribute__((unused));
5131
5132 /*
5133 * typedef struct {
5134 * mach_msg_header_t Head;
5135 * NDR_record_t NDR;
5136 * kern_return_t RetCode;
5137 * } mig_reply_error_t;
5138 */
5139
5140 RequestK *InKP = (RequestK *) InHeadP;
5141 RequestU *In0UP = (RequestU *) InDataP;
5142 ReplyK *OutKP = (ReplyK *) OutHeadP;
5143 ReplyU *OutUP = (ReplyU *) OutDataP;
5144 (void)OutUP;
5145#ifdef __MIG_check__Request__task_dyld_process_info_notify_register_t__defined
5146 kern_return_t check_result;
5147#endif /* __MIG_check__Request__task_dyld_process_info_notify_register_t__defined */
5148
5149#if __MigKernelSpecificCode
5150#else
5151#endif /* __MigKernelSpecificCode */
5152 task_read_t target_task;
5153
5154 __DeclareRcvRpc(3456, "task_dyld_process_info_notify_register")
5155 __BeforeRcvRpc(3456, "task_dyld_process_info_notify_register")
5156
5157#if defined(__MIG_check__Request__task_dyld_process_info_notify_register_t__defined)
5158 check_result = __MIG_check__Request__task_dyld_process_info_notify_register_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
5159 if (check_result != MACH_MSG_SUCCESS)
5160 { MIG_RETURN_ERROR(OutKP, check_result); }
5161#endif /* defined(__MIG_check__Request__task_dyld_process_info_notify_register_t__defined) */
5162
5163 target_task = convert_port_to_task_read_mig(port: InKP->Head.msgh_request_port);
5164
5165 OutUP->RetCode = task_dyld_process_info_notify_register(target_task, notify: InKP->notify.name);
5166 task_read_deallocate_mig(task_read: target_task);
5167#if __MigKernelSpecificCode
5168#endif /* __MigKernelSpecificCode */
5169
5170 OutUP->NDR = NDR_record;
5171
5172
5173 __AfterRcvRpc(3456, "task_dyld_process_info_notify_register")
5174}
5175
5176#if ( __MigTypeCheck )
5177#if __MIG_check__Request__task_subsystem__
5178#if !defined(__MIG_check__Request__task_create_identity_token_t__defined)
5179#define __MIG_check__Request__task_create_identity_token_t__defined
5180
5181mig_internal kern_return_t __MIG_check__Request__task_create_identity_token_t(
5182 __attribute__((__unused__)) __RequestKData__task_create_identity_token_t *InKP,
5183 __attribute__((__unused__)) __RequestUData__task_create_identity_token_t *In0UP,
5184 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
5185{
5186
5187 typedef __Request__task_create_identity_token_t __Request;
5188 typedef __RequestUData__task_create_identity_token_t __RequestU __attribute__((unused));
5189#if __MigTypeCheck
5190 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
5191 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
5192 return MIG_BAD_ARGUMENTS;
5193#endif /* __MigTypeCheck */
5194
5195 return MACH_MSG_SUCCESS;
5196}
5197#endif /* !defined(__MIG_check__Request__task_create_identity_token_t__defined) */
5198#endif /* __MIG_check__Request__task_subsystem__ */
5199#endif /* ( __MigTypeCheck ) */
5200
5201
5202/* Routine task_create_identity_token */
5203mig_internal novalue _Xtask_create_identity_token
5204 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
5205 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
5206 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
5207{
5208
5209#ifdef __MigPackStructs
5210#pragma pack(push, 4)
5211#endif
5212 typedef struct {
5213 mach_msg_trailer_t trailer;
5214 char padding[0]; /* Avoid generating empty UData structs */
5215 } RequestU __attribute__((unused));
5216#ifdef __MigPackStructs
5217#pragma pack(pop)
5218#endif
5219 typedef __RequestKData__task_create_identity_token_t RequestK;
5220 typedef __RequestUData__task_create_identity_token_t __RequestU;
5221 typedef __ReplyKData__task_create_identity_token_t ReplyK __attribute__((unused));
5222 typedef __ReplyUData__task_create_identity_token_t ReplyU __attribute__((unused));
5223 typedef __Reply__task_create_identity_token_t Reply __attribute__((unused));
5224 typedef __Request__task_create_identity_token_t __Request __attribute__((unused));
5225
5226 /*
5227 * typedef struct {
5228 * mach_msg_header_t Head;
5229 * NDR_record_t NDR;
5230 * kern_return_t RetCode;
5231 * } mig_reply_error_t;
5232 */
5233
5234 RequestK *InKP = (RequestK *) InHeadP;
5235 RequestU *In0UP = (RequestU *) InDataP;
5236 ReplyK *OutKP = (ReplyK *) OutHeadP;
5237 ReplyU *OutUP = (ReplyU *) OutDataP;
5238 (void)OutUP;
5239#ifdef __MIG_check__Request__task_create_identity_token_t__defined
5240 kern_return_t check_result;
5241#endif /* __MIG_check__Request__task_create_identity_token_t__defined */
5242
5243#if __MigKernelSpecificCode
5244#if UseStaticTemplates
5245 const static mach_msg_port_descriptor_t tokenTemplate = {
5246 /* name = */ MACH_PORT_NULL,
5247 /* pad1 = */ 0,
5248 /* pad2 = */ 0,
5249 /* disp = */ 17,
5250 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
5251 };
5252#endif /* UseStaticTemplates */
5253
5254#else
5255#if UseStaticTemplates
5256 const static mach_msg_port_descriptor_t tokenTemplate = {
5257 /* name = */ MACH_PORT_NULL,
5258 /* pad1 = */ 0,
5259 /* pad2 = */ 0,
5260 /* disp = */ 19,
5261 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
5262 };
5263#endif /* UseStaticTemplates */
5264
5265#endif /* __MigKernelSpecificCode */
5266 kern_return_t RetCode;
5267 task_t task;
5268 task_id_token_t token;
5269
5270 __DeclareRcvRpc(3457, "task_create_identity_token")
5271 __BeforeRcvRpc(3457, "task_create_identity_token")
5272
5273#if defined(__MIG_check__Request__task_create_identity_token_t__defined)
5274 check_result = __MIG_check__Request__task_create_identity_token_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
5275 if (check_result != MACH_MSG_SUCCESS)
5276 { MIG_RETURN_ERROR(OutKP, check_result); }
5277#endif /* defined(__MIG_check__Request__task_create_identity_token_t__defined) */
5278
5279#if UseStaticTemplates
5280 OutKP->token = tokenTemplate;
5281#else /* UseStaticTemplates */
5282#if __MigKernelSpecificCode
5283 OutKP->token.disposition = 17;
5284#else
5285 OutKP->token.disposition = 19;
5286#endif /* __MigKernelSpecificCode */
5287#if !(defined(KERNEL) && defined(__LP64__))
5288 OutKP->token.pad1 = 0;
5289#endif
5290 OutKP->token.pad2 = 0;
5291 OutKP->token.type = MACH_MSG_PORT_DESCRIPTOR;
5292#if defined(KERNEL)
5293 OutKP->token.pad_end = 0;
5294#endif
5295#endif /* UseStaticTemplates */
5296
5297
5298 task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
5299
5300 RetCode = task_create_identity_token(task, token: &token);
5301 task_deallocate_mig(task);
5302 if (RetCode != KERN_SUCCESS) {
5303 MIG_RETURN_ERROR(OutKP, RetCode);
5304 }
5305#if __MigKernelSpecificCode
5306#endif /* __MigKernelSpecificCode */
5307 OutKP->token.name = (mach_port_t)convert_task_id_token_to_port(token);
5308
5309
5310 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
5311 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
5312 OutKP->msgh_body.msgh_descriptor_count = 1;
5313 __AfterRcvRpc(3457, "task_create_identity_token")
5314}
5315
5316#if ( __MigTypeCheck )
5317#if __MIG_check__Request__task_subsystem__
5318#if !defined(__MIG_check__Request__task_identity_token_get_task_port_t__defined)
5319#define __MIG_check__Request__task_identity_token_get_task_port_t__defined
5320
5321mig_internal kern_return_t __MIG_check__Request__task_identity_token_get_task_port_t(
5322 __attribute__((__unused__)) __RequestKData__task_identity_token_get_task_port_t *InKP,
5323 __attribute__((__unused__)) __RequestUData__task_identity_token_get_task_port_t *In0UP,
5324 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
5325{
5326
5327 typedef __Request__task_identity_token_get_task_port_t __Request;
5328 typedef __RequestUData__task_identity_token_get_task_port_t __RequestU __attribute__((unused));
5329#if __MigTypeCheck
5330 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
5331 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
5332 return MIG_BAD_ARGUMENTS;
5333#endif /* __MigTypeCheck */
5334
5335 return MACH_MSG_SUCCESS;
5336}
5337#endif /* !defined(__MIG_check__Request__task_identity_token_get_task_port_t__defined) */
5338#endif /* __MIG_check__Request__task_subsystem__ */
5339#endif /* ( __MigTypeCheck ) */
5340
5341
5342/* Routine task_identity_token_get_task_port */
5343mig_internal novalue _Xtask_identity_token_get_task_port
5344 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
5345 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
5346 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
5347{
5348
5349#ifdef __MigPackStructs
5350#pragma pack(push, 4)
5351#endif
5352 typedef struct {
5353 NDR_record_t NDR;
5354 task_flavor_t flavor;
5355 mach_msg_trailer_t trailer;
5356 char padding[0]; /* Avoid generating empty UData structs */
5357 } RequestU __attribute__((unused));
5358#ifdef __MigPackStructs
5359#pragma pack(pop)
5360#endif
5361 typedef __RequestKData__task_identity_token_get_task_port_t RequestK;
5362 typedef __RequestUData__task_identity_token_get_task_port_t __RequestU;
5363 typedef __ReplyKData__task_identity_token_get_task_port_t ReplyK __attribute__((unused));
5364 typedef __ReplyUData__task_identity_token_get_task_port_t ReplyU __attribute__((unused));
5365 typedef __Reply__task_identity_token_get_task_port_t Reply __attribute__((unused));
5366 typedef __Request__task_identity_token_get_task_port_t __Request __attribute__((unused));
5367
5368 /*
5369 * typedef struct {
5370 * mach_msg_header_t Head;
5371 * NDR_record_t NDR;
5372 * kern_return_t RetCode;
5373 * } mig_reply_error_t;
5374 */
5375
5376 RequestK *InKP = (RequestK *) InHeadP;
5377 RequestU *In0UP = (RequestU *) InDataP;
5378 ReplyK *OutKP = (ReplyK *) OutHeadP;
5379 ReplyU *OutUP = (ReplyU *) OutDataP;
5380 (void)OutUP;
5381#ifdef __MIG_check__Request__task_identity_token_get_task_port_t__defined
5382 kern_return_t check_result;
5383#endif /* __MIG_check__Request__task_identity_token_get_task_port_t__defined */
5384
5385#if __MigKernelSpecificCode
5386#if UseStaticTemplates
5387 const static mach_msg_port_descriptor_t task_portTemplate = {
5388 /* name = */ MACH_PORT_NULL,
5389 /* pad1 = */ 0,
5390 /* pad2 = */ 0,
5391 /* disp = */ 17,
5392 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
5393 };
5394#endif /* UseStaticTemplates */
5395
5396#else
5397#if UseStaticTemplates
5398 const static mach_msg_port_descriptor_t task_portTemplate = {
5399 /* name = */ MACH_PORT_NULL,
5400 /* pad1 = */ 0,
5401 /* pad2 = */ 0,
5402 /* disp = */ 19,
5403 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
5404 };
5405#endif /* UseStaticTemplates */
5406
5407#endif /* __MigKernelSpecificCode */
5408 kern_return_t RetCode;
5409 task_id_token_t token;
5410
5411 __DeclareRcvRpc(3458, "task_identity_token_get_task_port")
5412 __BeforeRcvRpc(3458, "task_identity_token_get_task_port")
5413
5414#if defined(__MIG_check__Request__task_identity_token_get_task_port_t__defined)
5415 check_result = __MIG_check__Request__task_identity_token_get_task_port_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
5416 if (check_result != MACH_MSG_SUCCESS)
5417 { MIG_RETURN_ERROR(OutKP, check_result); }
5418#endif /* defined(__MIG_check__Request__task_identity_token_get_task_port_t__defined) */
5419
5420#if UseStaticTemplates
5421 OutKP->task_port = task_portTemplate;
5422#else /* UseStaticTemplates */
5423#if __MigKernelSpecificCode
5424 OutKP->task_port.disposition = 17;
5425#else
5426 OutKP->task_port.disposition = 19;
5427#endif /* __MigKernelSpecificCode */
5428#if !(defined(KERNEL) && defined(__LP64__))
5429 OutKP->task_port.pad1 = 0;
5430#endif
5431 OutKP->task_port.pad2 = 0;
5432 OutKP->task_port.type = MACH_MSG_PORT_DESCRIPTOR;
5433#if defined(KERNEL)
5434 OutKP->task_port.pad_end = 0;
5435#endif
5436#endif /* UseStaticTemplates */
5437
5438
5439 token = convert_port_to_task_id_token(port: InKP->Head.msgh_request_port);
5440
5441 RetCode = task_identity_token_get_task_port(token, flavor: In0UP->flavor, task_port: &OutKP->task_port.name);
5442 task_id_token_release(token);
5443 if (RetCode != KERN_SUCCESS) {
5444 MIG_RETURN_ERROR(OutKP, RetCode);
5445 }
5446#if __MigKernelSpecificCode
5447#endif /* __MigKernelSpecificCode */
5448
5449 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
5450 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
5451 OutKP->msgh_body.msgh_descriptor_count = 1;
5452 __AfterRcvRpc(3458, "task_identity_token_get_task_port")
5453}
5454
5455#if ( __MigTypeCheck )
5456#if __MIG_check__Request__task_subsystem__
5457#if !defined(__MIG_check__Request__task_dyld_process_info_notify_deregister_t__defined)
5458#define __MIG_check__Request__task_dyld_process_info_notify_deregister_t__defined
5459
5460mig_internal kern_return_t __MIG_check__Request__task_dyld_process_info_notify_deregister_t(
5461 __attribute__((__unused__)) __RequestKData__task_dyld_process_info_notify_deregister_t *InKP,
5462 __attribute__((__unused__)) __RequestUData__task_dyld_process_info_notify_deregister_t *In0UP,
5463 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
5464{
5465
5466 typedef __Request__task_dyld_process_info_notify_deregister_t __Request;
5467 typedef __RequestUData__task_dyld_process_info_notify_deregister_t __RequestU __attribute__((unused));
5468#if __MigTypeCheck
5469 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
5470 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
5471 return MIG_BAD_ARGUMENTS;
5472#endif /* __MigTypeCheck */
5473
5474 return MACH_MSG_SUCCESS;
5475}
5476#endif /* !defined(__MIG_check__Request__task_dyld_process_info_notify_deregister_t__defined) */
5477#endif /* __MIG_check__Request__task_subsystem__ */
5478#endif /* ( __MigTypeCheck ) */
5479
5480
5481/* Routine task_dyld_process_info_notify_deregister */
5482mig_internal novalue _Xtask_dyld_process_info_notify_deregister
5483 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
5484 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
5485 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
5486{
5487
5488#ifdef __MigPackStructs
5489#pragma pack(push, 4)
5490#endif
5491 typedef struct {
5492 NDR_record_t NDR;
5493 mach_port_name_t notify;
5494 mach_msg_trailer_t trailer;
5495 char padding[0]; /* Avoid generating empty UData structs */
5496 } RequestU __attribute__((unused));
5497#ifdef __MigPackStructs
5498#pragma pack(pop)
5499#endif
5500 typedef __RequestKData__task_dyld_process_info_notify_deregister_t RequestK;
5501 typedef __RequestUData__task_dyld_process_info_notify_deregister_t __RequestU;
5502 typedef __ReplyKData__task_dyld_process_info_notify_deregister_t ReplyK __attribute__((unused));
5503 typedef __ReplyUData__task_dyld_process_info_notify_deregister_t ReplyU __attribute__((unused));
5504 typedef __Reply__task_dyld_process_info_notify_deregister_t Reply __attribute__((unused));
5505 typedef __Request__task_dyld_process_info_notify_deregister_t __Request __attribute__((unused));
5506
5507 /*
5508 * typedef struct {
5509 * mach_msg_header_t Head;
5510 * NDR_record_t NDR;
5511 * kern_return_t RetCode;
5512 * } mig_reply_error_t;
5513 */
5514
5515 RequestK *InKP = (RequestK *) InHeadP;
5516 RequestU *In0UP = (RequestU *) InDataP;
5517 ReplyK *OutKP = (ReplyK *) OutHeadP;
5518 ReplyU *OutUP = (ReplyU *) OutDataP;
5519 (void)OutUP;
5520#ifdef __MIG_check__Request__task_dyld_process_info_notify_deregister_t__defined
5521 kern_return_t check_result;
5522#endif /* __MIG_check__Request__task_dyld_process_info_notify_deregister_t__defined */
5523
5524#if __MigKernelSpecificCode
5525#else
5526#endif /* __MigKernelSpecificCode */
5527 task_read_t target_task;
5528
5529 __DeclareRcvRpc(3459, "task_dyld_process_info_notify_deregister")
5530 __BeforeRcvRpc(3459, "task_dyld_process_info_notify_deregister")
5531
5532#if defined(__MIG_check__Request__task_dyld_process_info_notify_deregister_t__defined)
5533 check_result = __MIG_check__Request__task_dyld_process_info_notify_deregister_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
5534 if (check_result != MACH_MSG_SUCCESS)
5535 { MIG_RETURN_ERROR(OutKP, check_result); }
5536#endif /* defined(__MIG_check__Request__task_dyld_process_info_notify_deregister_t__defined) */
5537
5538 target_task = convert_port_to_task_read_mig(port: InKP->Head.msgh_request_port);
5539
5540 OutUP->RetCode = task_dyld_process_info_notify_deregister(target_task, notify: In0UP->notify);
5541 task_read_deallocate_mig(task_read: target_task);
5542#if __MigKernelSpecificCode
5543#endif /* __MigKernelSpecificCode */
5544
5545 OutUP->NDR = NDR_record;
5546
5547
5548 __AfterRcvRpc(3459, "task_dyld_process_info_notify_deregister")
5549}
5550
5551#if ( __MigTypeCheck )
5552#if __MIG_check__Request__task_subsystem__
5553#if !defined(__MIG_check__Request__task_get_exception_ports_info_t__defined)
5554#define __MIG_check__Request__task_get_exception_ports_info_t__defined
5555
5556mig_internal kern_return_t __MIG_check__Request__task_get_exception_ports_info_t(
5557 __attribute__((__unused__)) __RequestKData__task_get_exception_ports_info_t *InKP,
5558 __attribute__((__unused__)) __RequestUData__task_get_exception_ports_info_t *In0UP,
5559 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
5560{
5561
5562 typedef __Request__task_get_exception_ports_info_t __Request;
5563 typedef __RequestUData__task_get_exception_ports_info_t __RequestU __attribute__((unused));
5564#if __MigTypeCheck
5565 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
5566 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
5567 return MIG_BAD_ARGUMENTS;
5568#endif /* __MigTypeCheck */
5569
5570 return MACH_MSG_SUCCESS;
5571}
5572#endif /* !defined(__MIG_check__Request__task_get_exception_ports_info_t__defined) */
5573#endif /* __MIG_check__Request__task_subsystem__ */
5574#endif /* ( __MigTypeCheck ) */
5575
5576
5577/* Routine task_get_exception_ports_info */
5578mig_internal novalue _Xtask_get_exception_ports_info
5579 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
5580 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
5581 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
5582{
5583
5584#ifdef __MigPackStructs
5585#pragma pack(push, 4)
5586#endif
5587 typedef struct {
5588 NDR_record_t NDR;
5589 exception_mask_t exception_mask;
5590 mach_msg_trailer_t trailer;
5591 char padding[0]; /* Avoid generating empty UData structs */
5592 } RequestU __attribute__((unused));
5593#ifdef __MigPackStructs
5594#pragma pack(pop)
5595#endif
5596 typedef __RequestKData__task_get_exception_ports_info_t RequestK;
5597 typedef __RequestUData__task_get_exception_ports_info_t __RequestU;
5598 typedef __ReplyKData__task_get_exception_ports_info_t ReplyK __attribute__((unused));
5599 typedef __ReplyUData__task_get_exception_ports_info_t ReplyU __attribute__((unused));
5600 typedef __Reply__task_get_exception_ports_info_t Reply __attribute__((unused));
5601 typedef __Request__task_get_exception_ports_info_t __Request __attribute__((unused));
5602
5603 /*
5604 * typedef struct {
5605 * mach_msg_header_t Head;
5606 * NDR_record_t NDR;
5607 * kern_return_t RetCode;
5608 * } mig_reply_error_t;
5609 */
5610
5611 RequestK *InKP = (RequestK *) InHeadP;
5612 RequestU *In0UP = (RequestU *) InDataP;
5613 ReplyK *OutKP = (ReplyK *) OutHeadP;
5614 ReplyU *OutUP = (ReplyU *) OutDataP;
5615 (void)OutUP;
5616 unsigned int msgh_size;
5617 unsigned int msgh_size_delta;
5618
5619#ifdef __MIG_check__Request__task_get_exception_ports_info_t__defined
5620 kern_return_t check_result;
5621#endif /* __MIG_check__Request__task_get_exception_ports_info_t__defined */
5622
5623#if __MigKernelSpecificCode
5624#else
5625#endif /* __MigKernelSpecificCode */
5626 mach_msg_type_number_t masksCnt;
5627 exception_handler_info_t old_handlers_info[32];
5628 exception_behavior_t old_behaviors[32];
5629 thread_state_flavor_t old_flavors[32];
5630
5631 __DeclareRcvRpc(3460, "task_get_exception_ports_info")
5632 __BeforeRcvRpc(3460, "task_get_exception_ports_info")
5633
5634#if defined(__MIG_check__Request__task_get_exception_ports_info_t__defined)
5635 check_result = __MIG_check__Request__task_get_exception_ports_info_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
5636 if (check_result != MACH_MSG_SUCCESS)
5637 { MIG_RETURN_ERROR(OutKP, check_result); }
5638#endif /* defined(__MIG_check__Request__task_get_exception_ports_info_t__defined) */
5639
5640 masksCnt = 32;
5641
5642 OutUP->RetCode = task_get_exception_ports_info(port: InKP->Head.msgh_request_port, exception_mask: In0UP->exception_mask, masks: OutUP->masks, masksCnt: &masksCnt, old_handlers_info, old_behaviors, old_flavors);
5643 if (OutUP->RetCode != KERN_SUCCESS) {
5644 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
5645 }
5646#if __MigKernelSpecificCode
5647#endif /* __MigKernelSpecificCode */
5648
5649 OutUP->NDR = NDR_record;
5650
5651 OutUP->masksCnt = masksCnt;
5652 msgh_size_delta = ((4 * masksCnt));
5653 msgh_size = (mach_msg_size_t)(sizeof(Reply) - 640) + msgh_size_delta;
5654 OutUP = (ReplyU *) ((pointer_t) OutUP + msgh_size_delta - 128);
5655 (void)memcpy(dst: (char *) OutUP->old_handlers_info, src: (const char *) old_handlers_info, n: 8 * masksCnt);
5656 msgh_size_delta = ((8 * masksCnt));
5657 msgh_size += msgh_size_delta;
5658 OutUP = (ReplyU *) ((pointer_t) OutUP + msgh_size_delta - 256);
5659 (void)memcpy(dst: (char *) OutUP->old_behaviors, src: (const char *) old_behaviors, n: 4 * masksCnt);
5660 msgh_size_delta = ((4 * masksCnt));
5661 msgh_size += msgh_size_delta;
5662 OutUP = (ReplyU *) ((pointer_t) OutUP + msgh_size_delta - 128);
5663 (void)memcpy(dst: (char *) OutUP->old_flavors, src: (const char *) old_flavors, n: 4 * masksCnt);
5664 msgh_size += ((4 * masksCnt));
5665
5666 OutKP->Head.msgh_size = msgh_size;
5667 __AfterRcvRpc(3460, "task_get_exception_ports_info")
5668}
5669
5670#if ( __MigTypeCheck )
5671#if __MIG_check__Request__task_subsystem__
5672#if !defined(__MIG_check__Request__task_test_sync_upcall_t__defined)
5673#define __MIG_check__Request__task_test_sync_upcall_t__defined
5674
5675mig_internal kern_return_t __MIG_check__Request__task_test_sync_upcall_t(
5676 __attribute__((__unused__)) __RequestKData__task_test_sync_upcall_t *InKP,
5677 __attribute__((__unused__)) __RequestUData__task_test_sync_upcall_t *In0UP,
5678 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
5679{
5680
5681 typedef __Request__task_test_sync_upcall_t __Request;
5682 typedef __RequestUData__task_test_sync_upcall_t __RequestU __attribute__((unused));
5683#if __MigTypeCheck
5684 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
5685 (InKP->msgh_body.msgh_descriptor_count != 1) ||
5686 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
5687 return MIG_BAD_ARGUMENTS;
5688#endif /* __MigTypeCheck */
5689
5690#if __MigTypeCheck
5691 if (InKP->port.type != MACH_MSG_PORT_DESCRIPTOR ||
5692 InKP->port.disposition != 17)
5693 return MIG_TYPE_ERROR;
5694#endif /* __MigTypeCheck */
5695
5696 return MACH_MSG_SUCCESS;
5697}
5698#endif /* !defined(__MIG_check__Request__task_test_sync_upcall_t__defined) */
5699#endif /* __MIG_check__Request__task_subsystem__ */
5700#endif /* ( __MigTypeCheck ) */
5701
5702
5703/* Routine task_test_sync_upcall */
5704mig_internal novalue _Xtask_test_sync_upcall
5705 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
5706 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
5707 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
5708{
5709
5710#ifdef __MigPackStructs
5711#pragma pack(push, 4)
5712#endif
5713 typedef struct {
5714 mach_msg_trailer_t trailer;
5715 char padding[0]; /* Avoid generating empty UData structs */
5716 } RequestU __attribute__((unused));
5717#ifdef __MigPackStructs
5718#pragma pack(pop)
5719#endif
5720 typedef __RequestKData__task_test_sync_upcall_t RequestK;
5721 typedef __RequestUData__task_test_sync_upcall_t __RequestU;
5722 typedef __ReplyKData__task_test_sync_upcall_t ReplyK __attribute__((unused));
5723 typedef __ReplyUData__task_test_sync_upcall_t ReplyU __attribute__((unused));
5724 typedef __Reply__task_test_sync_upcall_t Reply __attribute__((unused));
5725 typedef __Request__task_test_sync_upcall_t __Request __attribute__((unused));
5726
5727 /*
5728 * typedef struct {
5729 * mach_msg_header_t Head;
5730 * NDR_record_t NDR;
5731 * kern_return_t RetCode;
5732 * } mig_reply_error_t;
5733 */
5734
5735 RequestK *InKP = (RequestK *) InHeadP;
5736 RequestU *In0UP = (RequestU *) InDataP;
5737 ReplyK *OutKP = (ReplyK *) OutHeadP;
5738 ReplyU *OutUP = (ReplyU *) OutDataP;
5739 (void)OutUP;
5740#ifdef __MIG_check__Request__task_test_sync_upcall_t__defined
5741 kern_return_t check_result;
5742#endif /* __MIG_check__Request__task_test_sync_upcall_t__defined */
5743
5744#if __MigKernelSpecificCode
5745#else
5746#endif /* __MigKernelSpecificCode */
5747 task_t task;
5748
5749 __DeclareRcvRpc(3461, "task_test_sync_upcall")
5750 __BeforeRcvRpc(3461, "task_test_sync_upcall")
5751
5752#if defined(__MIG_check__Request__task_test_sync_upcall_t__defined)
5753 check_result = __MIG_check__Request__task_test_sync_upcall_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
5754 if (check_result != MACH_MSG_SUCCESS)
5755 { MIG_RETURN_ERROR(OutKP, check_result); }
5756#endif /* defined(__MIG_check__Request__task_test_sync_upcall_t__defined) */
5757
5758 task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
5759
5760 OutUP->RetCode = task_test_sync_upcall(task, port: InKP->port.name);
5761 task_deallocate_mig(task);
5762#if __MigKernelSpecificCode
5763#endif /* __MigKernelSpecificCode */
5764
5765 OutUP->NDR = NDR_record;
5766
5767
5768 __AfterRcvRpc(3461, "task_test_sync_upcall")
5769}
5770
5771#if ( __MigTypeCheck )
5772#if __MIG_check__Request__task_subsystem__
5773#if !defined(__MIG_check__Request__task_set_corpse_forking_behavior_t__defined)
5774#define __MIG_check__Request__task_set_corpse_forking_behavior_t__defined
5775
5776mig_internal kern_return_t __MIG_check__Request__task_set_corpse_forking_behavior_t(
5777 __attribute__((__unused__)) __RequestKData__task_set_corpse_forking_behavior_t *InKP,
5778 __attribute__((__unused__)) __RequestUData__task_set_corpse_forking_behavior_t *In0UP,
5779 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
5780{
5781
5782 typedef __Request__task_set_corpse_forking_behavior_t __Request;
5783 typedef __RequestUData__task_set_corpse_forking_behavior_t __RequestU __attribute__((unused));
5784#if __MigTypeCheck
5785 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
5786 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
5787 return MIG_BAD_ARGUMENTS;
5788#endif /* __MigTypeCheck */
5789
5790 return MACH_MSG_SUCCESS;
5791}
5792#endif /* !defined(__MIG_check__Request__task_set_corpse_forking_behavior_t__defined) */
5793#endif /* __MIG_check__Request__task_subsystem__ */
5794#endif /* ( __MigTypeCheck ) */
5795
5796
5797/* Routine task_set_corpse_forking_behavior */
5798mig_internal novalue _Xtask_set_corpse_forking_behavior
5799 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
5800 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
5801 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
5802{
5803
5804#ifdef __MigPackStructs
5805#pragma pack(push, 4)
5806#endif
5807 typedef struct {
5808 NDR_record_t NDR;
5809 task_corpse_forking_behavior_t behavior;
5810 mach_msg_trailer_t trailer;
5811 char padding[0]; /* Avoid generating empty UData structs */
5812 } RequestU __attribute__((unused));
5813#ifdef __MigPackStructs
5814#pragma pack(pop)
5815#endif
5816 typedef __RequestKData__task_set_corpse_forking_behavior_t RequestK;
5817 typedef __RequestUData__task_set_corpse_forking_behavior_t __RequestU;
5818 typedef __ReplyKData__task_set_corpse_forking_behavior_t ReplyK __attribute__((unused));
5819 typedef __ReplyUData__task_set_corpse_forking_behavior_t ReplyU __attribute__((unused));
5820 typedef __Reply__task_set_corpse_forking_behavior_t Reply __attribute__((unused));
5821 typedef __Request__task_set_corpse_forking_behavior_t __Request __attribute__((unused));
5822
5823 /*
5824 * typedef struct {
5825 * mach_msg_header_t Head;
5826 * NDR_record_t NDR;
5827 * kern_return_t RetCode;
5828 * } mig_reply_error_t;
5829 */
5830
5831 RequestK *InKP = (RequestK *) InHeadP;
5832 RequestU *In0UP = (RequestU *) InDataP;
5833 ReplyK *OutKP = (ReplyK *) OutHeadP;
5834 ReplyU *OutUP = (ReplyU *) OutDataP;
5835 (void)OutUP;
5836#ifdef __MIG_check__Request__task_set_corpse_forking_behavior_t__defined
5837 kern_return_t check_result;
5838#endif /* __MIG_check__Request__task_set_corpse_forking_behavior_t__defined */
5839
5840#if __MigKernelSpecificCode
5841#else
5842#endif /* __MigKernelSpecificCode */
5843 task_t task;
5844
5845 __DeclareRcvRpc(3462, "task_set_corpse_forking_behavior")
5846 __BeforeRcvRpc(3462, "task_set_corpse_forking_behavior")
5847
5848#if defined(__MIG_check__Request__task_set_corpse_forking_behavior_t__defined)
5849 check_result = __MIG_check__Request__task_set_corpse_forking_behavior_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
5850 if (check_result != MACH_MSG_SUCCESS)
5851 { MIG_RETURN_ERROR(OutKP, check_result); }
5852#endif /* defined(__MIG_check__Request__task_set_corpse_forking_behavior_t__defined) */
5853
5854 task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
5855
5856 OutUP->RetCode = task_set_corpse_forking_behavior(task, behavior: In0UP->behavior);
5857 task_deallocate_mig(task);
5858#if __MigKernelSpecificCode
5859#endif /* __MigKernelSpecificCode */
5860
5861 OutUP->NDR = NDR_record;
5862
5863
5864 __AfterRcvRpc(3462, "task_set_corpse_forking_behavior")
5865}
5866
5867#if ( __MigTypeCheck )
5868#if __MIG_check__Request__task_subsystem__
5869#if !defined(__MIG_check__Request__task_test_async_upcall_propagation_t__defined)
5870#define __MIG_check__Request__task_test_async_upcall_propagation_t__defined
5871
5872mig_internal kern_return_t __MIG_check__Request__task_test_async_upcall_propagation_t(
5873 __attribute__((__unused__)) __RequestKData__task_test_async_upcall_propagation_t *InKP,
5874 __attribute__((__unused__)) __RequestUData__task_test_async_upcall_propagation_t *In0UP,
5875 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
5876{
5877
5878 typedef __Request__task_test_async_upcall_propagation_t __Request;
5879 typedef __RequestUData__task_test_async_upcall_propagation_t __RequestU __attribute__((unused));
5880#if __MigTypeCheck
5881 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
5882 (InKP->msgh_body.msgh_descriptor_count != 1) ||
5883 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
5884 return MIG_BAD_ARGUMENTS;
5885#endif /* __MigTypeCheck */
5886
5887#if __MigTypeCheck
5888 if (InKP->port.type != MACH_MSG_PORT_DESCRIPTOR ||
5889 InKP->port.disposition != 17)
5890 return MIG_TYPE_ERROR;
5891#endif /* __MigTypeCheck */
5892
5893 return MACH_MSG_SUCCESS;
5894}
5895#endif /* !defined(__MIG_check__Request__task_test_async_upcall_propagation_t__defined) */
5896#endif /* __MIG_check__Request__task_subsystem__ */
5897#endif /* ( __MigTypeCheck ) */
5898
5899
5900/* Routine task_test_async_upcall_propagation */
5901mig_internal novalue _Xtask_test_async_upcall_propagation
5902 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
5903 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
5904 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
5905{
5906
5907#ifdef __MigPackStructs
5908#pragma pack(push, 4)
5909#endif
5910 typedef struct {
5911 NDR_record_t NDR;
5912 int qos;
5913 int iotier;
5914 mach_msg_trailer_t trailer;
5915 char padding[0]; /* Avoid generating empty UData structs */
5916 } RequestU __attribute__((unused));
5917#ifdef __MigPackStructs
5918#pragma pack(pop)
5919#endif
5920 typedef __RequestKData__task_test_async_upcall_propagation_t RequestK;
5921 typedef __RequestUData__task_test_async_upcall_propagation_t __RequestU;
5922 typedef __ReplyKData__task_test_async_upcall_propagation_t ReplyK __attribute__((unused));
5923 typedef __ReplyUData__task_test_async_upcall_propagation_t ReplyU __attribute__((unused));
5924 typedef __Reply__task_test_async_upcall_propagation_t Reply __attribute__((unused));
5925 typedef __Request__task_test_async_upcall_propagation_t __Request __attribute__((unused));
5926
5927 /*
5928 * typedef struct {
5929 * mach_msg_header_t Head;
5930 * NDR_record_t NDR;
5931 * kern_return_t RetCode;
5932 * } mig_reply_error_t;
5933 */
5934
5935 RequestK *InKP = (RequestK *) InHeadP;
5936 RequestU *In0UP = (RequestU *) InDataP;
5937 ReplyK *OutKP = (ReplyK *) OutHeadP;
5938 ReplyU *OutUP = (ReplyU *) OutDataP;
5939 (void)OutUP;
5940#ifdef __MIG_check__Request__task_test_async_upcall_propagation_t__defined
5941 kern_return_t check_result;
5942#endif /* __MIG_check__Request__task_test_async_upcall_propagation_t__defined */
5943
5944#if __MigKernelSpecificCode
5945#else
5946#endif /* __MigKernelSpecificCode */
5947 task_t task;
5948
5949 __DeclareRcvRpc(3463, "task_test_async_upcall_propagation")
5950 __BeforeRcvRpc(3463, "task_test_async_upcall_propagation")
5951
5952#if defined(__MIG_check__Request__task_test_async_upcall_propagation_t__defined)
5953 check_result = __MIG_check__Request__task_test_async_upcall_propagation_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
5954 if (check_result != MACH_MSG_SUCCESS)
5955 { MIG_RETURN_ERROR(OutKP, check_result); }
5956#endif /* defined(__MIG_check__Request__task_test_async_upcall_propagation_t__defined) */
5957
5958 task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
5959
5960 OutUP->RetCode = task_test_async_upcall_propagation(task, port: InKP->port.name, qos: In0UP->qos, iotier: In0UP->iotier);
5961 task_deallocate_mig(task);
5962#if __MigKernelSpecificCode
5963#endif /* __MigKernelSpecificCode */
5964
5965 OutUP->NDR = NDR_record;
5966
5967
5968 __AfterRcvRpc(3463, "task_test_async_upcall_propagation")
5969}
5970
5971#if ( __MigTypeCheck )
5972#if __MIG_check__Request__task_subsystem__
5973#if !defined(__MIG_check__Request__task_map_kcdata_object_64_t__defined)
5974#define __MIG_check__Request__task_map_kcdata_object_64_t__defined
5975
5976mig_internal kern_return_t __MIG_check__Request__task_map_kcdata_object_64_t(
5977 __attribute__((__unused__)) __RequestKData__task_map_kcdata_object_64_t *InKP,
5978 __attribute__((__unused__)) __RequestUData__task_map_kcdata_object_64_t *In0UP,
5979 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
5980{
5981
5982 typedef __Request__task_map_kcdata_object_64_t __Request;
5983 typedef __RequestUData__task_map_kcdata_object_64_t __RequestU __attribute__((unused));
5984#if __MigTypeCheck
5985 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
5986 (InKP->msgh_body.msgh_descriptor_count != 1) ||
5987 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
5988 return MIG_BAD_ARGUMENTS;
5989#endif /* __MigTypeCheck */
5990
5991#if __MigTypeCheck
5992 if (InKP->kcdata_object.type != MACH_MSG_PORT_DESCRIPTOR ||
5993 InKP->kcdata_object.disposition != 17)
5994 return MIG_TYPE_ERROR;
5995#endif /* __MigTypeCheck */
5996
5997 return MACH_MSG_SUCCESS;
5998}
5999#endif /* !defined(__MIG_check__Request__task_map_kcdata_object_64_t__defined) */
6000#endif /* __MIG_check__Request__task_subsystem__ */
6001#endif /* ( __MigTypeCheck ) */
6002
6003
6004/* Routine task_map_kcdata_object_64 */
6005mig_internal novalue _Xtask_map_kcdata_object_64
6006 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
6007 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
6008 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
6009{
6010
6011#ifdef __MigPackStructs
6012#pragma pack(push, 4)
6013#endif
6014 typedef struct {
6015 mach_msg_trailer_t trailer;
6016 char padding[0]; /* Avoid generating empty UData structs */
6017 } RequestU __attribute__((unused));
6018#ifdef __MigPackStructs
6019#pragma pack(pop)
6020#endif
6021 typedef __RequestKData__task_map_kcdata_object_64_t RequestK;
6022 typedef __RequestUData__task_map_kcdata_object_64_t __RequestU;
6023 typedef __ReplyKData__task_map_kcdata_object_64_t ReplyK __attribute__((unused));
6024 typedef __ReplyUData__task_map_kcdata_object_64_t ReplyU __attribute__((unused));
6025 typedef __Reply__task_map_kcdata_object_64_t Reply __attribute__((unused));
6026 typedef __Request__task_map_kcdata_object_64_t __Request __attribute__((unused));
6027
6028 /*
6029 * typedef struct {
6030 * mach_msg_header_t Head;
6031 * NDR_record_t NDR;
6032 * kern_return_t RetCode;
6033 * } mig_reply_error_t;
6034 */
6035
6036 RequestK *InKP = (RequestK *) InHeadP;
6037 RequestU *In0UP = (RequestU *) InDataP;
6038 ReplyK *OutKP = (ReplyK *) OutHeadP;
6039 ReplyU *OutUP = (ReplyU *) OutDataP;
6040 (void)OutUP;
6041#ifdef __MIG_check__Request__task_map_kcdata_object_64_t__defined
6042 kern_return_t check_result;
6043#endif /* __MIG_check__Request__task_map_kcdata_object_64_t__defined */
6044
6045#if __MigKernelSpecificCode
6046#else
6047#endif /* __MigKernelSpecificCode */
6048 task_t task;
6049 kcdata_object_t kcdata_object;
6050
6051 __DeclareRcvRpc(3464, "task_map_kcdata_object_64")
6052 __BeforeRcvRpc(3464, "task_map_kcdata_object_64")
6053
6054#if defined(__MIG_check__Request__task_map_kcdata_object_64_t__defined)
6055 check_result = __MIG_check__Request__task_map_kcdata_object_64_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
6056 if (check_result != MACH_MSG_SUCCESS)
6057 { MIG_RETURN_ERROR(OutKP, check_result); }
6058#endif /* defined(__MIG_check__Request__task_map_kcdata_object_64_t__defined) */
6059
6060 task = convert_port_to_task_mig(port: InKP->Head.msgh_request_port);
6061
6062 kcdata_object = convert_port_to_kcdata_object(port: InKP->kcdata_object.name);
6063
6064 OutUP->RetCode = task_map_kcdata_object_64(task, kcdata_object, kcd_addr_begin: &OutUP->kcd_addr_begin, kcd_size: &OutUP->kcd_size);
6065 kcdata_object_release(obj: kcdata_object);
6066 task_deallocate_mig(task);
6067 if (OutUP->RetCode != KERN_SUCCESS) {
6068 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
6069 }
6070#if __MigKernelSpecificCode
6071 ipc_port_release_send(port: (ipc_port_t)InKP->kcdata_object.name);
6072#endif /* __MigKernelSpecificCode */
6073
6074 OutUP->NDR = NDR_record;
6075
6076
6077 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
6078 __AfterRcvRpc(3464, "task_map_kcdata_object_64")
6079}
6080
6081
6082
6083/* Description of this kernel subsystem, for use in direct RPC */
6084const struct task_subsystem task_subsystem = {
6085 task_server_routine,
6086 3400,
6087 3465,
6088 (mach_msg_size_t)sizeof(union __ReplyUnion__task_subsystem),
6089 (vm_address_t)0,
6090 {
6091 {0, 0, 0, 0, 0, 0},
6092 { .impl_routine: (mig_impl_routine_t) 0,
6093 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_terminate, .argc: 1, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_terminate_t)},
6094 { .impl_routine: (mig_impl_routine_t) 0,
6095 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_threads_from_user, .argc: 3, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_threads_from_user_t)},
6096 { .impl_routine: (mig_impl_routine_t) 0,
6097 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_ports_register, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_ports_register_t)},
6098 { .impl_routine: (mig_impl_routine_t) 0,
6099 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_ports_lookup, .argc: 3, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_ports_lookup_t)},
6100 { .impl_routine: (mig_impl_routine_t) 0,
6101 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_info_from_user, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_info_from_user_t)},
6102 { .impl_routine: (mig_impl_routine_t) 0,
6103 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_set_info, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_set_info_t)},
6104 { .impl_routine: (mig_impl_routine_t) 0,
6105 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_suspend, .argc: 1, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_suspend_t)},
6106 { .impl_routine: (mig_impl_routine_t) 0,
6107 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_resume, .argc: 1, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_resume_t)},
6108 { .impl_routine: (mig_impl_routine_t) 0,
6109 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_get_special_port_from_user, .argc: 3, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_get_special_port_from_user_t)},
6110 { .impl_routine: (mig_impl_routine_t) 0,
6111 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_set_special_port_from_user, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_set_special_port_from_user_t)},
6112 { .impl_routine: (mig_impl_routine_t) 0,
6113 .kstub_routine: (mig_stub_kern_routine_t) _Xthread_create_from_user, .argc: 2, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__thread_create_from_user_t)},
6114 { .impl_routine: (mig_impl_routine_t) 0,
6115 .kstub_routine: (mig_stub_kern_routine_t) _Xthread_create_running_from_user, .argc: 5, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__thread_create_running_from_user_t)},
6116 { .impl_routine: (mig_impl_routine_t) 0,
6117 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_set_exception_ports, .argc: 5, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_set_exception_ports_t)},
6118 { .impl_routine: (mig_impl_routine_t) 0,
6119 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_get_exception_ports_from_user, .argc: 7, .descr_count: 0, .reply_descr_count: 32, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_get_exception_ports_from_user_t)},
6120 { .impl_routine: (mig_impl_routine_t) 0,
6121 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_swap_exception_ports, .argc: 10, .descr_count: 0, .reply_descr_count: 32, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_swap_exception_ports_t)},
6122 {.impl_routine: 0, .kstub_routine: 0, .argc: 0, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: 0},
6123 {.impl_routine: 0, .kstub_routine: 0, .argc: 0, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: 0},
6124 { .impl_routine: (mig_impl_routine_t) 0,
6125 .kstub_routine: (mig_stub_kern_routine_t) _Xsemaphore_create, .argc: 4, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__semaphore_create_t)},
6126 { .impl_routine: (mig_impl_routine_t) 0,
6127 .kstub_routine: (mig_stub_kern_routine_t) _Xsemaphore_destroy, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__semaphore_destroy_t)},
6128 { .impl_routine: (mig_impl_routine_t) 0,
6129 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_policy_set, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_policy_set_t)},
6130 { .impl_routine: (mig_impl_routine_t) 0,
6131 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_policy_get, .argc: 5, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_policy_get_t)},
6132 {.impl_routine: 0, .kstub_routine: 0, .argc: 0, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: 0},
6133 {.impl_routine: 0, .kstub_routine: 0, .argc: 0, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: 0},
6134 {.impl_routine: 0, .kstub_routine: 0, .argc: 0, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: 0},
6135 {.impl_routine: 0, .kstub_routine: 0, .argc: 0, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: 0},
6136 {.impl_routine: 0, .kstub_routine: 0, .argc: 0, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: 0},
6137 {.impl_routine: 0, .kstub_routine: 0, .argc: 0, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: 0},
6138 {.impl_routine: 0, .kstub_routine: 0, .argc: 0, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: 0},
6139 {.impl_routine: 0, .kstub_routine: 0, .argc: 0, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: 0},
6140 {.impl_routine: 0, .kstub_routine: 0, .argc: 0, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: 0},
6141 {.impl_routine: 0, .kstub_routine: 0, .argc: 0, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: 0},
6142 {.impl_routine: 0, .kstub_routine: 0, .argc: 0, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: 0},
6143 { .impl_routine: (mig_impl_routine_t) 0,
6144 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_get_state, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_get_state_t)},
6145 { .impl_routine: (mig_impl_routine_t) 0,
6146 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_set_state, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_set_state_t)},
6147 { .impl_routine: (mig_impl_routine_t) 0,
6148 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_set_phys_footprint_limit, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_set_phys_footprint_limit_t)},
6149 { .impl_routine: (mig_impl_routine_t) 0,
6150 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_suspend2_mig, .argc: 2, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_suspend2_mig_t)},
6151 { .impl_routine: (mig_impl_routine_t) 0,
6152 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_resume2_mig, .argc: 1, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_resume2_mig_t)},
6153 { .impl_routine: (mig_impl_routine_t) 0,
6154 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_purgable_info, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_purgable_info_t)},
6155 { .impl_routine: (mig_impl_routine_t) 0,
6156 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_get_mach_voucher, .argc: 3, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_get_mach_voucher_t)},
6157 { .impl_routine: (mig_impl_routine_t) 0,
6158 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_set_mach_voucher, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_set_mach_voucher_t)},
6159 { .impl_routine: (mig_impl_routine_t) 0,
6160 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_swap_mach_voucher, .argc: 3, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_swap_mach_voucher_t)},
6161 { .impl_routine: (mig_impl_routine_t) 0,
6162 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_generate_corpse, .argc: 2, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_generate_corpse_t)},
6163 { .impl_routine: (mig_impl_routine_t) 0,
6164 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_map_corpse_info, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_map_corpse_info_t)},
6165 { .impl_routine: (mig_impl_routine_t) 0,
6166 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_register_dyld_image_infos, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_register_dyld_image_infos_t)},
6167 { .impl_routine: (mig_impl_routine_t) 0,
6168 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_unregister_dyld_image_infos, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_unregister_dyld_image_infos_t)},
6169 { .impl_routine: (mig_impl_routine_t) 0,
6170 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_get_dyld_image_infos, .argc: 3, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_get_dyld_image_infos_t)},
6171 { .impl_routine: (mig_impl_routine_t) 0,
6172 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_register_dyld_shared_cache_image_info, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_register_dyld_shared_cache_image_info_t)},
6173 { .impl_routine: (mig_impl_routine_t) 0,
6174 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_register_dyld_set_dyld_state, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_register_dyld_set_dyld_state_t)},
6175 { .impl_routine: (mig_impl_routine_t) 0,
6176 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_register_dyld_get_process_state, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_register_dyld_get_process_state_t)},
6177 { .impl_routine: (mig_impl_routine_t) 0,
6178 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_map_corpse_info_64, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_map_corpse_info_64_t)},
6179 { .impl_routine: (mig_impl_routine_t) 0,
6180 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_inspect, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_inspect_t)},
6181 { .impl_routine: (mig_impl_routine_t) 0,
6182 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_get_exc_guard_behavior, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_get_exc_guard_behavior_t)},
6183 { .impl_routine: (mig_impl_routine_t) 0,
6184 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_set_exc_guard_behavior, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_set_exc_guard_behavior_t)},
6185 {.impl_routine: 0, .kstub_routine: 0, .argc: 0, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: 0},
6186 { .impl_routine: (mig_impl_routine_t) 0,
6187 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_task_is_self, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_task_is_self_t)},
6188 { .impl_routine: (mig_impl_routine_t) 0,
6189 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_dyld_process_info_notify_register, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_dyld_process_info_notify_register_t)},
6190 { .impl_routine: (mig_impl_routine_t) 0,
6191 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_create_identity_token, .argc: 2, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_create_identity_token_t)},
6192 { .impl_routine: (mig_impl_routine_t) 0,
6193 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_identity_token_get_task_port, .argc: 3, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_identity_token_get_task_port_t)},
6194 { .impl_routine: (mig_impl_routine_t) 0,
6195 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_dyld_process_info_notify_deregister, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_dyld_process_info_notify_deregister_t)},
6196 { .impl_routine: (mig_impl_routine_t) 0,
6197 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_get_exception_ports_info, .argc: 7, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_get_exception_ports_info_t)},
6198 { .impl_routine: (mig_impl_routine_t) 0,
6199 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_test_sync_upcall, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_test_sync_upcall_t)},
6200 { .impl_routine: (mig_impl_routine_t) 0,
6201 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_set_corpse_forking_behavior, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_set_corpse_forking_behavior_t)},
6202 { .impl_routine: (mig_impl_routine_t) 0,
6203 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_test_async_upcall_propagation, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_test_async_upcall_propagation_t)},
6204 { .impl_routine: (mig_impl_routine_t) 0,
6205 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_map_kcdata_object_64, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_map_kcdata_object_64_t)},
6206 }
6207};
6208
6209mig_external boolean_t task_server
6210 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP)
6211{
6212 /*
6213 * typedef struct {
6214 * mach_msg_header_t Head;
6215 * NDR_record_t NDR;
6216 * kern_return_t RetCode;
6217 * } mig_reply_error_t;
6218 */
6219
6220 mig_kern_routine_t routine;
6221
6222 OutHeadP->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InHeadP->msgh_bits), 0);
6223 OutHeadP->msgh_remote_port = InHeadP->msgh_reply_port;
6224 /* Minimal size: routine() will update it if different */
6225 OutHeadP->msgh_size = (mach_msg_size_t)sizeof(mig_reply_error_t);
6226 OutHeadP->msgh_local_port = MACH_PORT_NULL;
6227 OutHeadP->msgh_id = InHeadP->msgh_id + 100;
6228 OutHeadP->msgh_reserved = 0;
6229
6230 if ((InHeadP->msgh_id > 3464) || (InHeadP->msgh_id < 3400) ||
6231 ((routine = task_subsystem.kroutine[InHeadP->msgh_id - 3400].kstub_routine) == 0)) {
6232 ((mig_reply_error_t *)OutHeadP)->NDR = NDR_record;
6233 ((mig_reply_error_t *)OutHeadP)->RetCode = MIG_BAD_ID;
6234 return FALSE;
6235 }
6236 (*routine) (InHeadP, InDataP, InTrailerP, OutHeadP, OutDataP);
6237 return TRUE;
6238}
6239
6240mig_external mig_kern_routine_t task_server_routine
6241 (mach_msg_header_t *InHeadP)
6242{
6243 int msgh_id;
6244
6245 msgh_id = InHeadP->msgh_id - 3400;
6246
6247 if ((msgh_id > 64) || (msgh_id < 0))
6248 return 0;
6249
6250 return task_subsystem.kroutine[msgh_id].kstub_routine;
6251}
6252