]> git.saurik.com Git - apple/xnu.git/blame - osfmk/mach/mach_types.defs
xnu-6153.141.1.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
A
121
122type task_t = mach_port_t
123#if KERNEL_SERVER
124 intran: task_t convert_port_to_task(mach_port_t)
125 outtran: mach_port_t convert_task_to_port(task_t)
126 destructor: task_deallocate(task_t)
127#endif /* KERNEL_SERVER */
128 ;
129
0c530ab8
A
130type task_name_t = mach_port_t
131#if KERNEL_SERVER
132 intran: task_name_t convert_port_to_task_name(mach_port_t)
133 outtran: mach_port_t convert_task_name_to_port(task_name_t)
134 destructor: task_name_deallocate(task_name_t)
135#endif /* KERNEL_SERVER */
136 ;
137
813fb2f6
A
138type task_inspect_t = mach_port_t
139#if KERNEL_SERVER
140 intran: task_inspect_t convert_port_to_task_inspect(mach_port_t)
141 outtran: mach_port_t convert_task_inspect_to_port(task_inspect_t)
142 destructor: task_inspect_deallocate(task_inspect_t)
143#endif /* KERNEL_SERVER */
144 ;
145
1c79356b
A
146type thread_t = mach_port_t
147#if KERNEL_SERVER
148 intran: thread_t convert_port_to_thread(mach_port_t)
149 outtran: mach_port_t convert_thread_to_port(thread_t)
150 destructor: thread_deallocate(thread_t)
151#endif /* KERNEL_SERVER */
152 ;
153
813fb2f6
A
154type thread_inspect_t = mach_port_t
155#if KERNEL_SERVER
156 intran: thread_inspect_t convert_port_to_thread_inspect(mach_port_t)
157 outtran: mach_port_t convert_thread_inspect_to_port(thread_inspect_t)
158 destructor: thread_inspect_deallocate(thread_inspect_t)
159#endif /* KERNEL_SERVER */
160 ;
161
1c79356b
A
162type thread_act_t = mach_port_t
163#if KERNEL_SERVER
91447636
A
164 intran: thread_act_t convert_port_to_thread(mach_port_t)
165 outtran: mach_port_t convert_thread_to_port(thread_act_t)
166 destructor: thread_deallocate(thread_act_t)
55e303ae 167#endif /* KERNEL_SERVER */
1c79356b
A
168 ;
169
170type thread_act_consume_ref_t = mach_port_move_send_t
91447636 171 cusertype: thread_act_t
1c79356b 172#if KERNEL_SERVER
91447636
A
173 intran: thread_act_t convert_port_to_thread(mach_port_t)
174 destructor: thread_deallocate(thread_act_t)
55e303ae 175#endif /* KERNEL_SERVER */
1c79356b
A
176 ;
177
ea3f0419
A
178type suid_cred_path_t = c_string[*:1024];
179type suid_cred_uid_t = uint32_t;
180type suid_cred_t = mach_port_t
181#if KERNEL_SERVER
182 outtran: mach_port_t convert_suid_cred_to_port(suid_cred_t)
183#endif /* KERNEL_SERVER */
184 ;
185
186
1c79356b
A
187 /* thread_state_t: This inline array can hold
188 * a machine-dependent amount of data, defined in
189 * mach/machine/???? (currently THREAD_STATE_MAX,
190 * in mach/thread_state.h)
191 */
192#include <mach/machine/thread_state.h>
193type thread_state_flavor_t = int;
194type thread_state_t = array[*:THREAD_STATE_MAX] of natural_t;
195
196type task_array_t = ^array[] of task_t;
197type thread_array_t = ^array[] of thread_t;
198type thread_act_array_t = ^array[] of thread_act_t;
199type act_params_t = array[6] of int;
200
201type vm_map_t = mach_port_t
202#if KERNEL_SERVER
203 intran: vm_map_t convert_port_to_map(mach_port_t)
204 destructor: vm_map_deallocate(vm_map_t)
205#endif /* KERNEL_SERVER */
206 ;
207
208type vm_task_entry_t = mach_port_t
91447636 209 cusertype: vm_map_t
1c79356b
A
210#if KERNEL_SERVER
211 intran: vm_map_t convert_port_entry_to_map(mach_port_t)
212 destructor: vm_map_deallocate(vm_map_t)
213#endif /* KERNEL_SERVER */
214 ;
215
1c79356b
A
216type ipc_space_t = mach_port_t
217#if KERNEL_SERVER
218 intran: ipc_space_t convert_port_to_space(mach_port_t)
219 destructor: space_deallocate(ipc_space_t)
220#endif /* KERNEL_SERVER */
221 ;
222
813fb2f6
A
223type ipc_space_inspect_t = mach_port_t
224#if KERNEL_SERVER
225 intran: ipc_space_inspect_t convert_port_to_space_inspect(mach_port_t)
226 destructor: space_inspect_deallocate(ipc_space_inspect_t)
227#endif /* KERNEL_SERVER */
228 ;
229
cb323159
A
230type arcade_register_t = mach_port_t
231#if KERNEL_SERVER
232 intran: arcade_register_t convert_port_to_arcade_register(mach_port_t)
233#endif /* KERNEL_SERVER */
234 ;
235
1c79356b
A
236type vm_prot_t = int;
237type vm_inherit_t = int;
91447636 238type vm_purgable_t = int;
1c79356b
A
239type xxx_vm_statistics_data_t = struct[13] of integer_t;
240type vm_behavior_t = int;
2d21ac55 241type vm_statistics_data_t = struct[15] of integer_t;
1c79356b
A
242type vm_machine_attribute_t = int;
243type vm_machine_attribute_val_t = int;
244type vm_sync_t = int;
245
246 /* thread_info_t: this inline array can hold any of:
247 * thread_basic_info_t (10 ints)
248 * policy_timeshare_info_t (5 ints)
249 * policy_fifo_info_t (4 ints)
250 * policy_rr_info_t (5 ints)
3e170ce0 251 * thread_extended_info (12 ints + 64 chars)
1c79356b
A
252 * if other thread_info flavors are added, this
253 * definition may need to be changed. (See
254 * mach/thread_info.h and mach/policy.h) */
255type thread_flavor_t = int;
3e170ce0 256type thread_info_t = array[*:32] of integer_t;
1c79356b
A
257
258type thread_policy_flavor_t = natural_t;
259type thread_policy_t = array[*:16] of integer_t;
260
261 /* task_info_t: this inline array can hold any of:
91447636
A
262 * task_basic_info_32_t (8 ints)
263 * task_basic_info_64_t (10 ints)
1c79356b
A
264 * task_events_info_t (8 ints)
265 * task_thread_times_info_t (4 ints)
266 * policy_timeshare_info_t (5 ints)
267 * policy_fifo_info_t (4 ints)
268 * policy_rr_info_t (5 ints)
55e303ae
A
269 * task security token (2 ints)
270 * task audit token (8 ints)
6d2010ae
A
271 * dyld info (2 64-bit ints and 1 int)
272 * task_extmod_info_t (8 64-bit ints)
316670eb
A
273 * task_basic_info_64_2_t
274 * mach_task_basic_info_t (12 ints)
bd504ef0 275 * task_power_info_t (18 ints)
cb323159 276 * task_vm_info_t (87 ints)
1c79356b
A
277 * If other task_info flavors are added, this
278 * definition may need to be changed. (See
279 * mach/task_info.h and mach/policy.h) */
280type task_flavor_t = int;
cb323159 281type task_info_t = array[*:87] of integer_t;
39236c6e
A
282
283type task_purgable_info_t = struct[68] of integer_t;
1c79356b
A
284
285type task_policy_flavor_t = natural_t;
286type task_policy_t = array[*:16] of integer_t;
287
5ba3f43e
A
288type task_inspect_flavor_t = natural_t;
289type task_inspect_info_t = array[*:4] of integer_t;
290
cb323159
A
291type task_exc_guard_behavior_t = uint32_t;
292
1c79356b
A
293type mem_entry_name_port_t = mach_port_t
294#if KERNEL_SERVER
0b4e3aa0 295 intran: mem_entry_name_port_t null_conversion(mach_port_t)
91447636
A
296 outtran: mach_port_t null_conversion(mem_entry_name_port_t)
297#endif /* KERNEL_SERVER */
298 ;
299
300type mem_entry_name_port_move_send_t = mach_port_move_send_t
301 cusertype: mem_entry_name_port_t
302#if KERNEL_SERVER
303 intran: mem_entry_name_port_t null_conversion(mach_port_t)
304 outtran: mach_port_t null_conversion(mem_entry_name_port_t)
1c79356b
A
305#endif /* KERNEL_SERVER */
306 ;
307
1c79356b 308type memory_object_default_t = mach_port_t
0b4e3aa0 309#if KERNEL_PRIVATE
1c79356b 310 intran: memory_object_default_t null_conversion(mach_port_t)
0b4e3aa0
A
311 outtran: mach_port_t null_conversion(memory_object_default_t)
312#endif /* KERNEL_PRIVATE */
1c79356b 313 ;
0b4e3aa0
A
314
315type memory_object_t = mach_port_t
316#if KERNEL_PRIVATE
317 intran: memory_object_t convert_port_to_memory_object(mach_port_t)
318 outtran: mach_port_t convert_memory_object_to_port(memory_object_t)
319#endif /* KERNEL_PRIVATE */
1c79356b
A
320 ;
321
0b4e3aa0
A
322
323type memory_object_control_t = mach_port_t
324#if KERNEL_PRIVATE
325 intran: memory_object_control_t convert_port_to_mo_control(mach_port_t)
326 outtran: mach_port_t convert_mo_control_to_port(memory_object_control_t)
327 destructor: memory_object_control_deallocate(memory_object_control_t)
328#endif /* KERNEL_PRIVATE */
1c79356b
A
329 ;
330
331type memory_object_name_t = mach_port_t
332 ctype: mach_port_t
333 ;
334
0b4e3aa0 335
1c79356b
A
336type memory_object_copy_strategy_t = int;
337type memory_object_return_t = int;
338
339type machine_info_data_t = struct[5] of integer_t;
340type machine_slot_data_t = struct[8] of integer_t;
341
342type host_t = mach_port_t
343#if KERNEL_SERVER
344 intran: host_t convert_port_to_host(mach_port_t)
345 outtran: mach_port_t convert_host_to_port(host_t)
346#endif /* KERNEL_SERVER */
347 ;
348
349type host_priv_t = mach_port_t
350#if KERNEL_SERVER
351 intran: host_priv_t convert_port_to_host_priv(mach_port_t)
352#endif /* KERNEL_SERVER */
353 ;
354
355type host_security_t = mach_port_t
356#if KERNEL_SERVER
357 intran: host_security_t convert_port_to_host_security(mach_port_t)
358#endif /* KERNEL_SERVER */
359 ;
360
b0d623f7
A
361 /*
362 * host_info_t: variable-sized inline array that can contain:
363 *
364 * host_basic_info_old_t (5 ints)
365 * host_basic_info_t (12 ints)
366 * host_sched_info_t (2 ints)
367 * kernel_resource_sizes_t (5 ints)
368 * host_load_info_t (6 ints)
369 * vm_statistics32_t (15 ints)
39236c6e 370 * host_purgable_info_t (68 ints)
bd504ef0 371 * host_expired_task_info uses a task_power_info (18 ints)
b0d623f7 372 *
1c79356b
A
373 * If other host_info flavors are added, this definition may
374 * need to be changed. (See mach/{host_info,vm_statistics}.h)
375 */
376type host_flavor_t = int;
39236c6e 377type host_info_t = array[*:68] of integer_t;
b0d623f7
A
378 /*
379 * host_info64_t: variable-sized inline array that can contain:
380 *
381 * vm_statistics_t (6 ints and 9 longs)
6d2010ae 382 * vm_extmod_statistics_t (6 64-bit ints)
b0d623f7
A
383 */
384type host_info64_t = array[*:256] of integer_t;
385
1c79356b
A
386type processor_t = mach_port_t
387#if KERNEL_SERVER
388 intran: processor_t convert_port_to_processor(mach_port_t)
389 outtran: mach_port_t convert_processor_to_port(processor_t)
390#endif /* KERNEL_SERVER */
391 ;
392
0a7de745 393type processor_array_t = ^array[] of processor_t;
1c79356b 394
0a7de745
A
395 /*
396 * processor_info_t: variable-sized inline array that can
1c79356b 397 * contain:
0a7de745
A
398 *
399 * - processor_basic_info_t: (5 ints)
400 * - processor_cpu_load_info_t: (4 ints)
401 * - processor_machine_info_t: (12 ints)
402 * - processor_cpu_stat_t: (10 ints)
403 * - processor_cpu_stat64_t: (20 ints)
404 *
1c79356b 405 * If other processor_info flavors are added, this definition
0a7de745
A
406 * may need to be changed.
407 *
408 * See mach/processor_info.h and mach/arm/processor_info.h.
409 */
410
411type processor_flavor_t = int;
412type processor_info_t = array[*:20] of integer_t;
413type processor_info_array_t = ^array[] of integer_t;
1c79356b
A
414
415type processor_set_t = mach_port_t
416#if KERNEL_SERVER
417 intran: processor_set_t convert_port_to_pset(mach_port_t)
418 outtran: mach_port_t convert_pset_to_port(processor_set_t)
419 destructor: pset_deallocate(processor_set_t)
420#endif /* KERNEL_SERVER */
421 ;
422
423type processor_set_array_t = ^array[] of processor_set_t;
424
425type processor_set_name_t = mach_port_t
426#if KERNEL_SERVER
427 intran: processor_set_name_t convert_port_to_pset_name(mach_port_t)
428 outtran: mach_port_t convert_pset_name_to_port(processor_set_name_t)
429 destructor: pset_deallocate(processor_set_name_t)
430#endif /* KERNEL_SERVER */
431 ;
432
433type processor_set_name_array_t = ^array[] of processor_set_name_t;
434
435 /* processor_set_info_t: variable-size inline array
436 * that can hold:
437 * processor_set_basic_info (5 ints)
438 * processor_set_load_info (4 ints)
439 * policy_timeshare_base_t (1 int)
440 * policy_fifo_base_t (1 int)
441 * policy_rr_base_t (1 int)
442 * policy_timeshare_base_t (1 int)
443 * policy_fifo_base_t (1 int)
444 * policy_rr_base_t (1 int)
445 * policy_t (1 int)
446 * If other flavors are added, this definition may
447 * need to be changed. (see mach/processor.h) */
448type processor_set_flavor_t = int;
449type processor_set_info_t = array[*:5] of integer_t;
450
451type bootstrap_t = mach_port_t;
452
453type kernel_version_t = c_string[*:512];
454type kernel_boot_info_t = c_string[*:4096];
455
456type time_value_t = struct[2] of integer_t;
457
1c79356b
A
458type mach_port_qos_t = struct[2] of integer_t;
459
39236c6e
A
460type mach_port_options_t = struct[3] of uint64_t;
461type mach_port_options_ptr_t = ^ mach_port_options_t;
462
1c79356b
A
463type emulation_vector_t = ^array[] of vm_offset_t;
464
465type inline_existence_map_t = array[*:512] of char;
466
467type policy_t = int;
468 /* policy_info_t: variable-size inline array. Can hold:
469 * policy_timeshare_info_t (5 ints)
470 * policy_fifo_info_t (4 ints)
471 * policy_rr_info_t (5 ints) */
472type policy_base_t = array[*:5] of integer_t;
473type policy_info_t = array[*:2] of integer_t;
474type policy_limit_t = array[*:1] of integer_t;
475
476type ledger_t = mach_port_t
477#if KERNEL_SERVER
478 intran: ledger_t convert_port_to_ledger(mach_port_t)
479 outtran: mach_port_t convert_ledger_to_port(ledger_t)
480#endif /* KERNEL_SERVER */
481 ;
482
55e303ae 483type ledger_array_t = ^array[] of ledger_t;
1c79356b 484type ledger_item_t = integer_t;
316670eb
A
485 /* DEPRECATED */
486
487type ledger_amount_t = int64_t;
1c79356b 488
55e303ae
A
489type security_token_t = struct[2] of uint32_t;
490type audit_token_t = struct[8] of uint32_t;
1c79356b 491
2d21ac55
A
492type msg_labels_t = mach_port_t;
493
1c79356b
A
494 /* memory_object_info_t: variable-size inline array:
495 * memory_object_attr_info_t (5 ints)
496 * XXX actually it's 6 ints temporarily (object_ready!)
497 * memory_object_behave_info_t (4 ints)
498 * memory_object_perf_info_t (2 ints)
499 * old_memory_object_attr_info_t (3 ints)
1c79356b
A
500 * If other flavors are added, this definition may
501 * need to be changed. (see mach/memory_object.h) */
502type memory_object_flavor_t = int;
503type memory_object_info_t = array[*:6] of int;
504
505 /* vm_region_info_t: variable-size inline array that can hold:
506 * vm_region_basic_info_t (8 ints)
507 * If other flavors are added, this definition may
508 * need to be changed. (see mach/vm_region.h) */
509type vm_region_flavor_t = int;
91447636 510type vm_region_info_t = array[*:10] of int;
1c79356b 511type vm_region_recurse_info_t = array[*:19] of int;
1c79356b 512
b0d623f7
A
513type vm_page_info_flavor_t = int;
514type vm_page_info_t = array[*:32] of int;
515
91447636
A
516type mach_vm_read_entry_t = array[512] of mach_vm_offset_t;
517type vm_read_entry_t = array[512] of vm_offset_t;
39037602 518#ifdef VM32_SUPPORT
b0d623f7
A
519type vm32_read_entry_t = array[512] of vm32_offset_t;
520#endif
1c79356b
A
521
522type exception_mask_t = int;
523type exception_behavior_t = int;
524
525type exception_handler_t = mach_port_t;
526
527type exception_handler_array_t =
528 array[*:32] of exception_handler_t;
529
530type exception_behavior_array_t =
531 array[*:32] of exception_behavior_t;
532
533type exception_flavor_array_t =
534 array[*:32] of thread_state_flavor_t;
535
536type exception_mask_array_t =
537 array[*:32] of exception_mask_t;
538
539type semaphore_t = mach_port_t
540#if KERNEL_SERVER
541 intran: semaphore_t convert_port_to_semaphore(mach_port_t)
542 outtran: mach_port_t convert_semaphore_to_port(semaphore_t)
543 destructor: semaphore_dereference(semaphore_t)
544#endif /* KERNEL_SERVER */
545 ;
546
547type semaphore_consume_ref_t = mach_port_move_send_t
91447636 548 cusertype: semaphore_t
1c79356b
A
549#if KERNEL_SERVER
550 intran: semaphore_t convert_port_to_semaphore(mach_port_t)
0b4e3aa0 551 outtran: mach_port_t convert_semaphore_to_port(semaphore_t)
1c79356b
A
552#endif /* KERNEL_SERVER */
553 ;
554
555type lock_set_t = mach_port_t
556#if KERNEL_SERVER
557 intran: lock_set_t convert_port_to_lock_set(mach_port_t)
558 outtran: mach_port_t convert_lock_set_to_port(lock_set_t)
559 destructor: lock_set_dereference(lock_set_t)
560#endif /* KERNEL_SERVER */
561 ;
562
39236c6e
A
563type task_suspension_token_t = mach_port_move_send_once_t
564#if KERNEL_SERVER
565 intran: task_suspension_token_t convert_port_to_task_suspension_token(mach_port_t)
566 outtran: mach_port_t convert_task_suspension_token_to_port(task_suspension_token_t)
567#endif /* KERNEL_SERVER */
568 ;
569
cb323159
A
570type vfs_path_t = c_string[4096];
571type nspace_path_t = c_string[1024]; /* 1024 == PATH_MAX */
fe8ab488
A
572
573/* public voucher types */
574
575/* Mach voucher object */
576type mach_voucher_t = mach_port_t;
577type mach_voucher_name_t = mach_port_name_t;
578
579type mach_voucher_attr_manager_t = mach_port_t;
580type mach_voucher_attr_control_t = mach_port_t;
581
582/* IPC voucher internal object */
583type ipc_voucher_t = mach_port_t
584#if KERNEL_SERVER
585 intran: ipc_voucher_t convert_port_to_voucher(mach_port_t)
586 outtran: mach_port_t convert_voucher_to_port(ipc_voucher_t)
587 destructor: ipc_voucher_release(ipc_voucher_t)
588#endif /* KERNEL_SERVER */
589 ;
590
591/* IPC voucher attribute control internal object */
592type ipc_voucher_attr_control_t = mach_port_t
593#if KERNEL_SERVER
594 intran: ipc_voucher_attr_control_t convert_port_to_voucher_attr_control(mach_port_t)
595 outtran: mach_port_t convert_voucher_attr_control_to_port(ipc_voucher_attr_control_t)
596 destructor: ipc_voucher_attr_control_release(ipc_voucher_attr_control_t)
597#endif /* KERNEL_SERVER */
598 ;
599
600type mach_voucher_attr_key_t = uint32_t;
601
602type mach_voucher_attr_command_t = uint32_t;
603type mach_voucher_attr_recipe_command_t = uint32_t;
604
605type mach_voucher_attr_content_size_t = uint32_t;
606type mach_voucher_attr_content_t = array[*:4096] of uint8_t;
607type mach_voucher_attr_content_array_t = array[*:5120] of uint8_t;
608
609type mach_voucher_attr_raw_recipe_size_t = uint32_t;
610type mach_voucher_attr_raw_recipe_t = array[*:4096] of uint8_t;
611type mach_voucher_attr_raw_recipe_array_t = array[*:5120] of uint8_t;
612
613type mach_voucher_selector_t = uint32_t;
614
615type mach_voucher_attr_value_handle_t = uint64_t;
616type mach_voucher_attr_value_handle_array_t = array[*:4] of mach_voucher_attr_value_handle_t;
617type mach_voucher_attr_value_reference_t = uint32_t;
618
1c79356b
A
619/* kernel module loader */
620type kmod_t = int;
621type kmod_control_flavor_t = int;
622
623type kmod_args_t = ^array[] of MACH_MSG_TYPE_BYTE
624 ctype: kmod_args_t;
625
626type io_master_t = mach_port_t;
627type UNDServerRef = mach_port_t;
628
39037602
A
629/* These must be kept in sync with definitions in osfmk/mach/dyld_kernel.h */
630type dyld_kernel_image_info_t = struct[40] of MACH_MSG_TYPE_BYTE;
631type dyld_kernel_image_info_array_t = ^array[] of dyld_kernel_image_info_t;
632type dyld_kernel_process_info_t = struct[64] of MACH_MSG_TYPE_BYTE;
633
9bccf70c 634#if KERNEL_SERVER
1c79356b 635#ifdef MACH_KERNEL_PRIVATE
fe8ab488 636simport <ipc/ipc_voucher.h>; /* for voucher conversions */
1c79356b
A
637simport <kern/ipc_kobject.h>; /* for null conversion */
638simport <kern/ipc_tt.h>; /* for task/thread conversion */
639simport <kern/ipc_host.h>; /* for host/processor/pset conversions */
1c79356b 640simport <kern/ipc_sync.h>; /* for lock_set and semaphore conversions */
9bccf70c 641simport <kern/ledger.h>; /* for ledger conversions */
91447636
A
642simport <kern/processor.h>; /* for processor conversions */
643simport <kern/sync_lock.h>; /* for lock-set conversions */
644simport <kern/sync_sema.h>; /* for semaphore conversions */
645simport <vm/memory_object.h>; /* for memory object type conversions */
646simport <vm/vm_map.h>; /* for vm_map conversions */
cb323159
A
647#if CONFIG_ARCADE
648simport <kern/arcade.h>; /* for arcade_register conversions */
649#endif
1c79356b
A
650#endif /* MACH_KERNEL_PRIVATE */
651
652simport <kern/ipc_mig.h>; /* pick up kernel-specific MIG things */
653
ea3f0419 654simport <kern/suid_cred.h>;
1c79356b
A
655#endif /* KERNEL_SERVER */
656
9bccf70c 657import <mach/mig.h>;
1c79356b
A
658import <mach/mach_types.h>;
659
660#endif /* _MACH_MACH_TYPES_DEFS_ */
2d21ac55
A
661
662/* vim: set ft=c : */