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