2 * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
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.
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
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.
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
32 * Mach Operating System
33 * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
34 * All Rights Reserved.
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.
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.
46 * Carnegie Mellon requests users of this software to return to
48 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
49 * School of Computer Science
50 * Carnegie Mellon University
51 * Pittsburgh PA 15213-3890
53 * any improvements or extensions that they make and grant Carnegie Mellon
54 * the rights to redistribute these changes.
59 * Definitions of general Mach system traps.
61 * These are the definitions as seen from user-space.
62 * The kernel definitions are in <mach/syscall_sw.h>.
63 * Kernel RPC functions are defined in <mach/mach_interface.h>.
66 #ifndef _MACH_MACH_TRAPS_H_
67 #define _MACH_MACH_TRAPS_H_
71 #include <mach/std_types.h>
72 #include <mach/mach_types.h>
73 #include <mach/kern_return.h>
74 #include <mach/port.h>
75 #include <mach/vm_types.h>
76 #include <mach/clock_types.h>
78 #include <machine/endian.h>
80 #include <sys/cdefs.h>
88 extern mach_port_name_t
mach_reply_port(void);
90 extern mach_port_name_t
thread_self_trap(void);
92 extern mach_port_name_t
host_self_trap(void);
94 extern mach_msg_return_t
mach_msg_trap(
95 mach_msg_header_t
*msg
,
96 mach_msg_option_t option
,
97 mach_msg_size_t send_size
,
98 mach_msg_size_t rcv_size
,
99 mach_port_name_t rcv_name
,
100 mach_msg_timeout_t timeout
,
101 mach_port_name_t notify
);
103 extern mach_msg_return_t
mach_msg_overwrite_trap(
104 mach_msg_header_t
*msg
,
105 mach_msg_option_t option
,
106 mach_msg_size_t send_size
,
107 mach_msg_size_t rcv_size
,
108 mach_port_name_t rcv_name
,
109 mach_msg_timeout_t timeout
,
110 mach_msg_priority_t override
,
111 mach_msg_header_t
*rcv_msg
,
112 mach_msg_size_t rcv_limit
);
114 extern kern_return_t
semaphore_signal_trap(
115 mach_port_name_t signal_name
);
117 extern kern_return_t
semaphore_signal_all_trap(
118 mach_port_name_t signal_name
);
120 extern kern_return_t
semaphore_signal_thread_trap(
121 mach_port_name_t signal_name
,
122 mach_port_name_t thread_name
);
124 extern kern_return_t
semaphore_wait_trap(
125 mach_port_name_t wait_name
);
127 extern kern_return_t
semaphore_wait_signal_trap(
128 mach_port_name_t wait_name
,
129 mach_port_name_t signal_name
);
131 extern kern_return_t
semaphore_timedwait_trap(
132 mach_port_name_t wait_name
,
136 extern kern_return_t
semaphore_timedwait_signal_trap(
137 mach_port_name_t wait_name
,
138 mach_port_name_t signal_name
,
144 extern kern_return_t
clock_sleep_trap(
145 mach_port_name_t clock_name
,
146 sleep_type_t sleep_type
,
149 mach_timespec_t
*wakeup_time
);
151 extern kern_return_t
_kernelrpc_mach_vm_allocate_trap(
152 mach_port_name_t target
,
153 mach_vm_offset_t
*addr
,
157 extern kern_return_t
_kernelrpc_mach_vm_deallocate_trap(
158 mach_port_name_t target
,
159 mach_vm_address_t address
,
163 extern kern_return_t
_kernelrpc_mach_vm_protect_trap(
164 mach_port_name_t target
,
165 mach_vm_address_t address
,
167 boolean_t set_maximum
,
168 vm_prot_t new_protection
171 extern kern_return_t
_kernelrpc_mach_vm_map_trap(
172 mach_port_name_t target
,
173 mach_vm_offset_t
*address
,
175 mach_vm_offset_t mask
,
177 vm_prot_t cur_protection
180 extern kern_return_t
_kernelrpc_mach_vm_purgable_control_trap(
181 mach_port_name_t target
,
182 mach_vm_offset_t address
,
183 vm_purgable_t control
,
186 extern kern_return_t
_kernelrpc_mach_port_allocate_trap(
187 mach_port_name_t target
,
188 mach_port_right_t right
,
189 mach_port_name_t
*name
193 extern kern_return_t
_kernelrpc_mach_port_destroy_trap(
194 mach_port_name_t target
,
195 mach_port_name_t name
198 extern kern_return_t
_kernelrpc_mach_port_deallocate_trap(
199 mach_port_name_t target
,
200 mach_port_name_t name
203 extern kern_return_t
_kernelrpc_mach_port_mod_refs_trap(
204 mach_port_name_t target
,
205 mach_port_name_t name
,
206 mach_port_right_t right
,
207 mach_port_delta_t delta
210 extern kern_return_t
_kernelrpc_mach_port_move_member_trap(
211 mach_port_name_t target
,
212 mach_port_name_t member
,
213 mach_port_name_t after
216 extern kern_return_t
_kernelrpc_mach_port_insert_right_trap(
217 mach_port_name_t target
,
218 mach_port_name_t name
,
219 mach_port_name_t poly
,
220 mach_msg_type_name_t polyPoly
223 extern kern_return_t
_kernelrpc_mach_port_insert_member_trap(
224 mach_port_name_t target
,
225 mach_port_name_t name
,
226 mach_port_name_t pset
229 extern kern_return_t
_kernelrpc_mach_port_extract_member_trap(
230 mach_port_name_t target
,
231 mach_port_name_t name
,
232 mach_port_name_t pset
235 extern kern_return_t
_kernelrpc_mach_port_construct_trap(
236 mach_port_name_t target
,
237 mach_port_options_t
*options
,
239 mach_port_name_t
*name
242 extern kern_return_t
_kernelrpc_mach_port_destruct_trap(
243 mach_port_name_t target
,
244 mach_port_name_t name
,
245 mach_port_delta_t srdelta
,
249 extern kern_return_t
_kernelrpc_mach_port_guard_trap(
250 mach_port_name_t target
,
251 mach_port_name_t name
,
256 extern kern_return_t
_kernelrpc_mach_port_unguard_trap(
257 mach_port_name_t target
,
258 mach_port_name_t name
,
262 extern kern_return_t
mach_generate_activity_id(
263 mach_port_name_t target
,
265 uint64_t *activity_id
268 extern kern_return_t
macx_swapon(
274 extern kern_return_t
macx_swapoff(
278 extern kern_return_t
macx_triggers(
282 mach_port_t alert_port
);
284 extern kern_return_t
macx_backing_store_suspend(
287 extern kern_return_t
macx_backing_store_recovery(
290 extern boolean_t
swtch_pri(int pri
);
292 extern boolean_t
swtch(void);
294 extern kern_return_t
thread_switch(
295 mach_port_name_t thread_name
,
297 mach_msg_timeout_t option_time
);
299 extern mach_port_name_t
task_self_trap(void);
301 extern kern_return_t
host_create_mach_voucher_trap(
302 mach_port_name_t host
,
303 mach_voucher_attr_raw_recipe_array_t recipes
,
305 mach_port_name_t
*voucher
);
307 extern kern_return_t
mach_voucher_extract_attr_recipe_trap(
308 mach_port_name_t voucher_name
,
309 mach_voucher_attr_key_t key
,
310 mach_voucher_attr_raw_recipe_t recipe
,
311 mach_msg_type_number_t
*recipe_size
);
314 * Obsolete interfaces.
317 extern kern_return_t
task_for_pid(
318 mach_port_name_t target_tport
,
320 mach_port_name_t
*t
);
322 extern kern_return_t
task_name_for_pid(
323 mach_port_name_t target_tport
,
325 mach_port_name_t
*tn
);
327 extern kern_return_t
pid_for_task(
333 #ifdef XNU_KERNEL_PRIVATE
335 /* Syscall data translations routines
337 * The kernel may support multiple userspace ABIs, and must use
338 * argument structures with elements large enough for any of them.
340 #if CONFIG_REQUIRES_U32_MUNGING
341 #define PAD_(t) (sizeof(uint64_t) <= sizeof(t) \
342 ? 0 : sizeof(uint64_t) - sizeof(t))
345 #define PAD_(t) (sizeof(uint32_t) <= sizeof(t) \
346 ? 0 : sizeof(uint32_t) - sizeof(t))
347 #define PAD_ARG_8 char arg8_pad_[sizeof(uint32_t)];
350 #if BYTE_ORDER == LITTLE_ENDIAN
352 #define PADR_(t) PAD_(t)
354 #define PADL_(t) PAD_(t)
358 #define PAD_ARG_(arg_type, arg_name) \
359 char arg_name##_l_[PADL_(arg_type)]; arg_type arg_name; char arg_name##_r_[PADR_(arg_type)];
362 * To support 32-bit clients as well as 64-bit clients, argument
363 * structures may need to be munged to repack the arguments. All
364 * active architectures do this inline in the code to dispatch Mach
365 * traps, without calling out to the BSD system call mungers.
368 struct kern_invalid_args
{
371 extern kern_return_t
kern_invalid(
372 struct kern_invalid_args
*args
);
374 struct mach_reply_port_args
{
377 extern mach_port_name_t
mach_reply_port(
378 struct mach_reply_port_args
*args
);
380 struct thread_self_trap_args
{
383 extern mach_port_name_t
thread_self_trap(
384 struct thread_self_trap_args
*args
);
386 struct task_self_trap_args
{
389 extern mach_port_name_t
task_self_trap(
390 struct task_self_trap_args
*args
);
392 struct host_self_trap_args
{
395 extern mach_port_name_t
host_self_trap(
396 struct host_self_trap_args
*args
);
398 struct mach_msg_overwrite_trap_args
{
399 PAD_ARG_(user_addr_t
, msg
);
400 PAD_ARG_(mach_msg_option_t
, option
);
401 PAD_ARG_(mach_msg_size_t
, send_size
);
402 PAD_ARG_(mach_msg_size_t
, rcv_size
);
403 PAD_ARG_(mach_port_name_t
, rcv_name
);
404 PAD_ARG_(mach_msg_timeout_t
, timeout
);
405 PAD_ARG_(mach_msg_priority_t
, override
);
407 PAD_ARG_(user_addr_t
, rcv_msg
); /* Unused on mach_msg_trap */
409 extern mach_msg_return_t
mach_msg_trap(
410 struct mach_msg_overwrite_trap_args
*args
);
411 extern mach_msg_return_t
mach_msg_overwrite_trap(
412 struct mach_msg_overwrite_trap_args
*args
);
414 struct semaphore_signal_trap_args
{
415 PAD_ARG_(mach_port_name_t
, signal_name
);
417 extern kern_return_t
semaphore_signal_trap(
418 struct semaphore_signal_trap_args
*args
);
420 struct semaphore_signal_all_trap_args
{
421 PAD_ARG_(mach_port_name_t
, signal_name
);
423 extern kern_return_t
semaphore_signal_all_trap(
424 struct semaphore_signal_all_trap_args
*args
);
426 struct semaphore_signal_thread_trap_args
{
427 PAD_ARG_(mach_port_name_t
, signal_name
);
428 PAD_ARG_(mach_port_name_t
, thread_name
);
430 extern kern_return_t
semaphore_signal_thread_trap(
431 struct semaphore_signal_thread_trap_args
*args
);
433 struct semaphore_wait_trap_args
{
434 PAD_ARG_(mach_port_name_t
, wait_name
);
436 extern kern_return_t
semaphore_wait_trap(
437 struct semaphore_wait_trap_args
*args
);
439 struct semaphore_wait_signal_trap_args
{
440 PAD_ARG_(mach_port_name_t
, wait_name
);
441 PAD_ARG_(mach_port_name_t
, signal_name
);
443 extern kern_return_t
semaphore_wait_signal_trap(
444 struct semaphore_wait_signal_trap_args
*args
);
446 struct semaphore_timedwait_trap_args
{
447 PAD_ARG_(mach_port_name_t
, wait_name
);
448 PAD_ARG_(unsigned int, sec
);
449 PAD_ARG_(clock_res_t
, nsec
);
451 extern kern_return_t
semaphore_timedwait_trap(
452 struct semaphore_timedwait_trap_args
*args
);
454 struct semaphore_timedwait_signal_trap_args
{
455 PAD_ARG_(mach_port_name_t
, wait_name
);
456 PAD_ARG_(mach_port_name_t
, signal_name
);
457 PAD_ARG_(unsigned int, sec
);
458 PAD_ARG_(clock_res_t
, nsec
);
460 extern kern_return_t
semaphore_timedwait_signal_trap(
461 struct semaphore_timedwait_signal_trap_args
*args
);
463 struct task_for_pid_args
{
464 PAD_ARG_(mach_port_name_t
, target_tport
);
466 PAD_ARG_(user_addr_t
, t
);
468 extern kern_return_t
task_for_pid(
469 struct task_for_pid_args
*args
);
471 struct task_name_for_pid_args
{
472 PAD_ARG_(mach_port_name_t
, target_tport
);
474 PAD_ARG_(user_addr_t
, t
);
476 extern kern_return_t
task_name_for_pid(
477 struct task_name_for_pid_args
*args
);
479 struct pid_for_task_args
{
480 PAD_ARG_(mach_port_name_t
, t
);
481 PAD_ARG_(user_addr_t
, pid
);
483 extern kern_return_t
pid_for_task(
484 struct pid_for_task_args
*args
);
486 struct macx_swapon_args
{
487 PAD_ARG_(uint64_t, filename
);
488 PAD_ARG_(int, flags
);
490 PAD_ARG_(int, priority
);
492 extern kern_return_t
macx_swapon(
493 struct macx_swapon_args
*args
);
495 struct macx_swapoff_args
{
496 PAD_ARG_(uint64_t, filename
);
497 PAD_ARG_(int, flags
);
499 extern kern_return_t
macx_swapoff(
500 struct macx_swapoff_args
*args
);
502 struct macx_triggers_args
{
503 PAD_ARG_(int, hi_water
);
504 PAD_ARG_(int, low_water
);
505 PAD_ARG_(int, flags
);
506 PAD_ARG_(mach_port_t
, alert_port
);
508 extern kern_return_t
macx_triggers(
509 struct macx_triggers_args
*args
);
511 struct macx_backing_store_suspend_args
{
512 PAD_ARG_(boolean_t
, suspend
);
514 extern kern_return_t
macx_backing_store_suspend(
515 struct macx_backing_store_suspend_args
*args
);
517 struct macx_backing_store_recovery_args
{
520 extern kern_return_t
macx_backing_store_recovery(
521 struct macx_backing_store_recovery_args
*args
);
523 struct swtch_pri_args
{
526 extern boolean_t
swtch_pri(
527 struct swtch_pri_args
*args
);
529 struct pfz_exit_args
{
532 extern kern_return_t
pfz_exit(
533 struct pfz_exit_args
*args
);
538 extern boolean_t
swtch(
539 struct swtch_args
*args
);
541 struct clock_sleep_trap_args
{
542 PAD_ARG_(mach_port_name_t
, clock_name
);
543 PAD_ARG_(sleep_type_t
, sleep_type
);
544 PAD_ARG_(int, sleep_sec
);
545 PAD_ARG_(int, sleep_nsec
);
546 PAD_ARG_(user_addr_t
, wakeup_time
);
548 extern kern_return_t
clock_sleep_trap(
549 struct clock_sleep_trap_args
*args
);
551 struct thread_switch_args
{
552 PAD_ARG_(mach_port_name_t
, thread_name
);
553 PAD_ARG_(int, option
);
554 PAD_ARG_(mach_msg_timeout_t
, option_time
);
556 extern kern_return_t
thread_switch(
557 struct thread_switch_args
*args
);
559 struct mach_timebase_info_trap_args
{
560 PAD_ARG_(user_addr_t
, info
);
562 extern kern_return_t
mach_timebase_info_trap(
563 struct mach_timebase_info_trap_args
*args
);
565 struct mach_wait_until_trap_args
{
566 PAD_ARG_(uint64_t, deadline
);
568 extern kern_return_t
mach_wait_until_trap(
569 struct mach_wait_until_trap_args
*args
);
571 struct mk_timer_create_trap_args
{
574 extern mach_port_name_t
mk_timer_create_trap(
575 struct mk_timer_create_trap_args
*args
);
577 struct mk_timer_destroy_trap_args
{
578 PAD_ARG_(mach_port_name_t
, name
);
580 extern kern_return_t
mk_timer_destroy_trap(
581 struct mk_timer_destroy_trap_args
*args
);
583 struct mk_timer_arm_trap_args
{
584 PAD_ARG_(mach_port_name_t
, name
);
585 PAD_ARG_(uint64_t, expire_time
);
587 extern kern_return_t
mk_timer_arm_trap(
588 struct mk_timer_arm_trap_args
*args
);
590 struct mk_timer_cancel_trap_args
{
591 PAD_ARG_(mach_port_name_t
, name
);
592 PAD_ARG_(user_addr_t
, result_time
);
594 extern kern_return_t
mk_timer_cancel_trap(
595 struct mk_timer_cancel_trap_args
*args
);
597 struct _kernelrpc_mach_vm_allocate_trap_args
{
598 PAD_ARG_(mach_port_name_t
, target
); /* 1 word */
599 PAD_ARG_(user_addr_t
, addr
); /* 1 word */
600 PAD_ARG_(mach_vm_size_t
, size
); /* 2 words */
601 PAD_ARG_(int, flags
); /* 1 word */
604 extern kern_return_t
_kernelrpc_mach_vm_allocate_trap(
605 struct _kernelrpc_mach_vm_allocate_trap_args
*args
);
607 struct _kernelrpc_mach_vm_deallocate_args
{
608 PAD_ARG_(mach_port_name_t
, target
); /* 1 word */
609 PAD_ARG_(mach_vm_address_t
, address
); /* 2 words */
610 PAD_ARG_(mach_vm_size_t
, size
); /* 2 words */
612 extern kern_return_t
_kernelrpc_mach_vm_deallocate_trap(
613 struct _kernelrpc_mach_vm_deallocate_args
*args
);
615 struct _kernelrpc_mach_vm_protect_args
{
616 PAD_ARG_(mach_port_name_t
, target
); /* 1 word */
617 PAD_ARG_(mach_vm_address_t
, address
); /* 2 words */
618 PAD_ARG_(mach_vm_size_t
, size
); /* 2 words */
619 PAD_ARG_(boolean_t
, set_maximum
); /* 1 word */
620 PAD_ARG_(vm_prot_t
, new_protection
); /* 1 word */
622 extern kern_return_t
_kernelrpc_mach_vm_protect_trap(
623 struct _kernelrpc_mach_vm_protect_args
*args
);
625 struct _kernelrpc_mach_vm_map_trap_args
{
626 PAD_ARG_(mach_port_name_t
, target
);
627 PAD_ARG_(user_addr_t
, addr
);
628 PAD_ARG_(mach_vm_size_t
, size
);
629 PAD_ARG_(mach_vm_offset_t
, mask
);
630 PAD_ARG_(int, flags
);
632 PAD_ARG_(vm_prot_t
, cur_protection
);
634 extern kern_return_t
_kernelrpc_mach_vm_map_trap(
635 struct _kernelrpc_mach_vm_map_trap_args
*args
);
637 struct _kernelrpc_mach_vm_purgable_control_trap_args
{
638 PAD_ARG_(mach_port_name_t
, target
); /* 1 word */
639 PAD_ARG_(mach_vm_offset_t
, address
); /* 2 words */
640 PAD_ARG_(vm_purgable_t
, control
); /* 1 word */
641 PAD_ARG_(user_addr_t
, state
); /* 1 word */
644 extern kern_return_t
_kernelrpc_mach_vm_purgable_control_trap(
645 struct _kernelrpc_mach_vm_purgable_control_trap_args
*args
);
647 struct _kernelrpc_mach_port_allocate_args
{
648 PAD_ARG_(mach_port_name_t
, target
);
649 PAD_ARG_(mach_port_right_t
, right
);
650 PAD_ARG_(user_addr_t
, name
);
652 extern kern_return_t
_kernelrpc_mach_port_allocate_trap(
653 struct _kernelrpc_mach_port_allocate_args
*args
);
656 struct _kernelrpc_mach_port_destroy_args
{
657 PAD_ARG_(mach_port_name_t
, target
);
658 PAD_ARG_(mach_port_name_t
, name
);
660 extern kern_return_t
_kernelrpc_mach_port_destroy_trap(
661 struct _kernelrpc_mach_port_destroy_args
*args
);
663 struct _kernelrpc_mach_port_deallocate_args
{
664 PAD_ARG_(mach_port_name_t
, target
);
665 PAD_ARG_(mach_port_name_t
, name
);
667 extern kern_return_t
_kernelrpc_mach_port_deallocate_trap(
668 struct _kernelrpc_mach_port_deallocate_args
*args
);
670 struct _kernelrpc_mach_port_mod_refs_args
{
671 PAD_ARG_(mach_port_name_t
, target
);
672 PAD_ARG_(mach_port_name_t
, name
);
673 PAD_ARG_(mach_port_right_t
, right
);
674 PAD_ARG_(mach_port_delta_t
, delta
);
676 extern kern_return_t
_kernelrpc_mach_port_mod_refs_trap(
677 struct _kernelrpc_mach_port_mod_refs_args
*args
);
679 struct _kernelrpc_mach_port_move_member_args
{
680 PAD_ARG_(mach_port_name_t
, target
);
681 PAD_ARG_(mach_port_name_t
, member
);
682 PAD_ARG_(mach_port_name_t
, after
);
684 extern kern_return_t
_kernelrpc_mach_port_move_member_trap(
685 struct _kernelrpc_mach_port_move_member_args
*args
);
687 struct _kernelrpc_mach_port_insert_right_args
{
688 PAD_ARG_(mach_port_name_t
, target
);
689 PAD_ARG_(mach_port_name_t
, name
);
690 PAD_ARG_(mach_port_name_t
, poly
);
691 PAD_ARG_(mach_msg_type_name_t
, polyPoly
);
693 extern kern_return_t
_kernelrpc_mach_port_insert_right_trap(
694 struct _kernelrpc_mach_port_insert_right_args
*args
);
696 struct _kernelrpc_mach_port_insert_member_args
{
697 PAD_ARG_(mach_port_name_t
, target
);
698 PAD_ARG_(mach_port_name_t
, name
);
699 PAD_ARG_(mach_port_name_t
, pset
);
701 extern kern_return_t
_kernelrpc_mach_port_insert_member_trap(
702 struct _kernelrpc_mach_port_insert_member_args
*args
);
704 struct _kernelrpc_mach_port_extract_member_args
{
705 PAD_ARG_(mach_port_name_t
, target
);
706 PAD_ARG_(mach_port_name_t
, name
);
707 PAD_ARG_(mach_port_name_t
, pset
);
709 extern kern_return_t
_kernelrpc_mach_port_extract_member_trap(
710 struct _kernelrpc_mach_port_extract_member_args
*args
);
712 struct _kernelrpc_mach_port_construct_args
{
713 PAD_ARG_(mach_port_name_t
, target
);
714 PAD_ARG_(user_addr_t
, options
);
715 PAD_ARG_(uint64_t, context
);
716 PAD_ARG_(user_addr_t
, name
);
718 extern kern_return_t
_kernelrpc_mach_port_construct_trap(
719 struct _kernelrpc_mach_port_construct_args
*args
);
721 struct _kernelrpc_mach_port_destruct_args
{
722 PAD_ARG_(mach_port_name_t
, target
);
723 PAD_ARG_(mach_port_name_t
, name
);
724 PAD_ARG_(mach_port_delta_t
, srdelta
);
725 PAD_ARG_(uint64_t, guard
);
727 extern kern_return_t
_kernelrpc_mach_port_destruct_trap(
728 struct _kernelrpc_mach_port_destruct_args
*args
);
730 struct _kernelrpc_mach_port_guard_args
{
731 PAD_ARG_(mach_port_name_t
, target
);
732 PAD_ARG_(mach_port_name_t
, name
);
733 PAD_ARG_(uint64_t, guard
);
734 PAD_ARG_(boolean_t
, strict
);
736 extern kern_return_t
_kernelrpc_mach_port_guard_trap(
737 struct _kernelrpc_mach_port_guard_args
*args
);
739 struct _kernelrpc_mach_port_unguard_args
{
740 PAD_ARG_(mach_port_name_t
, target
);
741 PAD_ARG_(mach_port_name_t
, name
);
742 PAD_ARG_(uint64_t, guard
);
744 extern kern_return_t
_kernelrpc_mach_port_unguard_trap(
745 struct _kernelrpc_mach_port_unguard_args
*args
);
747 struct mach_generate_activity_id_args
{
748 PAD_ARG_(mach_port_name_t
, target
);
749 PAD_ARG_(int, count
);
750 PAD_ARG_(user_addr_t
, activity_id
);
752 extern kern_return_t
mach_generate_activity_id(
753 struct mach_generate_activity_id_args
*args
);
756 * Voucher trap interfaces
759 struct host_create_mach_voucher_args
{
760 PAD_ARG_(mach_port_name_t
, host
);
761 PAD_ARG_(mach_voucher_attr_raw_recipe_array_t
, recipes
);
762 PAD_ARG_(int, recipes_size
);
763 PAD_ARG_(user_addr_t
, voucher
);
765 extern kern_return_t
host_create_mach_voucher_trap(
766 struct host_create_mach_voucher_args
*args
);
768 struct mach_voucher_extract_attr_recipe_args
{
769 PAD_ARG_(mach_port_name_t
, voucher_name
);
770 PAD_ARG_(mach_voucher_attr_key_t
, key
);
771 PAD_ARG_(mach_voucher_attr_raw_recipe_t
, recipe
);
772 PAD_ARG_(user_addr_t
, recipe_size
);
775 extern kern_return_t
mach_voucher_extract_attr_recipe_trap(
776 struct mach_voucher_extract_attr_recipe_args
*args
);
779 /* not published to LP64 clients yet */
780 struct iokit_user_client_trap_args
{
781 PAD_ARG_(void *, userClientRef
);
782 PAD_ARG_(uint32_t, index
);
783 PAD_ARG_(void *, p1
);
784 PAD_ARG_(void *, p2
);
785 PAD_ARG_(void *, p3
);
786 PAD_ARG_(void *, p4
);
787 PAD_ARG_(void *, p5
);
789 PAD_ARG_(void *, p6
);
791 kern_return_t
iokit_user_client_trap(
792 struct iokit_user_client_trap_args
*args
);
800 #endif /* XNU_KERNEL_PRIVATE */
806 #endif /* _MACH_MACH_TRAPS_H_ */