syscall.h revision e7c39670197fbf293d013134fe3ce65eaa7d0caa
176baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman/* 276baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl> 376baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com> 476baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * All rights reserved. 576baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * 676baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * Redistribution and use in source and binary forms, with or without 776baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * modification, are permitted provided that the following conditions 876baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * are met: 976baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * 1. Redistributions of source code must retain the above copyright 1076baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * notice, this list of conditions and the following disclaimer. 1176baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * 2. Redistributions in binary form must reproduce the above copyright 1276baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * notice, this list of conditions and the following disclaimer in the 1376baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * documentation and/or other materials provided with the distribution. 1476baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * 3. The name of the author may not be used to endorse or promote products 1576baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * derived from this software without specific prior written permission. 1676baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * 1776baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1876baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1976baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2076baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2176baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2276baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2376baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2476baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2576baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2676baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2776baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * 2876baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman * $Id$ 2976baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman */ 3076baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman 3176baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman#include "dummy.h" 3276baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman 3376baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman/* primary syscalls */ 3476baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman 3579dcd7aa9cdb1784a4e799fbb4fc37374d6424f1Roland McGrathint sys_restart_syscall(); 3676baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_setup(), sys_exit(), sys_fork(), sys_read(), sys_write(); 3776baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_open(), sys_close(), sys_waitpid(), sys_creat(), sys_link(); 3876baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_unlink(), sys_execve(), sys_chdir(), sys_time(), sys_mknod(); 3976baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_chmod(), sys_chown(), sys_break(), sys_oldstat(); 40dacfb6ebd630641d851b6df94c3b4587969a6cfbWichert Akkermanint sys_lseek(), sys_getpid(), sys_mount(), sys_umount(), sys_umount2(); 4176baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_setuid(), sys_getuid(), sys_stime(), sys_ptrace(); 4276baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_alarm(), sys_oldfstat(), sys_pause(), sys_utime(); 4376baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_stty(), sys_gtty(), sys_access(), sys_nice(), sys_ftime(); 4476baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_sync(), sys_kill(), sys_rename(), sys_mkdir(), sys_rmdir(); 4576baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_dup(), sys_pipe(), sys_times(), sys_prof(), sys_brk(); 4676baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_setgid(), sys_getgid(), sys_signal(), sys_geteuid(); 4776baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_getegid(), sys_acct(), sys_phys(), sys_lock(), sys_ioctl(); 4876baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_fcntl(), sys_mpx(), sys_setpgid(), sys_ulimit(); 4976baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_olduname(), sys_umask(), sys_chroot(), sys_ustat(); 5076baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_dup2(), sys_getppid(), sys_getpgrp(), sys_setsid(); 5176baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_sigaction(), sys_siggetmask(), sys_sigsetmask(); 5276baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_setreuid(), sys_setregid(), sys_sigsuspend(); 5376baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_sigpending(), sys_sethostname(), sys_setrlimit(); 5476baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_getrlimit(), sys_getrusage(), sys_gettimeofday(); 5576baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_settimeofday(), sys_getgroups(), sys_setgroups(); 56a44c82af4b7d1b412964881da063ed5aa6e729a4Roland McGrathint sys_setgroups32(), sys_getgroups32(); 5776baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_oldselect(), sys_symlink(), sys_oldlstat(), sys_readlink(); 5876baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_uselib(), sys_swapon(), sys_reboot(), sys_readdir(); 5976baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_mmap(), sys_munmap(), sys_truncate(), sys_ftruncate(); 6076baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_fchmod(), sys_fchown(), sys_getpriority(); 6176baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_setpriority(), sys_profil(), sys_statfs(), sys_fstatfs(); 6276baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_ioperm(), sys_socketcall(), sys_syslog(), sys_setitimer(); 6376baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_getitimer(), sys_stat(), sys_lstat(), sys_fstat(); 6476baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_uname(), sys_iopl(), sys_vhangup(), sys_idle(), sys_vm86(); 6576baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_wait4(), sys_swapoff(), sys_ipc(), sys_sigreturn(); 6676baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_fsync(), sys_clone(), sys_setdomainname(), sys_sysinfo(); 6776baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_modify_ldt(), sys_adjtimex(), sys_mprotect(); 6876baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_sigprocmask(), sys_create_module(), sys_init_module(); 6976baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_delete_module(), sys_get_kernel_syms(), sys_quotactl(); 7076baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_getpgid(), sys_fchdir(), sys_bdflush(); 7176baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_sysfs(), sys_personality(), sys_afs_syscall(); 7276baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_setfsuid(), sys_setfsgid(), sys_llseek(); 7376baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_getdents(), sys_flock(), sys_msync(); 7476baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_readv(), sys_writev(), sys_select(); 7576baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_getsid(), sys_fdatasync(), sys_sysctl(); 76c792698a99b640e7d256e8692c992bd967f0c5b2Wichert Akkermanint sys_mlock(), sys_munlock(), sys_mlockall(), sys_munlockall(), sys_madvise(); 7776baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_sched_setparam(), sys_sched_getparam(); 7876baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_sched_setscheduler(), sys_sched_getscheduler(), sys_sched_yield(); 7976baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_sched_get_priority_max(), sys_sched_get_priority_min(); 8076baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_sched_rr_get_interval(), sys_nanosleep(), sys_mremap(); 8176baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_sendmsg(), sys_recvmsg(), sys_setresuid(), sys_setresgid(); 8276baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_getresuid(), sys_getresgid(), sys_pread(), sys_pwrite(), sys_getcwd(); 8376baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_sigaltstack(), sys_rt_sigprocmask(), sys_rt_sigaction(); 8476baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_rt_sigpending(), sys_rt_sigsuspend(), sys_rt_sigqueueinfo(); 8576baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_rt_sigtimedwait(), sys_prctl(), sys_poll(), sys_vfork(); 8675bb37c8a82fff91874b26a914c551ab6b48e103Ulrich Drepperint sys_sendfile(), sys_old_mmap(), sys_stat64(), sys_lstat64(), sys_fstat64(); 87c792698a99b640e7d256e8692c992bd967f0c5b2Wichert Akkermanint sys_truncate64(), sys_ftruncate64(), sys_pivotroot(); 889677b3a2805e346ca5e61820391095ea3e571c3fRoland McGrathint sys_getdents64(); 892c71e0da7e531494f4ea21f8b8e9730a26789154Roland McGrathint sys_getpmsg(), sys_putpmsg(), sys_readahead(), sys_sendfile64(); 902c71e0da7e531494f4ea21f8b8e9730a26789154Roland McGrathint sys_setxattr(), sys_fsetxattr(), sys_getxattr(), sys_fgetxattr(); 912c71e0da7e531494f4ea21f8b8e9730a26789154Roland McGrathint sys_listxattr(), sys_flistxattr(), sys_removexattr(), sys_fremovexattr(); 922c71e0da7e531494f4ea21f8b8e9730a26789154Roland McGrathint sys_sched_setaffinity(), sys_sched_getaffinity(), sys_futex(); 9372c5b7bf739c707a7f8cd006050f1302c0e618e7Roland McGrathint sys_set_thread_area(), sys_get_thread_area(), sys_remap_file_pages(); 941e35679bbb8c840bd0b107c68cb187feeb3e3282Roland McGrathint sys_timer_create(), sys_timer_delete(), sys_timer_getoverrun(); 951e35679bbb8c840bd0b107c68cb187feeb3e3282Roland McGrathint sys_timer_gettime(), sys_timer_settime(), sys_clock_settime(); 961e35679bbb8c840bd0b107c68cb187feeb3e3282Roland McGrathint sys_clock_gettime(), sys_clock_getres(), sys_clock_nanosleep(); 97ab147c5d67748213d3169fdf9f39c26ec0f65770Roland McGrathint sys_semtimedop(), sys_statfs64(), sys_fstatfs64(), sys_tgkill(); 98d4c85ebbc64b1eb141b310a4634c6ca37fd352c1Roland McGrathint sys_mq_open(), sys_mq_timedsend(), sys_mq_timedreceive(); 99d4c85ebbc64b1eb141b310a4634c6ca37fd352c1Roland McGrathint sys_mq_notify(), sys_mq_getsetattr(); 10093817bfb82577309f84cb5ac8324e34f502d777fRoland McGrathint sys_epoll_create(), sys_epoll_ctl(), sys_epoll_wait(); 101df13e8f4cae0e57786cf5cd9d0304d6f9f2715d5Roland McGrathint sys_waitid(), sys_fadvise64(), sys_fadvise64_64(); 1022c00a4a3cb2d949ecec228395b4912a4727e89d6Roland McGrathint sys_mbind(), sys_get_mempolicy(), sys_set_mempolicy(), sys_move_pages(); 1031f1c54aea7e4f9a7fcfab61ee30f03fce9fe91b4Roland McGrathint sys_arch_prctl(); 10437b9f8480cf54455d1943e534509e20a92da2199Roland McGrathint sys_io_setup(), sys_io_submit(), sys_io_cancel(), sys_io_getevents(), sys_io_destroy(); 105e7c39670197fbf293d013134fe3ce65eaa7d0caaRoland McGrathint sys_utimensat(), sys_epoll_pwait(), sys_signalfd(), sys_timerfd(), sys_eventfd(); 10676baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman 10776baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman/* sys_socketcall subcalls */ 10876baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman 10976baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_socket(), sys_bind(), sys_connect(), sys_listen(); 11076baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_accept(), sys_getsockname(), sys_getpeername(), sys_socketpair(); 11176baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_send(), sys_recv(), sys_sendto(), sys_recvfrom(); 11276baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_shutdown(), sys_setsockopt(), sys_getsockopt(); 11376baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman 11495ebf5abfc1f3ed8b451b7816aa51b93a49e3ef7Dmitry V. Levin/* *at syscalls */ 11595ebf5abfc1f3ed8b451b7816aa51b93a49e3ef7Dmitry V. Levinint sys_fchmodat(); 11695ebf5abfc1f3ed8b451b7816aa51b93a49e3ef7Dmitry V. Levinint sys_newfstatat(); 11795ebf5abfc1f3ed8b451b7816aa51b93a49e3ef7Dmitry V. Levinint sys_unlinkat(); 11895ebf5abfc1f3ed8b451b7816aa51b93a49e3ef7Dmitry V. Levinint sys_fchownat(); 11995ebf5abfc1f3ed8b451b7816aa51b93a49e3ef7Dmitry V. Levinint sys_openat(); 12095ebf5abfc1f3ed8b451b7816aa51b93a49e3ef7Dmitry V. Levinint sys_renameat(); 12195ebf5abfc1f3ed8b451b7816aa51b93a49e3ef7Dmitry V. Levinint sys_symlinkat(); 12295ebf5abfc1f3ed8b451b7816aa51b93a49e3ef7Dmitry V. Levinint sys_readlinkat(); 12395ebf5abfc1f3ed8b451b7816aa51b93a49e3ef7Dmitry V. Levinint sys_linkat(); 12495ebf5abfc1f3ed8b451b7816aa51b93a49e3ef7Dmitry V. Levinint sys_faccessat(); 12595ebf5abfc1f3ed8b451b7816aa51b93a49e3ef7Dmitry V. Levinint sys_mkdirat(); 12695ebf5abfc1f3ed8b451b7816aa51b93a49e3ef7Dmitry V. Levinint sys_mknodat(); 12795ebf5abfc1f3ed8b451b7816aa51b93a49e3ef7Dmitry V. Levinint sys_futimesat(); 12895ebf5abfc1f3ed8b451b7816aa51b93a49e3ef7Dmitry V. Levin 12976baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman/* new ones */ 13076baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_query_module(); 13176baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_poll(); 13210a88d09ebe283d0dd2ba5deccfe50dc20ea5821Michal Ludvigint sys_mincore(); 13395ebf5abfc1f3ed8b451b7816aa51b93a49e3ef7Dmitry V. Levinint sys_inotify_add_watch(); 13495ebf5abfc1f3ed8b451b7816aa51b93a49e3ef7Dmitry V. Levinint sys_inotify_rm_watch(); 13595ebf5abfc1f3ed8b451b7816aa51b93a49e3ef7Dmitry V. Levinint sys_pselect6(); 13695ebf5abfc1f3ed8b451b7816aa51b93a49e3ef7Dmitry V. Levinint sys_ppoll(); 13795ebf5abfc1f3ed8b451b7816aa51b93a49e3ef7Dmitry V. Levinint sys_unshare(); 13876baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman 1390ae852b90b116aaac2c0c7816dce2e1365ad271eWichert Akkerman/* architecture-specific calls */ 1400ae852b90b116aaac2c0c7816dce2e1365ad271eWichert Akkerman#ifdef ALPHA 141221f54f721a2f74e629bb70e34888205f68e95ccWichert Akkermanint sys_osf_select(); 142221f54f721a2f74e629bb70e34888205f68e95ccWichert Akkermanint sys_osf_gettimeofday(); 143221f54f721a2f74e629bb70e34888205f68e95ccWichert Akkermanint sys_osf_settimeofday(); 144221f54f721a2f74e629bb70e34888205f68e95ccWichert Akkermanint sys_osf_getitimer(); 145221f54f721a2f74e629bb70e34888205f68e95ccWichert Akkermanint sys_osf_setitimer(); 146221f54f721a2f74e629bb70e34888205f68e95ccWichert Akkermanint sys_osf_getrusage(); 147221f54f721a2f74e629bb70e34888205f68e95ccWichert Akkermanint sys_osf_wait4(); 148221f54f721a2f74e629bb70e34888205f68e95ccWichert Akkermanint sys_osf_utimes(); 1490ae852b90b116aaac2c0c7816dce2e1365ad271eWichert Akkerman#endif 1500ae852b90b116aaac2c0c7816dce2e1365ad271eWichert Akkerman 1510ae852b90b116aaac2c0c7816dce2e1365ad271eWichert Akkerman 152e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#ifndef SYS_waitid 153e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# ifdef I386 154e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# define SYS_waitid 284 155e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# elif defined ALPHA 156e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# define SYS_waitid 438 157e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# elif defined ARM 158e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# define SYS_waitid (NR_SYSCALL_BASE + 280) 159e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# elif defined IA64 160e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# define SYS_waitid 1270 161e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# elif defined M68K 162e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# define SYS_waitid 277 163e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# elif defined POWERPC 164e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# define SYS_waitid 272 165e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# elif defined S390 || defined S390X 166e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# define SYS_waitid 281 167e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# elif defined SH64 168e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# define SYS_waitid 312 169e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# elif defined SH64 170e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# define SYS_waitid 312 171e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# elif defined SH 172e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# define SYS_waitid 284 173e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# elif defined SPARC || defined SPARC64 174e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# define SYS_waitid 279 175e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# elif defined X86_64 176e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# define SYS_waitid 247 177e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# endif 178e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#endif 179e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath 180e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#if !defined(ALPHA) && !defined(MIPS) && !defined(HPPA) 1817b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# ifdef IA64 1827b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman/* 1837b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman * IA64 syscall numbers (the only ones available from standard header 1847b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman * files) are disjoint from IA32 syscall numbers. We need to define 1857b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman * the IA32 socket call number here. 1867b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman */ 1877b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# define SYS_socketcall 102 1887b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman 1897b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_socket 1907b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_bind 1917b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_connect 1927b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_listen 1937b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_accept 1947b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_getsockname 1957b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_getpeername 1967b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_socketpair 1977b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_send 1987b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_recv 1997b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_sendto 2007b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_recvfrom 2017b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_shutdown 2027b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_setsockopt 2037b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_getsockopt 2047b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_sendmsg 2057b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_recvmsg 20609f0d1d4c48e19b84573f66e8c8edab79150a550Roland McGrath# endif /* IA64 */ 207feb838139028d6e063d10a6033269870a5c25b5cRoland McGrath# define SYS_socket_subcall 400 208e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_socket (SYS_socket_subcall + 1) 209e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_bind (SYS_socket_subcall + 2) 210e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_connect (SYS_socket_subcall + 3) 211e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_listen (SYS_socket_subcall + 4) 212e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_accept (SYS_socket_subcall + 5) 213e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_getsockname (SYS_socket_subcall + 6) 214e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_getpeername (SYS_socket_subcall + 7) 215e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_socketpair (SYS_socket_subcall + 8) 216e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_send (SYS_socket_subcall + 9) 217e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_recv (SYS_socket_subcall + 10) 218e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_sendto (SYS_socket_subcall + 11) 219e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_recvfrom (SYS_socket_subcall + 12) 220e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_shutdown (SYS_socket_subcall + 13) 221e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_setsockopt (SYS_socket_subcall + 14) 222e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_getsockopt (SYS_socket_subcall + 15) 223e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_sendmsg (SYS_socket_subcall + 16) 224e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_recvmsg (SYS_socket_subcall + 17) 22576baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman 2260ae852b90b116aaac2c0c7816dce2e1365ad271eWichert Akkerman#define SYS_socket_nsubcalls 18 227e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#endif /* !(ALPHA || MIPS || HPPA) */ 22876baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman 22976baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman/* sys_ipc subcalls */ 23076baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman 231e5be0de04471219a85a6ca0e37d21ef6d0d18cafWichert Akkermanint sys_semget(), sys_semctl(), sys_semop(); 23276baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_msgsnd(), sys_msgrcv(), sys_msgget(), sys_msgctl(); 23376baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_shmat(), sys_shmdt(), sys_shmget(), sys_shmctl(); 23476baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman 235e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#if !defined(ALPHA) && !defined(MIPS) && !defined(SPARC) && !defined(HPPA) 2367b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# ifdef IA64 2377b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman /* 2387b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman * IA64 syscall numbers (the only ones available from standard 2397b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman * header files) are disjoint from IA32 syscall numbers. We need 2407b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman * to define the IA32 socket call number here. Fortunately, this 2417b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman * symbol, `SYS_ipc', is not used by any of the IA64 code so 2427b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman * re-defining this symbol will not cause a problem. 2437b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman */ 2447b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_ipc 2457b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# define SYS_ipc 117 2467b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_semop 2477b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_semget 2487b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_semctl 249f01185e5d4d04197408f48c474cee819b8063bb8Roland McGrath# undef SYS_semtimedop 2507b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_msgsnd 2517b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_msgrcv 2527b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_msgget 2537b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_msgctl 2547b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_shmat 2557b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_shmdt 2567b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_shmget 2577b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# undef SYS_shmctl 2587b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# endif /* IA64 */ 2592c71e0da7e531494f4ea21f8b8e9730a26789154Roland McGrath#define SYS_ipc_subcall ((SYS_socket_subcall)+(SYS_socket_nsubcalls)) 260e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_semop (SYS_ipc_subcall + 1) 261e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_semget (SYS_ipc_subcall + 2) 262e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_semctl (SYS_ipc_subcall + 3) 263e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_semtimedop (SYS_ipc_subcall + 4) 264e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_msgsnd (SYS_ipc_subcall + 11) 265e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_msgrcv (SYS_ipc_subcall + 12) 266e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_msgget (SYS_ipc_subcall + 13) 267e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_msgctl (SYS_ipc_subcall + 14) 268e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_shmat (SYS_ipc_subcall + 21) 269e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_shmdt (SYS_ipc_subcall + 22) 270e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_shmget (SYS_ipc_subcall + 23) 271e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#define SYS_sub_shmctl (SYS_ipc_subcall + 24) 27276baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman 27376baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman#define SYS_ipc_nsubcalls 25 274e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#endif /* !(ALPHA || MIPS || SPARC || HPPA) */ 275e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath 276e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#if defined SYS_ipc_subcall && !defined SYS_ipc 277e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# define SYS_ipc SYS_ipc_subcall 278e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#endif 279e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#if defined SYS_socket_subcall && !defined SYS_socketcall 280e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath# define SYS_socketcall SYS_socket_subcall 281e69b627099635f34bc2056e6cf2ada02ec9b0a09Roland McGrath#endif 2827b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman 2837b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman#ifdef IA64 2847b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman /* 2857b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman * IA64 syscall numbers (the only ones available from standard header 2867b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman * files) are disjoint from IA32 syscall numbers. We need to define 2877b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman * some IA32 specific syscalls here. 2887b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman */ 2897b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# define SYS_fork 2 2907b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# define SYS_vfork 190 2917b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# define SYS32_exit 1 2927b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# define SYS_waitpid 7 2937b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# define SYS32_wait4 114 2947b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman# define SYS32_execve 11 2957b3346be42d6a1f539e95d385ee498f8b3c529f8Wichert Akkerman#endif /* IA64 */ 2968b1b40cd8b49151374d0ac2a5b1a4b459f9e0ae5Wichert Akkerman 2978b1b40cd8b49151374d0ac2a5b1a4b459f9e0ae5Wichert Akkerman#if defined(ALPHA) || defined(IA64) 2988b1b40cd8b49151374d0ac2a5b1a4b459f9e0ae5Wichert Akkermanint sys_getpagesize(); 2998b1b40cd8b49151374d0ac2a5b1a4b459f9e0ae5Wichert Akkerman#endif 30076baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman 30176baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman#ifdef ALPHA 302c792698a99b640e7d256e8692c992bd967f0c5b2Wichert Akkermanint osf_statfs(), osf_fstatfs(); 3038b1b40cd8b49151374d0ac2a5b1a4b459f9e0ae5Wichert Akkerman#endif 3048b1b40cd8b49151374d0ac2a5b1a4b459f9e0ae5Wichert Akkerman 3058b1b40cd8b49151374d0ac2a5b1a4b459f9e0ae5Wichert Akkerman#ifdef IA64 3068b1b40cd8b49151374d0ac2a5b1a4b459f9e0ae5Wichert Akkermanint sys_getpmsg(), sys_putpmsg(); /* STREAMS stuff */ 30776baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman#endif 30876baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman 3090cbfb324b54e4c5859c76dd132a7ad942c0f5e77Wichert Akkerman#ifdef MIPS 310d6b924937038457f83b47b26b9163bdfbdc230f2Wichert Akkermanint sys_sysmips(); 3110cbfb324b54e4c5859c76dd132a7ad942c0f5e77Wichert Akkerman#endif 3120cbfb324b54e4c5859c76dd132a7ad942c0f5e77Wichert Akkerman 31376baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_setpgrp(), sys_gethostname(), sys_getdtablesize(), sys_utimes(); 31476baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkermanint sys_capget(), sys_capset(); 31576baf7c9f6dd61a15524ad43c1b690c252cf5b7Wichert Akkerman 3162e2553a534f532a1546ea2b2f3dc3cd2276d020dWichert Akkerman#ifdef M68K 3172e2553a534f532a1546ea2b2f3dc3cd2276d020dWichert Akkermanint sys_cacheflush(); 3182e2553a534f532a1546ea2b2f3dc3cd2276d020dWichert Akkerman#endif 319