Linux: Add support for the BLKFLSBUF ioctl
[valgrind.git] / include / vki / vki-scnums-darwin.h
blob99cb342fab454849fcdf504bd5d4b42a48f3c874
2 /*--------------------------------------------------------------------*/
3 /*--- System call numbers for Darwin. vki-scnums-darwin.h ---*/
4 /*--------------------------------------------------------------------*/
6 /*
7 This file is part of Valgrind, a dynamic binary instrumentation
8 framework.
10 Copyright (C) 2007-2017 Apple Inc.
11 Greg Parker gparker@apple.com
13 This program is free software; you can redistribute it and/or
14 modify it under the terms of the GNU General Public License as
15 published by the Free Software Foundation; either version 2 of the
16 License, or (at your option) any later version.
18 This program is distributed in the hope that it will be useful, but
19 WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 General Public License for more details.
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
26 02111-1307, USA.
28 The GNU General Public License is contained in the file COPYING.
31 #ifndef __VKI_SCNUMS_DARWIN_H
32 #define __VKI_SCNUMS_DARWIN_H
35 // need DARWIN_10_x definitions
36 #include "config.h"
38 // osfmk/mach/i386/syscall_sw.h
40 // There are two syscall number encodings in Darwin.
42 // The 64-bit encoding is that the top 8-bits are the syscall class. The low
43 // 24 are the syscall number (index) within that class.
45 // The 32-bit encoding is that the syscall number (index) is stored as-is and
46 // the syscall class is encoded as the argument to the 'int' instruction used
47 // to trigger the syscall:
48 // - 0x80: Unix
49 // - 0x81: Mach
50 // - 0x82: Machine-dependent
51 // - 0x83: Diagnostic
52 // Furthermore, just to make life interesting, for Mach traps the number is
53 // negative.
55 // Within Valgrind we only use the 64-bit encoding -- on 32-bit systems, we
56 // convert any syscall number to 64-bit encoding when we receive it, and
57 // convert back with VG_DARWIN_SYSNO_FOR_KERNEL when passing any syscall
58 // number back to the kernel (__NR_something shouldn't be passed directly to
59 // the kernel).
61 // Hack: x86 `int $0x80` (unix, 64-bit result) are special.
62 // [I haven't worked out why... --njn]
64 #define VG_DARWIN_SYSCALL_CLASS_SHIFT 24
65 #define VG_DARWIN_SYSCALL_CLASS_MASK (0xFF << VG_DARWIN_SYSCALL_CLASS_SHIFT)
66 #define VG_DARWIN_SYSCALL_NUMBER_MASK (~VG_DARWIN_SYSCALL_CLASS_MASK)
68 #define VG_DARWIN_SYSCALL_CLASS_NONE 0 /* Invalid */
69 #define VG_DARWIN_SYSCALL_CLASS_MACH 1 /* Mach */
70 #define VG_DARWIN_SYSCALL_CLASS_UNIX 2 /* Unix/BSD */
71 #define VG_DARWIN_SYSCALL_CLASS_MDEP 3 /* Machine-dependent */
72 #define VG_DARWIN_SYSCALL_CLASS_DIAG 4 /* Diagnostics */
74 // Macros for encoding syscall numbers in the 64-bit encoding scheme.
75 #define VG_DARWIN_SYSCALL_CONSTRUCT_MACH(syscall_number) \
76 ((VG_DARWIN_SYSCALL_CLASS_MACH << VG_DARWIN_SYSCALL_CLASS_SHIFT) | \
77 (VG_DARWIN_SYSCALL_NUMBER_MASK & (syscall_number)))
79 #define VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(syscall_number) \
80 ((VG_DARWIN_SYSCALL_CLASS_UNIX << VG_DARWIN_SYSCALL_CLASS_SHIFT) | \
81 (VG_DARWIN_SYSCALL_NUMBER_MASK & (syscall_number)))
83 #define VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(syscall_number) \
84 ((VG_DARWIN_SYSCALL_CLASS_MDEP << VG_DARWIN_SYSCALL_CLASS_SHIFT) | \
85 (VG_DARWIN_SYSCALL_NUMBER_MASK & (syscall_number)))
87 #define VG_DARWIN_SYSCALL_CONSTRUCT_DIAG(syscall_number) \
88 ((VG_DARWIN_SYSCALL_CLASS_DIAG << VG_DARWIN_SYSCALL_CLASS_SHIFT) | \
89 (VG_DARWIN_SYSCALL_NUMBER_MASK & (syscall_number)))
92 /* Macros for decoding syscall numbers from the 64-bit encoding scheme. */
93 #define VG_DARWIN_SYSNO_INDEX(sysno) ((sysno) & VG_DARWIN_SYSCALL_NUMBER_MASK)
94 #define VG_DARWIN_SYSNO_CLASS(sysno) ((sysno) >> VG_DARWIN_SYSCALL_CLASS_SHIFT)
97 /* Macros for converting syscall numbers to the form expected by the kernel.*/
98 #if defined(VGA_x86)
99 // This converts the 64-bit syscall number encoding, which we use
100 // throughout Valgrind, into the 32-bit syscall number encoding, which is
101 // suitable for passing to the (32-bit) kernel.
102 # define VG_DARWIN_SYSNO_FOR_KERNEL(sysno) \
103 ((VG_DARWIN_SYSNO_CLASS(sysno) == VG_DARWIN_SYSCALL_CLASS_MACH) \
104 ? -VG_DARWIN_SYSNO_INDEX(sysno) \
105 : VG_DARWIN_SYSNO_INDEX(sysno) \
108 #elif defined(VGA_amd64)
109 // For 64-bit systems, we don't need to do anything to the syscall number.
110 # define VG_DARWIN_SYSNO_FOR_KERNEL(sysno) (sysno)
112 #else
113 # error Unknown architecture
114 #endif
117 // mdep syscalls
119 #if defined(VGA_x86)
121 // osfmk/i386/machdep_call.c
122 // DDD: the last two are BSD_CALL instead of CALL...
123 //#define __NR_thread_get_cthread_self VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(0)
124 //#define __NR_thread_set_cthread_self VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(1)
125 // 2 is invalid
126 #define __NR_thread_fast_set_cthread_self VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(3)
127 //#define __NR_thread_set_user_ldt VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(4)
128 //#define __NR_i386_set_ldt VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(5)
129 //#define __NR_i386_get_ldt VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(6)
131 #elif defined(VGA_amd64)
133 // osfmk/i386/machdep_call.c
134 // 0, 1, 2 are invalid
135 #define __NR_thread_fast_set_cthread_self VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(3)
136 // 4, 5, 6 are invalid
138 #else
139 # error unknown architecture
140 #endif
143 // osfmk/mach/syscall_sw.h
145 #define __NR_kernelrpc_mach_vm_allocate_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(10)
147 #define __NR_kernelrpc_mach_vm_deallocate_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(12)
149 #define __NR_kernelrpc_mach_vm_protect_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(14)
150 #define __NR_kernelrpc_mach_vm_map_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(15)
151 #define __NR_kernelrpc_mach_port_allocate_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(16)
152 #define __NR_kernelrpc_mach_port_destroy_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(17)
153 #define __NR_kernelrpc_mach_port_deallocate_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(18)
154 #define __NR_kernelrpc_mach_port_mod_refs_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(19)
155 #define __NR_kernelrpc_mach_port_move_member_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(20)
156 #define __NR_kernelrpc_mach_port_insert_right_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(21)
157 #define __NR_kernelrpc_mach_port_insert_member_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(22)
158 #define __NR_kernelrpc_mach_port_extract_member_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(23)
159 #define __NR_kernelrpc_mach_port_construct_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(24)
160 #define __NR_kernelrpc_mach_port_destruct_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(25)
163 #define __NR_mach_reply_port VG_DARWIN_SYSCALL_CONSTRUCT_MACH(26)
164 #define __NR_thread_self_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(27)
165 #define __NR_task_self_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(28)
166 #define __NR_host_self_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(29)
168 #define __NR_mach_msg_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(31)
169 #define __NR_mach_msg_overwrite_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(32)
170 #define __NR_semaphore_signal_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(33)
171 #define __NR_semaphore_signal_all_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(34)
172 #define __NR_semaphore_signal_thread_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(35)
173 #define __NR_semaphore_wait_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(36)
174 #define __NR_semaphore_wait_signal_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(37)
175 #define __NR_semaphore_timedwait_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(38)
176 #define __NR_semaphore_timedwait_signal_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(39)
178 #if DARWIN_VERS >= DARWIN_10_9
179 #define __NR_kernelrpc_mach_port_guard_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(41)
180 #define __NR_kernelrpc_mach_port_unguard_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(42)
181 #endif
183 #if DARWIN_VERS >= DARWIN_10_12
184 #define __NR_mach_generate_activity_id VG_DARWIN_SYSCALL_CONSTRUCT_MACH(43)
185 #elif defined(VGA_x86) || DARWIN_VERS == DARWIN_10_9
186 #define __NR_map_fd VG_DARWIN_SYSCALL_CONSTRUCT_MACH(43)
187 #endif
189 #define __NR_task_name_for_pid VG_DARWIN_SYSCALL_CONSTRUCT_MACH(44)
190 #define __NR_task_for_pid VG_DARWIN_SYSCALL_CONSTRUCT_MACH(45)
191 #define __NR_pid_for_task VG_DARWIN_SYSCALL_CONSTRUCT_MACH(46)
193 #if defined(VGA_x86)
194 #define __NR_macx_swapon VG_DARWIN_SYSCALL_CONSTRUCT_MACH(48)
195 #define __NR_macx_swapoff VG_DARWIN_SYSCALL_CONSTRUCT_MACH(49)
196 #endif
198 #if DARWIN_VERS >= DARWIN_10_13
199 #define __NR_thread_get_special_reply_port VG_DARWIN_SYSCALL_CONSTRUCT_MACH(50)
200 #endif /* DARWIN_VERS >= DARWIN_10_13 */
202 #if defined(VGA_x86)
203 #define __NR_macx_triggers VG_DARWIN_SYSCALL_CONSTRUCT_MACH(51)
204 #define __NR_macx_backing_store_suspend VG_DARWIN_SYSCALL_CONSTRUCT_MACH(52)
205 #define __NR_macx_backing_store_recovery VG_DARWIN_SYSCALL_CONSTRUCT_MACH(53)
206 #endif
208 #define __NR_swtch_pri VG_DARWIN_SYSCALL_CONSTRUCT_MACH(59)
209 #define __NR_swtch VG_DARWIN_SYSCALL_CONSTRUCT_MACH(60)
210 #define __NR_sched_yield __NR_swtch /* linux-alike name */
211 #define __NR_syscall_thread_switch VG_DARWIN_SYSCALL_CONSTRUCT_MACH(61)
212 #define __NR_clock_sleep_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(62)
214 #if DARWIN_VERS >= DARWIN_10_12
215 #define __NR_host_create_mach_voucher_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(70)
216 #endif
218 #define __NR_mach_timebase_info VG_DARWIN_SYSCALL_CONSTRUCT_MACH(89)
219 #define __NR_mach_wait_until VG_DARWIN_SYSCALL_CONSTRUCT_MACH(90)
220 #define __NR_mk_timer_create VG_DARWIN_SYSCALL_CONSTRUCT_MACH(91)
221 #define __NR_mk_timer_destroy VG_DARWIN_SYSCALL_CONSTRUCT_MACH(92)
222 #define __NR_mk_timer_arm VG_DARWIN_SYSCALL_CONSTRUCT_MACH(93)
223 #define __NR_mk_timer_cancel VG_DARWIN_SYSCALL_CONSTRUCT_MACH(94)
225 #define __NR_iokit_user_client_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(100)
228 // bsd/sys/syscall.h
230 #define __NR_syscall VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(0)
231 #define __NR_exit VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(1)
232 #define __NR_fork VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(2) // was UX64
233 #define __NR_read VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(3)
234 #define __NR_write VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(4)
235 #define __NR_open VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(5)
236 #define __NR_close VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(6)
237 #define __NR_wait4 VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(7)
238 /* 8 old creat */
239 #define __NR_link VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(9)
240 #define __NR_unlink VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(10)
241 /* 11 old execv */
242 #define __NR_chdir VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(12)
243 #define __NR_fchdir VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(13)
244 #define __NR_mknod VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(14)
245 #define __NR_chmod VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(15)
246 #define __NR_chown VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(16)
247 /* 17 old break */
248 #define __NR_getfsstat VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(18)
249 /* 19 old lseek */
250 #define __NR_getpid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(20)
251 /* 21 old mount */
252 /* 22 old umount */
253 #define __NR_setuid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(23)
254 #define __NR_getuid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(24)
255 #define __NR_geteuid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(25)
256 #define __NR_ptrace VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(26)
257 #define __NR_recvmsg VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(27)
258 #define __NR_sendmsg VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(28)
259 #define __NR_recvfrom VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(29)
260 #define __NR_accept VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(30)
261 #define __NR_getpeername VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(31)
262 #define __NR_getsockname VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(32)
263 #define __NR_access VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(33)
264 #define __NR_chflags VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(34)
265 #define __NR_fchflags VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(35)
266 #define __NR_sync VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(36)
267 #define __NR_kill VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(37)
268 /* 38 old stat */
269 #define __NR_getppid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(39)
270 /* 40 old lstat */
271 #define __NR_dup VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(41)
272 #define __NR_pipe VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(42) // was UX64
273 #define __NR_getegid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(43)
274 #define __NR_profil VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(44)
275 /* 45 old ktrace */
276 #define __NR_sigaction VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(46)
277 #define __NR_getgid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(47)
278 #define __NR_sigprocmask VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(48)
279 #define __NR_getlogin VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(49)
280 #define __NR_setlogin VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(50)
281 #define __NR_acct VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(51)
282 #define __NR_sigpending VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(52)
283 #define __NR_sigaltstack VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(53)
284 #define __NR_ioctl VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(54)
285 #define __NR_reboot VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(55)
286 #define __NR_revoke VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(56)
287 #define __NR_symlink VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(57)
288 #define __NR_readlink VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(58)
289 #define __NR_execve VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(59)
290 #define __NR_umask VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(60)
291 #define __NR_chroot VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(61)
292 /* 62 old fstat */
293 /* 63 used internally , reserved */
294 /* 64 old getpagesize */
295 #define __NR_msync VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(65)
296 #define __NR_vfork VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(66)
297 /* 67 old vread */
298 /* 68 old vwrite */
299 /* 69 old sbrk */
300 /* 70 old sstk */
301 /* 71 old mmap */
302 /* 72 old vadvise */
303 #define __NR_munmap VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(73)
304 #define __NR_mprotect VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(74)
305 #define __NR_madvise VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(75)
306 /* 76 old vhangup */
307 /* 77 old vlimit */
308 #define __NR_mincore VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(78)
309 #define __NR_getgroups VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(79)
310 #define __NR_setgroups VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(80)
311 #define __NR_getpgrp VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(81)
312 #define __NR_setpgid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(82)
313 #define __NR_setitimer VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(83)
314 /* 84 old wait */
315 #define __NR_swapon VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(85)
316 #define __NR_getitimer VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(86)
317 /* 87 old gethostname */
318 /* 88 old sethostname */
319 #define __NR_getdtablesize VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(89)
320 #define __NR_dup2 VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(90)
321 /* 91 old getdopt */
322 #define __NR_fcntl VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(92)
323 #define __NR_select VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(93)
324 /* 94 old setdopt */
325 #define __NR_fsync VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(95)
326 #define __NR_setpriority VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(96)
327 #define __NR_socket VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(97)
328 #define __NR_connect VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(98)
329 /* 99 old accept */
330 #define __NR_getpriority VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(100)
331 /* 101 old send */
332 /* 102 old recv */
333 /* 103 old sigreturn */
334 #define __NR_bind VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(104)
335 #define __NR_setsockopt VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(105)
336 #define __NR_listen VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(106)
337 /* 107 old vtimes */
338 /* 108 old sigvec */
339 /* 109 old sigblock */
340 /* 110 old sigsetmask */
341 #define __NR_sigsuspend VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(111)
342 /* 112 old sigstack */
343 /* 113 old recvmsg */
344 /* 114 old sendmsg */
345 /* 115 old vtrace */
346 #define __NR_gettimeofday VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(116)
347 #define __NR_getrusage VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(117)
348 #define __NR_getsockopt VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(118)
349 /* 119 old resuba */
350 #define __NR_readv VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(120)
351 #define __NR_writev VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(121)
352 #define __NR_settimeofday VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(122)
353 #define __NR_fchown VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(123)
354 #define __NR_fchmod VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(124)
355 /* 125 old recvfrom */
356 #define __NR_setreuid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(126)
357 #define __NR_setregid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(127)
358 #define __NR_rename VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(128)
359 /* 129 old truncate */
360 /* 130 old ftruncate */
361 #define __NR_flock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(131)
362 #define __NR_mkfifo VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(132)
363 #define __NR_sendto VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(133)
364 #define __NR_shutdown VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(134)
365 #define __NR_socketpair VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(135)
366 #define __NR_mkdir VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(136)
367 #define __NR_rmdir VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(137)
368 #define __NR_utimes VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(138)
369 #define __NR_futimes VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(139)
370 #define __NR_adjtime VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(140)
371 /* 141 old getpeername */
372 #define __NR_gethostuuid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(142)
373 /* 143 old sethostid */
374 /* 144 old getrlimit */
375 /* 145 old setrlimit */
376 /* 146 old killpg */
377 #define __NR_setsid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(147)
378 /* 148 old setquota */
379 /* 149 old qquota */
380 /* 150 old getsockname */
381 #define __NR_getpgid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(151)
382 #define __NR_setprivexec VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(152)
383 #define __NR_pread VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(153)
384 #define __NR_pwrite VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(154)
385 #define __NR_nfssvc VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(155)
386 /* 156 old getdirentries */
387 #define __NR_statfs VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(157)
388 #define __NR_fstatfs VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(158)
389 #define __NR_unmount VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(159)
390 /* 160 old async_daemon */
391 #define __NR_getfh VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(161)
392 /* 162 old getdomainname */
393 /* 163 old setdomainname */
394 /* 164 */
395 #define __NR_quotactl VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(165)
396 /* 166 old exportfs */
397 #define __NR_mount VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(167)
398 /* 168 old ustat */
399 #define __NR_csops VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(169)
400 /* 170 old table */
401 /* 171 old wait3 */
402 /* 172 old rpause */
403 #define __NR_waitid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(173)
404 /* 174 old getdents */
405 /* 175 old gc_control */
406 #define __NR_add_profil VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(176)
408 #if DARWIN_VERS >= DARWIN_10_12
409 #define __NR_kdebug_typefilter VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(177)
410 #endif /* DARWIN_VERS >= DARWIN_10_12 */
411 #if DARWIN_VERS >= DARWIN_10_11
412 #define __NR_kdebug_trace_string VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(178)
413 #endif /* DARWIN_VERS >= DARWIN_10_11 */
414 /* 179 */
415 #define __NR_kdebug_trace VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(180)
416 #define __NR_setgid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(181)
417 #define __NR_setegid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(182)
418 #define __NR_seteuid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(183)
419 #define __NR_sigreturn VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(184)
420 #define __NR_chud VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(185)
421 #if DARWIN_VERS >= DARWIN_10_13
422 #define __NR_thread_selfcounts VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(186)
423 #else
424 /* 186 */
425 #endif /* DARWIN_VERS >= DARWIN_10_13 */
426 #if DARWIN_VERS >= DARWIN_10_6
427 #define __NR_fdatasync VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(187)
428 #else
429 /* 187 */
430 #endif
431 #define __NR_stat VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(188)
432 #define __NR_fstat VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(189)
433 #define __NR_lstat VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(190)
434 #define __NR_pathconf VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(191)
435 #define __NR_fpathconf VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(192)
436 /* 193 */
437 #define __NR_getrlimit VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(194)
438 #define __NR_setrlimit VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(195)
439 #define __NR_getdirentries VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(196)
440 #define __NR_mmap VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(197)
441 /* 198 __syscall */
442 #define __NR_lseek VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(199) // was UX64
443 #define __NR_truncate VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(200)
444 #define __NR_ftruncate VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(201)
445 #define __NR___sysctl VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(202)
446 #define __NR_mlock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(203)
447 #define __NR_munlock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(204)
448 #define __NR_undelete VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(205)
449 #define __NR_ATsocket VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(206)
450 #define __NR_ATgetmsg VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(207)
451 #define __NR_ATputmsg VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(208)
452 #define __NR_ATPsndreq VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(209)
453 #define __NR_ATPsndrsp VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(210)
454 #define __NR_ATPgetreq VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(211)
455 #define __NR_ATPgetrsp VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(212)
456 /* 213 Reserved for AppleTalk */
457 #if DARWIN_VERS >= DARWIN_10_6
458 /* 214 old kqueue_from_portset_np*/
459 /* 215 old kqueue_portset_np*/
460 #else
461 #define __NR_kqueue_from_portset_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(214)
462 #define __NR_kqueue_portset_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(215)
463 #endif
464 #define __NR_mkcomplex VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(216)
465 #define __NR_statv VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(217)
466 #define __NR_lstatv VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(218)
467 #define __NR_fstatv VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(219)
468 #define __NR_getattrlist VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(220)
469 #define __NR_setattrlist VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(221)
470 #define __NR_getdirentriesattr VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(222)
471 #define __NR_exchangedata VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(223)
472 /* 224 old checkuseraccess */
473 #define __NR_searchfs VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(225)
474 #define __NR_delete VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(226)
475 #define __NR_copyfile VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(227)
476 #if DARWIN_VERS >= DARWIN_10_6
477 #define __NR_fgetattrlist VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(228)
478 #define __NR_fsetattrlist VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(229)
479 #else
480 /* 228 */
481 /* 229 */
482 #endif
483 #define __NR_poll VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(230)
484 #define __NR_watchevent VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(231)
485 #define __NR_waitevent VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(232)
486 #define __NR_modwatch VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(233)
487 #define __NR_getxattr VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(234)
488 #define __NR_fgetxattr VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(235)
489 #define __NR_setxattr VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(236)
490 #define __NR_fsetxattr VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(237)
491 #define __NR_removexattr VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(238)
492 #define __NR_fremovexattr VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(239)
493 #define __NR_listxattr VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(240)
494 #define __NR_flistxattr VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(241)
495 #define __NR_fsctl VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(242)
496 #define __NR_initgroups VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(243)
497 #define __NR_posix_spawn VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(244)
498 #if DARWIN_VERS >= DARWIN_10_6
499 #define __NR_ffsctl VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(245)
500 #else
501 /* 245 */
502 #endif
503 /* 246 */
504 #define __NR_nfsclnt VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(247)
505 #define __NR_fhopen VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(248)
506 /* 249 */
507 #define __NR_minherit VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(250)
508 #define __NR_semsys VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(251)
509 #define __NR_msgsys VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(252)
510 #define __NR_shmsys VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(253)
511 #define __NR_semctl VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(254)
512 #define __NR_semget VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(255)
513 #define __NR_semop VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(256)
514 /* 257 */
515 #define __NR_msgctl VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(258)
516 #define __NR_msgget VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(259)
517 #define __NR_msgsnd VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(260)
518 #define __NR_msgrcv VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(261)
519 #define __NR_shmat VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(262)
520 #define __NR_shmctl VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(263)
521 #define __NR_shmdt VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(264)
522 #define __NR_shmget VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(265)
523 #define __NR_shm_open VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(266)
524 #define __NR_shm_unlink VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(267)
525 #define __NR_sem_open VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(268)
526 #define __NR_sem_close VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(269)
527 #define __NR_sem_unlink VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(270)
528 #define __NR_sem_wait VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(271)
529 #define __NR_sem_trywait VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(272)
530 #define __NR_sem_post VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(273)
532 #if DARWIN_VERS < DARWIN_10_10
533 #define __NR_sem_getvalue VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(274)
534 #elif DARWIN_VERS >= DARWIN_10_10
535 #define __NR_sysctlbyname VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(274)
536 #endif
538 #define __NR_sem_init VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(275)
539 #define __NR_sem_destroy VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(276)
540 #define __NR_open_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(277)
541 #define __NR_umask_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(278)
542 #define __NR_stat_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(279)
543 #define __NR_lstat_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(280)
544 #define __NR_fstat_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(281)
545 #define __NR_chmod_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(282)
546 #define __NR_fchmod_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(283)
547 #define __NR_access_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(284)
548 #define __NR_settid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(285)
549 #define __NR_gettid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(286)
550 #define __NR_setsgroups VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(287)
551 #define __NR_getsgroups VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(288)
552 #define __NR_setwgroups VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(289)
553 #define __NR_getwgroups VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(290)
554 #define __NR_mkfifo_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(291)
555 #define __NR_mkdir_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(292)
556 #define __NR_identitysvc VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(293)
557 #define __NR_shared_region_check_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(294)
558 #define __NR_shared_region_map_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(295)
559 #if DARWIN_VERS >= DARWIN_10_6
560 #define __NR_vm_pressure_monitor VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(296)
561 #define __NR_psynch_rw_longrdlock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(297)
562 #define __NR_psynch_rw_yieldwrlock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(298)
563 #define __NR_psynch_rw_downgrade VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(299)
564 #define __NR_psynch_rw_upgrade VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(300)
565 #define __NR_psynch_mutexwait VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(301)
566 #define __NR_psynch_mutexdrop VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(302)
567 #define __NR_psynch_cvbroad VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(303)
568 #define __NR_psynch_cvsignal VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(304)
569 #define __NR_psynch_cvwait VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(305)
570 #define __NR_psynch_rw_rdlock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(306)
571 #define __NR_psynch_rw_wrlock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(307)
572 #define __NR_psynch_rw_unlock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(308)
573 #define __NR_psynch_rw_unlock2 VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(309)
574 #else
575 /* 296 old load_shared_file */
576 /* 297 old reset_shared_file */
577 /* 298 old new_system_shared_regions */
578 /* 299 old shared_region_map_file_np */
579 /* 300 old shared_region_make_private_np */
580 #define __NR___pthread_mutex_destroy VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(301)
581 #define __NR___pthread_mutex_init VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(302)
582 #define __NR___pthread_mutex_lock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(303)
583 #define __NR___pthread_mutex_trylock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(304)
584 #define __NR___pthread_mutex_unlock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(305)
585 #define __NR___pthread_cond_init VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(306)
586 #define __NR___pthread_cond_destroy VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(307)
587 #define __NR___pthread_cond_broadcast VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(308)
588 #define __NR___pthread_cond_signal VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(309)
589 #endif
590 #define __NR_getsid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(310)
591 #define __NR_settid_with_pid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(311)
592 #if DARWIN_VERS >= DARWIN_10_7
593 #define __NR_psynch_cvclrprepost VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(312)
594 #else
595 #define __NR___pthread_cond_timedwait VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(312)
596 #endif
597 #define __NR_aio_fsync VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(313)
598 #define __NR_aio_return VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(314)
599 #define __NR_aio_suspend VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(315)
600 #define __NR_aio_cancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(316)
601 #define __NR_aio_error VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(317)
602 #define __NR_aio_read VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(318)
603 #define __NR_aio_write VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(319)
604 #define __NR_lio_listio VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(320)
605 /* 321 */
606 #define __NR_iopolicysys VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(322)
607 #define __NR_process_policy VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(323)
608 #define __NR_mlockall VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(324)
609 #define __NR_munlockall VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(325)
610 /* 326 */
611 #define __NR_issetugid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(327)
612 #define __NR___pthread_kill VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(328)
613 #define __NR___pthread_sigmask VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(329)
614 #define __NR___sigwait VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(330)
615 #define __NR___disable_threadsignal VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(331)
616 #define __NR___pthread_markcancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(332)
617 #define __NR___pthread_canceled VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(333)
618 #define __NR___semwait_signal VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(334)
619 /* 335 old utrace */
620 #define __NR_proc_info VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(336)
621 #define __NR_sendfile VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(337)
622 #define __NR_stat64 VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(338)
623 #define __NR_fstat64 VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(339)
624 #define __NR_lstat64 VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(340)
625 #define __NR_stat64_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(341)
626 #define __NR_lstat64_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(342)
627 #define __NR_fstat64_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(343)
628 #define __NR_getdirentries64 VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(344)
629 #define __NR_statfs64 VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(345)
630 #define __NR_fstatfs64 VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(346)
631 #define __NR_getfsstat64 VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(347)
632 #define __NR___pthread_chdir VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(348)
633 #define __NR___pthread_fchdir VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(349)
635 #define __NR_audit VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(350)
636 #define __NR_auditon VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(351)
637 /* 352 */
638 #define __NR_getauid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(353)
639 #define __NR_setauid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(354)
640 #define __NR_getaudit VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(355)
641 #define __NR_setaudit VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(356)
642 #define __NR_getaudit_addr VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(357)
643 #define __NR_setaudit_addr VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(358)
644 #define __NR_auditctl VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(359)
645 #define __NR_bsdthread_create VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(360)
646 #define __NR_bsdthread_terminate VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(361)
647 #define __NR_kqueue VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(362)
648 #define __NR_kevent VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(363)
649 #define __NR_lchown VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(364)
650 #define __NR_stack_snapshot VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(365)
651 #define __NR_bsdthread_register VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(366)
652 #define __NR_workq_open VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(367)
653 #define __NR_workq_ops VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(368)
654 #if DARWIN_VERS >= DARWIN_10_6
655 #define __NR_kevent64 VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(369)
656 #else
657 /* 369 */
658 #endif
659 /* 370 */
660 /* 371 */
661 #if DARWIN_VERS >= DARWIN_10_6
662 #define __NR___thread_selfid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(372) // was UX64
663 #else
664 /* 372 */
665 #endif
666 /* 373 */
667 #if DARWIN_VERS >= DARWIN_10_11
668 #define __NR_kevent_qos VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(374)
669 #endif /* DARWIN_VERS >= DARWIN_10_11 */
670 #if DARWIN_VERS >= DARWIN_10_13
671 #define __NR_kevent_id VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(375)
672 #else
673 /* 375 */
674 #endif /* DARWIN_VERS >= DARWIN_10_13 */
675 /* 376 */
676 /* 377 */
677 /* 378 */
678 /* 379 */
679 #define __NR___mac_execve VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(380)
680 #define __NR___mac_syscall VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(381)
681 #define __NR___mac_get_file VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(382)
682 #define __NR___mac_set_file VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(383)
683 #define __NR___mac_get_link VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(384)
684 #define __NR___mac_set_link VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(385)
685 #define __NR___mac_get_proc VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(386)
686 #define __NR___mac_set_proc VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(387)
687 #define __NR___mac_get_fd VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(388)
688 #define __NR___mac_set_fd VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(389)
689 #define __NR___mac_get_pid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(390)
690 #define __NR___mac_get_lcid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(391)
691 #define __NR___mac_get_lctx VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(392)
692 #define __NR___mac_set_lctx VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(393)
694 #if DARWIN_VERS >= DARWIN_10_11
695 #define __NR_pselect VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(394)
696 #else
697 #define __NR_setlcid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(394)
698 #endif /* DARWIN_VERS >= DARWIN_10_11 */
700 #define __NR_getlcid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(395)
701 #define __NR_read_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(396)
702 #define __NR_write_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(397)
703 #define __NR_open_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(398)
704 #define __NR_close_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(399)
705 #define __NR_wait4_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(400)
706 #define __NR_recvmsg_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(401)
707 #define __NR_sendmsg_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(402)
708 #define __NR_recvfrom_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(403)
709 #define __NR_accept_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(404)
710 #define __NR_msync_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(405)
711 #define __NR_fcntl_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(406)
712 #define __NR_select_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(407)
713 #define __NR_fsync_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(408)
714 #define __NR_connect_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(409)
715 #define __NR_sigsuspend_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(410)
716 #define __NR_readv_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(411)
717 #define __NR_writev_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(412)
718 #define __NR_sendto_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(413)
719 #define __NR_pread_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(414)
720 #define __NR_pwrite_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(415)
721 #define __NR_waitid_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(416)
722 #define __NR_poll_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(417)
723 #define __NR_msgsnd_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(418)
724 #define __NR_msgrcv_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(419)
725 #define __NR_sem_wait_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(420)
726 #define __NR_aio_suspend_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(421)
727 #define __NR___sigwait_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(422)
728 #define __NR___semwait_signal_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(423)
729 #define __NR___mac_mount VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(424)
730 #define __NR___mac_get_mount VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(425)
731 #define __NR___mac_getfsstat VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(426)
732 #if DARWIN_VERS >= DARWIN_10_6
733 #define __NR_fsgetpath VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(427)
734 #define __NR_audit_session_self VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(428)
735 #define __NR_audit_session_join VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(429)
736 #endif /* DARWIN_VERS >= DARWIN_10_6 */
737 #if DARWIN_VERS >= DARWIN_10_9
738 #define __NR_fileport_makeport VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(430)
739 #define __NR_fileport_makefd VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(431)
740 #define __NR_audit_session_port VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(432)
741 #define __NR_pid_suspend VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(433)
742 #define __NR_pid_resume VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(434)
743 /* 435 */
744 /* 436 */
745 /* 437 */
746 #define __NR_shared_region_map_and_slide_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(438)
747 #define __NR_kas_info VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(439)
748 #define __NR_memorystatus_control VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(440)
749 #define __NR_guarded_open_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(441)
750 #define __NR_guarded_close_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(442)
751 #define __NR_guarded_kqueue_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(443)
752 #define __NR_change_fdguard_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(444)
753 /* 445 */
754 #define __NR_proc_rlimit_control VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(446)
755 #define __NR_connectx VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(447)
756 #define __NR_disconnectx VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(448)
757 #define __NR_peeloff VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(449)
758 #define __NR_socket_delegate VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(450)
759 #define __NR_telemetry VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(451)
760 #define __NR_proc_uuid_policy VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(452)
761 #define __NR_memorystatus_get_level VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(453)
762 #define __NR_system_override VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(454)
763 #define __NR_vfs_purge VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(455)
764 #endif /* DARWIN_VERS >= DARWIN_10_9 */
766 #if DARWIN_VERS >= DARWIN_10_10
767 #define __NR_necp_match_policy VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(460)
768 #define __NR_getattrlistbulk VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(461)
769 #endif /* DARWIN_VERS >= DARWIN_10_10 */
771 #if DARWIN_VERS >= DARWIN_10_12
772 #define __NR_clonefileat VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(462)
773 #endif /* DARWIN_VERS >= DARWIN_10_12 */
775 #if DARWIN_VERS >= DARWIN_10_10
776 #define __NR_faccessat VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(466)
777 #define __NR_fstatat64 VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(470)
778 #define __NR_readlinkat VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(473)
779 #define __NR_bsdthread_ctl VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(478)
780 #define __NR_csrctl VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(483)
781 #define __NR_guarded_open_dprotected_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(484)
782 #define __NR_guarded_write_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(485)
783 #define __NR_guarded_pwrite_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(486)
784 #define __NR_guarded_writev_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(487)
785 #endif /* DARWIN_VERS >= DARWIN_10_10 */
787 #if DARWIN_VERS >= DARWIN_10_12
788 #define __NR_renameatx_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(488)
789 #endif /* DARWIN_VERS >= DARWIN_10_12 */
790 /* 489 */
792 #if DARWIN_VERS >= DARWIN_10_11
793 #define __NR_netagent_trigger VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(490)
794 #define __NR_stack_snapshot_with_config VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(491)
795 #define __NR_microstackshot VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(492)
796 #define __NR_grab_pgo_data VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(493)
797 #define __NR_persona VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(494)
798 /* 495 */
799 /* 496 */
800 /* 497 */
801 /* 498 */
802 #define __NR_work_interval_ctl VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(499)
803 #endif /* DARWIN_VERS >= DARWIN_10_11 */
805 #if DARWIN_VERS >= DARWIN_10_12
806 #define __NR_getentropy VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(500)
807 #define __NR_necp_open VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(501)
808 #define __NR_necp_client_action VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(502)
809 /* 503 */
810 /* 504 */
811 /* 505 */
812 /* 506 */
813 /* 507 */
814 /* 508 */
815 /* 509 */
816 /* 510 */
817 /* 511 */
818 /* 512 */
819 /* 513 */
820 /* 514 */
821 #define __NR_ulock_wait VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(515)
822 #define __NR_ulock_wake VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(516)
823 #define __NR_fclonefileat VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(517)
824 #define __NR_fs_snapshot VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(518)
825 /* 519 */
826 #define __NR_terminate_with_payload VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(520)
827 #define __NR_abort_with_payload VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(521)
828 #endif /* DARWIN_VERS >= DARWIN_10_12 */
830 #if DARWIN_VERS >= DARWIN_10_13
831 #define __NR_necp_session_open VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(522)
832 #define __NR_necp_session_action VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(523)
833 #define __NR_setattrlistat VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(524)
834 #define __NR_net_qos_guideline VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(525)
835 #define __NR_fmount VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(526)
836 #define __NR_ntp_adjtime VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(527)
837 #define __NR_ntp_gettime VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(528)
838 #define __NR_os_fault_with_payload VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(529)
839 #endif /* DARWIN_VERS >= DARWIN_10_13 */
841 #if DARWIN_VERS < DARWIN_10_6
842 #define __NR_MAXSYSCALL VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(427)
843 #elif DARWIN_VERS < DARWIN_10_7
844 #define __NR_MAXSYSCALL VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(430)
845 #elif DARWIN_VERS < DARWIN_10_9
846 #define __NR_MAXSYSCALL VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(430)
847 #elif DARWIN_VERS == DARWIN_10_9
848 #define __NR_MAXSYSCALL VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(456)
849 #elif DARWIN_VERS == DARWIN_10_10
850 #define __NR_MAXSYSCALL VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(490)
851 #elif DARWIN_VERS == DARWIN_10_11
852 #define __NR_MAXSYSCALL VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(500)
853 #elif DARWIN_VERS == DARWIN_10_12
854 #define __NR_MAXSYSCALL VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(522)
855 #elif DARWIN_VERS == DARWIN_10_13
856 #define __NR_MAXSYSCALL VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(530)
857 #else
858 #error unknown darwin version
859 #endif
861 #define __NR_DARWIN_FAKE_SIGRETURN (1 + __NR_MAXSYSCALL)
863 #endif