]> git.saurik.com Git - apple/xnu.git/blob - libsyscall/mach/mach_eventlink.defs
xnu-7195.101.1.tar.gz
[apple/xnu.git] / libsyscall / mach / mach_eventlink.defs
1 /*
2 * Copyright (c) 2019 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *
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.
14 *
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
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.
25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */
28
29 import <mach/mach_eventlink_types.h>;
30
31 /*
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>.
36 */
37 subsystem
38 #if KERNEL_SERVER
39 KernelServer
40 #endif /* KERNEL_SERVER */
41 mach_eventlink 716200;
42
43 #include <mach/std_types.defs>
44 #include <mach/mach_types.defs>
45 #include <mach/clock_types.defs>
46
47 #ifndef _MACH_MACH_EVENTLINK_TYPE_DEFS
48 #define _MACH_MACH_EVENTLINK_TYPE_DEFS
49
50 type eventlink_t = mach_port_t
51 ctype: mach_port_t
52 #if KERNEL_SERVER
53 intran: ipc_eventlink_t convert_port_to_eventlink(mach_port_t)
54 destructor: ipc_eventlink_deallocate(ipc_eventlink_t)
55 #endif /* KERNEL_SERVER */
56 ;
57
58 type eventlink_consume_ref_t = mach_port_move_send_t
59 ctype: mach_port_t
60 #if KERNEL_SERVER
61 intran: ipc_eventlink_t convert_port_to_eventlink(mach_port_t)
62 destructor: ipc_eventlink_deallocate(ipc_eventlink_t)
63 #endif /* KERNEL_SERVER */
64 ;
65
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;
71
72 #endif /* _MACH_MACH_EVENTLINK_TYPE_DEFS */
73
74 routine mach_eventlink_create(
75 task : task_t;
76 option : mach_eventlink_create_option_t;
77 out eventlink_pair : eventlink_port_pair_t);
78
79 routine mach_eventlink_destroy(
80 eventlink : eventlink_consume_ref_t);
81
82
83 routine mach_eventlink_associate(
84 eventlink : eventlink_t;
85 thread : thread_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);
91
92 routine mach_eventlink_disassociate(
93 eventlink : eventlink_t;
94 option : mach_eventlink_disassociate_option_t);
95
96 /* vim: set ft=c : */