]> git.saurik.com Git - apple/xnu.git/blame - osfmk/mach/mach_types.defs
xnu-7195.81.3.tar.gz
[apple/xnu.git] / osfmk / mach / mach_types.defs
CommitLineData
1c79356b 1/*
39037602 2 * Copyright (c) 2000-2016 Apple Inc. All rights reserved.
1c79356b 3 *
2d21ac55 4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
1c79356b 5 *
2d21ac55
A
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.
8f6c56a5 14 *
2d21ac55
A
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
8f6c56a5
A
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2d21ac55
A
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.
8f6c56a5 25 *
2d21ac55 26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
1c79356b
A
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 Software.Distribution@CS.CMU.EDU
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 */
2d21ac55
A
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 */
1c79356b
A
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
9bccf70c
A
74type memory_object_offset_t = uint64_t;
75type memory_object_size_t = uint64_t;
91447636 76type memory_object_cluster_size_t = uint32_t;
2d21ac55 77type memory_object_fault_info_t = array[16] of integer_t;
1c79356b 78
91447636 79#ifdef KERNEL_PRIVATE
1c79356b 80
91447636
A
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;
1c79356b 86
91447636
A
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 */
1c79356b
A
94
95type mach_port_status_t = struct[10] of integer_t; /* obsolete */
39236c6e 96type mach_port_info_ext_t = struct[17] of integer_t;
1c79356b
A
97
98 /* mach_port_info_t: can hold either a
99 * mach_port_status_t (9 ints) or a
39236c6e
A
100 * mach_port_limits_t (1 int) or a
101 * mach_port_info_ext_t (17 ints). If new flavors of
1c79356b
A
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;
39236c6e
A
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;
1c79356b 121
f427ee49
A
122type mach_task_flavor_t = int;
123
1c79356b
A
124type task_t = mach_port_t
125#if KERNEL_SERVER
126 intran: task_t convert_port_to_task(mach_port_t)
127 outtran: mach_port_t convert_task_to_port(task_t)
128 destructor: task_deallocate(task_t)
129#endif /* KERNEL_SERVER */
130 ;
131
0c530ab8
A
132type task_name_t = mach_port_t
133#if KERNEL_SERVER
134 intran: task_name_t convert_port_to_task_name(mach_port_t)
135 outtran: mach_port_t convert_task_name_to_port(task_name_t)
136 destructor: task_name_deallocate(task_name_t)
137#endif /* KERNEL_SERVER */
138 ;
139
f427ee49
A
140type task_policy_set_t = mach_port_t
141#if KERNEL_SERVER
142 intran: task_policy_set_t convert_port_to_task_policy_set(mach_port_t)
143 destructor: task_policy_set_deallocate(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(mach_port_t)
150 destructor: task_policy_get_deallocate(task_policy_get_t)
151#endif /* KERNEL_SERVER */
152 ;
153
154
813fb2f6
A
155type task_inspect_t = mach_port_t
156#if KERNEL_SERVER
157 intran: task_inspect_t convert_port_to_task_inspect(mach_port_t)
158 outtran: mach_port_t convert_task_inspect_to_port(task_inspect_t)
159 destructor: task_inspect_deallocate(task_inspect_t)
160#endif /* KERNEL_SERVER */
161 ;
162
f427ee49
A
163type task_read_t = mach_port_t
164#if KERNEL_SERVER
165 intran: task_read_t convert_port_to_task_read(mach_port_t)
166 outtran: mach_port_t convert_task_read_to_port(task_read_t)
167 destructor: task_read_deallocate(task_read_t)
168#endif /* KERNEL_SERVER */
169 ;
170
1c79356b
A
171type thread_t = mach_port_t
172#if KERNEL_SERVER
173 intran: thread_t convert_port_to_thread(mach_port_t)
174 outtran: mach_port_t convert_thread_to_port(thread_t)
175 destructor: thread_deallocate(thread_t)
176#endif /* KERNEL_SERVER */
177 ;
178
813fb2f6
A
179type thread_inspect_t = mach_port_t
180#if KERNEL_SERVER
181 intran: thread_inspect_t convert_port_to_thread_inspect(mach_port_t)
182 outtran: mach_port_t convert_thread_inspect_to_port(thread_inspect_t)
183 destructor: thread_inspect_deallocate(thread_inspect_t)
184#endif /* KERNEL_SERVER */
185 ;
186
f427ee49
A
187type thread_read_t = mach_port_t
188#if KERNEL_SERVER
189 intran: thread_read_t convert_port_to_thread_read(mach_port_t)
190 outtran: mach_port_t convert_thread_read_to_port(thread_read_t)
191 destructor: thread_read_deallocate(thread_read_t)
192#endif /* KERNEL_SERVER */
193 ;
194
1c79356b
A
195type thread_act_t = mach_port_t
196#if KERNEL_SERVER
91447636
A
197 intran: thread_act_t convert_port_to_thread(mach_port_t)
198 outtran: mach_port_t convert_thread_to_port(thread_act_t)
199 destructor: thread_deallocate(thread_act_t)
55e303ae 200#endif /* KERNEL_SERVER */
1c79356b
A
201 ;
202
203type thread_act_consume_ref_t = mach_port_move_send_t
91447636 204 cusertype: thread_act_t
1c79356b 205#if KERNEL_SERVER
91447636
A
206 intran: thread_act_t convert_port_to_thread(mach_port_t)
207 destructor: thread_deallocate(thread_act_t)
55e303ae 208#endif /* KERNEL_SERVER */
1c79356b
A
209 ;
210
ea3f0419
A
211type suid_cred_path_t = c_string[*:1024];
212type suid_cred_uid_t = uint32_t;
213type suid_cred_t = mach_port_t
214#if KERNEL_SERVER
215 outtran: mach_port_t convert_suid_cred_to_port(suid_cred_t)
216#endif /* KERNEL_SERVER */
217 ;
218
219
1c79356b
A
220 /* thread_state_t: This inline array can hold
221 * a machine-dependent amount of data, defined in
222 * mach/machine/???? (currently THREAD_STATE_MAX,
223 * in mach/thread_state.h)
224 */
225#include <mach/machine/thread_state.h>
226type thread_state_flavor_t = int;
227type thread_state_t = array[*:THREAD_STATE_MAX] of natural_t;
228
229type task_array_t = ^array[] of task_t;
230type thread_array_t = ^array[] of thread_t;
231type thread_act_array_t = ^array[] of thread_act_t;
232type act_params_t = array[6] of int;
233
234type vm_map_t = mach_port_t
235#if KERNEL_SERVER
236 intran: vm_map_t convert_port_to_map(mach_port_t)
237 destructor: vm_map_deallocate(vm_map_t)
238#endif /* KERNEL_SERVER */
239 ;
240
f427ee49
A
241type vm_map_inspect_t = mach_port_t
242#if KERNEL_SERVER
243 intran: vm_map_inspect_t convert_port_to_map_inspect(mach_port_t)
244 destructor: vm_map_inspect_deallocate(vm_map_inspect_t)
245#endif /* KERNEL_SERVER */
246 ;
247
248type vm_map_read_t = mach_port_t
249#if KERNEL_SERVER
250 intran: vm_map_read_t convert_port_to_map_read(mach_port_t)
251 destructor: vm_map_read_deallocate(vm_map_read_t)
252#endif /* KERNEL_SERVER */
253 ;
254
1c79356b 255type vm_task_entry_t = mach_port_t
91447636 256 cusertype: vm_map_t
1c79356b
A
257#if KERNEL_SERVER
258 intran: vm_map_t convert_port_entry_to_map(mach_port_t)
259 destructor: vm_map_deallocate(vm_map_t)
260#endif /* KERNEL_SERVER */
261 ;
262
1c79356b
A
263type ipc_space_t = mach_port_t
264#if KERNEL_SERVER
265 intran: ipc_space_t convert_port_to_space(mach_port_t)
266 destructor: space_deallocate(ipc_space_t)
267#endif /* KERNEL_SERVER */
268 ;
269
f427ee49
A
270type ipc_space_read_t = mach_port_t
271#if KERNEL_SERVER
272 intran: ipc_space_read_t convert_port_to_space_read(mach_port_t)
273 destructor: space_read_deallocate(ipc_space_read_t)
274#endif /* KERNEL_SERVER */
275 ;
276
813fb2f6
A
277type ipc_space_inspect_t = mach_port_t
278#if KERNEL_SERVER
279 intran: ipc_space_inspect_t convert_port_to_space_inspect(mach_port_t)
280 destructor: space_inspect_deallocate(ipc_space_inspect_t)
281#endif /* KERNEL_SERVER */
282 ;
283
cb323159
A
284type arcade_register_t = mach_port_t
285#if KERNEL_SERVER
286 intran: arcade_register_t convert_port_to_arcade_register(mach_port_t)
287#endif /* KERNEL_SERVER */
288 ;
289
1c79356b
A
290type vm_prot_t = int;
291type vm_inherit_t = int;
91447636 292type vm_purgable_t = int;
1c79356b
A
293type xxx_vm_statistics_data_t = struct[13] of integer_t;
294type vm_behavior_t = int;
2d21ac55 295type vm_statistics_data_t = struct[15] of integer_t;
1c79356b
A
296type vm_machine_attribute_t = int;
297type vm_machine_attribute_val_t = int;
298type vm_sync_t = int;
299
300 /* thread_info_t: this inline array can hold any of:
301 * thread_basic_info_t (10 ints)
302 * policy_timeshare_info_t (5 ints)
303 * policy_fifo_info_t (4 ints)
304 * policy_rr_info_t (5 ints)
3e170ce0 305 * thread_extended_info (12 ints + 64 chars)
1c79356b
A
306 * if other thread_info flavors are added, this
307 * definition may need to be changed. (See
308 * mach/thread_info.h and mach/policy.h) */
309type thread_flavor_t = int;
3e170ce0 310type thread_info_t = array[*:32] of integer_t;
1c79356b
A
311
312type thread_policy_flavor_t = natural_t;
313type thread_policy_t = array[*:16] of integer_t;
314
315 /* task_info_t: this inline array can hold any of:
91447636
A
316 * task_basic_info_32_t (8 ints)
317 * task_basic_info_64_t (10 ints)
1c79356b
A
318 * task_events_info_t (8 ints)
319 * task_thread_times_info_t (4 ints)
320 * policy_timeshare_info_t (5 ints)
321 * policy_fifo_info_t (4 ints)
322 * policy_rr_info_t (5 ints)
55e303ae
A
323 * task security token (2 ints)
324 * task audit token (8 ints)
6d2010ae
A
325 * dyld info (2 64-bit ints and 1 int)
326 * task_extmod_info_t (8 64-bit ints)
316670eb
A
327 * task_basic_info_64_2_t
328 * mach_task_basic_info_t (12 ints)
bd504ef0 329 * task_power_info_t (18 ints)
cb323159 330 * task_vm_info_t (87 ints)
1c79356b
A
331 * If other task_info flavors are added, this
332 * definition may need to be changed. (See
333 * mach/task_info.h and mach/policy.h) */
334type task_flavor_t = int;
cb323159 335type task_info_t = array[*:87] of integer_t;
39236c6e
A
336
337type task_purgable_info_t = struct[68] of integer_t;
1c79356b
A
338
339type task_policy_flavor_t = natural_t;
340type task_policy_t = array[*:16] of integer_t;
341
5ba3f43e
A
342type task_inspect_flavor_t = natural_t;
343type task_inspect_info_t = array[*:4] of integer_t;
344
cb323159
A
345type task_exc_guard_behavior_t = uint32_t;
346
1c79356b
A
347type mem_entry_name_port_t = mach_port_t
348#if KERNEL_SERVER
0b4e3aa0 349 intran: mem_entry_name_port_t null_conversion(mach_port_t)
91447636
A
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)
1c79356b
A
359#endif /* KERNEL_SERVER */
360 ;
361
1c79356b 362type memory_object_default_t = mach_port_t
0b4e3aa0 363#if KERNEL_PRIVATE
1c79356b 364 intran: memory_object_default_t null_conversion(mach_port_t)
0b4e3aa0
A
365 outtran: mach_port_t null_conversion(memory_object_default_t)
366#endif /* KERNEL_PRIVATE */
1c79356b 367 ;
0b4e3aa0
A
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 */
1c79356b
A
374 ;
375
0b4e3aa0
A
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 */
1c79356b
A
383 ;
384
385type memory_object_name_t = mach_port_t
386 ctype: mach_port_t
387 ;
388
0b4e3aa0 389
1c79356b
A
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
410#if KERNEL_SERVER
411 intran: host_security_t convert_port_to_host_security(mach_port_t)
412#endif /* KERNEL_SERVER */
413 ;
414
b0d623f7
A
415 /*
416 * host_info_t: variable-sized inline array that can contain:
417 *
418 * host_basic_info_old_t (5 ints)
419 * host_basic_info_t (12 ints)
420 * host_sched_info_t (2 ints)
421 * kernel_resource_sizes_t (5 ints)
422 * host_load_info_t (6 ints)
423 * vm_statistics32_t (15 ints)
39236c6e 424 * host_purgable_info_t (68 ints)
bd504ef0 425 * host_expired_task_info uses a task_power_info (18 ints)
b0d623f7 426 *
1c79356b
A
427 * If other host_info flavors are added, this definition may
428 * need to be changed. (See mach/{host_info,vm_statistics}.h)
429 */
430type host_flavor_t = int;
39236c6e 431type host_info_t = array[*:68] of integer_t;
b0d623f7
A
432 /*
433 * host_info64_t: variable-sized inline array that can contain:
434 *
435 * vm_statistics_t (6 ints and 9 longs)
6d2010ae 436 * vm_extmod_statistics_t (6 64-bit ints)
b0d623f7
A
437 */
438type host_info64_t = array[*:256] of integer_t;
439
1c79356b
A
440type processor_t = mach_port_t
441#if KERNEL_SERVER
442 intran: processor_t convert_port_to_processor(mach_port_t)
443 outtran: mach_port_t convert_processor_to_port(processor_t)
444#endif /* KERNEL_SERVER */
445 ;
446
0a7de745 447type processor_array_t = ^array[] of processor_t;
1c79356b 448
0a7de745
A
449 /*
450 * processor_info_t: variable-sized inline array that can
1c79356b 451 * contain:
0a7de745
A
452 *
453 * - processor_basic_info_t: (5 ints)
454 * - processor_cpu_load_info_t: (4 ints)
455 * - processor_machine_info_t: (12 ints)
456 * - processor_cpu_stat_t: (10 ints)
457 * - processor_cpu_stat64_t: (20 ints)
458 *
1c79356b 459 * If other processor_info flavors are added, this definition
0a7de745
A
460 * may need to be changed.
461 *
462 * See mach/processor_info.h and mach/arm/processor_info.h.
463 */
464
465type processor_flavor_t = int;
466type processor_info_t = array[*:20] of integer_t;
467type processor_info_array_t = ^array[] of integer_t;
1c79356b
A
468
469type processor_set_t = mach_port_t
470#if KERNEL_SERVER
471 intran: processor_set_t convert_port_to_pset(mach_port_t)
472 outtran: mach_port_t convert_pset_to_port(processor_set_t)
473 destructor: pset_deallocate(processor_set_t)
474#endif /* KERNEL_SERVER */
475 ;
476
477type processor_set_array_t = ^array[] of processor_set_t;
478
479type processor_set_name_t = mach_port_t
480#if KERNEL_SERVER
481 intran: processor_set_name_t convert_port_to_pset_name(mach_port_t)
482 outtran: mach_port_t convert_pset_name_to_port(processor_set_name_t)
483 destructor: pset_deallocate(processor_set_name_t)
484#endif /* KERNEL_SERVER */
485 ;
486
487type processor_set_name_array_t = ^array[] of processor_set_name_t;
488
489 /* processor_set_info_t: variable-size inline array
490 * that can hold:
491 * processor_set_basic_info (5 ints)
492 * processor_set_load_info (4 ints)
493 * policy_timeshare_base_t (1 int)
494 * policy_fifo_base_t (1 int)
495 * policy_rr_base_t (1 int)
496 * policy_timeshare_base_t (1 int)
497 * policy_fifo_base_t (1 int)
498 * policy_rr_base_t (1 int)
499 * policy_t (1 int)
500 * If other flavors are added, this definition may
501 * need to be changed. (see mach/processor.h) */
502type processor_set_flavor_t = int;
503type processor_set_info_t = array[*:5] of integer_t;
504
505type bootstrap_t = mach_port_t;
506
507type kernel_version_t = c_string[*:512];
508type kernel_boot_info_t = c_string[*:4096];
509
510type time_value_t = struct[2] of integer_t;
511
1c79356b
A
512type mach_port_qos_t = struct[2] of integer_t;
513
39236c6e
A
514type mach_port_options_t = struct[3] of uint64_t;
515type mach_port_options_ptr_t = ^ mach_port_options_t;
516
1c79356b
A
517type emulation_vector_t = ^array[] of vm_offset_t;
518
519type inline_existence_map_t = array[*:512] of char;
520
521type policy_t = int;
522 /* policy_info_t: variable-size inline array. Can hold:
523 * policy_timeshare_info_t (5 ints)
524 * policy_fifo_info_t (4 ints)
525 * policy_rr_info_t (5 ints) */
526type policy_base_t = array[*:5] of integer_t;
527type policy_info_t = array[*:2] of integer_t;
528type policy_limit_t = array[*:1] of integer_t;
529
530type ledger_t = mach_port_t
531#if KERNEL_SERVER
532 intran: ledger_t convert_port_to_ledger(mach_port_t)
533 outtran: mach_port_t convert_ledger_to_port(ledger_t)
534#endif /* KERNEL_SERVER */
535 ;
536
55e303ae 537type ledger_array_t = ^array[] of ledger_t;
1c79356b 538type ledger_item_t = integer_t;
316670eb
A
539 /* DEPRECATED */
540
541type ledger_amount_t = int64_t;
1c79356b 542
55e303ae
A
543type security_token_t = struct[2] of uint32_t;
544type audit_token_t = struct[8] of uint32_t;
1c79356b 545
2d21ac55
A
546type msg_labels_t = mach_port_t;
547
1c79356b
A
548 /* memory_object_info_t: variable-size inline array:
549 * memory_object_attr_info_t (5 ints)
550 * XXX actually it's 6 ints temporarily (object_ready!)
551 * memory_object_behave_info_t (4 ints)
552 * memory_object_perf_info_t (2 ints)
553 * old_memory_object_attr_info_t (3 ints)
1c79356b
A
554 * If other flavors are added, this definition may
555 * need to be changed. (see mach/memory_object.h) */
556type memory_object_flavor_t = int;
557type memory_object_info_t = array[*:6] of int;
558
559 /* vm_region_info_t: variable-size inline array that can hold:
560 * vm_region_basic_info_t (8 ints)
561 * If other flavors are added, this definition may
562 * need to be changed. (see mach/vm_region.h) */
563type vm_region_flavor_t = int;
91447636 564type vm_region_info_t = array[*:10] of int;
1c79356b 565type vm_region_recurse_info_t = array[*:19] of int;
1c79356b 566
b0d623f7
A
567type vm_page_info_flavor_t = int;
568type vm_page_info_t = array[*:32] of int;
569
91447636
A
570type mach_vm_read_entry_t = array[512] of mach_vm_offset_t;
571type vm_read_entry_t = array[512] of vm_offset_t;
39037602 572#ifdef VM32_SUPPORT
b0d623f7
A
573type vm32_read_entry_t = array[512] of vm32_offset_t;
574#endif
1c79356b
A
575
576type exception_mask_t = int;
577type exception_behavior_t = int;
578
579type exception_handler_t = mach_port_t;
580
581type exception_handler_array_t =
582 array[*:32] of exception_handler_t;
583
584type exception_behavior_array_t =
585 array[*:32] of exception_behavior_t;
586
587type exception_flavor_array_t =
588 array[*:32] of thread_state_flavor_t;
589
590type exception_mask_array_t =
591 array[*:32] of exception_mask_t;
592
593type semaphore_t = mach_port_t
594#if KERNEL_SERVER
595 intran: semaphore_t convert_port_to_semaphore(mach_port_t)
596 outtran: mach_port_t convert_semaphore_to_port(semaphore_t)
597 destructor: semaphore_dereference(semaphore_t)
598#endif /* KERNEL_SERVER */
599 ;
600
601type semaphore_consume_ref_t = mach_port_move_send_t
91447636 602 cusertype: semaphore_t
1c79356b
A
603#if KERNEL_SERVER
604 intran: semaphore_t convert_port_to_semaphore(mach_port_t)
0b4e3aa0 605 outtran: mach_port_t convert_semaphore_to_port(semaphore_t)
1c79356b
A
606#endif /* KERNEL_SERVER */
607 ;
608
f427ee49
A
609#ifndef _MACH_MACH_EVENTLINK_TYPE_DEFS
610#define _MACH_MACH_EVENTLINK_TYPE_DEFS
611
612type eventlink_t = mach_port_t
613 ctype: mach_port_t
614#if KERNEL_SERVER
615 intran: ipc_eventlink_t convert_port_to_eventlink(mach_port_t)
616 destructor: ipc_eventlink_deallocate(ipc_eventlink_t)
617#endif /* KERNEL_SERVER */
618 ;
619
620type eventlink_consume_ref_t = mach_port_move_send_t
621 ctype: mach_port_t
622#if KERNEL_SERVER
623 intran: ipc_eventlink_t convert_port_to_eventlink(mach_port_t)
624 destructor: ipc_eventlink_deallocate(ipc_eventlink_t)
625#endif /* KERNEL_SERVER */
626 ;
627
628type eventlink_port_pair_t = array[2] of mach_port_t;
629type mach_eventlink_create_option_t = uint32_t;
630type mach_eventlink_associate_option_t = uint32_t;
631type mach_eventlink_disassociate_option_t = uint32_t;
632type mach_eventlink_signal_wait_option_t = uint32_t;
633
634#endif /* _MACH_MACH_EVENTLINK_TYPE_DEFS */
635
1c79356b
A
636type lock_set_t = mach_port_t
637#if KERNEL_SERVER
638 intran: lock_set_t convert_port_to_lock_set(mach_port_t)
639 outtran: mach_port_t convert_lock_set_to_port(lock_set_t)
640 destructor: lock_set_dereference(lock_set_t)
641#endif /* KERNEL_SERVER */
642 ;
643
39236c6e
A
644type task_suspension_token_t = mach_port_move_send_once_t
645#if KERNEL_SERVER
646 intran: task_suspension_token_t convert_port_to_task_suspension_token(mach_port_t)
647 outtran: mach_port_t convert_task_suspension_token_to_port(task_suspension_token_t)
648#endif /* KERNEL_SERVER */
649 ;
650
cb323159
A
651type vfs_path_t = c_string[4096];
652type nspace_path_t = c_string[1024]; /* 1024 == PATH_MAX */
fe8ab488
A
653
654/* public voucher types */
655
656/* Mach voucher object */
657type mach_voucher_t = mach_port_t;
658type mach_voucher_name_t = mach_port_name_t;
659
660type mach_voucher_attr_manager_t = mach_port_t;
661type mach_voucher_attr_control_t = mach_port_t;
662
663/* IPC voucher internal object */
664type ipc_voucher_t = mach_port_t
665#if KERNEL_SERVER
666 intran: ipc_voucher_t convert_port_to_voucher(mach_port_t)
667 outtran: mach_port_t convert_voucher_to_port(ipc_voucher_t)
668 destructor: ipc_voucher_release(ipc_voucher_t)
669#endif /* KERNEL_SERVER */
670 ;
671
672/* IPC voucher attribute control internal object */
673type ipc_voucher_attr_control_t = mach_port_t
674#if KERNEL_SERVER
675 intran: ipc_voucher_attr_control_t convert_port_to_voucher_attr_control(mach_port_t)
676 outtran: mach_port_t convert_voucher_attr_control_to_port(ipc_voucher_attr_control_t)
677 destructor: ipc_voucher_attr_control_release(ipc_voucher_attr_control_t)
678#endif /* KERNEL_SERVER */
679 ;
680
681type mach_voucher_attr_key_t = uint32_t;
682
683type mach_voucher_attr_command_t = uint32_t;
684type mach_voucher_attr_recipe_command_t = uint32_t;
685
686type mach_voucher_attr_content_size_t = uint32_t;
687type mach_voucher_attr_content_t = array[*:4096] of uint8_t;
688type mach_voucher_attr_content_array_t = array[*:5120] of uint8_t;
689
690type mach_voucher_attr_raw_recipe_size_t = uint32_t;
691type mach_voucher_attr_raw_recipe_t = array[*:4096] of uint8_t;
692type mach_voucher_attr_raw_recipe_array_t = array[*:5120] of uint8_t;
693
694type mach_voucher_selector_t = uint32_t;
695
696type mach_voucher_attr_value_handle_t = uint64_t;
697type mach_voucher_attr_value_handle_array_t = array[*:4] of mach_voucher_attr_value_handle_t;
698type mach_voucher_attr_value_reference_t = uint32_t;
699
1c79356b
A
700/* kernel module loader */
701type kmod_t = int;
702type kmod_control_flavor_t = int;
703
704type kmod_args_t = ^array[] of MACH_MSG_TYPE_BYTE
705 ctype: kmod_args_t;
706
707type io_master_t = mach_port_t;
708type UNDServerRef = mach_port_t;
709
39037602
A
710/* These must be kept in sync with definitions in osfmk/mach/dyld_kernel.h */
711type dyld_kernel_image_info_t = struct[40] of MACH_MSG_TYPE_BYTE;
712type dyld_kernel_image_info_array_t = ^array[] of dyld_kernel_image_info_t;
713type dyld_kernel_process_info_t = struct[64] of MACH_MSG_TYPE_BYTE;
714
9bccf70c 715#if KERNEL_SERVER
1c79356b 716#ifdef MACH_KERNEL_PRIVATE
fe8ab488 717simport <ipc/ipc_voucher.h>; /* for voucher conversions */
1c79356b
A
718simport <kern/ipc_kobject.h>; /* for null conversion */
719simport <kern/ipc_tt.h>; /* for task/thread conversion */
720simport <kern/ipc_host.h>; /* for host/processor/pset conversions */
1c79356b 721simport <kern/ipc_sync.h>; /* for lock_set and semaphore conversions */
9bccf70c 722simport <kern/ledger.h>; /* for ledger conversions */
91447636
A
723simport <kern/processor.h>; /* for processor conversions */
724simport <kern/sync_lock.h>; /* for lock-set conversions */
725simport <kern/sync_sema.h>; /* for semaphore conversions */
f427ee49 726simport <ipc/ipc_eventlink.h>; /* for eventlink conversions */
91447636
A
727simport <vm/memory_object.h>; /* for memory object type conversions */
728simport <vm/vm_map.h>; /* for vm_map conversions */
cb323159
A
729#if CONFIG_ARCADE
730simport <kern/arcade.h>; /* for arcade_register conversions */
731#endif
1c79356b
A
732#endif /* MACH_KERNEL_PRIVATE */
733
734simport <kern/ipc_mig.h>; /* pick up kernel-specific MIG things */
735
ea3f0419 736simport <kern/suid_cred.h>;
1c79356b
A
737#endif /* KERNEL_SERVER */
738
9bccf70c 739import <mach/mig.h>;
1c79356b
A
740import <mach/mach_types.h>;
741
742#endif /* _MACH_MACH_TYPES_DEFS_ */
2d21ac55
A
743
744/* vim: set ft=c : */