1 #ifndef	_thread_act_user_
2 #define	_thread_act_user_
3 
4 /* Module thread_act */
5 
6 #include <string.h>
7 #include <mach/ndr.h>
8 #include <mach/boolean.h>
9 #include <mach/kern_return.h>
10 #include <mach/notify.h>
11 #include <mach/mach_types.h>
12 #include <mach/message.h>
13 #include <mach/mig_errors.h>
14 #include <mach/port.h>
15 
16 /* BEGIN MIG_STRNCPY_ZEROFILL CODE */
17 
18 #if defined(__has_include)
19 #if __has_include(<mach/mig_strncpy_zerofill_support.h>)
20 #ifndef USING_MIG_STRNCPY_ZEROFILL
21 #define USING_MIG_STRNCPY_ZEROFILL
22 #endif
23 #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
24 #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
29 #ifdef __cplusplus
30 }
31 #endif
32 #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
33 #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
34 #endif /* __has_include */
35 
36 /* END MIG_STRNCPY_ZEROFILL CODE */
37 
38 
39 #ifdef AUTOTEST
40 #ifndef FUNCTION_PTR_T
41 #define FUNCTION_PTR_T
42 typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
43 typedef struct {
44         char            *name;
45         function_ptr_t  function;
46 } function_table_entry;
47 typedef function_table_entry   *function_table_t;
48 #endif /* FUNCTION_PTR_T */
49 #endif /* AUTOTEST */
50 
51 #ifndef	thread_act_MSG_COUNT
52 #define	thread_act_MSG_COUNT	28
53 #endif	/* thread_act_MSG_COUNT */
54 
55 #include <mach/std_types.h>
56 #include <mach/mig.h>
57 #include <mach/mig.h>
58 #include <mach/mach_types.h>
59 
60 #ifdef __BeforeMigUserHeader
61 __BeforeMigUserHeader
62 #endif /* __BeforeMigUserHeader */
63 
64 #include <sys/cdefs.h>
65 __BEGIN_DECLS
66 
67 
68 /* Routine thread_terminate */
69 #ifdef	mig_external
70 mig_external
71 #else
72 extern
73 #endif	/* mig_external */
74 __WATCHOS_PROHIBITED
75 __TVOS_PROHIBITED
76 kern_return_t thread_terminate
77 (
78 	thread_act_t target_act
79 );
80 
81 /* Routine act_get_state */
82 #ifdef	mig_external
83 mig_external
84 #else
85 extern
86 #endif	/* mig_external */
87 __WATCHOS_PROHIBITED
88 __TVOS_PROHIBITED
89 kern_return_t act_get_state
90 (
91 	thread_act_t target_act,
92 	int flavor,
93 	thread_state_t old_state,
94 	mach_msg_type_number_t *old_stateCnt
95 );
96 
97 /* Routine act_set_state */
98 #ifdef	mig_external
99 mig_external
100 #else
101 extern
102 #endif	/* mig_external */
103 __WATCHOS_PROHIBITED
104 __TVOS_PROHIBITED
105 kern_return_t act_set_state
106 (
107 	thread_act_t target_act,
108 	int flavor,
109 	thread_state_t new_state,
110 	mach_msg_type_number_t new_stateCnt
111 );
112 
113 /* Routine thread_get_state */
114 #ifdef	mig_external
115 mig_external
116 #else
117 extern
118 #endif	/* mig_external */
119 __WATCHOS_PROHIBITED
120 kern_return_t thread_get_state
121 (
122 	thread_act_t target_act,
123 	thread_state_flavor_t flavor,
124 	thread_state_t old_state,
125 	mach_msg_type_number_t *old_stateCnt
126 );
127 
128 /* Routine thread_set_state */
129 #ifdef	mig_external
130 mig_external
131 #else
132 extern
133 #endif	/* mig_external */
134 __WATCHOS_PROHIBITED
135 kern_return_t thread_set_state
136 (
137 	thread_act_t target_act,
138 	thread_state_flavor_t flavor,
139 	thread_state_t new_state,
140 	mach_msg_type_number_t new_stateCnt
141 );
142 
143 /* Routine thread_suspend */
144 #ifdef	mig_external
145 mig_external
146 #else
147 extern
148 #endif	/* mig_external */
149 __WATCHOS_PROHIBITED
150 kern_return_t thread_suspend
151 (
152 	thread_act_t target_act
153 );
154 
155 /* Routine thread_resume */
156 #ifdef	mig_external
157 mig_external
158 #else
159 extern
160 #endif	/* mig_external */
161 __WATCHOS_PROHIBITED
162 kern_return_t thread_resume
163 (
164 	thread_act_t target_act
165 );
166 
167 /* Routine thread_abort */
168 #ifdef	mig_external
169 mig_external
170 #else
171 extern
172 #endif	/* mig_external */
173 __WATCHOS_PROHIBITED
174 kern_return_t thread_abort
175 (
176 	thread_act_t target_act
177 );
178 
179 /* Routine thread_abort_safely */
180 #ifdef	mig_external
181 mig_external
182 #else
183 extern
184 #endif	/* mig_external */
185 __WATCHOS_PROHIBITED
186 kern_return_t thread_abort_safely
187 (
188 	thread_act_t target_act
189 );
190 
191 /* Routine thread_depress_abort */
192 #ifdef	mig_external
193 mig_external
194 #else
195 extern
196 #endif	/* mig_external */
197 __WATCHOS_PROHIBITED
198 __TVOS_PROHIBITED
199 kern_return_t thread_depress_abort
200 (
201 	thread_act_t thread
202 );
203 
204 /* Routine thread_get_special_port */
205 #ifdef	mig_external
206 mig_external
207 #else
208 extern
209 #endif	/* mig_external */
210 __WATCHOS_PROHIBITED
211 __TVOS_PROHIBITED
212 kern_return_t thread_get_special_port
213 (
214 	thread_act_t thr_act,
215 	int which_port,
216 	mach_port_t *special_port
217 );
218 
219 /* Routine thread_set_special_port */
220 #ifdef	mig_external
221 mig_external
222 #else
223 extern
224 #endif	/* mig_external */
225 __WATCHOS_PROHIBITED
226 __TVOS_PROHIBITED
227 kern_return_t thread_set_special_port
228 (
229 	thread_act_t thr_act,
230 	int which_port,
231 	mach_port_t special_port
232 );
233 
234 /* Routine thread_info */
235 #ifdef	mig_external
236 mig_external
237 #else
238 extern
239 #endif	/* mig_external */
240 kern_return_t thread_info
241 (
242 	thread_inspect_t target_act,
243 	thread_flavor_t flavor,
244 	thread_info_t thread_info_out,
245 	mach_msg_type_number_t *thread_info_outCnt
246 );
247 
248 /* Routine thread_set_exception_ports */
249 #ifdef	mig_external
250 mig_external
251 #else
252 extern
253 #endif	/* mig_external */
254 __WATCHOS_PROHIBITED
255 __TVOS_PROHIBITED
256 kern_return_t thread_set_exception_ports
257 (
258 	thread_act_t thread,
259 	exception_mask_t exception_mask,
260 	mach_port_t new_port,
261 	exception_behavior_t behavior,
262 	thread_state_flavor_t new_flavor
263 );
264 
265 /* Routine thread_get_exception_ports */
266 #ifdef	mig_external
267 mig_external
268 #else
269 extern
270 #endif	/* mig_external */
271 __WATCHOS_PROHIBITED
272 __TVOS_PROHIBITED
273 kern_return_t thread_get_exception_ports
274 (
275 	thread_inspect_t thread,
276 	exception_mask_t exception_mask,
277 	exception_mask_array_t masks,
278 	mach_msg_type_number_t *masksCnt,
279 	exception_handler_array_t old_handlers,
280 	exception_behavior_array_t old_behaviors,
281 	exception_flavor_array_t old_flavors
282 );
283 
284 /* Routine thread_swap_exception_ports */
285 #ifdef	mig_external
286 mig_external
287 #else
288 extern
289 #endif	/* mig_external */
290 __WATCHOS_PROHIBITED
291 __TVOS_PROHIBITED
292 kern_return_t thread_swap_exception_ports
293 (
294 	thread_act_t thread,
295 	exception_mask_t exception_mask,
296 	mach_port_t new_port,
297 	exception_behavior_t behavior,
298 	thread_state_flavor_t new_flavor,
299 	exception_mask_array_t masks,
300 	mach_msg_type_number_t *masksCnt,
301 	exception_handler_array_t old_handlers,
302 	exception_behavior_array_t old_behaviors,
303 	exception_flavor_array_t old_flavors
304 );
305 
306 /* Routine thread_policy */
307 #ifdef	mig_external
308 mig_external
309 #else
310 extern
311 #endif	/* mig_external */
312 kern_return_t thread_policy
313 (
314 	thread_act_t thr_act,
315 	policy_t policy,
316 	policy_base_t base,
317 	mach_msg_type_number_t baseCnt,
318 	boolean_t set_limit
319 );
320 
321 /* Routine thread_policy_set */
322 #ifdef	mig_external
323 mig_external
324 #else
325 extern
326 #endif	/* mig_external */
327 kern_return_t thread_policy_set
328 (
329 	thread_act_t thread,
330 	thread_policy_flavor_t flavor,
331 	thread_policy_t policy_info,
332 	mach_msg_type_number_t policy_infoCnt
333 );
334 
335 /* Routine thread_policy_get */
336 #ifdef	mig_external
337 mig_external
338 #else
339 extern
340 #endif	/* mig_external */
341 kern_return_t thread_policy_get
342 (
343 	thread_inspect_t thread,
344 	thread_policy_flavor_t flavor,
345 	thread_policy_t policy_info,
346 	mach_msg_type_number_t *policy_infoCnt,
347 	boolean_t *get_default
348 );
349 
350 /* Routine thread_sample */
351 #ifdef	mig_external
352 mig_external
353 #else
354 extern
355 #endif	/* mig_external */
356 kern_return_t thread_sample
357 (
358 	thread_act_t thread,
359 	mach_port_t reply
360 );
361 
362 /* Routine etap_trace_thread */
363 #ifdef	mig_external
364 mig_external
365 #else
366 extern
367 #endif	/* mig_external */
368 kern_return_t etap_trace_thread
369 (
370 	thread_act_t target_act,
371 	boolean_t trace_status
372 );
373 
374 /* Routine thread_assign */
375 #ifdef	mig_external
376 mig_external
377 #else
378 extern
379 #endif	/* mig_external */
380 kern_return_t thread_assign
381 (
382 	thread_act_t thread,
383 	processor_set_t new_set
384 );
385 
386 /* Routine thread_assign_default */
387 #ifdef	mig_external
388 mig_external
389 #else
390 extern
391 #endif	/* mig_external */
392 kern_return_t thread_assign_default
393 (
394 	thread_act_t thread
395 );
396 
397 /* Routine thread_get_assignment */
398 #ifdef	mig_external
399 mig_external
400 #else
401 extern
402 #endif	/* mig_external */
403 kern_return_t thread_get_assignment
404 (
405 	thread_act_t thread,
406 	processor_set_name_t *assigned_set
407 );
408 
409 /* Routine thread_set_policy */
410 #ifdef	mig_external
411 mig_external
412 #else
413 extern
414 #endif	/* mig_external */
415 kern_return_t thread_set_policy
416 (
417 	thread_act_t thr_act,
418 	processor_set_t pset,
419 	policy_t policy,
420 	policy_base_t base,
421 	mach_msg_type_number_t baseCnt,
422 	policy_limit_t limit,
423 	mach_msg_type_number_t limitCnt
424 );
425 
426 /* Routine thread_get_mach_voucher */
427 #ifdef	mig_external
428 mig_external
429 #else
430 extern
431 #endif	/* mig_external */
432 __WATCHOS_PROHIBITED
433 __TVOS_PROHIBITED
434 kern_return_t thread_get_mach_voucher
435 (
436 	thread_act_t thr_act,
437 	mach_voucher_selector_t which,
438 	ipc_voucher_t *voucher
439 );
440 
441 /* Routine thread_set_mach_voucher */
442 #ifdef	mig_external
443 mig_external
444 #else
445 extern
446 #endif	/* mig_external */
447 __WATCHOS_PROHIBITED
448 __TVOS_PROHIBITED
449 kern_return_t thread_set_mach_voucher
450 (
451 	thread_act_t thr_act,
452 	ipc_voucher_t voucher
453 );
454 
455 /* Routine thread_swap_mach_voucher */
456 #ifdef	mig_external
457 mig_external
458 #else
459 extern
460 #endif	/* mig_external */
461 __WATCHOS_PROHIBITED
462 __TVOS_PROHIBITED
463 kern_return_t thread_swap_mach_voucher
464 (
465 	thread_act_t thr_act,
466 	ipc_voucher_t new_voucher,
467 	ipc_voucher_t *old_voucher
468 );
469 
470 __END_DECLS
471 
472 /********************** Caution **************************/
473 /* The following data types should be used to calculate  */
474 /* maximum message sizes only. The actual message may be */
475 /* smaller, and the position of the arguments within the */
476 /* message layout may vary from what is presented here.  */
477 /* For example, if any of the arguments are variable-    */
478 /* sized, and less than the maximum is sent, the data    */
479 /* will be packed tight in the actual message to reduce  */
480 /* the presence of holes.                                */
481 /********************** Caution **************************/
482 
483 /* typedefs for all requests */
484 
485 #ifndef __Request__thread_act_subsystem__defined
486 #define __Request__thread_act_subsystem__defined
487 
488 #ifdef  __MigPackStructs
489 #pragma pack(push, 4)
490 #endif
491 	typedef struct {
492 		mach_msg_header_t Head;
493 	} __Request__thread_terminate_t __attribute__((unused));
494 #ifdef  __MigPackStructs
495 #pragma pack(pop)
496 #endif
497 
498 #ifdef  __MigPackStructs
499 #pragma pack(push, 4)
500 #endif
501 	typedef struct {
502 		mach_msg_header_t Head;
503 		NDR_record_t NDR;
504 		int flavor;
505 		mach_msg_type_number_t old_stateCnt;
506 	} __Request__act_get_state_t __attribute__((unused));
507 #ifdef  __MigPackStructs
508 #pragma pack(pop)
509 #endif
510 
511 #ifdef  __MigPackStructs
512 #pragma pack(push, 4)
513 #endif
514 	typedef struct {
515 		mach_msg_header_t Head;
516 		NDR_record_t NDR;
517 		int flavor;
518 		mach_msg_type_number_t new_stateCnt;
519 		natural_t new_state[614];
520 	} __Request__act_set_state_t __attribute__((unused));
521 #ifdef  __MigPackStructs
522 #pragma pack(pop)
523 #endif
524 
525 #ifdef  __MigPackStructs
526 #pragma pack(push, 4)
527 #endif
528 	typedef struct {
529 		mach_msg_header_t Head;
530 		NDR_record_t NDR;
531 		thread_state_flavor_t flavor;
532 		mach_msg_type_number_t old_stateCnt;
533 	} __Request__thread_get_state_t __attribute__((unused));
534 #ifdef  __MigPackStructs
535 #pragma pack(pop)
536 #endif
537 
538 #ifdef  __MigPackStructs
539 #pragma pack(push, 4)
540 #endif
541 	typedef struct {
542 		mach_msg_header_t Head;
543 		NDR_record_t NDR;
544 		thread_state_flavor_t flavor;
545 		mach_msg_type_number_t new_stateCnt;
546 		natural_t new_state[614];
547 	} __Request__thread_set_state_t __attribute__((unused));
548 #ifdef  __MigPackStructs
549 #pragma pack(pop)
550 #endif
551 
552 #ifdef  __MigPackStructs
553 #pragma pack(push, 4)
554 #endif
555 	typedef struct {
556 		mach_msg_header_t Head;
557 	} __Request__thread_suspend_t __attribute__((unused));
558 #ifdef  __MigPackStructs
559 #pragma pack(pop)
560 #endif
561 
562 #ifdef  __MigPackStructs
563 #pragma pack(push, 4)
564 #endif
565 	typedef struct {
566 		mach_msg_header_t Head;
567 	} __Request__thread_resume_t __attribute__((unused));
568 #ifdef  __MigPackStructs
569 #pragma pack(pop)
570 #endif
571 
572 #ifdef  __MigPackStructs
573 #pragma pack(push, 4)
574 #endif
575 	typedef struct {
576 		mach_msg_header_t Head;
577 	} __Request__thread_abort_t __attribute__((unused));
578 #ifdef  __MigPackStructs
579 #pragma pack(pop)
580 #endif
581 
582 #ifdef  __MigPackStructs
583 #pragma pack(push, 4)
584 #endif
585 	typedef struct {
586 		mach_msg_header_t Head;
587 	} __Request__thread_abort_safely_t __attribute__((unused));
588 #ifdef  __MigPackStructs
589 #pragma pack(pop)
590 #endif
591 
592 #ifdef  __MigPackStructs
593 #pragma pack(push, 4)
594 #endif
595 	typedef struct {
596 		mach_msg_header_t Head;
597 	} __Request__thread_depress_abort_t __attribute__((unused));
598 #ifdef  __MigPackStructs
599 #pragma pack(pop)
600 #endif
601 
602 #ifdef  __MigPackStructs
603 #pragma pack(push, 4)
604 #endif
605 	typedef struct {
606 		mach_msg_header_t Head;
607 		NDR_record_t NDR;
608 		int which_port;
609 	} __Request__thread_get_special_port_t __attribute__((unused));
610 #ifdef  __MigPackStructs
611 #pragma pack(pop)
612 #endif
613 
614 #ifdef  __MigPackStructs
615 #pragma pack(push, 4)
616 #endif
617 	typedef struct {
618 		mach_msg_header_t Head;
619 		/* start of the kernel processed data */
620 		mach_msg_body_t msgh_body;
621 		mach_msg_port_descriptor_t special_port;
622 		/* end of the kernel processed data */
623 		NDR_record_t NDR;
624 		int which_port;
625 	} __Request__thread_set_special_port_t __attribute__((unused));
626 #ifdef  __MigPackStructs
627 #pragma pack(pop)
628 #endif
629 
630 #ifdef  __MigPackStructs
631 #pragma pack(push, 4)
632 #endif
633 	typedef struct {
634 		mach_msg_header_t Head;
635 		NDR_record_t NDR;
636 		thread_flavor_t flavor;
637 		mach_msg_type_number_t thread_info_outCnt;
638 	} __Request__thread_info_t __attribute__((unused));
639 #ifdef  __MigPackStructs
640 #pragma pack(pop)
641 #endif
642 
643 #ifdef  __MigPackStructs
644 #pragma pack(push, 4)
645 #endif
646 	typedef struct {
647 		mach_msg_header_t Head;
648 		/* start of the kernel processed data */
649 		mach_msg_body_t msgh_body;
650 		mach_msg_port_descriptor_t new_port;
651 		/* end of the kernel processed data */
652 		NDR_record_t NDR;
653 		exception_mask_t exception_mask;
654 		exception_behavior_t behavior;
655 		thread_state_flavor_t new_flavor;
656 	} __Request__thread_set_exception_ports_t __attribute__((unused));
657 #ifdef  __MigPackStructs
658 #pragma pack(pop)
659 #endif
660 
661 #ifdef  __MigPackStructs
662 #pragma pack(push, 4)
663 #endif
664 	typedef struct {
665 		mach_msg_header_t Head;
666 		NDR_record_t NDR;
667 		exception_mask_t exception_mask;
668 	} __Request__thread_get_exception_ports_t __attribute__((unused));
669 #ifdef  __MigPackStructs
670 #pragma pack(pop)
671 #endif
672 
673 #ifdef  __MigPackStructs
674 #pragma pack(push, 4)
675 #endif
676 	typedef struct {
677 		mach_msg_header_t Head;
678 		/* start of the kernel processed data */
679 		mach_msg_body_t msgh_body;
680 		mach_msg_port_descriptor_t new_port;
681 		/* end of the kernel processed data */
682 		NDR_record_t NDR;
683 		exception_mask_t exception_mask;
684 		exception_behavior_t behavior;
685 		thread_state_flavor_t new_flavor;
686 	} __Request__thread_swap_exception_ports_t __attribute__((unused));
687 #ifdef  __MigPackStructs
688 #pragma pack(pop)
689 #endif
690 
691 #ifdef  __MigPackStructs
692 #pragma pack(push, 4)
693 #endif
694 	typedef struct {
695 		mach_msg_header_t Head;
696 		NDR_record_t NDR;
697 		policy_t policy;
698 		mach_msg_type_number_t baseCnt;
699 		integer_t base[5];
700 		boolean_t set_limit;
701 	} __Request__thread_policy_t __attribute__((unused));
702 #ifdef  __MigPackStructs
703 #pragma pack(pop)
704 #endif
705 
706 #ifdef  __MigPackStructs
707 #pragma pack(push, 4)
708 #endif
709 	typedef struct {
710 		mach_msg_header_t Head;
711 		NDR_record_t NDR;
712 		thread_policy_flavor_t flavor;
713 		mach_msg_type_number_t policy_infoCnt;
714 		integer_t policy_info[16];
715 	} __Request__thread_policy_set_t __attribute__((unused));
716 #ifdef  __MigPackStructs
717 #pragma pack(pop)
718 #endif
719 
720 #ifdef  __MigPackStructs
721 #pragma pack(push, 4)
722 #endif
723 	typedef struct {
724 		mach_msg_header_t Head;
725 		NDR_record_t NDR;
726 		thread_policy_flavor_t flavor;
727 		mach_msg_type_number_t policy_infoCnt;
728 		boolean_t get_default;
729 	} __Request__thread_policy_get_t __attribute__((unused));
730 #ifdef  __MigPackStructs
731 #pragma pack(pop)
732 #endif
733 
734 #ifdef  __MigPackStructs
735 #pragma pack(push, 4)
736 #endif
737 	typedef struct {
738 		mach_msg_header_t Head;
739 		/* start of the kernel processed data */
740 		mach_msg_body_t msgh_body;
741 		mach_msg_port_descriptor_t reply;
742 		/* end of the kernel processed data */
743 	} __Request__thread_sample_t __attribute__((unused));
744 #ifdef  __MigPackStructs
745 #pragma pack(pop)
746 #endif
747 
748 #ifdef  __MigPackStructs
749 #pragma pack(push, 4)
750 #endif
751 	typedef struct {
752 		mach_msg_header_t Head;
753 		NDR_record_t NDR;
754 		boolean_t trace_status;
755 	} __Request__etap_trace_thread_t __attribute__((unused));
756 #ifdef  __MigPackStructs
757 #pragma pack(pop)
758 #endif
759 
760 #ifdef  __MigPackStructs
761 #pragma pack(push, 4)
762 #endif
763 	typedef struct {
764 		mach_msg_header_t Head;
765 		/* start of the kernel processed data */
766 		mach_msg_body_t msgh_body;
767 		mach_msg_port_descriptor_t new_set;
768 		/* end of the kernel processed data */
769 	} __Request__thread_assign_t __attribute__((unused));
770 #ifdef  __MigPackStructs
771 #pragma pack(pop)
772 #endif
773 
774 #ifdef  __MigPackStructs
775 #pragma pack(push, 4)
776 #endif
777 	typedef struct {
778 		mach_msg_header_t Head;
779 	} __Request__thread_assign_default_t __attribute__((unused));
780 #ifdef  __MigPackStructs
781 #pragma pack(pop)
782 #endif
783 
784 #ifdef  __MigPackStructs
785 #pragma pack(push, 4)
786 #endif
787 	typedef struct {
788 		mach_msg_header_t Head;
789 	} __Request__thread_get_assignment_t __attribute__((unused));
790 #ifdef  __MigPackStructs
791 #pragma pack(pop)
792 #endif
793 
794 #ifdef  __MigPackStructs
795 #pragma pack(push, 4)
796 #endif
797 	typedef struct {
798 		mach_msg_header_t Head;
799 		/* start of the kernel processed data */
800 		mach_msg_body_t msgh_body;
801 		mach_msg_port_descriptor_t pset;
802 		/* end of the kernel processed data */
803 		NDR_record_t NDR;
804 		policy_t policy;
805 		mach_msg_type_number_t baseCnt;
806 		integer_t base[5];
807 		mach_msg_type_number_t limitCnt;
808 		integer_t limit[1];
809 	} __Request__thread_set_policy_t __attribute__((unused));
810 #ifdef  __MigPackStructs
811 #pragma pack(pop)
812 #endif
813 
814 #ifdef  __MigPackStructs
815 #pragma pack(push, 4)
816 #endif
817 	typedef struct {
818 		mach_msg_header_t Head;
819 		NDR_record_t NDR;
820 		mach_voucher_selector_t which;
821 	} __Request__thread_get_mach_voucher_t __attribute__((unused));
822 #ifdef  __MigPackStructs
823 #pragma pack(pop)
824 #endif
825 
826 #ifdef  __MigPackStructs
827 #pragma pack(push, 4)
828 #endif
829 	typedef struct {
830 		mach_msg_header_t Head;
831 		/* start of the kernel processed data */
832 		mach_msg_body_t msgh_body;
833 		mach_msg_port_descriptor_t voucher;
834 		/* end of the kernel processed data */
835 	} __Request__thread_set_mach_voucher_t __attribute__((unused));
836 #ifdef  __MigPackStructs
837 #pragma pack(pop)
838 #endif
839 
840 #ifdef  __MigPackStructs
841 #pragma pack(push, 4)
842 #endif
843 	typedef struct {
844 		mach_msg_header_t Head;
845 		/* start of the kernel processed data */
846 		mach_msg_body_t msgh_body;
847 		mach_msg_port_descriptor_t new_voucher;
848 		mach_msg_port_descriptor_t old_voucher;
849 		/* end of the kernel processed data */
850 	} __Request__thread_swap_mach_voucher_t __attribute__((unused));
851 #ifdef  __MigPackStructs
852 #pragma pack(pop)
853 #endif
854 #endif /* !__Request__thread_act_subsystem__defined */
855 
856 /* union of all requests */
857 
858 #ifndef __RequestUnion__thread_act_subsystem__defined
859 #define __RequestUnion__thread_act_subsystem__defined
860 union __RequestUnion__thread_act_subsystem {
861 	__Request__thread_terminate_t Request_thread_terminate;
862 	__Request__act_get_state_t Request_act_get_state;
863 	__Request__act_set_state_t Request_act_set_state;
864 	__Request__thread_get_state_t Request_thread_get_state;
865 	__Request__thread_set_state_t Request_thread_set_state;
866 	__Request__thread_suspend_t Request_thread_suspend;
867 	__Request__thread_resume_t Request_thread_resume;
868 	__Request__thread_abort_t Request_thread_abort;
869 	__Request__thread_abort_safely_t Request_thread_abort_safely;
870 	__Request__thread_depress_abort_t Request_thread_depress_abort;
871 	__Request__thread_get_special_port_t Request_thread_get_special_port;
872 	__Request__thread_set_special_port_t Request_thread_set_special_port;
873 	__Request__thread_info_t Request_thread_info;
874 	__Request__thread_set_exception_ports_t Request_thread_set_exception_ports;
875 	__Request__thread_get_exception_ports_t Request_thread_get_exception_ports;
876 	__Request__thread_swap_exception_ports_t Request_thread_swap_exception_ports;
877 	__Request__thread_policy_t Request_thread_policy;
878 	__Request__thread_policy_set_t Request_thread_policy_set;
879 	__Request__thread_policy_get_t Request_thread_policy_get;
880 	__Request__thread_sample_t Request_thread_sample;
881 	__Request__etap_trace_thread_t Request_etap_trace_thread;
882 	__Request__thread_assign_t Request_thread_assign;
883 	__Request__thread_assign_default_t Request_thread_assign_default;
884 	__Request__thread_get_assignment_t Request_thread_get_assignment;
885 	__Request__thread_set_policy_t Request_thread_set_policy;
886 	__Request__thread_get_mach_voucher_t Request_thread_get_mach_voucher;
887 	__Request__thread_set_mach_voucher_t Request_thread_set_mach_voucher;
888 	__Request__thread_swap_mach_voucher_t Request_thread_swap_mach_voucher;
889 };
890 #endif /* !__RequestUnion__thread_act_subsystem__defined */
891 /* typedefs for all replies */
892 
893 #ifndef __Reply__thread_act_subsystem__defined
894 #define __Reply__thread_act_subsystem__defined
895 
896 #ifdef  __MigPackStructs
897 #pragma pack(push, 4)
898 #endif
899 	typedef struct {
900 		mach_msg_header_t Head;
901 		NDR_record_t NDR;
902 		kern_return_t RetCode;
903 	} __Reply__thread_terminate_t __attribute__((unused));
904 #ifdef  __MigPackStructs
905 #pragma pack(pop)
906 #endif
907 
908 #ifdef  __MigPackStructs
909 #pragma pack(push, 4)
910 #endif
911 	typedef struct {
912 		mach_msg_header_t Head;
913 		NDR_record_t NDR;
914 		kern_return_t RetCode;
915 		mach_msg_type_number_t old_stateCnt;
916 		natural_t old_state[614];
917 	} __Reply__act_get_state_t __attribute__((unused));
918 #ifdef  __MigPackStructs
919 #pragma pack(pop)
920 #endif
921 
922 #ifdef  __MigPackStructs
923 #pragma pack(push, 4)
924 #endif
925 	typedef struct {
926 		mach_msg_header_t Head;
927 		NDR_record_t NDR;
928 		kern_return_t RetCode;
929 	} __Reply__act_set_state_t __attribute__((unused));
930 #ifdef  __MigPackStructs
931 #pragma pack(pop)
932 #endif
933 
934 #ifdef  __MigPackStructs
935 #pragma pack(push, 4)
936 #endif
937 	typedef struct {
938 		mach_msg_header_t Head;
939 		NDR_record_t NDR;
940 		kern_return_t RetCode;
941 		mach_msg_type_number_t old_stateCnt;
942 		natural_t old_state[614];
943 	} __Reply__thread_get_state_t __attribute__((unused));
944 #ifdef  __MigPackStructs
945 #pragma pack(pop)
946 #endif
947 
948 #ifdef  __MigPackStructs
949 #pragma pack(push, 4)
950 #endif
951 	typedef struct {
952 		mach_msg_header_t Head;
953 		NDR_record_t NDR;
954 		kern_return_t RetCode;
955 	} __Reply__thread_set_state_t __attribute__((unused));
956 #ifdef  __MigPackStructs
957 #pragma pack(pop)
958 #endif
959 
960 #ifdef  __MigPackStructs
961 #pragma pack(push, 4)
962 #endif
963 	typedef struct {
964 		mach_msg_header_t Head;
965 		NDR_record_t NDR;
966 		kern_return_t RetCode;
967 	} __Reply__thread_suspend_t __attribute__((unused));
968 #ifdef  __MigPackStructs
969 #pragma pack(pop)
970 #endif
971 
972 #ifdef  __MigPackStructs
973 #pragma pack(push, 4)
974 #endif
975 	typedef struct {
976 		mach_msg_header_t Head;
977 		NDR_record_t NDR;
978 		kern_return_t RetCode;
979 	} __Reply__thread_resume_t __attribute__((unused));
980 #ifdef  __MigPackStructs
981 #pragma pack(pop)
982 #endif
983 
984 #ifdef  __MigPackStructs
985 #pragma pack(push, 4)
986 #endif
987 	typedef struct {
988 		mach_msg_header_t Head;
989 		NDR_record_t NDR;
990 		kern_return_t RetCode;
991 	} __Reply__thread_abort_t __attribute__((unused));
992 #ifdef  __MigPackStructs
993 #pragma pack(pop)
994 #endif
995 
996 #ifdef  __MigPackStructs
997 #pragma pack(push, 4)
998 #endif
999 	typedef struct {
1000 		mach_msg_header_t Head;
1001 		NDR_record_t NDR;
1002 		kern_return_t RetCode;
1003 	} __Reply__thread_abort_safely_t __attribute__((unused));
1004 #ifdef  __MigPackStructs
1005 #pragma pack(pop)
1006 #endif
1007 
1008 #ifdef  __MigPackStructs
1009 #pragma pack(push, 4)
1010 #endif
1011 	typedef struct {
1012 		mach_msg_header_t Head;
1013 		NDR_record_t NDR;
1014 		kern_return_t RetCode;
1015 	} __Reply__thread_depress_abort_t __attribute__((unused));
1016 #ifdef  __MigPackStructs
1017 #pragma pack(pop)
1018 #endif
1019 
1020 #ifdef  __MigPackStructs
1021 #pragma pack(push, 4)
1022 #endif
1023 	typedef struct {
1024 		mach_msg_header_t Head;
1025 		/* start of the kernel processed data */
1026 		mach_msg_body_t msgh_body;
1027 		mach_msg_port_descriptor_t special_port;
1028 		/* end of the kernel processed data */
1029 	} __Reply__thread_get_special_port_t __attribute__((unused));
1030 #ifdef  __MigPackStructs
1031 #pragma pack(pop)
1032 #endif
1033 
1034 #ifdef  __MigPackStructs
1035 #pragma pack(push, 4)
1036 #endif
1037 	typedef struct {
1038 		mach_msg_header_t Head;
1039 		NDR_record_t NDR;
1040 		kern_return_t RetCode;
1041 	} __Reply__thread_set_special_port_t __attribute__((unused));
1042 #ifdef  __MigPackStructs
1043 #pragma pack(pop)
1044 #endif
1045 
1046 #ifdef  __MigPackStructs
1047 #pragma pack(push, 4)
1048 #endif
1049 	typedef struct {
1050 		mach_msg_header_t Head;
1051 		NDR_record_t NDR;
1052 		kern_return_t RetCode;
1053 		mach_msg_type_number_t thread_info_outCnt;
1054 		integer_t thread_info_out[32];
1055 	} __Reply__thread_info_t __attribute__((unused));
1056 #ifdef  __MigPackStructs
1057 #pragma pack(pop)
1058 #endif
1059 
1060 #ifdef  __MigPackStructs
1061 #pragma pack(push, 4)
1062 #endif
1063 	typedef struct {
1064 		mach_msg_header_t Head;
1065 		NDR_record_t NDR;
1066 		kern_return_t RetCode;
1067 	} __Reply__thread_set_exception_ports_t __attribute__((unused));
1068 #ifdef  __MigPackStructs
1069 #pragma pack(pop)
1070 #endif
1071 
1072 #ifdef  __MigPackStructs
1073 #pragma pack(push, 4)
1074 #endif
1075 	typedef struct {
1076 		mach_msg_header_t Head;
1077 		/* start of the kernel processed data */
1078 		mach_msg_body_t msgh_body;
1079 		mach_msg_port_descriptor_t old_handlers[32];
1080 		/* end of the kernel processed data */
1081 		NDR_record_t NDR;
1082 		mach_msg_type_number_t masksCnt;
1083 		exception_mask_t masks[32];
1084 		exception_behavior_t old_behaviors[32];
1085 		thread_state_flavor_t old_flavors[32];
1086 	} __Reply__thread_get_exception_ports_t __attribute__((unused));
1087 #ifdef  __MigPackStructs
1088 #pragma pack(pop)
1089 #endif
1090 
1091 #ifdef  __MigPackStructs
1092 #pragma pack(push, 4)
1093 #endif
1094 	typedef struct {
1095 		mach_msg_header_t Head;
1096 		/* start of the kernel processed data */
1097 		mach_msg_body_t msgh_body;
1098 		mach_msg_port_descriptor_t old_handlers[32];
1099 		/* end of the kernel processed data */
1100 		NDR_record_t NDR;
1101 		mach_msg_type_number_t masksCnt;
1102 		exception_mask_t masks[32];
1103 		exception_behavior_t old_behaviors[32];
1104 		thread_state_flavor_t old_flavors[32];
1105 	} __Reply__thread_swap_exception_ports_t __attribute__((unused));
1106 #ifdef  __MigPackStructs
1107 #pragma pack(pop)
1108 #endif
1109 
1110 #ifdef  __MigPackStructs
1111 #pragma pack(push, 4)
1112 #endif
1113 	typedef struct {
1114 		mach_msg_header_t Head;
1115 		NDR_record_t NDR;
1116 		kern_return_t RetCode;
1117 	} __Reply__thread_policy_t __attribute__((unused));
1118 #ifdef  __MigPackStructs
1119 #pragma pack(pop)
1120 #endif
1121 
1122 #ifdef  __MigPackStructs
1123 #pragma pack(push, 4)
1124 #endif
1125 	typedef struct {
1126 		mach_msg_header_t Head;
1127 		NDR_record_t NDR;
1128 		kern_return_t RetCode;
1129 	} __Reply__thread_policy_set_t __attribute__((unused));
1130 #ifdef  __MigPackStructs
1131 #pragma pack(pop)
1132 #endif
1133 
1134 #ifdef  __MigPackStructs
1135 #pragma pack(push, 4)
1136 #endif
1137 	typedef struct {
1138 		mach_msg_header_t Head;
1139 		NDR_record_t NDR;
1140 		kern_return_t RetCode;
1141 		mach_msg_type_number_t policy_infoCnt;
1142 		integer_t policy_info[16];
1143 		boolean_t get_default;
1144 	} __Reply__thread_policy_get_t __attribute__((unused));
1145 #ifdef  __MigPackStructs
1146 #pragma pack(pop)
1147 #endif
1148 
1149 #ifdef  __MigPackStructs
1150 #pragma pack(push, 4)
1151 #endif
1152 	typedef struct {
1153 		mach_msg_header_t Head;
1154 		NDR_record_t NDR;
1155 		kern_return_t RetCode;
1156 	} __Reply__thread_sample_t __attribute__((unused));
1157 #ifdef  __MigPackStructs
1158 #pragma pack(pop)
1159 #endif
1160 
1161 #ifdef  __MigPackStructs
1162 #pragma pack(push, 4)
1163 #endif
1164 	typedef struct {
1165 		mach_msg_header_t Head;
1166 		NDR_record_t NDR;
1167 		kern_return_t RetCode;
1168 	} __Reply__etap_trace_thread_t __attribute__((unused));
1169 #ifdef  __MigPackStructs
1170 #pragma pack(pop)
1171 #endif
1172 
1173 #ifdef  __MigPackStructs
1174 #pragma pack(push, 4)
1175 #endif
1176 	typedef struct {
1177 		mach_msg_header_t Head;
1178 		NDR_record_t NDR;
1179 		kern_return_t RetCode;
1180 	} __Reply__thread_assign_t __attribute__((unused));
1181 #ifdef  __MigPackStructs
1182 #pragma pack(pop)
1183 #endif
1184 
1185 #ifdef  __MigPackStructs
1186 #pragma pack(push, 4)
1187 #endif
1188 	typedef struct {
1189 		mach_msg_header_t Head;
1190 		NDR_record_t NDR;
1191 		kern_return_t RetCode;
1192 	} __Reply__thread_assign_default_t __attribute__((unused));
1193 #ifdef  __MigPackStructs
1194 #pragma pack(pop)
1195 #endif
1196 
1197 #ifdef  __MigPackStructs
1198 #pragma pack(push, 4)
1199 #endif
1200 	typedef struct {
1201 		mach_msg_header_t Head;
1202 		/* start of the kernel processed data */
1203 		mach_msg_body_t msgh_body;
1204 		mach_msg_port_descriptor_t assigned_set;
1205 		/* end of the kernel processed data */
1206 	} __Reply__thread_get_assignment_t __attribute__((unused));
1207 #ifdef  __MigPackStructs
1208 #pragma pack(pop)
1209 #endif
1210 
1211 #ifdef  __MigPackStructs
1212 #pragma pack(push, 4)
1213 #endif
1214 	typedef struct {
1215 		mach_msg_header_t Head;
1216 		NDR_record_t NDR;
1217 		kern_return_t RetCode;
1218 	} __Reply__thread_set_policy_t __attribute__((unused));
1219 #ifdef  __MigPackStructs
1220 #pragma pack(pop)
1221 #endif
1222 
1223 #ifdef  __MigPackStructs
1224 #pragma pack(push, 4)
1225 #endif
1226 	typedef struct {
1227 		mach_msg_header_t Head;
1228 		/* start of the kernel processed data */
1229 		mach_msg_body_t msgh_body;
1230 		mach_msg_port_descriptor_t voucher;
1231 		/* end of the kernel processed data */
1232 	} __Reply__thread_get_mach_voucher_t __attribute__((unused));
1233 #ifdef  __MigPackStructs
1234 #pragma pack(pop)
1235 #endif
1236 
1237 #ifdef  __MigPackStructs
1238 #pragma pack(push, 4)
1239 #endif
1240 	typedef struct {
1241 		mach_msg_header_t Head;
1242 		NDR_record_t NDR;
1243 		kern_return_t RetCode;
1244 	} __Reply__thread_set_mach_voucher_t __attribute__((unused));
1245 #ifdef  __MigPackStructs
1246 #pragma pack(pop)
1247 #endif
1248 
1249 #ifdef  __MigPackStructs
1250 #pragma pack(push, 4)
1251 #endif
1252 	typedef struct {
1253 		mach_msg_header_t Head;
1254 		/* start of the kernel processed data */
1255 		mach_msg_body_t msgh_body;
1256 		mach_msg_port_descriptor_t old_voucher;
1257 		/* end of the kernel processed data */
1258 	} __Reply__thread_swap_mach_voucher_t __attribute__((unused));
1259 #ifdef  __MigPackStructs
1260 #pragma pack(pop)
1261 #endif
1262 #endif /* !__Reply__thread_act_subsystem__defined */
1263 
1264 /* union of all replies */
1265 
1266 #ifndef __ReplyUnion__thread_act_subsystem__defined
1267 #define __ReplyUnion__thread_act_subsystem__defined
1268 union __ReplyUnion__thread_act_subsystem {
1269 	__Reply__thread_terminate_t Reply_thread_terminate;
1270 	__Reply__act_get_state_t Reply_act_get_state;
1271 	__Reply__act_set_state_t Reply_act_set_state;
1272 	__Reply__thread_get_state_t Reply_thread_get_state;
1273 	__Reply__thread_set_state_t Reply_thread_set_state;
1274 	__Reply__thread_suspend_t Reply_thread_suspend;
1275 	__Reply__thread_resume_t Reply_thread_resume;
1276 	__Reply__thread_abort_t Reply_thread_abort;
1277 	__Reply__thread_abort_safely_t Reply_thread_abort_safely;
1278 	__Reply__thread_depress_abort_t Reply_thread_depress_abort;
1279 	__Reply__thread_get_special_port_t Reply_thread_get_special_port;
1280 	__Reply__thread_set_special_port_t Reply_thread_set_special_port;
1281 	__Reply__thread_info_t Reply_thread_info;
1282 	__Reply__thread_set_exception_ports_t Reply_thread_set_exception_ports;
1283 	__Reply__thread_get_exception_ports_t Reply_thread_get_exception_ports;
1284 	__Reply__thread_swap_exception_ports_t Reply_thread_swap_exception_ports;
1285 	__Reply__thread_policy_t Reply_thread_policy;
1286 	__Reply__thread_policy_set_t Reply_thread_policy_set;
1287 	__Reply__thread_policy_get_t Reply_thread_policy_get;
1288 	__Reply__thread_sample_t Reply_thread_sample;
1289 	__Reply__etap_trace_thread_t Reply_etap_trace_thread;
1290 	__Reply__thread_assign_t Reply_thread_assign;
1291 	__Reply__thread_assign_default_t Reply_thread_assign_default;
1292 	__Reply__thread_get_assignment_t Reply_thread_get_assignment;
1293 	__Reply__thread_set_policy_t Reply_thread_set_policy;
1294 	__Reply__thread_get_mach_voucher_t Reply_thread_get_mach_voucher;
1295 	__Reply__thread_set_mach_voucher_t Reply_thread_set_mach_voucher;
1296 	__Reply__thread_swap_mach_voucher_t Reply_thread_swap_mach_voucher;
1297 };
1298 #endif /* !__RequestUnion__thread_act_subsystem__defined */
1299 
1300 #ifndef subsystem_to_name_map_thread_act
1301 #define subsystem_to_name_map_thread_act \
1302     { "thread_terminate", 3600 },\
1303     { "act_get_state", 3601 },\
1304     { "act_set_state", 3602 },\
1305     { "thread_get_state", 3603 },\
1306     { "thread_set_state", 3604 },\
1307     { "thread_suspend", 3605 },\
1308     { "thread_resume", 3606 },\
1309     { "thread_abort", 3607 },\
1310     { "thread_abort_safely", 3608 },\
1311     { "thread_depress_abort", 3609 },\
1312     { "thread_get_special_port", 3610 },\
1313     { "thread_set_special_port", 3611 },\
1314     { "thread_info", 3612 },\
1315     { "thread_set_exception_ports", 3613 },\
1316     { "thread_get_exception_ports", 3614 },\
1317     { "thread_swap_exception_ports", 3615 },\
1318     { "thread_policy", 3616 },\
1319     { "thread_policy_set", 3617 },\
1320     { "thread_policy_get", 3618 },\
1321     { "thread_sample", 3619 },\
1322     { "etap_trace_thread", 3620 },\
1323     { "thread_assign", 3621 },\
1324     { "thread_assign_default", 3622 },\
1325     { "thread_get_assignment", 3623 },\
1326     { "thread_set_policy", 3624 },\
1327     { "thread_get_mach_voucher", 3625 },\
1328     { "thread_set_mach_voucher", 3626 },\
1329     { "thread_swap_mach_voucher", 3627 }
1330 #endif
1331 
1332 #ifdef __AfterMigUserHeader
1333 __AfterMigUserHeader
1334 #endif /* __AfterMigUserHeader */
1335 
1336 #endif	 /* _thread_act_user_ */