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 31 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_read_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_read_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_read_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_read_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_inspect_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_act_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_inspect_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_read_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 /* Routine thread_convert_thread_state */ 471 #ifdef mig_external 472 mig_external 473 #else 474 extern 475 #endif /* mig_external */ 476 kern_return_t thread_convert_thread_state 477 ( 478 thread_act_t thread, 479 int direction, 480 thread_state_flavor_t flavor, 481 thread_state_t in_state, 482 mach_msg_type_number_t in_stateCnt, 483 thread_state_t out_state, 484 mach_msg_type_number_t *out_stateCnt 485 ); 486 487 /* Routine thread_get_exception_ports_info */ 488 #ifdef mig_external 489 mig_external 490 #else 491 extern 492 #endif /* mig_external */ 493 kern_return_t thread_get_exception_ports_info 494 ( 495 mach_port_t port, 496 exception_mask_t exception_mask, 497 exception_mask_array_t masks, 498 mach_msg_type_number_t *masksCnt, 499 exception_handler_info_array_t old_handlers_info, 500 exception_behavior_array_t old_behaviors, 501 exception_flavor_array_t old_flavors 502 ); 503 504 __END_DECLS 505 506 /********************** Caution **************************/ 507 /* The following data types should be used to calculate */ 508 /* maximum message sizes only. The actual message may be */ 509 /* smaller, and the position of the arguments within the */ 510 /* message layout may vary from what is presented here. */ 511 /* For example, if any of the arguments are variable- */ 512 /* sized, and less than the maximum is sent, the data */ 513 /* will be packed tight in the actual message to reduce */ 514 /* the presence of holes. */ 515 /********************** Caution **************************/ 516 517 /* typedefs for all requests */ 518 519 #ifndef __Request__thread_act_subsystem__defined 520 #define __Request__thread_act_subsystem__defined 521 522 #ifdef __MigPackStructs 523 #pragma pack(push, 4) 524 #endif 525 typedef struct { 526 mach_msg_header_t Head; 527 } __Request__thread_terminate_t __attribute__((unused)); 528 #ifdef __MigPackStructs 529 #pragma pack(pop) 530 #endif 531 532 #ifdef __MigPackStructs 533 #pragma pack(push, 4) 534 #endif 535 typedef struct { 536 mach_msg_header_t Head; 537 NDR_record_t NDR; 538 int flavor; 539 mach_msg_type_number_t old_stateCnt; 540 } __Request__act_get_state_t __attribute__((unused)); 541 #ifdef __MigPackStructs 542 #pragma pack(pop) 543 #endif 544 545 #ifdef __MigPackStructs 546 #pragma pack(push, 4) 547 #endif 548 typedef struct { 549 mach_msg_header_t Head; 550 NDR_record_t NDR; 551 int flavor; 552 mach_msg_type_number_t new_stateCnt; 553 natural_t new_state[1296]; 554 } __Request__act_set_state_t __attribute__((unused)); 555 #ifdef __MigPackStructs 556 #pragma pack(pop) 557 #endif 558 559 #ifdef __MigPackStructs 560 #pragma pack(push, 4) 561 #endif 562 typedef struct { 563 mach_msg_header_t Head; 564 NDR_record_t NDR; 565 thread_state_flavor_t flavor; 566 mach_msg_type_number_t old_stateCnt; 567 } __Request__thread_get_state_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 NDR_record_t NDR; 578 thread_state_flavor_t flavor; 579 mach_msg_type_number_t new_stateCnt; 580 natural_t new_state[1296]; 581 } __Request__thread_set_state_t __attribute__((unused)); 582 #ifdef __MigPackStructs 583 #pragma pack(pop) 584 #endif 585 586 #ifdef __MigPackStructs 587 #pragma pack(push, 4) 588 #endif 589 typedef struct { 590 mach_msg_header_t Head; 591 } __Request__thread_suspend_t __attribute__((unused)); 592 #ifdef __MigPackStructs 593 #pragma pack(pop) 594 #endif 595 596 #ifdef __MigPackStructs 597 #pragma pack(push, 4) 598 #endif 599 typedef struct { 600 mach_msg_header_t Head; 601 } __Request__thread_resume_t __attribute__((unused)); 602 #ifdef __MigPackStructs 603 #pragma pack(pop) 604 #endif 605 606 #ifdef __MigPackStructs 607 #pragma pack(push, 4) 608 #endif 609 typedef struct { 610 mach_msg_header_t Head; 611 } __Request__thread_abort_t __attribute__((unused)); 612 #ifdef __MigPackStructs 613 #pragma pack(pop) 614 #endif 615 616 #ifdef __MigPackStructs 617 #pragma pack(push, 4) 618 #endif 619 typedef struct { 620 mach_msg_header_t Head; 621 } __Request__thread_abort_safely_t __attribute__((unused)); 622 #ifdef __MigPackStructs 623 #pragma pack(pop) 624 #endif 625 626 #ifdef __MigPackStructs 627 #pragma pack(push, 4) 628 #endif 629 typedef struct { 630 mach_msg_header_t Head; 631 } __Request__thread_depress_abort_t __attribute__((unused)); 632 #ifdef __MigPackStructs 633 #pragma pack(pop) 634 #endif 635 636 #ifdef __MigPackStructs 637 #pragma pack(push, 4) 638 #endif 639 typedef struct { 640 mach_msg_header_t Head; 641 NDR_record_t NDR; 642 int which_port; 643 } __Request__thread_get_special_port_t __attribute__((unused)); 644 #ifdef __MigPackStructs 645 #pragma pack(pop) 646 #endif 647 648 #ifdef __MigPackStructs 649 #pragma pack(push, 4) 650 #endif 651 typedef struct { 652 mach_msg_header_t Head; 653 /* start of the kernel processed data */ 654 mach_msg_body_t msgh_body; 655 mach_msg_port_descriptor_t special_port; 656 /* end of the kernel processed data */ 657 NDR_record_t NDR; 658 int which_port; 659 } __Request__thread_set_special_port_t __attribute__((unused)); 660 #ifdef __MigPackStructs 661 #pragma pack(pop) 662 #endif 663 664 #ifdef __MigPackStructs 665 #pragma pack(push, 4) 666 #endif 667 typedef struct { 668 mach_msg_header_t Head; 669 NDR_record_t NDR; 670 thread_flavor_t flavor; 671 mach_msg_type_number_t thread_info_outCnt; 672 } __Request__thread_info_t __attribute__((unused)); 673 #ifdef __MigPackStructs 674 #pragma pack(pop) 675 #endif 676 677 #ifdef __MigPackStructs 678 #pragma pack(push, 4) 679 #endif 680 typedef struct { 681 mach_msg_header_t Head; 682 /* start of the kernel processed data */ 683 mach_msg_body_t msgh_body; 684 mach_msg_port_descriptor_t new_port; 685 /* end of the kernel processed data */ 686 NDR_record_t NDR; 687 exception_mask_t exception_mask; 688 exception_behavior_t behavior; 689 thread_state_flavor_t new_flavor; 690 } __Request__thread_set_exception_ports_t __attribute__((unused)); 691 #ifdef __MigPackStructs 692 #pragma pack(pop) 693 #endif 694 695 #ifdef __MigPackStructs 696 #pragma pack(push, 4) 697 #endif 698 typedef struct { 699 mach_msg_header_t Head; 700 NDR_record_t NDR; 701 exception_mask_t exception_mask; 702 } __Request__thread_get_exception_ports_t __attribute__((unused)); 703 #ifdef __MigPackStructs 704 #pragma pack(pop) 705 #endif 706 707 #ifdef __MigPackStructs 708 #pragma pack(push, 4) 709 #endif 710 typedef struct { 711 mach_msg_header_t Head; 712 /* start of the kernel processed data */ 713 mach_msg_body_t msgh_body; 714 mach_msg_port_descriptor_t new_port; 715 /* end of the kernel processed data */ 716 NDR_record_t NDR; 717 exception_mask_t exception_mask; 718 exception_behavior_t behavior; 719 thread_state_flavor_t new_flavor; 720 } __Request__thread_swap_exception_ports_t __attribute__((unused)); 721 #ifdef __MigPackStructs 722 #pragma pack(pop) 723 #endif 724 725 #ifdef __MigPackStructs 726 #pragma pack(push, 4) 727 #endif 728 typedef struct { 729 mach_msg_header_t Head; 730 NDR_record_t NDR; 731 policy_t policy; 732 mach_msg_type_number_t baseCnt; 733 integer_t base[5]; 734 boolean_t set_limit; 735 } __Request__thread_policy_t __attribute__((unused)); 736 #ifdef __MigPackStructs 737 #pragma pack(pop) 738 #endif 739 740 #ifdef __MigPackStructs 741 #pragma pack(push, 4) 742 #endif 743 typedef struct { 744 mach_msg_header_t Head; 745 NDR_record_t NDR; 746 thread_policy_flavor_t flavor; 747 mach_msg_type_number_t policy_infoCnt; 748 integer_t policy_info[16]; 749 } __Request__thread_policy_set_t __attribute__((unused)); 750 #ifdef __MigPackStructs 751 #pragma pack(pop) 752 #endif 753 754 #ifdef __MigPackStructs 755 #pragma pack(push, 4) 756 #endif 757 typedef struct { 758 mach_msg_header_t Head; 759 NDR_record_t NDR; 760 thread_policy_flavor_t flavor; 761 mach_msg_type_number_t policy_infoCnt; 762 boolean_t get_default; 763 } __Request__thread_policy_get_t __attribute__((unused)); 764 #ifdef __MigPackStructs 765 #pragma pack(pop) 766 #endif 767 768 #ifdef __MigPackStructs 769 #pragma pack(push, 4) 770 #endif 771 typedef struct { 772 mach_msg_header_t Head; 773 /* start of the kernel processed data */ 774 mach_msg_body_t msgh_body; 775 mach_msg_port_descriptor_t reply; 776 /* end of the kernel processed data */ 777 } __Request__thread_sample_t __attribute__((unused)); 778 #ifdef __MigPackStructs 779 #pragma pack(pop) 780 #endif 781 782 #ifdef __MigPackStructs 783 #pragma pack(push, 4) 784 #endif 785 typedef struct { 786 mach_msg_header_t Head; 787 NDR_record_t NDR; 788 boolean_t trace_status; 789 } __Request__etap_trace_thread_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 new_set; 802 /* end of the kernel processed data */ 803 } __Request__thread_assign_t __attribute__((unused)); 804 #ifdef __MigPackStructs 805 #pragma pack(pop) 806 #endif 807 808 #ifdef __MigPackStructs 809 #pragma pack(push, 4) 810 #endif 811 typedef struct { 812 mach_msg_header_t Head; 813 } __Request__thread_assign_default_t __attribute__((unused)); 814 #ifdef __MigPackStructs 815 #pragma pack(pop) 816 #endif 817 818 #ifdef __MigPackStructs 819 #pragma pack(push, 4) 820 #endif 821 typedef struct { 822 mach_msg_header_t Head; 823 } __Request__thread_get_assignment_t __attribute__((unused)); 824 #ifdef __MigPackStructs 825 #pragma pack(pop) 826 #endif 827 828 #ifdef __MigPackStructs 829 #pragma pack(push, 4) 830 #endif 831 typedef struct { 832 mach_msg_header_t Head; 833 /* start of the kernel processed data */ 834 mach_msg_body_t msgh_body; 835 mach_msg_port_descriptor_t pset; 836 /* end of the kernel processed data */ 837 NDR_record_t NDR; 838 policy_t policy; 839 mach_msg_type_number_t baseCnt; 840 integer_t base[5]; 841 mach_msg_type_number_t limitCnt; 842 integer_t limit[1]; 843 } __Request__thread_set_policy_t __attribute__((unused)); 844 #ifdef __MigPackStructs 845 #pragma pack(pop) 846 #endif 847 848 #ifdef __MigPackStructs 849 #pragma pack(push, 4) 850 #endif 851 typedef struct { 852 mach_msg_header_t Head; 853 NDR_record_t NDR; 854 mach_voucher_selector_t which; 855 } __Request__thread_get_mach_voucher_t __attribute__((unused)); 856 #ifdef __MigPackStructs 857 #pragma pack(pop) 858 #endif 859 860 #ifdef __MigPackStructs 861 #pragma pack(push, 4) 862 #endif 863 typedef struct { 864 mach_msg_header_t Head; 865 /* start of the kernel processed data */ 866 mach_msg_body_t msgh_body; 867 mach_msg_port_descriptor_t voucher; 868 /* end of the kernel processed data */ 869 } __Request__thread_set_mach_voucher_t __attribute__((unused)); 870 #ifdef __MigPackStructs 871 #pragma pack(pop) 872 #endif 873 874 #ifdef __MigPackStructs 875 #pragma pack(push, 4) 876 #endif 877 typedef struct { 878 mach_msg_header_t Head; 879 /* start of the kernel processed data */ 880 mach_msg_body_t msgh_body; 881 mach_msg_port_descriptor_t new_voucher; 882 mach_msg_port_descriptor_t old_voucher; 883 /* end of the kernel processed data */ 884 } __Request__thread_swap_mach_voucher_t __attribute__((unused)); 885 #ifdef __MigPackStructs 886 #pragma pack(pop) 887 #endif 888 889 #ifdef __MigPackStructs 890 #pragma pack(push, 4) 891 #endif 892 typedef struct { 893 mach_msg_header_t Head; 894 NDR_record_t NDR; 895 int direction; 896 thread_state_flavor_t flavor; 897 mach_msg_type_number_t in_stateCnt; 898 natural_t in_state[1296]; 899 mach_msg_type_number_t out_stateCnt; 900 } __Request__thread_convert_thread_state_t __attribute__((unused)); 901 #ifdef __MigPackStructs 902 #pragma pack(pop) 903 #endif 904 905 #ifdef __MigPackStructs 906 #pragma pack(push, 4) 907 #endif 908 typedef struct { 909 mach_msg_header_t Head; 910 NDR_record_t NDR; 911 exception_mask_t exception_mask; 912 } __Request__thread_get_exception_ports_info_t __attribute__((unused)); 913 #ifdef __MigPackStructs 914 #pragma pack(pop) 915 #endif 916 #endif /* !__Request__thread_act_subsystem__defined */ 917 918 /* union of all requests */ 919 920 #ifndef __RequestUnion__thread_act_subsystem__defined 921 #define __RequestUnion__thread_act_subsystem__defined 922 union __RequestUnion__thread_act_subsystem { 923 __Request__thread_terminate_t Request_thread_terminate; 924 __Request__act_get_state_t Request_act_get_state; 925 __Request__act_set_state_t Request_act_set_state; 926 __Request__thread_get_state_t Request_thread_get_state; 927 __Request__thread_set_state_t Request_thread_set_state; 928 __Request__thread_suspend_t Request_thread_suspend; 929 __Request__thread_resume_t Request_thread_resume; 930 __Request__thread_abort_t Request_thread_abort; 931 __Request__thread_abort_safely_t Request_thread_abort_safely; 932 __Request__thread_depress_abort_t Request_thread_depress_abort; 933 __Request__thread_get_special_port_t Request_thread_get_special_port; 934 __Request__thread_set_special_port_t Request_thread_set_special_port; 935 __Request__thread_info_t Request_thread_info; 936 __Request__thread_set_exception_ports_t Request_thread_set_exception_ports; 937 __Request__thread_get_exception_ports_t Request_thread_get_exception_ports; 938 __Request__thread_swap_exception_ports_t Request_thread_swap_exception_ports; 939 __Request__thread_policy_t Request_thread_policy; 940 __Request__thread_policy_set_t Request_thread_policy_set; 941 __Request__thread_policy_get_t Request_thread_policy_get; 942 __Request__thread_sample_t Request_thread_sample; 943 __Request__etap_trace_thread_t Request_etap_trace_thread; 944 __Request__thread_assign_t Request_thread_assign; 945 __Request__thread_assign_default_t Request_thread_assign_default; 946 __Request__thread_get_assignment_t Request_thread_get_assignment; 947 __Request__thread_set_policy_t Request_thread_set_policy; 948 __Request__thread_get_mach_voucher_t Request_thread_get_mach_voucher; 949 __Request__thread_set_mach_voucher_t Request_thread_set_mach_voucher; 950 __Request__thread_swap_mach_voucher_t Request_thread_swap_mach_voucher; 951 __Request__thread_convert_thread_state_t Request_thread_convert_thread_state; 952 __Request__thread_get_exception_ports_info_t Request_thread_get_exception_ports_info; 953 }; 954 #endif /* !__RequestUnion__thread_act_subsystem__defined */ 955 /* typedefs for all replies */ 956 957 #ifndef __Reply__thread_act_subsystem__defined 958 #define __Reply__thread_act_subsystem__defined 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_terminate_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 mach_msg_type_number_t old_stateCnt; 980 natural_t old_state[1296]; 981 } __Reply__act_get_state_t __attribute__((unused)); 982 #ifdef __MigPackStructs 983 #pragma pack(pop) 984 #endif 985 986 #ifdef __MigPackStructs 987 #pragma pack(push, 4) 988 #endif 989 typedef struct { 990 mach_msg_header_t Head; 991 NDR_record_t NDR; 992 kern_return_t RetCode; 993 } __Reply__act_set_state_t __attribute__((unused)); 994 #ifdef __MigPackStructs 995 #pragma pack(pop) 996 #endif 997 998 #ifdef __MigPackStructs 999 #pragma pack(push, 4) 1000 #endif 1001 typedef struct { 1002 mach_msg_header_t Head; 1003 NDR_record_t NDR; 1004 kern_return_t RetCode; 1005 mach_msg_type_number_t old_stateCnt; 1006 natural_t old_state[1296]; 1007 } __Reply__thread_get_state_t __attribute__((unused)); 1008 #ifdef __MigPackStructs 1009 #pragma pack(pop) 1010 #endif 1011 1012 #ifdef __MigPackStructs 1013 #pragma pack(push, 4) 1014 #endif 1015 typedef struct { 1016 mach_msg_header_t Head; 1017 NDR_record_t NDR; 1018 kern_return_t RetCode; 1019 } __Reply__thread_set_state_t __attribute__((unused)); 1020 #ifdef __MigPackStructs 1021 #pragma pack(pop) 1022 #endif 1023 1024 #ifdef __MigPackStructs 1025 #pragma pack(push, 4) 1026 #endif 1027 typedef struct { 1028 mach_msg_header_t Head; 1029 NDR_record_t NDR; 1030 kern_return_t RetCode; 1031 } __Reply__thread_suspend_t __attribute__((unused)); 1032 #ifdef __MigPackStructs 1033 #pragma pack(pop) 1034 #endif 1035 1036 #ifdef __MigPackStructs 1037 #pragma pack(push, 4) 1038 #endif 1039 typedef struct { 1040 mach_msg_header_t Head; 1041 NDR_record_t NDR; 1042 kern_return_t RetCode; 1043 } __Reply__thread_resume_t __attribute__((unused)); 1044 #ifdef __MigPackStructs 1045 #pragma pack(pop) 1046 #endif 1047 1048 #ifdef __MigPackStructs 1049 #pragma pack(push, 4) 1050 #endif 1051 typedef struct { 1052 mach_msg_header_t Head; 1053 NDR_record_t NDR; 1054 kern_return_t RetCode; 1055 } __Reply__thread_abort_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_abort_safely_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 NDR_record_t NDR; 1078 kern_return_t RetCode; 1079 } __Reply__thread_depress_abort_t __attribute__((unused)); 1080 #ifdef __MigPackStructs 1081 #pragma pack(pop) 1082 #endif 1083 1084 #ifdef __MigPackStructs 1085 #pragma pack(push, 4) 1086 #endif 1087 typedef struct { 1088 mach_msg_header_t Head; 1089 /* start of the kernel processed data */ 1090 mach_msg_body_t msgh_body; 1091 mach_msg_port_descriptor_t special_port; 1092 /* end of the kernel processed data */ 1093 } __Reply__thread_get_special_port_t __attribute__((unused)); 1094 #ifdef __MigPackStructs 1095 #pragma pack(pop) 1096 #endif 1097 1098 #ifdef __MigPackStructs 1099 #pragma pack(push, 4) 1100 #endif 1101 typedef struct { 1102 mach_msg_header_t Head; 1103 NDR_record_t NDR; 1104 kern_return_t RetCode; 1105 } __Reply__thread_set_special_port_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 mach_msg_type_number_t thread_info_outCnt; 1118 integer_t thread_info_out[32]; 1119 } __Reply__thread_info_t __attribute__((unused)); 1120 #ifdef __MigPackStructs 1121 #pragma pack(pop) 1122 #endif 1123 1124 #ifdef __MigPackStructs 1125 #pragma pack(push, 4) 1126 #endif 1127 typedef struct { 1128 mach_msg_header_t Head; 1129 NDR_record_t NDR; 1130 kern_return_t RetCode; 1131 } __Reply__thread_set_exception_ports_t __attribute__((unused)); 1132 #ifdef __MigPackStructs 1133 #pragma pack(pop) 1134 #endif 1135 1136 #ifdef __MigPackStructs 1137 #pragma pack(push, 4) 1138 #endif 1139 typedef struct { 1140 mach_msg_header_t Head; 1141 /* start of the kernel processed data */ 1142 mach_msg_body_t msgh_body; 1143 mach_msg_port_descriptor_t old_handlers[32]; 1144 /* end of the kernel processed data */ 1145 NDR_record_t NDR; 1146 mach_msg_type_number_t masksCnt; 1147 exception_mask_t masks[32]; 1148 exception_behavior_t old_behaviors[32]; 1149 thread_state_flavor_t old_flavors[32]; 1150 } __Reply__thread_get_exception_ports_t __attribute__((unused)); 1151 #ifdef __MigPackStructs 1152 #pragma pack(pop) 1153 #endif 1154 1155 #ifdef __MigPackStructs 1156 #pragma pack(push, 4) 1157 #endif 1158 typedef struct { 1159 mach_msg_header_t Head; 1160 /* start of the kernel processed data */ 1161 mach_msg_body_t msgh_body; 1162 mach_msg_port_descriptor_t old_handlers[32]; 1163 /* end of the kernel processed data */ 1164 NDR_record_t NDR; 1165 mach_msg_type_number_t masksCnt; 1166 exception_mask_t masks[32]; 1167 exception_behavior_t old_behaviors[32]; 1168 thread_state_flavor_t old_flavors[32]; 1169 } __Reply__thread_swap_exception_ports_t __attribute__((unused)); 1170 #ifdef __MigPackStructs 1171 #pragma pack(pop) 1172 #endif 1173 1174 #ifdef __MigPackStructs 1175 #pragma pack(push, 4) 1176 #endif 1177 typedef struct { 1178 mach_msg_header_t Head; 1179 NDR_record_t NDR; 1180 kern_return_t RetCode; 1181 } __Reply__thread_policy_t __attribute__((unused)); 1182 #ifdef __MigPackStructs 1183 #pragma pack(pop) 1184 #endif 1185 1186 #ifdef __MigPackStructs 1187 #pragma pack(push, 4) 1188 #endif 1189 typedef struct { 1190 mach_msg_header_t Head; 1191 NDR_record_t NDR; 1192 kern_return_t RetCode; 1193 } __Reply__thread_policy_set_t __attribute__((unused)); 1194 #ifdef __MigPackStructs 1195 #pragma pack(pop) 1196 #endif 1197 1198 #ifdef __MigPackStructs 1199 #pragma pack(push, 4) 1200 #endif 1201 typedef struct { 1202 mach_msg_header_t Head; 1203 NDR_record_t NDR; 1204 kern_return_t RetCode; 1205 mach_msg_type_number_t policy_infoCnt; 1206 integer_t policy_info[16]; 1207 boolean_t get_default; 1208 } __Reply__thread_policy_get_t __attribute__((unused)); 1209 #ifdef __MigPackStructs 1210 #pragma pack(pop) 1211 #endif 1212 1213 #ifdef __MigPackStructs 1214 #pragma pack(push, 4) 1215 #endif 1216 typedef struct { 1217 mach_msg_header_t Head; 1218 NDR_record_t NDR; 1219 kern_return_t RetCode; 1220 } __Reply__thread_sample_t __attribute__((unused)); 1221 #ifdef __MigPackStructs 1222 #pragma pack(pop) 1223 #endif 1224 1225 #ifdef __MigPackStructs 1226 #pragma pack(push, 4) 1227 #endif 1228 typedef struct { 1229 mach_msg_header_t Head; 1230 NDR_record_t NDR; 1231 kern_return_t RetCode; 1232 } __Reply__etap_trace_thread_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_assign_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 NDR_record_t NDR; 1255 kern_return_t RetCode; 1256 } __Reply__thread_assign_default_t __attribute__((unused)); 1257 #ifdef __MigPackStructs 1258 #pragma pack(pop) 1259 #endif 1260 1261 #ifdef __MigPackStructs 1262 #pragma pack(push, 4) 1263 #endif 1264 typedef struct { 1265 mach_msg_header_t Head; 1266 /* start of the kernel processed data */ 1267 mach_msg_body_t msgh_body; 1268 mach_msg_port_descriptor_t assigned_set; 1269 /* end of the kernel processed data */ 1270 } __Reply__thread_get_assignment_t __attribute__((unused)); 1271 #ifdef __MigPackStructs 1272 #pragma pack(pop) 1273 #endif 1274 1275 #ifdef __MigPackStructs 1276 #pragma pack(push, 4) 1277 #endif 1278 typedef struct { 1279 mach_msg_header_t Head; 1280 NDR_record_t NDR; 1281 kern_return_t RetCode; 1282 } __Reply__thread_set_policy_t __attribute__((unused)); 1283 #ifdef __MigPackStructs 1284 #pragma pack(pop) 1285 #endif 1286 1287 #ifdef __MigPackStructs 1288 #pragma pack(push, 4) 1289 #endif 1290 typedef struct { 1291 mach_msg_header_t Head; 1292 /* start of the kernel processed data */ 1293 mach_msg_body_t msgh_body; 1294 mach_msg_port_descriptor_t voucher; 1295 /* end of the kernel processed data */ 1296 } __Reply__thread_get_mach_voucher_t __attribute__((unused)); 1297 #ifdef __MigPackStructs 1298 #pragma pack(pop) 1299 #endif 1300 1301 #ifdef __MigPackStructs 1302 #pragma pack(push, 4) 1303 #endif 1304 typedef struct { 1305 mach_msg_header_t Head; 1306 NDR_record_t NDR; 1307 kern_return_t RetCode; 1308 } __Reply__thread_set_mach_voucher_t __attribute__((unused)); 1309 #ifdef __MigPackStructs 1310 #pragma pack(pop) 1311 #endif 1312 1313 #ifdef __MigPackStructs 1314 #pragma pack(push, 4) 1315 #endif 1316 typedef struct { 1317 mach_msg_header_t Head; 1318 /* start of the kernel processed data */ 1319 mach_msg_body_t msgh_body; 1320 mach_msg_port_descriptor_t old_voucher; 1321 /* end of the kernel processed data */ 1322 } __Reply__thread_swap_mach_voucher_t __attribute__((unused)); 1323 #ifdef __MigPackStructs 1324 #pragma pack(pop) 1325 #endif 1326 1327 #ifdef __MigPackStructs 1328 #pragma pack(push, 4) 1329 #endif 1330 typedef struct { 1331 mach_msg_header_t Head; 1332 NDR_record_t NDR; 1333 kern_return_t RetCode; 1334 mach_msg_type_number_t out_stateCnt; 1335 natural_t out_state[1296]; 1336 } __Reply__thread_convert_thread_state_t __attribute__((unused)); 1337 #ifdef __MigPackStructs 1338 #pragma pack(pop) 1339 #endif 1340 1341 #ifdef __MigPackStructs 1342 #pragma pack(push, 4) 1343 #endif 1344 typedef struct { 1345 mach_msg_header_t Head; 1346 NDR_record_t NDR; 1347 kern_return_t RetCode; 1348 mach_msg_type_number_t masksCnt; 1349 exception_mask_t masks[32]; 1350 exception_handler_info_t old_handlers_info[32]; 1351 exception_behavior_t old_behaviors[32]; 1352 thread_state_flavor_t old_flavors[32]; 1353 } __Reply__thread_get_exception_ports_info_t __attribute__((unused)); 1354 #ifdef __MigPackStructs 1355 #pragma pack(pop) 1356 #endif 1357 #endif /* !__Reply__thread_act_subsystem__defined */ 1358 1359 /* union of all replies */ 1360 1361 #ifndef __ReplyUnion__thread_act_subsystem__defined 1362 #define __ReplyUnion__thread_act_subsystem__defined 1363 union __ReplyUnion__thread_act_subsystem { 1364 __Reply__thread_terminate_t Reply_thread_terminate; 1365 __Reply__act_get_state_t Reply_act_get_state; 1366 __Reply__act_set_state_t Reply_act_set_state; 1367 __Reply__thread_get_state_t Reply_thread_get_state; 1368 __Reply__thread_set_state_t Reply_thread_set_state; 1369 __Reply__thread_suspend_t Reply_thread_suspend; 1370 __Reply__thread_resume_t Reply_thread_resume; 1371 __Reply__thread_abort_t Reply_thread_abort; 1372 __Reply__thread_abort_safely_t Reply_thread_abort_safely; 1373 __Reply__thread_depress_abort_t Reply_thread_depress_abort; 1374 __Reply__thread_get_special_port_t Reply_thread_get_special_port; 1375 __Reply__thread_set_special_port_t Reply_thread_set_special_port; 1376 __Reply__thread_info_t Reply_thread_info; 1377 __Reply__thread_set_exception_ports_t Reply_thread_set_exception_ports; 1378 __Reply__thread_get_exception_ports_t Reply_thread_get_exception_ports; 1379 __Reply__thread_swap_exception_ports_t Reply_thread_swap_exception_ports; 1380 __Reply__thread_policy_t Reply_thread_policy; 1381 __Reply__thread_policy_set_t Reply_thread_policy_set; 1382 __Reply__thread_policy_get_t Reply_thread_policy_get; 1383 __Reply__thread_sample_t Reply_thread_sample; 1384 __Reply__etap_trace_thread_t Reply_etap_trace_thread; 1385 __Reply__thread_assign_t Reply_thread_assign; 1386 __Reply__thread_assign_default_t Reply_thread_assign_default; 1387 __Reply__thread_get_assignment_t Reply_thread_get_assignment; 1388 __Reply__thread_set_policy_t Reply_thread_set_policy; 1389 __Reply__thread_get_mach_voucher_t Reply_thread_get_mach_voucher; 1390 __Reply__thread_set_mach_voucher_t Reply_thread_set_mach_voucher; 1391 __Reply__thread_swap_mach_voucher_t Reply_thread_swap_mach_voucher; 1392 __Reply__thread_convert_thread_state_t Reply_thread_convert_thread_state; 1393 __Reply__thread_get_exception_ports_info_t Reply_thread_get_exception_ports_info; 1394 }; 1395 #endif /* !__RequestUnion__thread_act_subsystem__defined */ 1396 1397 #ifndef subsystem_to_name_map_thread_act 1398 #define subsystem_to_name_map_thread_act \ 1399 { "thread_terminate", 3600 },\ 1400 { "act_get_state", 3601 },\ 1401 { "act_set_state", 3602 },\ 1402 { "thread_get_state", 3603 },\ 1403 { "thread_set_state", 3604 },\ 1404 { "thread_suspend", 3605 },\ 1405 { "thread_resume", 3606 },\ 1406 { "thread_abort", 3607 },\ 1407 { "thread_abort_safely", 3608 },\ 1408 { "thread_depress_abort", 3609 },\ 1409 { "thread_get_special_port", 3610 },\ 1410 { "thread_set_special_port", 3611 },\ 1411 { "thread_info", 3612 },\ 1412 { "thread_set_exception_ports", 3613 },\ 1413 { "thread_get_exception_ports", 3614 },\ 1414 { "thread_swap_exception_ports", 3615 },\ 1415 { "thread_policy", 3616 },\ 1416 { "thread_policy_set", 3617 },\ 1417 { "thread_policy_get", 3618 },\ 1418 { "thread_sample", 3619 },\ 1419 { "etap_trace_thread", 3620 },\ 1420 { "thread_assign", 3621 },\ 1421 { "thread_assign_default", 3622 },\ 1422 { "thread_get_assignment", 3623 },\ 1423 { "thread_set_policy", 3624 },\ 1424 { "thread_get_mach_voucher", 3625 },\ 1425 { "thread_set_mach_voucher", 3626 },\ 1426 { "thread_swap_mach_voucher", 3627 },\ 1427 { "thread_convert_thread_state", 3628 },\ 1428 { "thread_get_exception_ports_info", 3630 } 1429 #endif 1430 1431 #ifdef __AfterMigUserHeader 1432 __AfterMigUserHeader 1433 #endif /* __AfterMigUserHeader */ 1434 1435 #endif /* _thread_act_user_ */