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