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