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