Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:13:25

0001 
0002 /*--------------------------------------------------------------------*/
0003 /*--- System call numbers for Darwin.          vki-scnums-darwin.h ---*/
0004 /*--------------------------------------------------------------------*/
0005 
0006 /*
0007    This file is part of Valgrind, a dynamic binary instrumentation
0008    framework.
0009 
0010    Copyright (C) 2007-2017 Apple Inc.
0011       Greg Parker  gparker@apple.com
0012 
0013    This program is free software; you can redistribute it and/or
0014    modify it under the terms of the GNU General Public License as
0015    published by the Free Software Foundation; either version 2 of the
0016    License, or (at your option) any later version.
0017 
0018    This program is distributed in the hope that it will be useful, but
0019    WITHOUT ANY WARRANTY; without even the implied warranty of
0020    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0021    General Public License for more details.
0022 
0023    You should have received a copy of the GNU General Public License
0024    along with this program; if not, see <http://www.gnu.org/licenses/>.
0025 
0026    The GNU General Public License is contained in the file COPYING.
0027 */
0028 
0029 #ifndef __VKI_SCNUMS_DARWIN_H
0030 #define __VKI_SCNUMS_DARWIN_H
0031 
0032 
0033 // need DARWIN_10_x definitions
0034 #include "config.h"
0035 
0036 // osfmk/mach/i386/syscall_sw.h
0037 
0038 // There are two syscall number encodings in Darwin.
0039 //
0040 // The 64-bit encoding is that the top 8-bits are the syscall class.  The low
0041 // 24 are the syscall number (index) within that class.
0042 //
0043 // The 32-bit encoding is that the syscall number (index) is stored as-is and
0044 // the syscall class is encoded as the argument to the 'int' instruction used
0045 // to trigger the syscall:
0046 // - 0x80: Unix
0047 // - 0x81: Mach
0048 // - 0x82: Machine-dependent
0049 // - 0x83: Diagnostic
0050 // Furthermore, just to make life interesting, for Mach traps the number is
0051 // negative.
0052 //
0053 // Within Valgrind we only use the 64-bit encoding -- on 32-bit systems, we
0054 // convert any syscall number to 64-bit encoding when we receive it, and
0055 // convert back with VG_DARWIN_SYSNO_FOR_KERNEL when passing any syscall
0056 // number back to the kernel (__NR_something shouldn't be passed directly to
0057 // the kernel).
0058 //
0059 // Hack: x86 `int $0x80` (unix, 64-bit result) are special.
0060 // [I haven't worked out why... --njn]
0061 
0062 #define VG_DARWIN_SYSCALL_CLASS_SHIFT     24
0063 #define VG_DARWIN_SYSCALL_CLASS_MASK      (0xFF << VG_DARWIN_SYSCALL_CLASS_SHIFT)
0064 #define VG_DARWIN_SYSCALL_NUMBER_MASK     (~VG_DARWIN_SYSCALL_CLASS_MASK)
0065 
0066 #define VG_DARWIN_SYSCALL_CLASS_NONE      0       /* Invalid */
0067 #define VG_DARWIN_SYSCALL_CLASS_MACH      1       /* Mach */      
0068 #define VG_DARWIN_SYSCALL_CLASS_UNIX      2       /* Unix/BSD */
0069 #define VG_DARWIN_SYSCALL_CLASS_MDEP      3       /* Machine-dependent */
0070 #define VG_DARWIN_SYSCALL_CLASS_DIAG      4       /* Diagnostics */
0071 
0072 // Macros for encoding syscall numbers in the 64-bit encoding scheme.
0073 #define VG_DARWIN_SYSCALL_CONSTRUCT_MACH(syscall_number) \
0074     ((VG_DARWIN_SYSCALL_CLASS_MACH << VG_DARWIN_SYSCALL_CLASS_SHIFT) | \
0075      (VG_DARWIN_SYSCALL_NUMBER_MASK & (syscall_number)))
0076 
0077 #define VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(syscall_number) \
0078     ((VG_DARWIN_SYSCALL_CLASS_UNIX << VG_DARWIN_SYSCALL_CLASS_SHIFT) | \
0079      (VG_DARWIN_SYSCALL_NUMBER_MASK & (syscall_number)))
0080 
0081 #define VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(syscall_number) \
0082     ((VG_DARWIN_SYSCALL_CLASS_MDEP << VG_DARWIN_SYSCALL_CLASS_SHIFT) | \
0083      (VG_DARWIN_SYSCALL_NUMBER_MASK & (syscall_number)))
0084 
0085 #define VG_DARWIN_SYSCALL_CONSTRUCT_DIAG(syscall_number) \
0086     ((VG_DARWIN_SYSCALL_CLASS_DIAG << VG_DARWIN_SYSCALL_CLASS_SHIFT) | \
0087      (VG_DARWIN_SYSCALL_NUMBER_MASK & (syscall_number)))
0088 
0089 
0090 /* Macros for decoding syscall numbers from the 64-bit encoding scheme. */
0091 #define VG_DARWIN_SYSNO_INDEX(sysno) ((sysno) & VG_DARWIN_SYSCALL_NUMBER_MASK)
0092 #define VG_DARWIN_SYSNO_CLASS(sysno) ((sysno) >> VG_DARWIN_SYSCALL_CLASS_SHIFT)
0093 
0094 
0095 /* Macros for converting syscall numbers to the form expected by the kernel.*/
0096 #if defined(VGA_x86)
0097    // This converts the 64-bit syscall number encoding, which we use
0098    // throughout Valgrind, into the 32-bit syscall number encoding, which is
0099    // suitable for passing to the (32-bit) kernel.
0100 #  define VG_DARWIN_SYSNO_FOR_KERNEL(sysno) \
0101     ((VG_DARWIN_SYSNO_CLASS(sysno) == VG_DARWIN_SYSCALL_CLASS_MACH) \
0102     ? -VG_DARWIN_SYSNO_INDEX(sysno) \
0103     :  VG_DARWIN_SYSNO_INDEX(sysno) \
0104     )
0105 
0106 #elif defined(VGA_amd64)
0107    // For 64-bit systems, we don't need to do anything to the syscall number.
0108 #  define VG_DARWIN_SYSNO_FOR_KERNEL(sysno) (sysno)
0109 
0110 #else
0111 #  error Unknown architecture
0112 #endif
0113 
0114 
0115 // mdep syscalls
0116 
0117 #if defined(VGA_x86)
0118 
0119 // osfmk/i386/machdep_call.c
0120 // DDD: the last two are BSD_CALL instead of CALL...
0121 //#define __NR_thread_get_cthread_self      VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(0)
0122 //#define __NR_thread_set_cthread_self      VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(1)
0123 // 2 is invalid
0124 #define __NR_thread_fast_set_cthread_self VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(3)
0125 //#define __NR_thread_set_user_ldt          VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(4)
0126 //#define __NR_i386_set_ldt                 VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(5)
0127 //#define __NR_i386_get_ldt                 VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(6)
0128 
0129 #elif defined(VGA_amd64)
0130 
0131 // osfmk/i386/machdep_call.c
0132 // 0, 1, 2 are invalid
0133 #define __NR_thread_fast_set_cthread_self VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(3)
0134 // 4, 5, 6 are invalid
0135 
0136 #else
0137 #  error unknown architecture
0138 #endif
0139 
0140 
0141 // osfmk/mach/syscall_sw.h
0142 
0143 #define __NR_kernelrpc_mach_vm_allocate_trap         VG_DARWIN_SYSCALL_CONSTRUCT_MACH(10)
0144 
0145 #define __NR_kernelrpc_mach_vm_deallocate_trap       VG_DARWIN_SYSCALL_CONSTRUCT_MACH(12)
0146 
0147 #define __NR_kernelrpc_mach_vm_protect_trap          VG_DARWIN_SYSCALL_CONSTRUCT_MACH(14)
0148 #define __NR_kernelrpc_mach_vm_map_trap              VG_DARWIN_SYSCALL_CONSTRUCT_MACH(15)
0149 #define __NR_kernelrpc_mach_port_allocate_trap       VG_DARWIN_SYSCALL_CONSTRUCT_MACH(16)
0150 #define __NR_kernelrpc_mach_port_destroy_trap        VG_DARWIN_SYSCALL_CONSTRUCT_MACH(17)
0151 #define __NR_kernelrpc_mach_port_deallocate_trap     VG_DARWIN_SYSCALL_CONSTRUCT_MACH(18)
0152 #define __NR_kernelrpc_mach_port_mod_refs_trap       VG_DARWIN_SYSCALL_CONSTRUCT_MACH(19)
0153 #define __NR_kernelrpc_mach_port_move_member_trap    VG_DARWIN_SYSCALL_CONSTRUCT_MACH(20)
0154 #define __NR_kernelrpc_mach_port_insert_right_trap   VG_DARWIN_SYSCALL_CONSTRUCT_MACH(21)
0155 #define __NR_kernelrpc_mach_port_insert_member_trap  VG_DARWIN_SYSCALL_CONSTRUCT_MACH(22)
0156 #define __NR_kernelrpc_mach_port_extract_member_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(23)
0157 #define __NR_kernelrpc_mach_port_construct_trap      VG_DARWIN_SYSCALL_CONSTRUCT_MACH(24)
0158 #define __NR_kernelrpc_mach_port_destruct_trap       VG_DARWIN_SYSCALL_CONSTRUCT_MACH(25)
0159 
0160 
0161 #define __NR_mach_reply_port                  VG_DARWIN_SYSCALL_CONSTRUCT_MACH(26)
0162 #define __NR_thread_self_trap                 VG_DARWIN_SYSCALL_CONSTRUCT_MACH(27)
0163 #define __NR_task_self_trap                   VG_DARWIN_SYSCALL_CONSTRUCT_MACH(28)
0164 #define __NR_host_self_trap                   VG_DARWIN_SYSCALL_CONSTRUCT_MACH(29)
0165 
0166 #define __NR_mach_msg_trap                    VG_DARWIN_SYSCALL_CONSTRUCT_MACH(31)
0167 #define __NR_mach_msg_overwrite_trap          VG_DARWIN_SYSCALL_CONSTRUCT_MACH(32)
0168 #define __NR_semaphore_signal_trap            VG_DARWIN_SYSCALL_CONSTRUCT_MACH(33)
0169 #define __NR_semaphore_signal_all_trap        VG_DARWIN_SYSCALL_CONSTRUCT_MACH(34)
0170 #define __NR_semaphore_signal_thread_trap     VG_DARWIN_SYSCALL_CONSTRUCT_MACH(35)
0171 #define __NR_semaphore_wait_trap              VG_DARWIN_SYSCALL_CONSTRUCT_MACH(36)
0172 #define __NR_semaphore_wait_signal_trap       VG_DARWIN_SYSCALL_CONSTRUCT_MACH(37)
0173 #define __NR_semaphore_timedwait_trap         VG_DARWIN_SYSCALL_CONSTRUCT_MACH(38)
0174 #define __NR_semaphore_timedwait_signal_trap  VG_DARWIN_SYSCALL_CONSTRUCT_MACH(39)
0175 
0176 #if DARWIN_VERS >= DARWIN_10_9
0177 #define __NR_kernelrpc_mach_port_guard_trap   VG_DARWIN_SYSCALL_CONSTRUCT_MACH(41)
0178 #define __NR_kernelrpc_mach_port_unguard_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(42)
0179 #endif
0180 
0181 #if DARWIN_VERS >= DARWIN_10_12
0182 #define __NR_mach_generate_activity_id        VG_DARWIN_SYSCALL_CONSTRUCT_MACH(43)
0183 #elif defined(VGA_x86) || DARWIN_VERS == DARWIN_10_9
0184 #define __NR_map_fd                           VG_DARWIN_SYSCALL_CONSTRUCT_MACH(43)
0185 #endif
0186 
0187 #define __NR_task_name_for_pid                VG_DARWIN_SYSCALL_CONSTRUCT_MACH(44)
0188 #define __NR_task_for_pid                     VG_DARWIN_SYSCALL_CONSTRUCT_MACH(45)
0189 #define __NR_pid_for_task                     VG_DARWIN_SYSCALL_CONSTRUCT_MACH(46)
0190 
0191 #if defined(VGA_x86)
0192 #define __NR_macx_swapon                      VG_DARWIN_SYSCALL_CONSTRUCT_MACH(48)
0193 #define __NR_macx_swapoff                     VG_DARWIN_SYSCALL_CONSTRUCT_MACH(49)
0194 #endif
0195 
0196 #if DARWIN_VERS >= DARWIN_10_13
0197 #define __NR_thread_get_special_reply_port    VG_DARWIN_SYSCALL_CONSTRUCT_MACH(50)
0198 #endif /* DARWIN_VERS >= DARWIN_10_13 */
0199 
0200 #if defined(VGA_x86)
0201 #define __NR_macx_triggers                    VG_DARWIN_SYSCALL_CONSTRUCT_MACH(51)
0202 #define __NR_macx_backing_store_suspend       VG_DARWIN_SYSCALL_CONSTRUCT_MACH(52)
0203 #define __NR_macx_backing_store_recovery      VG_DARWIN_SYSCALL_CONSTRUCT_MACH(53)
0204 #endif
0205 
0206 #define __NR_swtch_pri                        VG_DARWIN_SYSCALL_CONSTRUCT_MACH(59)
0207 #define __NR_swtch                            VG_DARWIN_SYSCALL_CONSTRUCT_MACH(60)
0208 #define __NR_sched_yield  __NR_swtch  /* linux-alike name */
0209 #define __NR_syscall_thread_switch            VG_DARWIN_SYSCALL_CONSTRUCT_MACH(61)
0210 #define __NR_clock_sleep_trap                 VG_DARWIN_SYSCALL_CONSTRUCT_MACH(62)
0211 
0212 #if DARWIN_VERS >= DARWIN_10_12
0213 #define __NR_host_create_mach_voucher_trap    VG_DARWIN_SYSCALL_CONSTRUCT_MACH(70)
0214 #endif
0215 
0216 #define __NR_mach_timebase_info               VG_DARWIN_SYSCALL_CONSTRUCT_MACH(89)
0217 #define __NR_mach_wait_until                  VG_DARWIN_SYSCALL_CONSTRUCT_MACH(90)
0218 #define __NR_mk_timer_create                  VG_DARWIN_SYSCALL_CONSTRUCT_MACH(91)
0219 #define __NR_mk_timer_destroy                 VG_DARWIN_SYSCALL_CONSTRUCT_MACH(92)
0220 #define __NR_mk_timer_arm                     VG_DARWIN_SYSCALL_CONSTRUCT_MACH(93)
0221 #define __NR_mk_timer_cancel                  VG_DARWIN_SYSCALL_CONSTRUCT_MACH(94)
0222 
0223 #define __NR_iokit_user_client_trap           VG_DARWIN_SYSCALL_CONSTRUCT_MACH(100)
0224 
0225 
0226 // bsd/sys/syscall.h
0227  
0228 #define __NR_syscall        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(0)
0229 #define __NR_exit           VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(1)
0230 #define __NR_fork           VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(2) // was UX64
0231 #define __NR_read           VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(3)
0232 #define __NR_write          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(4)
0233 #define __NR_open           VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(5)
0234 #define __NR_close          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(6)
0235 #define __NR_wait4          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(7)
0236             /* 8  old creat */
0237 #define __NR_link           VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(9)
0238 #define __NR_unlink         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(10)
0239             /* 11  old execv */
0240 #define __NR_chdir          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(12)
0241 #define __NR_fchdir         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(13)
0242 #define __NR_mknod          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(14)
0243 #define __NR_chmod          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(15)
0244 #define __NR_chown          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(16)
0245             /* 17  old break */
0246 #define __NR_getfsstat      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(18)
0247             /* 19  old lseek */
0248 #define __NR_getpid         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(20)
0249             /* 21  old mount */
0250             /* 22  old umount */
0251 #define __NR_setuid         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(23)
0252 #define __NR_getuid         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(24)
0253 #define __NR_geteuid        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(25)
0254 #define __NR_ptrace         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(26)
0255 #define __NR_recvmsg        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(27)
0256 #define __NR_sendmsg        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(28)
0257 #define __NR_recvfrom       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(29)
0258 #define __NR_accept         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(30)
0259 #define __NR_getpeername    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(31)
0260 #define __NR_getsockname    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(32)
0261 #define __NR_access         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(33)
0262 #define __NR_chflags        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(34)
0263 #define __NR_fchflags       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(35)
0264 #define __NR_sync           VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(36)
0265 #define __NR_kill           VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(37)
0266             /* 38  old stat */
0267 #define __NR_getppid        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(39)
0268             /* 40  old lstat */
0269 #define __NR_dup            VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(41)
0270 #define __NR_pipe           VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(42) // was UX64
0271 #define __NR_getegid        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(43)
0272 #define __NR_profil         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(44)
0273             /* 45  old ktrace */
0274 #define __NR_sigaction      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(46)
0275 #define __NR_getgid         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(47)
0276 #define __NR_sigprocmask    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(48)
0277 #define __NR_getlogin       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(49)
0278 #define __NR_setlogin       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(50)
0279 #define __NR_acct           VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(51)
0280 #define __NR_sigpending     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(52)
0281 #define __NR_sigaltstack    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(53)
0282 #define __NR_ioctl          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(54)
0283 #define __NR_reboot         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(55)
0284 #define __NR_revoke         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(56)
0285 #define __NR_symlink        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(57)
0286 #define __NR_readlink       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(58)
0287 #define __NR_execve         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(59)
0288 #define __NR_umask          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(60)
0289 #define __NR_chroot         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(61)
0290             /* 62  old fstat */
0291             /* 63  used internally , reserved */
0292             /* 64  old getpagesize */
0293 #define __NR_msync          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(65)
0294 #define __NR_vfork          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(66)
0295             /* 67  old vread */
0296             /* 68  old vwrite */
0297             /* 69  old sbrk */
0298             /* 70  old sstk */
0299             /* 71  old mmap */
0300             /* 72  old vadvise */
0301 #define __NR_munmap         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(73)
0302 #define __NR_mprotect       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(74)
0303 #define __NR_madvise        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(75)
0304             /* 76  old vhangup */
0305             /* 77  old vlimit */
0306 #define __NR_mincore        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(78)
0307 #define __NR_getgroups      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(79)
0308 #define __NR_setgroups      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(80)
0309 #define __NR_getpgrp        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(81)
0310 #define __NR_setpgid        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(82)
0311 #define __NR_setitimer      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(83)
0312             /* 84  old wait */
0313 #define __NR_swapon         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(85)
0314 #define __NR_getitimer      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(86)
0315             /* 87  old gethostname */
0316             /* 88  old sethostname */
0317 #define __NR_getdtablesize  VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(89)
0318 #define __NR_dup2           VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(90)
0319             /* 91  old getdopt */
0320 #define __NR_fcntl          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(92)
0321 #define __NR_select         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(93)
0322             /* 94  old setdopt */
0323 #define __NR_fsync          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(95)
0324 #define __NR_setpriority    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(96)
0325 #define __NR_socket         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(97)
0326 #define __NR_connect        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(98)
0327             /* 99  old accept */
0328 #define __NR_getpriority    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(100)
0329             /* 101  old send */
0330             /* 102  old recv */
0331             /* 103  old sigreturn */
0332 #define __NR_bind           VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(104)
0333 #define __NR_setsockopt     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(105)
0334 #define __NR_listen         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(106)
0335             /* 107  old vtimes */
0336             /* 108  old sigvec */
0337             /* 109  old sigblock */
0338             /* 110  old sigsetmask */
0339 #define __NR_sigsuspend     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(111)
0340             /* 112  old sigstack */
0341             /* 113  old recvmsg */
0342             /* 114  old sendmsg */
0343             /* 115  old vtrace */
0344 #define __NR_gettimeofday   VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(116)
0345 #define __NR_getrusage      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(117)
0346 #define __NR_getsockopt     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(118)
0347             /* 119  old resuba */
0348 #define __NR_readv          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(120)
0349 #define __NR_writev         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(121)
0350 #define __NR_settimeofday   VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(122)
0351 #define __NR_fchown         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(123)
0352 #define __NR_fchmod         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(124)
0353             /* 125  old recvfrom */
0354 #define __NR_setreuid       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(126)
0355 #define __NR_setregid       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(127)
0356 #define __NR_rename         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(128)
0357             /* 129  old truncate */
0358             /* 130  old ftruncate */
0359 #define __NR_flock          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(131)
0360 #define __NR_mkfifo         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(132)
0361 #define __NR_sendto         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(133)
0362 #define __NR_shutdown       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(134)
0363 #define __NR_socketpair     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(135)
0364 #define __NR_mkdir          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(136)
0365 #define __NR_rmdir          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(137)
0366 #define __NR_utimes         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(138)
0367 #define __NR_futimes        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(139)
0368 #define __NR_adjtime        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(140)
0369             /* 141  old getpeername */
0370 #define __NR_gethostuuid    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(142)
0371             /* 143  old sethostid */
0372             /* 144  old getrlimit */
0373             /* 145  old setrlimit */
0374             /* 146  old killpg */
0375 #define __NR_setsid         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(147)
0376             /* 148  old setquota */
0377             /* 149  old qquota */
0378             /* 150  old getsockname */
0379 #define __NR_getpgid        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(151)
0380 #define __NR_setprivexec    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(152)
0381 #define __NR_pread          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(153)
0382 #define __NR_pwrite         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(154)
0383 #define __NR_nfssvc         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(155)
0384             /* 156  old getdirentries */
0385 #define __NR_statfs         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(157)
0386 #define __NR_fstatfs        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(158)
0387 #define __NR_unmount        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(159)
0388             /* 160  old async_daemon */
0389 #define __NR_getfh          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(161)
0390             /* 162  old getdomainname */
0391             /* 163  old setdomainname */
0392             /* 164  */
0393 #define __NR_quotactl       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(165)
0394             /* 166  old exportfs */
0395 #define __NR_mount          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(167)
0396             /* 168  old ustat */
0397 #define __NR_csops          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(169)
0398             /* 170  old table */
0399             /* 171  old wait3 */
0400             /* 172  old rpause */
0401 #define __NR_waitid         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(173)
0402             /* 174  old getdents */
0403             /* 175  old gc_control */
0404 #define __NR_add_profil     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(176)
0405 
0406 #if DARWIN_VERS >= DARWIN_10_12
0407 #define __NR_kdebug_typefilter VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(177)
0408 #endif /* DARWIN_VERS >= DARWIN_10_12 */
0409 #if DARWIN_VERS >= DARWIN_10_11
0410 #define __NR_kdebug_trace_string VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(178)
0411 #endif /* DARWIN_VERS >= DARWIN_10_11 */
0412             /* 179  */
0413 #define __NR_kdebug_trace   VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(180)
0414 #define __NR_setgid         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(181)
0415 #define __NR_setegid        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(182)
0416 #define __NR_seteuid        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(183)
0417 #define __NR_sigreturn      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(184)
0418 #define __NR_chud           VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(185)
0419 #if DARWIN_VERS >= DARWIN_10_13
0420 #define __NR_thread_selfcounts      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(186)
0421 #else
0422             /* 186  */
0423 #endif /* DARWIN_VERS >= DARWIN_10_13 */
0424 #if DARWIN_VERS >= DARWIN_10_6
0425 #define __NR_fdatasync      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(187)
0426 #else
0427             /* 187  */
0428 #endif
0429 #define __NR_stat           VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(188)
0430 #define __NR_fstat          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(189)
0431 #define __NR_lstat          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(190)
0432 #define __NR_pathconf       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(191)
0433 #define __NR_fpathconf      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(192)
0434             /* 193 */
0435 #define __NR_getrlimit      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(194)
0436 #define __NR_setrlimit      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(195)
0437 #define __NR_getdirentries  VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(196)
0438 #define __NR_mmap           VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(197)
0439             /* 198  __syscall */
0440 #define __NR_lseek          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(199) // was UX64
0441 #define __NR_truncate       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(200)
0442 #define __NR_ftruncate      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(201)
0443 #define __NR___sysctl       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(202)
0444 #define __NR_mlock          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(203)
0445 #define __NR_munlock        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(204)
0446 #define __NR_undelete       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(205)
0447 #define __NR_ATsocket       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(206)
0448 #define __NR_ATgetmsg       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(207)
0449 #define __NR_ATputmsg       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(208)
0450 #define __NR_ATPsndreq      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(209)
0451 #define __NR_ATPsndrsp      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(210)
0452 #define __NR_ATPgetreq      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(211)
0453 #define __NR_ATPgetrsp      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(212)
0454             /* 213  Reserved for AppleTalk */
0455 #if DARWIN_VERS >= DARWIN_10_6
0456                         /* 214  old kqueue_from_portset_np*/
0457                         /* 215  old kqueue_portset_np*/
0458 #else
0459 #define __NR_kqueue_from_portset_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(214)
0460 #define __NR_kqueue_portset_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(215)
0461 #endif
0462 #define __NR_mkcomplex      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(216)
0463 #define __NR_statv          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(217)
0464 #define __NR_lstatv         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(218)
0465 #define __NR_fstatv         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(219)
0466 #define __NR_getattrlist    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(220)
0467 #define __NR_setattrlist    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(221)
0468 #define __NR_getdirentriesattr VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(222)
0469 #define __NR_exchangedata   VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(223)
0470             /* 224  old checkuseraccess */
0471 #define __NR_searchfs       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(225)
0472 #define __NR_delete         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(226)
0473 #define __NR_copyfile       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(227)
0474 #if DARWIN_VERS >= DARWIN_10_6
0475 #define __NR_fgetattrlist   VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(228)
0476 #define __NR_fsetattrlist   VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(229)
0477 #else
0478             /* 228  */
0479             /* 229  */
0480 #endif
0481 #define __NR_poll           VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(230)
0482 #define __NR_watchevent     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(231)
0483 #define __NR_waitevent      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(232)
0484 #define __NR_modwatch       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(233)
0485 #define __NR_getxattr       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(234)
0486 #define __NR_fgetxattr      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(235)
0487 #define __NR_setxattr       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(236)
0488 #define __NR_fsetxattr      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(237)
0489 #define __NR_removexattr    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(238)
0490 #define __NR_fremovexattr   VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(239)
0491 #define __NR_listxattr      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(240)
0492 #define __NR_flistxattr     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(241)
0493 #define __NR_fsctl          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(242)
0494 #define __NR_initgroups     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(243)
0495 #define __NR_posix_spawn    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(244)
0496 #if DARWIN_VERS >= DARWIN_10_6
0497 #define __NR_ffsctl         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(245)
0498 #else
0499             /* 245  */
0500 #endif
0501             /* 246  */
0502 #define __NR_nfsclnt        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(247)
0503 #define __NR_fhopen         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(248)
0504             /* 249  */
0505 #define __NR_minherit       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(250)
0506 #define __NR_semsys         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(251)
0507 #define __NR_msgsys         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(252)
0508 #define __NR_shmsys         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(253)
0509 #define __NR_semctl         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(254)
0510 #define __NR_semget         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(255)
0511 #define __NR_semop          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(256)
0512             /* 257  */
0513 #define __NR_msgctl         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(258)
0514 #define __NR_msgget         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(259)
0515 #define __NR_msgsnd         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(260)
0516 #define __NR_msgrcv         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(261)
0517 #define __NR_shmat          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(262)
0518 #define __NR_shmctl         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(263)
0519 #define __NR_shmdt          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(264)
0520 #define __NR_shmget         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(265)
0521 #define __NR_shm_open       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(266)
0522 #define __NR_shm_unlink     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(267)
0523 #define __NR_sem_open       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(268)
0524 #define __NR_sem_close      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(269)
0525 #define __NR_sem_unlink     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(270)
0526 #define __NR_sem_wait       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(271)
0527 #define __NR_sem_trywait    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(272)
0528 #define __NR_sem_post       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(273)
0529 
0530 #if DARWIN_VERS < DARWIN_10_10
0531 #define __NR_sem_getvalue   VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(274)
0532 #elif DARWIN_VERS >= DARWIN_10_10
0533 #define __NR_sysctlbyname   VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(274)
0534 #endif
0535 
0536 #define __NR_sem_init       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(275)
0537 #define __NR_sem_destroy    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(276)
0538 #define __NR_open_extended  VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(277)
0539 #define __NR_umask_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(278)
0540 #define __NR_stat_extended  VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(279)
0541 #define __NR_lstat_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(280)
0542 #define __NR_fstat_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(281)
0543 #define __NR_chmod_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(282)
0544 #define __NR_fchmod_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(283)
0545 #define __NR_access_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(284)
0546 #define __NR_settid         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(285)
0547 #define __NR_gettid         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(286)
0548 #define __NR_setsgroups     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(287)
0549 #define __NR_getsgroups     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(288)
0550 #define __NR_setwgroups     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(289)
0551 #define __NR_getwgroups     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(290)
0552 #define __NR_mkfifo_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(291)
0553 #define __NR_mkdir_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(292)
0554 #define __NR_identitysvc    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(293)
0555 #define __NR_shared_region_check_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(294)
0556 #define __NR_shared_region_map_np   VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(295)
0557 #if DARWIN_VERS >= DARWIN_10_6
0558 #define __NR_vm_pressure_monitor    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(296)
0559 #define __NR_psynch_rw_longrdlock   VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(297)
0560 #define __NR_psynch_rw_yieldwrlock  VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(298)
0561 #define __NR_psynch_rw_downgrade    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(299)
0562 #define __NR_psynch_rw_upgrade      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(300)
0563 #define __NR_psynch_mutexwait       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(301)
0564 #define __NR_psynch_mutexdrop       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(302)
0565 #define __NR_psynch_cvbroad         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(303)
0566 #define __NR_psynch_cvsignal        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(304)
0567 #define __NR_psynch_cvwait          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(305)
0568 #define __NR_psynch_rw_rdlock       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(306)
0569 #define __NR_psynch_rw_wrlock       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(307)
0570 #define __NR_psynch_rw_unlock       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(308)
0571 #define __NR_psynch_rw_unlock2      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(309)
0572 #else
0573             /* 296  old load_shared_file */
0574             /* 297  old reset_shared_file */
0575             /* 298  old new_system_shared_regions */
0576             /* 299  old shared_region_map_file_np */
0577             /* 300  old shared_region_make_private_np */
0578 #define __NR___pthread_mutex_destroy  VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(301)
0579 #define __NR___pthread_mutex_init     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(302)
0580 #define __NR___pthread_mutex_lock     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(303)
0581 #define __NR___pthread_mutex_trylock  VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(304)
0582 #define __NR___pthread_mutex_unlock   VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(305)
0583 #define __NR___pthread_cond_init      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(306)
0584 #define __NR___pthread_cond_destroy   VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(307)
0585 #define __NR___pthread_cond_broadcast VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(308)
0586 #define __NR___pthread_cond_signal    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(309)
0587 #endif
0588 #define __NR_getsid         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(310)
0589 #define __NR_settid_with_pid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(311)
0590 #if DARWIN_VERS >= DARWIN_10_7
0591 #define __NR_psynch_cvclrprepost VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(312)
0592 #else
0593 #define __NR___pthread_cond_timedwait VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(312)
0594 #endif
0595 #define __NR_aio_fsync      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(313)
0596 #define __NR_aio_return     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(314)
0597 #define __NR_aio_suspend    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(315)
0598 #define __NR_aio_cancel     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(316)
0599 #define __NR_aio_error      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(317)
0600 #define __NR_aio_read       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(318)
0601 #define __NR_aio_write      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(319)
0602 #define __NR_lio_listio     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(320)
0603             /* 321 */
0604 #define __NR_iopolicysys    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(322)
0605 #define __NR_process_policy VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(323)
0606 #define __NR_mlockall       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(324)
0607 #define __NR_munlockall     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(325)
0608             /* 326  */
0609 #define __NR_issetugid      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(327)
0610 #define __NR___pthread_kill VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(328)
0611 #define __NR___pthread_sigmask VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(329)
0612 #define __NR___sigwait        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(330)
0613 #define __NR___disable_threadsignal VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(331)
0614 #define __NR___pthread_markcancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(332)
0615 #define __NR___pthread_canceled VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(333)
0616 #define __NR___semwait_signal VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(334)
0617             /* 335  old utrace */
0618 #define __NR_proc_info      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(336)
0619 #define __NR_sendfile       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(337)
0620 #define __NR_stat64         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(338)
0621 #define __NR_fstat64        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(339)
0622 #define __NR_lstat64        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(340)
0623 #define __NR_stat64_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(341)
0624 #define __NR_lstat64_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(342)
0625 #define __NR_fstat64_extended VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(343)
0626 #define __NR_getdirentries64 VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(344)
0627 #define __NR_statfs64       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(345)
0628 #define __NR_fstatfs64      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(346)
0629 #define __NR_getfsstat64    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(347)
0630 #define __NR___pthread_chdir VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(348)
0631 #define __NR___pthread_fchdir VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(349)
0632 
0633 #define __NR_audit          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(350)
0634 #define __NR_auditon        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(351)
0635             /* 352  */
0636 #define __NR_getauid        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(353)
0637 #define __NR_setauid        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(354)
0638 #define __NR_getaudit       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(355)
0639 #define __NR_setaudit       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(356)
0640 #define __NR_getaudit_addr  VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(357)
0641 #define __NR_setaudit_addr  VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(358)
0642 #define __NR_auditctl       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(359)
0643 #define __NR_bsdthread_create VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(360)
0644 #define __NR_bsdthread_terminate VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(361)
0645 #define __NR_kqueue         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(362)
0646 #define __NR_kevent         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(363)
0647 #define __NR_lchown         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(364)
0648 #define __NR_stack_snapshot VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(365)
0649 #define __NR_bsdthread_register VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(366)
0650 #define __NR_workq_open     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(367)
0651 #define __NR_workq_ops      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(368)
0652 #if DARWIN_VERS >= DARWIN_10_6
0653 #define __NR_kevent64       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(369)
0654 #else
0655             /* 369  */
0656 #endif
0657             /* 370  */
0658             /* 371  */
0659 #if DARWIN_VERS >= DARWIN_10_6
0660 #define __NR___thread_selfid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(372)  // was UX64
0661 #else
0662             /* 372  */
0663 #endif
0664             /* 373  */
0665 #if DARWIN_VERS >= DARWIN_10_11
0666 #define __NR_kevent_qos             VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(374)
0667 #endif /* DARWIN_VERS >= DARWIN_10_11 */
0668 #if DARWIN_VERS >= DARWIN_10_13
0669 #define __NR_kevent_id              VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(375)
0670 #else
0671             /* 375  */
0672 #endif /* DARWIN_VERS >= DARWIN_10_13 */
0673             /* 376  */
0674             /* 377  */
0675             /* 378  */
0676             /* 379  */
0677 #define __NR___mac_execve   VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(380)
0678 #define __NR___mac_syscall  VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(381)
0679 #define __NR___mac_get_file VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(382)
0680 #define __NR___mac_set_file VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(383)
0681 #define __NR___mac_get_link VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(384)
0682 #define __NR___mac_set_link VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(385)
0683 #define __NR___mac_get_proc VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(386)
0684 #define __NR___mac_set_proc VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(387)
0685 #define __NR___mac_get_fd   VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(388)
0686 #define __NR___mac_set_fd   VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(389)
0687 #define __NR___mac_get_pid  VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(390)
0688 #define __NR___mac_get_lcid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(391)
0689 #define __NR___mac_get_lctx VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(392)
0690 #define __NR___mac_set_lctx VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(393)
0691 
0692 #if DARWIN_VERS >= DARWIN_10_11
0693 #define __NR_pselect        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(394)
0694 #else
0695 #define __NR_setlcid        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(394)
0696 #endif /* DARWIN_VERS >= DARWIN_10_11 */
0697 
0698 #define __NR_getlcid        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(395)
0699 #define __NR_read_nocancel          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(396)
0700 #define __NR_write_nocancel         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(397)
0701 #define __NR_open_nocancel          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(398)
0702 #define __NR_close_nocancel         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(399)
0703 #define __NR_wait4_nocancel         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(400)
0704 #define __NR_recvmsg_nocancel       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(401)
0705 #define __NR_sendmsg_nocancel       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(402)
0706 #define __NR_recvfrom_nocancel      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(403)
0707 #define __NR_accept_nocancel        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(404)
0708 #define __NR_msync_nocancel         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(405)
0709 #define __NR_fcntl_nocancel         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(406)
0710 #define __NR_select_nocancel        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(407)
0711 #define __NR_fsync_nocancel         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(408)
0712 #define __NR_connect_nocancel       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(409)
0713 #define __NR_sigsuspend_nocancel    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(410)
0714 #define __NR_readv_nocancel         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(411)
0715 #define __NR_writev_nocancel        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(412)
0716 #define __NR_sendto_nocancel        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(413)
0717 #define __NR_pread_nocancel         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(414)
0718 #define __NR_pwrite_nocancel        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(415)
0719 #define __NR_waitid_nocancel        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(416)
0720 #define __NR_poll_nocancel          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(417)
0721 #define __NR_msgsnd_nocancel        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(418)
0722 #define __NR_msgrcv_nocancel        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(419)
0723 #define __NR_sem_wait_nocancel      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(420)
0724 #define __NR_aio_suspend_nocancel   VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(421)
0725 #define __NR___sigwait_nocancel     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(422)
0726 #define __NR___semwait_signal_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(423)
0727 #define __NR___mac_mount            VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(424)
0728 #define __NR___mac_get_mount        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(425)
0729 #define __NR___mac_getfsstat        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(426)
0730 #if DARWIN_VERS >= DARWIN_10_6
0731 #define __NR_fsgetpath              VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(427)
0732 #define __NR_audit_session_self     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(428)
0733 #define __NR_audit_session_join     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(429)
0734 #endif /* DARWIN_VERS >= DARWIN_10_6 */
0735 #if DARWIN_VERS >= DARWIN_10_9
0736 #define __NR_fileport_makeport      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(430)
0737 #define __NR_fileport_makefd        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(431)
0738 #define __NR_audit_session_port     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(432)
0739 #define __NR_pid_suspend            VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(433)
0740 #define __NR_pid_resume             VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(434)
0741             /* 435  */
0742             /* 436  */
0743             /* 437  */
0744 #define __NR_shared_region_map_and_slide_np  VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(438)
0745 #define __NR_kas_info               VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(439)
0746 #define __NR_memorystatus_control   VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(440)
0747 #define __NR_guarded_open_np        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(441)
0748 #define __NR_guarded_close_np       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(442)
0749 #define __NR_guarded_kqueue_np      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(443)
0750 #define __NR_change_fdguard_np      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(444)
0751             /* 445  */
0752 #define __NR_proc_rlimit_control    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(446)
0753 #define __NR_connectx               VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(447)
0754 #define __NR_disconnectx            VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(448)
0755 #define __NR_peeloff                VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(449)
0756 #define __NR_socket_delegate        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(450)
0757 #define __NR_telemetry              VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(451)
0758 #define __NR_proc_uuid_policy       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(452)
0759 #define __NR_memorystatus_get_level VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(453)
0760 #define __NR_system_override        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(454)
0761 #define __NR_vfs_purge              VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(455)
0762 #endif /* DARWIN_VERS >= DARWIN_10_9 */
0763 
0764 #if DARWIN_VERS >= DARWIN_10_10
0765 #define __NR_necp_match_policy      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(460)
0766 #define __NR_getattrlistbulk        VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(461)
0767 #endif /* DARWIN_VERS >= DARWIN_10_10 */
0768 
0769 #if DARWIN_VERS >= DARWIN_10_12
0770 #define __NR_clonefileat            VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(462)
0771 #endif /* DARWIN_VERS >= DARWIN_10_12 */
0772 
0773 #if DARWIN_VERS >= DARWIN_10_10
0774 #define __NR_faccessat              VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(466)
0775 #define __NR_fstatat64              VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(470)
0776 #define __NR_readlinkat             VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(473)
0777 #define __NR_bsdthread_ctl          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(478)
0778 #define __NR_csrctl                 VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(483)
0779 #define __NR_guarded_open_dprotected_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(484)
0780 #define __NR_guarded_write_np       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(485)
0781 #define __NR_guarded_pwrite_np      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(486)
0782 #define __NR_guarded_writev_np      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(487)
0783 #endif /* DARWIN_VERS >= DARWIN_10_10 */
0784 
0785 #if DARWIN_VERS >= DARWIN_10_12
0786 #define __NR_renameatx_np           VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(488)
0787 #endif /* DARWIN_VERS >= DARWIN_10_12 */
0788             /* 489  */
0789 
0790 #if DARWIN_VERS >= DARWIN_10_11
0791 #define __NR_netagent_trigger       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(490)
0792 #define __NR_stack_snapshot_with_config       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(491)
0793 #define __NR_microstackshot         VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(492)
0794 #define __NR_grab_pgo_data          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(493)
0795 #define __NR_persona                VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(494)
0796             /* 495  */
0797             /* 496  */
0798             /* 497  */
0799             /* 498  */
0800 #define __NR_work_interval_ctl      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(499)
0801 #endif /* DARWIN_VERS >= DARWIN_10_11 */
0802 
0803 #if DARWIN_VERS >= DARWIN_10_12
0804 #define __NR_getentropy             VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(500)
0805 #define __NR_necp_open              VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(501)
0806 #define __NR_necp_client_action     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(502)
0807             /* 503  */
0808             /* 504  */
0809             /* 505  */
0810             /* 506  */
0811             /* 507  */
0812             /* 508  */
0813             /* 509  */
0814             /* 510  */
0815             /* 511  */
0816             /* 512  */
0817             /* 513  */
0818             /* 514  */
0819 #define __NR_ulock_wait             VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(515)
0820 #define __NR_ulock_wake             VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(516)
0821 #define __NR_fclonefileat           VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(517)
0822 #define __NR_fs_snapshot            VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(518)
0823             /* 519  */
0824 #define __NR_terminate_with_payload VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(520)
0825 #define __NR_abort_with_payload     VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(521)
0826 #endif /* DARWIN_VERS >= DARWIN_10_12 */
0827 
0828 #if DARWIN_VERS >= DARWIN_10_13
0829 #define __NR_necp_session_open      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(522)
0830 #define __NR_necp_session_action    VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(523)
0831 #define __NR_setattrlistat          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(524)
0832 #define __NR_net_qos_guideline      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(525)
0833 #define __NR_fmount                 VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(526)
0834 #define __NR_ntp_adjtime            VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(527)
0835 #define __NR_ntp_gettime            VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(528)
0836 #define __NR_os_fault_with_payload  VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(529)
0837 #endif /* DARWIN_VERS >= DARWIN_10_13 */
0838 
0839 #if DARWIN_VERS < DARWIN_10_6
0840 #define __NR_MAXSYSCALL             VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(427)
0841 #elif DARWIN_VERS < DARWIN_10_7
0842 #define __NR_MAXSYSCALL             VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(430)
0843 #elif DARWIN_VERS < DARWIN_10_9
0844 #define __NR_MAXSYSCALL             VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(430)
0845 #elif DARWIN_VERS == DARWIN_10_9
0846 #define __NR_MAXSYSCALL             VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(456)
0847 #elif DARWIN_VERS == DARWIN_10_10
0848 #define __NR_MAXSYSCALL             VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(490)
0849 #elif DARWIN_VERS == DARWIN_10_11
0850 #define __NR_MAXSYSCALL             VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(500)
0851 #elif DARWIN_VERS == DARWIN_10_12
0852 #define __NR_MAXSYSCALL             VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(522)
0853 #elif DARWIN_VERS == DARWIN_10_13
0854 #define __NR_MAXSYSCALL             VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(530)
0855 #else
0856 #error unknown darwin version
0857 #endif
0858 
0859 #define __NR_DARWIN_FAKE_SIGRETURN (1 + __NR_MAXSYSCALL)
0860 
0861 #endif