2 * Copyright (c) 2019 Apple Computer, 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@
29 import <mach/mach_eventlink_types.h>;
32 * Libsyscall mach_eventlink.defs should include mach/mach_eventlink.defs exported by
33 * kernel, putting a copy of the file instead to avoid the build failure due to
34 * ordering issues. Once the mach/mach_eventlink.defs is in build, replace the content
35 * on defs file with #inlude <mach/mach_eventlink.defs>.
40 #endif /* KERNEL_SERVER */
41 mach_eventlink 716200;
43 #include <mach/std_types.defs>
44 #include <mach/mach_types.defs>
45 #include <mach/clock_types.defs>
47 #ifndef _MACH_MACH_EVENTLINK_TYPE_DEFS
48 #define _MACH_MACH_EVENTLINK_TYPE_DEFS
50 type eventlink_t = mach_port_t
53 intran: ipc_eventlink_t convert_port_to_eventlink(mach_port_t)
54 destructor: ipc_eventlink_deallocate(ipc_eventlink_t)
55 #endif /* KERNEL_SERVER */
58 type eventlink_consume_ref_t = mach_port_move_send_t
61 intran: ipc_eventlink_t convert_port_to_eventlink(mach_port_t)
62 destructor: ipc_eventlink_deallocate(ipc_eventlink_t)
63 #endif /* KERNEL_SERVER */
66 type eventlink_port_pair_t = array[2] of mach_port_t;
67 type mach_eventlink_create_option_t = uint32_t;
68 type mach_eventlink_associate_option_t = uint32_t;
69 type mach_eventlink_disassociate_option_t = uint32_t;
70 type mach_eventlink_signal_wait_option_t = uint32_t;
72 #endif /* _MACH_MACH_EVENTLINK_TYPE_DEFS */
74 routine mach_eventlink_create(
76 option : mach_eventlink_create_option_t;
77 out eventlink_pair : eventlink_port_pair_t);
79 routine mach_eventlink_destroy(
80 eventlink : eventlink_consume_ref_t);
83 routine mach_eventlink_associate(
84 eventlink : eventlink_t;
86 copyin_addr_wait : mach_vm_address_t;
87 copyin_mask_wait : uint64_t;
88 copyin_addr_signal : mach_vm_address_t;
89 copyin_mask_signal : uint64_t;
90 option : mach_eventlink_associate_option_t);
92 routine mach_eventlink_disassociate(
93 eventlink : eventlink_t;
94 option : mach_eventlink_disassociate_option_t);