1/* 2 * Copyright (c) 2000-2016 Apple Inc. All rights reserved. 3 * 4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 * 6 * This file contains Original Code and/or Modifications of Original Code 7 * as defined in and that are subject to the Apple Public Source License 8 * Version 2.0 (the 'License'). You may not use this file except in 9 * compliance with the License. The rights granted to you under the License 10 * may not be used to create, or enable the creation or redistribution of, 11 * unlawful or unlicensed copies of an Apple operating system, or to 12 * circumvent, violate, or enable the circumvention or violation of, any 13 * terms of an Apple operating system software license agreement. 14 * 15 * Please obtain a copy of the License at 16 * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 * 18 * The Original Code and all software distributed under the License are 19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 * Please see the License for the specific language governing rights and 24 * limitations under the License. 25 * 26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 */ 28/* 29 * @OSF_COPYRIGHT@ 30 */ 31/* 32 * Mach Operating System 33 * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University 34 * All Rights Reserved. 35 * 36 * Permission to use, copy, modify and distribute this software and its 37 * documentation is hereby granted, provided that both the copyright 38 * notice and this permission notice appear in all copies of the 39 * software, derivative works or modified versions, and any portions 40 * thereof, and that both notices appear in supporting documentation. 41 * 42 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 43 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 44 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 45 * 46 * Carnegie Mellon requests users of this software to return to 47 * 48 * Software Distribution Coordinator or [email protected] 49 * School of Computer Science 50 * Carnegie Mellon University 51 * Pittsburgh PA 15213-3890 52 * 53 * any improvements or extensions that they make and grant Carnegie Mellon 54 * the rights to redistribute these changes. 55 */ 56/* 57 * NOTICE: This file was modified by McAfee Research in 2004 to introduce 58 * support for mandatory and extensible security protections. This notice 59 * is included in support of clause 2.2 (b) of the Apple Public License, 60 * Version 2.0. 61 */ 62/* 63 */ 64/* 65 * Mach kernel interface type declarations 66 */ 67 68#ifndef _MACH_MACH_TYPES_DEFS_ 69#define _MACH_MACH_TYPES_DEFS_ 70 71 72#include <mach/std_types.defs> 73 74type memory_object_offset_t = uint64_t; 75type memory_object_size_t = uint64_t; 76type memory_object_cluster_size_t = uint32_t; 77type memory_object_fault_info_t = array[16] of integer_t; 78 79#ifdef KERNEL_PRIVATE 80 81/* Universal Page Lists - restricted to (in-kernel) pagers for now */ 82type upl_size_t = uint32_t; 83type upl_offset_t = uint32_t; 84type upl_page_info_t = struct[2] of integer_t; 85type upl_page_info_array_t = array[*:256] of upl_page_info_t; 86 87type upl_t = mach_port_t 88 intran: upl_t convert_port_to_upl(mach_port_t) 89 outtran: mach_port_t convert_upl_to_port(upl_t) 90 destructor: upl_deallocate(upl_t) 91 ; 92 93#endif /* KERNEL_PRIVATE */ 94 95type mach_port_status_t = struct[10] of integer_t; /* obsolete */ 96type mach_port_info_ext_t = struct[17] of integer_t; 97 98 /* mach_port_info_t: can hold either a 99 * mach_port_status_t (9 ints) or a 100 * mach_port_limits_t (1 int) or a 101 * mach_port_info_ext_t (17 ints). If new flavors of 102 * mach_port_{get,set}_attributes are added, the size of 103 * this array may have to be increased. (See mach/port.h) 104 */ 105type mach_port_flavor_t = int; 106type mach_port_info_t = array[*:17] of integer_t; 107 108 /* 109 * mach_msg_max_trailer_t: can hold 110 * mach_msg_trailer_type_t (1 int) 111 * mach_msg_trailer_size_t (1 int) 112 * mach_port_seqno_t (1 int) 113 * security_token_t (2 ints) 114 * audit_token_t (8 ints) 115 * mach_port_context_t (2 ints) 116 * msgh_ad (1 int) 117 * msg_labels_t (1 int) 118 */ 119type mach_msg_trailer_type_t = int; 120type mach_msg_trailer_info_t = array[*:68] of char; 121 122type mach_task_flavor_t = int; 123 124type task_t = mach_port_t 125#if KERNEL_SERVER 126 intran: task_t convert_port_to_task_mig(mach_port_t) 127 outtran: mach_port_t convert_task_to_port_kernel(task_t) 128 destructor: task_deallocate_mig(task_t) 129#endif /* KERNEL_SERVER */ 130 ; 131 132type task_name_t = mach_port_t 133#if KERNEL_SERVER 134 intran: task_name_t convert_port_to_task_name_mig(mach_port_t) 135 outtran: mach_port_t convert_task_name_to_port(task_name_t) 136 destructor: task_name_deallocate_mig(task_name_t) 137#endif /* KERNEL_SERVER */ 138 ; 139 140type task_policy_set_t = mach_port_t 141#if KERNEL_SERVER 142 intran: task_policy_set_t convert_port_to_task_policy_set_mig(mach_port_t) 143 destructor: task_policy_set_deallocate_mig(task_policy_set_t) 144#endif /* KERNEL_SERVER */ 145 ; 146 147type task_policy_get_t = mach_port_t 148#if KERNEL_SERVER 149 intran: task_policy_get_t convert_port_to_task_policy_get_mig(mach_port_t) 150 destructor: task_policy_get_deallocate_mig(task_policy_get_t) 151#endif /* KERNEL_SERVER */ 152 ; 153 154 155type task_inspect_t = mach_port_t 156#if KERNEL_SERVER 157 intran: task_inspect_t convert_port_to_task_inspect_mig(mach_port_t) 158 outtran: mach_port_t convert_task_inspect_to_port(task_inspect_t) 159 destructor: task_inspect_deallocate_mig(task_inspect_t) 160#endif /* KERNEL_SERVER */ 161 ; 162 163type task_read_t = mach_port_t 164#if KERNEL_SERVER 165 intran: task_read_t convert_port_to_task_read_mig(mach_port_t) 166 outtran: mach_port_t convert_task_read_to_port(task_read_t) 167 destructor: task_read_deallocate_mig(task_read_t) 168#endif /* KERNEL_SERVER */ 169 ; 170 171type task_id_token_t = mach_port_t 172#if KERNEL_SERVER 173 intran: task_id_token_t convert_port_to_task_id_token(mach_port_t) 174 outtran: mach_port_t convert_task_id_token_to_port(task_id_token_t) 175 destructor: task_id_token_release(task_id_token_t) 176#endif /* KERNEL_SERVER */ 177 ; 178 179type thread_t = mach_port_t 180#if KERNEL_SERVER 181 intran: thread_t convert_port_to_thread(mach_port_t) 182 outtran: mach_port_t convert_thread_to_port(thread_t) 183 destructor: thread_deallocate(thread_t) 184#endif /* KERNEL_SERVER */ 185 ; 186 187type thread_inspect_t = mach_port_t 188#if KERNEL_SERVER 189 intran: thread_inspect_t convert_port_to_thread_inspect(mach_port_t) 190 outtran: mach_port_t convert_thread_inspect_to_port(thread_inspect_t) 191 destructor: thread_inspect_deallocate(thread_inspect_t) 192#endif /* KERNEL_SERVER */ 193 ; 194 195type thread_read_t = mach_port_t 196#if KERNEL_SERVER 197 intran: thread_read_t convert_port_to_thread_read(mach_port_t) 198 outtran: mach_port_t convert_thread_read_to_port(thread_read_t) 199 destructor: thread_read_deallocate(thread_read_t) 200#endif /* KERNEL_SERVER */ 201 ; 202 203type thread_act_t = mach_port_t 204#if KERNEL_SERVER 205 intran: thread_act_t convert_port_to_thread(mach_port_t) 206 outtran: mach_port_t convert_thread_to_port(thread_act_t) 207 destructor: thread_deallocate(thread_act_t) 208#endif /* KERNEL_SERVER */ 209 ; 210 211type thread_act_consume_ref_t = mach_port_move_send_t 212 cusertype: thread_act_t 213#if KERNEL_SERVER 214 intran: thread_act_t convert_port_to_thread(mach_port_t) 215 destructor: thread_deallocate(thread_act_t) 216#endif /* KERNEL_SERVER */ 217 ; 218 219 /* thread_state_t: This inline array can hold 220 * a machine-dependent amount of data, defined in 221 * mach/machine/???? (currently THREAD_STATE_MAX, 222 * in mach/thread_state.h) 223 */ 224#include <mach/machine/thread_state.h> 225type thread_state_flavor_t = int; 226type thread_state_t = array[*:THREAD_STATE_MAX] of natural_t; 227 228type task_array_t = ^array[] of task_t; 229type thread_array_t = ^array[] of thread_t; 230type thread_act_array_t = ^array[] of thread_act_t; 231type act_params_t = array[6] of int; 232 233type vm_map_t = mach_port_t 234#if KERNEL_SERVER 235 intran: vm_map_t convert_port_to_map(mach_port_t) 236 destructor: vm_map_deallocate(vm_map_t) 237#endif /* KERNEL_SERVER */ 238 ; 239 240type vm_map_inspect_t = mach_port_t 241#if KERNEL_SERVER 242 intran: vm_map_inspect_t convert_port_to_map_inspect(mach_port_t) 243 destructor: vm_map_inspect_deallocate(vm_map_inspect_t) 244#endif /* KERNEL_SERVER */ 245 ; 246 247type vm_map_read_t = mach_port_t 248#if KERNEL_SERVER 249 intran: vm_map_read_t convert_port_to_map_read(mach_port_t) 250 destructor: vm_map_read_deallocate(vm_map_read_t) 251#endif /* KERNEL_SERVER */ 252 ; 253 254type vm_task_entry_t = mach_port_t 255 cusertype: vm_map_t 256#if KERNEL_SERVER 257 intran: vm_map_t convert_port_entry_to_map(mach_port_t) 258 destructor: vm_map_deallocate(vm_map_t) 259#endif /* KERNEL_SERVER */ 260 ; 261 262type ipc_space_t = mach_port_t 263#if KERNEL_SERVER 264 intran: ipc_space_t convert_port_to_space(mach_port_t) 265 destructor: space_deallocate(ipc_space_t) 266#endif /* KERNEL_SERVER */ 267 ; 268 269type ipc_space_read_t = mach_port_t 270#if KERNEL_SERVER 271 intran: ipc_space_read_t convert_port_to_space_read(mach_port_t) 272 destructor: space_read_deallocate(ipc_space_read_t) 273#endif /* KERNEL_SERVER */ 274 ; 275 276type ipc_space_inspect_t = mach_port_t 277#if KERNEL_SERVER 278 intran: ipc_space_inspect_t convert_port_to_space_inspect(mach_port_t) 279 destructor: space_inspect_deallocate(ipc_space_inspect_t) 280#endif /* KERNEL_SERVER */ 281 ; 282 283type arcade_register_t = mach_port_t 284#if KERNEL_SERVER 285 intran: arcade_register_t convert_port_to_arcade_register(mach_port_t) 286#endif /* KERNEL_SERVER */ 287 ; 288 289type vm_prot_t = int; 290type vm_inherit_t = int; 291type vm_purgable_t = int; 292type xxx_vm_statistics_data_t = struct[13] of integer_t; 293type vm_behavior_t = int; 294type vm_statistics_data_t = struct[15] of integer_t; 295type vm_machine_attribute_t = int; 296type vm_machine_attribute_val_t = int; 297type vm_sync_t = int; 298 299 /* thread_info_t: this inline array can hold any of: 300 * thread_basic_info_t (10 ints) 301 * policy_timeshare_info_t (5 ints) 302 * policy_fifo_info_t (4 ints) 303 * policy_rr_info_t (5 ints) 304 * thread_extended_info (12 ints + 64 chars) 305 * if other thread_info flavors are added, this 306 * definition may need to be changed. (See 307 * mach/thread_info.h and mach/policy.h) */ 308type thread_flavor_t = int; 309type thread_info_t = array[*:32] of integer_t; 310 311type thread_policy_flavor_t = natural_t; 312type thread_policy_t = array[*:16] of integer_t; 313 314 /* task_info_t: this inline array can hold any of: 315 * task_basic_info_32_t (8 ints) 316 * task_basic_info_64_t (10 ints) 317 * task_events_info_t (8 ints) 318 * task_thread_times_info_t (4 ints) 319 * policy_timeshare_info_t (5 ints) 320 * policy_fifo_info_t (4 ints) 321 * policy_rr_info_t (5 ints) 322 * task security token (2 ints) 323 * task audit token (8 ints) 324 * dyld info (2 64-bit ints and 1 int) 325 * task_extmod_info_t (8 64-bit ints) 326 * task_basic_info_64_2_t 327 * mach_task_basic_info_t (12 ints) 328 * task_power_info_t (18 ints) 329 * task_vm_info_t (89 ints) 330 * If other task_info flavors are added, this 331 * definition may need to be changed. (See 332 * mach/task_info.h and mach/policy.h) */ 333type task_flavor_t = int; 334type task_info_t = array[*:89] of integer_t; 335 336type task_purgable_info_t = struct[68] of integer_t; 337 338type task_policy_flavor_t = natural_t; 339type task_policy_t = array[*:16] of integer_t; 340 341type task_inspect_flavor_t = natural_t; 342type task_inspect_info_t = array[*:4] of integer_t; 343 344type task_exc_guard_behavior_t = uint32_t; 345type task_corpse_forking_behavior_t = uint32_t; 346 347type mem_entry_name_port_t = mach_port_t 348#if KERNEL_SERVER 349 intran: mem_entry_name_port_t null_conversion(mach_port_t) 350 outtran: mach_port_t null_conversion(mem_entry_name_port_t) 351#endif /* KERNEL_SERVER */ 352 ; 353 354type mem_entry_name_port_move_send_t = mach_port_move_send_t 355 cusertype: mem_entry_name_port_t 356#if KERNEL_SERVER 357 intran: mem_entry_name_port_t null_conversion(mach_port_t) 358 outtran: mach_port_t null_conversion(mem_entry_name_port_t) 359#endif /* KERNEL_SERVER */ 360 ; 361 362type memory_object_default_t = mach_port_t 363#if KERNEL_PRIVATE 364 intran: memory_object_default_t null_conversion(mach_port_t) 365 outtran: mach_port_t null_conversion(memory_object_default_t) 366#endif /* KERNEL_PRIVATE */ 367 ; 368 369type memory_object_t = mach_port_t 370#if KERNEL_PRIVATE 371 intran: memory_object_t convert_port_to_memory_object(mach_port_t) 372 outtran: mach_port_t convert_memory_object_to_port(memory_object_t) 373#endif /* KERNEL_PRIVATE */ 374 ; 375 376 377type memory_object_control_t = mach_port_t 378#if KERNEL_PRIVATE 379 intran: memory_object_control_t convert_port_to_mo_control(mach_port_t) 380 outtran: mach_port_t convert_mo_control_to_port(memory_object_control_t) 381 destructor: memory_object_control_deallocate(memory_object_control_t) 382#endif /* KERNEL_PRIVATE */ 383 ; 384 385type memory_object_name_t = mach_port_t 386 ctype: mach_port_t 387 ; 388 389 390type memory_object_copy_strategy_t = int; 391type memory_object_return_t = int; 392 393type machine_info_data_t = struct[5] of integer_t; 394type machine_slot_data_t = struct[8] of integer_t; 395 396type host_t = mach_port_t 397#if KERNEL_SERVER 398 intran: host_t convert_port_to_host(mach_port_t) 399 outtran: mach_port_t convert_host_to_port(host_t) 400#endif /* KERNEL_SERVER */ 401 ; 402 403type host_priv_t = mach_port_t 404#if KERNEL_SERVER 405 intran: host_priv_t convert_port_to_host_priv(mach_port_t) 406#endif /* KERNEL_SERVER */ 407 ; 408 409type host_security_t = mach_port_t; /* obsolete */ 410 411 /* 412 * host_info_t: variable-sized inline array that can contain: 413 * 414 * host_basic_info_old_t (5 ints) 415 * host_basic_info_t (12 ints) 416 * host_sched_info_t (2 ints) 417 * kernel_resource_sizes_t (5 ints) 418 * host_load_info_t (6 ints) 419 * vm_statistics32_t (15 ints) 420 * host_purgable_info_t (68 ints) 421 * host_expired_task_info uses a task_power_info (18 ints) 422 * 423 * If other host_info flavors are added, this definition may 424 * need to be changed. (See mach/{host_info,vm_statistics}.h) 425 */ 426type host_flavor_t = int; 427type host_info_t = array[*:68] of integer_t; 428 /* 429 * host_info64_t: variable-sized inline array that can contain: 430 * 431 * vm_statistics_t (6 ints and 9 longs) 432 * vm_extmod_statistics_t (6 64-bit ints) 433 */ 434type host_info64_t = array[*:256] of integer_t; 435 436type processor_t = mach_port_t 437#if KERNEL_SERVER 438 intran: processor_t convert_port_to_processor(mach_port_t) 439 outtran: mach_port_t convert_processor_to_port(processor_t) 440#endif /* KERNEL_SERVER */ 441 ; 442 443type processor_array_t = ^array[] of processor_t; 444 445 /* 446 * processor_info_t: variable-sized inline array that can 447 * contain: 448 * 449 * - processor_basic_info_t: (5 ints) 450 * - processor_cpu_load_info_t: (4 ints) 451 * - processor_machine_info_t: (12 ints) 452 * - processor_cpu_stat_t: (10 ints) 453 * - processor_cpu_stat64_t: (20 ints) 454 * 455 * If other processor_info flavors are added, this definition 456 * may need to be changed. 457 * 458 * See mach/processor_info.h and mach/arm/processor_info.h. 459 */ 460 461type processor_flavor_t = int; 462type processor_info_t = array[*:20] of integer_t; 463type processor_info_array_t = ^array[] of integer_t; 464 465type processor_set_t = mach_port_t 466#if KERNEL_SERVER 467 intran: processor_set_t convert_port_to_pset(mach_port_t) 468 outtran: mach_port_t convert_pset_to_port(processor_set_t) 469 destructor: pset_deallocate(processor_set_t) 470#endif /* KERNEL_SERVER */ 471 ; 472 473type processor_set_array_t = ^array[] of processor_set_t; 474 475type processor_set_name_t = mach_port_t 476#if KERNEL_SERVER 477 intran: processor_set_name_t convert_port_to_pset_name(mach_port_t) 478 outtran: mach_port_t convert_pset_name_to_port(processor_set_name_t) 479 destructor: pset_deallocate(processor_set_name_t) 480#endif /* KERNEL_SERVER */ 481 ; 482 483type processor_set_name_array_t = ^array[] of processor_set_name_t; 484 485 /* processor_set_info_t: variable-size inline array 486 * that can hold: 487 * processor_set_basic_info (5 ints) 488 * processor_set_load_info (4 ints) 489 * policy_timeshare_base_t (1 int) 490 * policy_fifo_base_t (1 int) 491 * policy_rr_base_t (1 int) 492 * policy_timeshare_base_t (1 int) 493 * policy_fifo_base_t (1 int) 494 * policy_rr_base_t (1 int) 495 * policy_t (1 int) 496 * If other flavors are added, this definition may 497 * need to be changed. (see mach/processor.h) */ 498type processor_set_flavor_t = int; 499type processor_set_info_t = array[*:5] of integer_t; 500 501type bootstrap_t = mach_port_t; 502 503type kernel_version_t = c_string[*:512]; 504type kernel_boot_info_t = c_string[*:4096]; 505 506type time_value_t = struct[2] of integer_t; 507 508type mach_port_qos_t = struct[2] of integer_t; 509 510type mach_port_options_t = struct[3] of uint64_t; 511type mach_port_options_ptr_t = ^ mach_port_options_t; 512 513type mach_service_port_info_data_t = struct[256] of char; 514 515type emulation_vector_t = ^array[] of vm_offset_t; 516 517type inline_existence_map_t = array[*:512] of char; 518 519type policy_t = int; 520 /* policy_info_t: variable-size inline array. Can hold: 521 * policy_timeshare_info_t (5 ints) 522 * policy_fifo_info_t (4 ints) 523 * policy_rr_info_t (5 ints) */ 524type policy_base_t = array[*:5] of integer_t; 525type policy_info_t = array[*:2] of integer_t; 526type policy_limit_t = array[*:1] of integer_t; 527 528type ledger_t = mach_port_t 529#if KERNEL_SERVER 530 intran: ledger_t convert_port_to_ledger(mach_port_t) 531 outtran: mach_port_t convert_ledger_to_port(ledger_t) 532#endif /* KERNEL_SERVER */ 533 ; 534 535type ledger_array_t = ^array[] of ledger_t; 536type ledger_item_t = integer_t; 537 /* DEPRECATED */ 538 539type ledger_amount_t = int64_t; 540 541type security_token_t = struct[2] of uint32_t; 542type audit_token_t = struct[8] of uint32_t; 543 544type msg_labels_t = mach_port_t; 545 546 /* memory_object_info_t: variable-size inline array: 547 * memory_object_attr_info_t (5 ints) 548 * XXX actually it's 6 ints temporarily (object_ready!) 549 * memory_object_behave_info_t (4 ints) 550 * memory_object_perf_info_t (2 ints) 551 * old_memory_object_attr_info_t (3 ints) 552 * If other flavors are added, this definition may 553 * need to be changed. (see mach/memory_object.h) */ 554type memory_object_flavor_t = int; 555type memory_object_info_t = array[*:6] of int; 556 557 /* vm_region_info_t: variable-size inline array that can hold: 558 * vm_region_basic_info_t (8 ints) 559 * If other flavors are added, this definition may 560 * need to be changed. (see mach/vm_region.h) */ 561type vm_region_flavor_t = int; 562type vm_region_info_t = array[*:10] of int; 563type vm_region_recurse_info_t = array[*:19] of int; 564 565type vm_page_info_flavor_t = int; 566type vm_page_info_t = array[*:32] of int; 567 568type mach_vm_read_entry_t = array[512] of mach_vm_offset_t; 569type vm_read_entry_t = array[512] of vm_offset_t; 570#ifdef VM32_SUPPORT 571type vm32_read_entry_t = array[512] of vm32_offset_t; 572#endif 573 574type exception_mask_t = int; 575type exception_behavior_t = int; 576 577type exception_handler_t = mach_port_t; 578 579type exception_handler_info_t = struct[2] of natural_t; 580 581type exception_handler_array_t = 582 array[*:32] of exception_handler_t; 583 584type exception_handler_info_array_t = 585 array[*:32] of exception_handler_info_t; 586 587type exception_behavior_array_t = 588 array[*:32] of exception_behavior_t; 589 590type exception_flavor_array_t = 591 array[*:32] of thread_state_flavor_t; 592 593type exception_mask_array_t = 594 array[*:32] of exception_mask_t; 595 596type semaphore_t = mach_port_t 597#if KERNEL_SERVER 598 intran: semaphore_t convert_port_to_semaphore(mach_port_t) 599 outtran: mach_port_t convert_semaphore_to_port(semaphore_t) 600 destructor: semaphore_dereference(semaphore_t) 601#endif /* KERNEL_SERVER */ 602 ; 603 604type semaphore_consume_ref_t = mach_port_move_send_t 605 cusertype: semaphore_t 606#if KERNEL_SERVER 607 intran: semaphore_t convert_port_to_semaphore(mach_port_t) 608 outtran: mach_port_t convert_semaphore_to_port(semaphore_t) 609#endif /* KERNEL_SERVER */ 610 ; 611 612#ifndef _MACH_MACH_EVENTLINK_TYPE_DEFS 613#define _MACH_MACH_EVENTLINK_TYPE_DEFS 614 615type eventlink_t = mach_port_t 616 ctype: mach_port_t 617#if KERNEL_SERVER 618 intran: ipc_eventlink_t convert_port_to_eventlink(mach_port_t) 619 destructor: ipc_eventlink_deallocate(ipc_eventlink_t) 620#endif /* KERNEL_SERVER */ 621 ; 622 623type eventlink_consume_ref_t = mach_port_move_send_t 624 ctype: mach_port_t 625#if KERNEL_SERVER 626 intran: ipc_eventlink_t convert_port_to_eventlink(mach_port_t) 627 destructor: ipc_eventlink_deallocate(ipc_eventlink_t) 628#endif /* KERNEL_SERVER */ 629 ; 630 631type eventlink_port_pair_t = array[2] of mach_port_t; 632type mach_eventlink_create_option_t = uint32_t; 633type mach_eventlink_associate_option_t = uint32_t; 634type mach_eventlink_disassociate_option_t = uint32_t; 635type mach_eventlink_signal_wait_option_t = uint32_t; 636 637#endif /* _MACH_MACH_EVENTLINK_TYPE_DEFS */ 638 639/* obsolete */ 640type lock_set_t = mach_port_t; 641 642type task_suspension_token_t = mach_port_move_send_once_t 643#if KERNEL_SERVER 644 intran: task_suspension_token_t convert_port_to_task_suspension_token_mig(mach_port_t) 645 outtran: mach_port_t convert_task_suspension_token_to_port_mig(task_suspension_token_t) 646#endif /* KERNEL_SERVER */ 647 ; 648 649type vfs_path_t = c_string[4096]; 650type nspace_path_t = c_string[1024]; /* 1024 == PATH_MAX */ 651type nspace_name_t = c_string[1024]; /* 1024 == PATH_MAX */ 652 653/* public voucher types */ 654 655/* Mach voucher object */ 656type mach_voucher_t = mach_port_t; 657type mach_voucher_name_t = mach_port_name_t; 658 659type mach_voucher_attr_manager_t = mach_port_t; 660type mach_voucher_attr_control_t = mach_port_t; 661 662/* IPC voucher internal object */ 663type ipc_voucher_t = mach_port_t 664#if KERNEL_SERVER 665 intran: ipc_voucher_t convert_port_to_voucher(mach_port_t) 666 outtran: mach_port_t convert_voucher_to_port(ipc_voucher_t) 667 destructor: ipc_voucher_release(ipc_voucher_t) 668#endif /* KERNEL_SERVER */ 669 ; 670 671/* IPC voucher attribute control internal object */ 672type ipc_voucher_attr_control_t = mach_port_t 673#if KERNEL_SERVER 674 intran: ipc_voucher_attr_control_t convert_port_to_voucher_attr_control(mach_port_t) 675 outtran: mach_port_t convert_voucher_attr_control_to_port(ipc_voucher_attr_control_t) 676 destructor: ipc_voucher_attr_control_release(ipc_voucher_attr_control_t) 677#endif /* KERNEL_SERVER */ 678 ; 679 680type mach_voucher_attr_key_t = uint32_t; 681 682type mach_voucher_attr_command_t = uint32_t; 683type mach_voucher_attr_recipe_command_t = uint32_t; 684 685type mach_voucher_attr_content_size_t = uint32_t; 686type mach_voucher_attr_content_t = array[*:4096] of uint8_t; 687type mach_voucher_attr_content_array_t = array[*:5120] of uint8_t; 688 689type mach_voucher_attr_raw_recipe_size_t = uint32_t; 690type mach_voucher_attr_raw_recipe_t = array[*:4096] of uint8_t; 691type mach_voucher_attr_raw_recipe_array_t = array[*:5120] of uint8_t; 692 693type mach_voucher_selector_t = uint32_t; 694 695type mach_voucher_attr_value_handle_t = uint64_t; 696type mach_voucher_attr_value_handle_array_t = array[*:4] of mach_voucher_attr_value_handle_t; 697type mach_voucher_attr_value_reference_t = uint32_t; 698 699/* kernel module loader */ 700type kmod_t = int; 701type kmod_control_flavor_t = int; 702 703type kmod_args_t = ^array[] of MACH_MSG_TYPE_BYTE 704 ctype: kmod_args_t; 705 706type io_master_t = mach_port_t; 707type UNDServerRef = mach_port_t; 708 709/* These must be kept in sync with definitions in osfmk/mach/dyld_kernel.h */ 710type dyld_kernel_image_info_t = struct[40] of MACH_MSG_TYPE_BYTE; 711type dyld_kernel_image_info_array_t = ^array[] of dyld_kernel_image_info_t; 712type dyld_kernel_process_info_t = struct[64] of MACH_MSG_TYPE_BYTE; 713 714#if KERNEL_SERVER 715#ifdef MACH_KERNEL_PRIVATE 716simport <ipc/ipc_voucher.h>; /* for voucher conversions */ 717simport <kern/ipc_kobject.h>; /* for null conversion */ 718simport <kern/ipc_tt.h>; /* for task/thread conversion */ 719simport <kern/ipc_host.h>; /* for host/processor/pset conversions */ 720simport <kern/ledger.h>; /* for ledger conversions */ 721simport <kern/processor.h>; /* for processor conversions */ 722simport <kern/sync_sema.h>; /* for semaphore conversions */ 723simport <ipc/ipc_eventlink.h>; /* for eventlink conversions */ 724simport <vm/memory_object.h>; /* for memory object type conversions */ 725simport <vm/vm_map.h>; /* for vm_map conversions */ 726#if CONFIG_ARCADE 727simport <kern/arcade.h>; /* for arcade_register conversions */ 728#endif 729#endif /* MACH_KERNEL_PRIVATE */ 730 731simport <kern/ipc_mig.h>; /* pick up kernel-specific MIG things */ 732 733simport <kern/task_ident.h>; /* for task_id_token conversions */ 734#endif /* KERNEL_SERVER */ 735 736import <mach/mig.h>; 737import <mach/mach_types.h>; 738 739#endif /* _MACH_MACH_TYPES_DEFS_ */ 740 741/* vim: set ft=c : */ 742