Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl> |
| 3 | * Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com> |
| 4 | * All rights reserved. |
| 5 | * |
| 6 | * Redistribution and use in source and binary forms, with or without |
| 7 | * modification, are permitted provided that the following conditions |
| 8 | * are met: |
| 9 | * 1. Redistributions of source code must retain the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer. |
| 11 | * 2. Redistributions in binary form must reproduce the above copyright |
| 12 | * notice, this list of conditions and the following disclaimer in the |
| 13 | * documentation and/or other materials provided with the distribution. |
| 14 | * 3. The name of the author may not be used to endorse or promote products |
| 15 | * derived from this software without specific prior written permission. |
| 16 | * |
| 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
| 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
| 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
| 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | * |
| 28 | * $Id$ |
| 29 | */ |
| 30 | |
| 31 | #include "dummy.h" |
| 32 | |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 33 | /* common syscalls */ |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 34 | |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 35 | int sys_accept(); |
| 36 | int sys_accept4(); |
| 37 | int sys_access(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 38 | int sys_adjtimex(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 39 | int sys_alarm(); |
| 40 | int sys_arch_prctl(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 41 | int sys_bind(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 42 | int sys_brk(); |
| 43 | int sys_capget(); |
| 44 | int sys_capset(); |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 45 | int sys_chdir(); |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 46 | int sys_chmod(); |
| 47 | int sys_chown(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 48 | int sys_clock_gettime(); |
| 49 | int sys_clock_nanosleep(); |
| 50 | int sys_clock_settime(); |
| 51 | int sys_clone(); |
| 52 | int sys_close(); |
| 53 | int sys_connect(); |
| 54 | int sys_creat(); |
| 55 | int sys_create_module(); |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 56 | int sys_dup2(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 57 | int sys_dup3(); |
| 58 | int sys_epoll_create(); |
| 59 | int sys_epoll_create1(); |
| 60 | int sys_epoll_ctl(); |
| 61 | int sys_epoll_pwait(); |
| 62 | int sys_epoll_wait(); |
| 63 | int sys_eventfd(); |
| 64 | int sys_eventfd2(); |
| 65 | int sys_execve(); |
| 66 | int sys_exit(); |
| 67 | int sys_faccessat(); |
| 68 | int sys_fadvise64(); |
| 69 | int sys_fadvise64_64(); |
| 70 | int sys_fallocate(); |
| 71 | int sys_fchmod(); |
| 72 | int sys_fchmodat(); |
| 73 | int sys_fchown(); |
| 74 | int sys_fchownat(); |
| 75 | int sys_fcntl(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 76 | int sys_fgetxattr(); |
| 77 | int sys_flistxattr(); |
| 78 | int sys_flock(); |
| 79 | int sys_fork(); |
| 80 | int sys_fremovexattr(); |
| 81 | int sys_fsetxattr(); |
| 82 | int sys_fstat(); |
| 83 | int sys_fstat64(); |
| 84 | int sys_fstatfs(); |
| 85 | int sys_fstatfs64(); |
| 86 | int sys_fsync(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 87 | int sys_ftruncate(); |
| 88 | int sys_ftruncate64(); |
| 89 | int sys_futex(); |
| 90 | int sys_futimesat(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 91 | int sys_get_mempolicy(); |
| 92 | int sys_get_thread_area(); |
| 93 | int sys_getcpu(); |
| 94 | int sys_getcwd(); |
| 95 | int sys_getdents(); |
| 96 | int sys_getdents64(); |
| 97 | int sys_getdtablesize(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 98 | int sys_getgroups(); |
| 99 | int sys_getgroups32(); |
| 100 | int sys_gethostname(); |
| 101 | int sys_getitimer(); |
| 102 | int sys_getpeername(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 103 | int sys_getpmsg(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 104 | int sys_getpriority(); |
| 105 | int sys_getresgid(); |
| 106 | int sys_getresuid(); |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 107 | int sys_getrlimit(); |
| 108 | int sys_getrusage(); |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 109 | int sys_getsid(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 110 | int sys_getsockname(); |
| 111 | int sys_getsockopt(); |
| 112 | int sys_gettimeofday(); |
| 113 | int sys_getuid(); |
| 114 | int sys_getxattr(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 115 | int sys_init_module(); |
| 116 | int sys_inotify_add_watch(); |
| 117 | int sys_inotify_init1(); |
| 118 | int sys_inotify_rm_watch(); |
| 119 | int sys_io_cancel(); |
| 120 | int sys_io_destroy(); |
| 121 | int sys_io_getevents(); |
| 122 | int sys_io_setup(); |
| 123 | int sys_io_submit(); |
| 124 | int sys_ioctl(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 125 | int sys_kill(); |
| 126 | int sys_link(); |
| 127 | int sys_linkat(); |
| 128 | int sys_listen(); |
| 129 | int sys_listxattr(); |
| 130 | int sys_llseek(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 131 | int sys_lseek(); |
| 132 | int sys_lstat(); |
| 133 | int sys_lstat64(); |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 134 | int sys_madvise(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 135 | int sys_mbind(); |
| 136 | int sys_mincore(); |
| 137 | int sys_mkdir(); |
| 138 | int sys_mkdirat(); |
| 139 | int sys_mknod(); |
| 140 | int sys_mknodat(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 141 | int sys_mlockall(); |
| 142 | int sys_mmap(); |
| 143 | int sys_modify_ldt(); |
| 144 | int sys_mount(); |
| 145 | int sys_move_pages(); |
| 146 | int sys_mprotect(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 147 | int sys_mq_getsetattr(); |
| 148 | int sys_mq_notify(); |
| 149 | int sys_mq_open(); |
| 150 | int sys_mq_timedreceive(); |
| 151 | int sys_mq_timedsend(); |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 152 | int sys_mremap(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 153 | int sys_msgctl(); |
| 154 | int sys_msgget(); |
| 155 | int sys_msgrcv(); |
| 156 | int sys_msgsnd(); |
| 157 | int sys_msync(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 158 | int sys_munmap(); |
| 159 | int sys_nanosleep(); |
| 160 | int sys_newfstatat(); |
| 161 | int sys_nice(); |
| 162 | int sys_old_mmap(); |
| 163 | int sys_oldfstat(); |
| 164 | int sys_oldlstat(); |
| 165 | int sys_oldselect(); |
| 166 | int sys_oldstat(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 167 | int sys_open(); |
| 168 | int sys_openat(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 169 | int sys_personality(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 170 | int sys_pipe(); |
| 171 | int sys_pipe2(); |
| 172 | int sys_poll(); |
| 173 | int sys_poll(); |
| 174 | int sys_ppoll(); |
| 175 | int sys_prctl(); |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 176 | int sys_pread(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 177 | int sys_pread64(); |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 178 | int sys_preadv(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 179 | int sys_pselect6(); |
| 180 | int sys_ptrace(); |
Denys Vlasenko | 3af224c | 2012-01-28 01:46:33 +0100 | [diff] [blame^] | 181 | int sys_process_vm_readv(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 182 | int sys_putpmsg(); |
| 183 | int sys_pwrite(); |
| 184 | int sys_pwrite64(); |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 185 | int sys_pwritev(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 186 | int sys_query_module(); |
| 187 | int sys_quotactl(); |
| 188 | int sys_read(); |
| 189 | int sys_readahead(); |
| 190 | int sys_readdir(); |
| 191 | int sys_readlink(); |
| 192 | int sys_readlinkat(); |
| 193 | int sys_readv(); |
| 194 | int sys_reboot(); |
| 195 | int sys_recv(); |
| 196 | int sys_recvfrom(); |
| 197 | int sys_recvmmsg(); |
| 198 | int sys_recvmsg(); |
| 199 | int sys_remap_file_pages(); |
| 200 | int sys_removexattr(); |
| 201 | int sys_renameat(); |
| 202 | int sys_restart_syscall(); |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 203 | int sys_rt_sigaction(); |
| 204 | int sys_rt_sigpending(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 205 | int sys_rt_sigprocmask(); |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 206 | int sys_rt_sigqueueinfo(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 207 | int sys_rt_sigsuspend(); |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 208 | int sys_rt_sigtimedwait(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 209 | int sys_sched_get_priority_min(); |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 210 | int sys_sched_getaffinity(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 211 | int sys_sched_getparam(); |
| 212 | int sys_sched_getscheduler(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 213 | int sys_sched_setaffinity(); |
| 214 | int sys_sched_setparam(); |
| 215 | int sys_sched_setscheduler(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 216 | int sys_select(); |
| 217 | int sys_semctl(); |
| 218 | int sys_semget(); |
| 219 | int sys_semop(); |
| 220 | int sys_semtimedop(); |
| 221 | int sys_send(); |
| 222 | int sys_sendfile(); |
| 223 | int sys_sendfile64(); |
| 224 | int sys_sendmsg(); |
| 225 | int sys_sendto(); |
| 226 | int sys_set_mempolicy(); |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 227 | int sys_set_thread_area(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 228 | int sys_setdomainname(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 229 | int sys_setfsuid(); |
| 230 | int sys_setgid(); |
| 231 | int sys_setgroups(); |
| 232 | int sys_setgroups32(); |
| 233 | int sys_sethostname(); |
| 234 | int sys_setitimer(); |
| 235 | int sys_setpgid(); |
| 236 | int sys_setpgrp(); |
| 237 | int sys_setpriority(); |
| 238 | int sys_setregid(); |
| 239 | int sys_setresgid(); |
| 240 | int sys_setresuid(); |
| 241 | int sys_setreuid(); |
| 242 | int sys_setrlimit(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 243 | int sys_setsockopt(); |
| 244 | int sys_settimeofday(); |
| 245 | int sys_setuid(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 246 | int sys_setxattr(); |
| 247 | int sys_shmat(); |
| 248 | int sys_shmctl(); |
| 249 | int sys_shmdt(); |
| 250 | int sys_shmget(); |
| 251 | int sys_shutdown(); |
| 252 | int sys_sigaction(); |
| 253 | int sys_sigaltstack(); |
| 254 | int sys_siggetmask(); |
| 255 | int sys_signal(); |
| 256 | int sys_signalfd(); |
| 257 | int sys_signalfd4(); |
| 258 | int sys_sigpending(); |
| 259 | int sys_sigprocmask(); |
| 260 | int sys_sigreturn(); |
| 261 | int sys_sigsetmask(); |
| 262 | int sys_sigsuspend(); |
| 263 | int sys_socket(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 264 | int sys_socketpair(); |
| 265 | int sys_splice(); |
| 266 | int sys_stat(); |
| 267 | int sys_stat64(); |
| 268 | int sys_statfs(); |
| 269 | int sys_statfs64(); |
| 270 | int sys_stime(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 271 | int sys_swapon(); |
| 272 | int sys_symlinkat(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 273 | int sys_sysctl(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 274 | int sys_sysinfo(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 275 | int sys_tee(); |
| 276 | int sys_tgkill(); |
| 277 | int sys_time(); |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 278 | int sys_timer_create(); |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 279 | int sys_timer_gettime(); |
| 280 | int sys_timer_settime(); |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 281 | int sys_timerfd(); |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 282 | int sys_timerfd_create(); |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 283 | int sys_timerfd_gettime(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 284 | int sys_timerfd_settime(); |
| 285 | int sys_times(); |
| 286 | int sys_truncate(); |
| 287 | int sys_truncate64(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 288 | int sys_umask(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 289 | int sys_umount2(); |
| 290 | int sys_uname(); |
Dmitry V. Levin | 95ebf5a | 2006-10-13 20:25:12 +0000 | [diff] [blame] | 291 | int sys_unlinkat(); |
Dmitry V. Levin | 95ebf5a | 2006-10-13 20:25:12 +0000 | [diff] [blame] | 292 | int sys_unshare(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 293 | int sys_utime(); |
| 294 | int sys_utimensat(); |
| 295 | int sys_utimes(); |
| 296 | int sys_vfork(); |
Dmitry V. Levin | d99e48c | 2011-10-11 17:07:05 +0000 | [diff] [blame] | 297 | int sys_vmsplice(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 298 | int sys_wait4(); |
| 299 | int sys_waitid(); |
| 300 | int sys_waitpid(); |
| 301 | int sys_write(); |
| 302 | int sys_writev(); |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 303 | |
Wichert Akkerman | 0ae852b | 1999-11-18 17:12:55 +0000 | [diff] [blame] | 304 | /* architecture-specific calls */ |
| 305 | #ifdef ALPHA |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 306 | int osf_statfs(); |
| 307 | int osf_fstatfs(); |
Wichert Akkerman | 221f54f | 1999-11-18 17:26:45 +0000 | [diff] [blame] | 308 | int sys_osf_getitimer(); |
Wichert Akkerman | 221f54f | 1999-11-18 17:26:45 +0000 | [diff] [blame] | 309 | int sys_osf_getrusage(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 310 | int sys_osf_gettimeofday(); |
| 311 | int sys_osf_select(); |
| 312 | int sys_osf_setitimer(); |
| 313 | int sys_osf_settimeofday(); |
Wichert Akkerman | 221f54f | 1999-11-18 17:26:45 +0000 | [diff] [blame] | 314 | int sys_osf_utimes(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 315 | int sys_osf_wait4(); |
Wichert Akkerman | 0ae852b | 1999-11-18 17:12:55 +0000 | [diff] [blame] | 316 | #endif |
| 317 | |
Roland McGrath | e69b627 | 2005-06-07 23:21:28 +0000 | [diff] [blame] | 318 | #ifndef SYS_waitid |
| 319 | # ifdef I386 |
| 320 | # define SYS_waitid 284 |
| 321 | # elif defined ALPHA |
| 322 | # define SYS_waitid 438 |
| 323 | # elif defined ARM |
| 324 | # define SYS_waitid (NR_SYSCALL_BASE + 280) |
| 325 | # elif defined IA64 |
| 326 | # define SYS_waitid 1270 |
| 327 | # elif defined M68K |
| 328 | # define SYS_waitid 277 |
| 329 | # elif defined POWERPC |
| 330 | # define SYS_waitid 272 |
| 331 | # elif defined S390 || defined S390X |
| 332 | # define SYS_waitid 281 |
| 333 | # elif defined SH64 |
| 334 | # define SYS_waitid 312 |
| 335 | # elif defined SH64 |
| 336 | # define SYS_waitid 312 |
| 337 | # elif defined SH |
| 338 | # define SYS_waitid 284 |
| 339 | # elif defined SPARC || defined SPARC64 |
| 340 | # define SYS_waitid 279 |
| 341 | # elif defined X86_64 |
| 342 | # define SYS_waitid 247 |
| 343 | # endif |
| 344 | #endif |
| 345 | |
Roland McGrath | d94020f | 2008-08-25 03:15:43 +0000 | [diff] [blame] | 346 | #if !defined(ALPHA) && !defined(MIPS) && !defined(HPPA) && \ |
| 347 | !defined(__ARM_EABI__) |
Wichert Akkerman | 7b3346b | 2001-10-09 23:47:38 +0000 | [diff] [blame] | 348 | # ifdef IA64 |
| 349 | /* |
| 350 | * IA64 syscall numbers (the only ones available from standard header |
| 351 | * files) are disjoint from IA32 syscall numbers. We need to define |
| 352 | * the IA32 socket call number here. |
| 353 | */ |
| 354 | # define SYS_socketcall 102 |
| 355 | |
| 356 | # undef SYS_socket |
| 357 | # undef SYS_bind |
| 358 | # undef SYS_connect |
| 359 | # undef SYS_listen |
| 360 | # undef SYS_accept |
| 361 | # undef SYS_getsockname |
| 362 | # undef SYS_getpeername |
| 363 | # undef SYS_socketpair |
| 364 | # undef SYS_send |
| 365 | # undef SYS_recv |
| 366 | # undef SYS_sendto |
| 367 | # undef SYS_recvfrom |
| 368 | # undef SYS_shutdown |
| 369 | # undef SYS_setsockopt |
| 370 | # undef SYS_getsockopt |
| 371 | # undef SYS_sendmsg |
| 372 | # undef SYS_recvmsg |
Roland McGrath | 09f0d1d | 2002-12-22 03:34:39 +0000 | [diff] [blame] | 373 | # endif /* IA64 */ |
Mike Frysinger | 330a895 | 2011-02-19 15:48:52 -0500 | [diff] [blame] | 374 | # if defined(SPARC) || defined(SPARC64) |
| 375 | # define SYS_socket_subcall 353 |
| 376 | # else |
Roland McGrath | feb8381 | 2006-08-22 06:06:12 +0000 | [diff] [blame] | 377 | # define SYS_socket_subcall 400 |
Mike Frysinger | 330a895 | 2011-02-19 15:48:52 -0500 | [diff] [blame] | 378 | # endif |
Roland McGrath | e69b627 | 2005-06-07 23:21:28 +0000 | [diff] [blame] | 379 | #define SYS_sub_socket (SYS_socket_subcall + 1) |
| 380 | #define SYS_sub_bind (SYS_socket_subcall + 2) |
| 381 | #define SYS_sub_connect (SYS_socket_subcall + 3) |
| 382 | #define SYS_sub_listen (SYS_socket_subcall + 4) |
| 383 | #define SYS_sub_accept (SYS_socket_subcall + 5) |
| 384 | #define SYS_sub_getsockname (SYS_socket_subcall + 6) |
| 385 | #define SYS_sub_getpeername (SYS_socket_subcall + 7) |
| 386 | #define SYS_sub_socketpair (SYS_socket_subcall + 8) |
| 387 | #define SYS_sub_send (SYS_socket_subcall + 9) |
| 388 | #define SYS_sub_recv (SYS_socket_subcall + 10) |
| 389 | #define SYS_sub_sendto (SYS_socket_subcall + 11) |
| 390 | #define SYS_sub_recvfrom (SYS_socket_subcall + 12) |
| 391 | #define SYS_sub_shutdown (SYS_socket_subcall + 13) |
| 392 | #define SYS_sub_setsockopt (SYS_socket_subcall + 14) |
| 393 | #define SYS_sub_getsockopt (SYS_socket_subcall + 15) |
| 394 | #define SYS_sub_sendmsg (SYS_socket_subcall + 16) |
| 395 | #define SYS_sub_recvmsg (SYS_socket_subcall + 17) |
Paolo Bonzini | 8a56b8a | 2009-08-14 12:34:06 +0200 | [diff] [blame] | 396 | #define SYS_sub_accept4 (SYS_socket_subcall + 18) |
Andreas Schwab | 0873f29 | 2010-02-12 21:39:12 +0100 | [diff] [blame] | 397 | #define SYS_sub_recvmmsg (SYS_socket_subcall + 19) |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 398 | |
Andreas Schwab | 0873f29 | 2010-02-12 21:39:12 +0100 | [diff] [blame] | 399 | #define SYS_socket_nsubcalls 20 |
Roland McGrath | e69b627 | 2005-06-07 23:21:28 +0000 | [diff] [blame] | 400 | #endif /* !(ALPHA || MIPS || HPPA) */ |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 401 | |
Mike Frysinger | 330a895 | 2011-02-19 15:48:52 -0500 | [diff] [blame] | 402 | #if !defined(ALPHA) && !defined(MIPS) && !defined(HPPA) && \ |
Roland McGrath | d94020f | 2008-08-25 03:15:43 +0000 | [diff] [blame] | 403 | !defined(__ARM_EABI__) |
Wichert Akkerman | 7b3346b | 2001-10-09 23:47:38 +0000 | [diff] [blame] | 404 | # ifdef IA64 |
| 405 | /* |
| 406 | * IA64 syscall numbers (the only ones available from standard |
| 407 | * header files) are disjoint from IA32 syscall numbers. We need |
| 408 | * to define the IA32 socket call number here. Fortunately, this |
| 409 | * symbol, `SYS_ipc', is not used by any of the IA64 code so |
| 410 | * re-defining this symbol will not cause a problem. |
| 411 | */ |
| 412 | # undef SYS_ipc |
| 413 | # define SYS_ipc 117 |
| 414 | # undef SYS_semop |
| 415 | # undef SYS_semget |
| 416 | # undef SYS_semctl |
Roland McGrath | f01185e | 2005-02-02 03:42:51 +0000 | [diff] [blame] | 417 | # undef SYS_semtimedop |
Wichert Akkerman | 7b3346b | 2001-10-09 23:47:38 +0000 | [diff] [blame] | 418 | # undef SYS_msgsnd |
| 419 | # undef SYS_msgrcv |
| 420 | # undef SYS_msgget |
| 421 | # undef SYS_msgctl |
| 422 | # undef SYS_shmat |
| 423 | # undef SYS_shmdt |
| 424 | # undef SYS_shmget |
| 425 | # undef SYS_shmctl |
| 426 | # endif /* IA64 */ |
Roland McGrath | 2c71e0d | 2002-12-15 23:58:19 +0000 | [diff] [blame] | 427 | #define SYS_ipc_subcall ((SYS_socket_subcall)+(SYS_socket_nsubcalls)) |
Roland McGrath | e69b627 | 2005-06-07 23:21:28 +0000 | [diff] [blame] | 428 | #define SYS_sub_semop (SYS_ipc_subcall + 1) |
| 429 | #define SYS_sub_semget (SYS_ipc_subcall + 2) |
| 430 | #define SYS_sub_semctl (SYS_ipc_subcall + 3) |
| 431 | #define SYS_sub_semtimedop (SYS_ipc_subcall + 4) |
| 432 | #define SYS_sub_msgsnd (SYS_ipc_subcall + 11) |
| 433 | #define SYS_sub_msgrcv (SYS_ipc_subcall + 12) |
| 434 | #define SYS_sub_msgget (SYS_ipc_subcall + 13) |
| 435 | #define SYS_sub_msgctl (SYS_ipc_subcall + 14) |
| 436 | #define SYS_sub_shmat (SYS_ipc_subcall + 21) |
| 437 | #define SYS_sub_shmdt (SYS_ipc_subcall + 22) |
| 438 | #define SYS_sub_shmget (SYS_ipc_subcall + 23) |
| 439 | #define SYS_sub_shmctl (SYS_ipc_subcall + 24) |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 440 | |
| 441 | #define SYS_ipc_nsubcalls 25 |
Mike Frysinger | 330a895 | 2011-02-19 15:48:52 -0500 | [diff] [blame] | 442 | #endif /* !(ALPHA || MIPS || HPPA) */ |
Roland McGrath | e69b627 | 2005-06-07 23:21:28 +0000 | [diff] [blame] | 443 | |
| 444 | #if defined SYS_ipc_subcall && !defined SYS_ipc |
| 445 | # define SYS_ipc SYS_ipc_subcall |
| 446 | #endif |
| 447 | #if defined SYS_socket_subcall && !defined SYS_socketcall |
| 448 | # define SYS_socketcall SYS_socket_subcall |
| 449 | #endif |
Wichert Akkerman | 7b3346b | 2001-10-09 23:47:38 +0000 | [diff] [blame] | 450 | |
| 451 | #ifdef IA64 |
| 452 | /* |
| 453 | * IA64 syscall numbers (the only ones available from standard header |
| 454 | * files) are disjoint from IA32 syscall numbers. We need to define |
| 455 | * some IA32 specific syscalls here. |
| 456 | */ |
| 457 | # define SYS_fork 2 |
| 458 | # define SYS_vfork 190 |
| 459 | # define SYS32_exit 1 |
| 460 | # define SYS_waitpid 7 |
| 461 | # define SYS32_wait4 114 |
| 462 | # define SYS32_execve 11 |
| 463 | #endif /* IA64 */ |
Wichert Akkerman | 8b1b40c | 2000-02-03 21:58:30 +0000 | [diff] [blame] | 464 | |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 465 | #if defined(ALPHA) || defined(IA64) || defined(SPARC) || defined(SPARC64) |
Wichert Akkerman | 8b1b40c | 2000-02-03 21:58:30 +0000 | [diff] [blame] | 466 | int sys_getpagesize(); |
| 467 | #endif |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 468 | |
Wichert Akkerman | 8b1b40c | 2000-02-03 21:58:30 +0000 | [diff] [blame] | 469 | #ifdef IA64 |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 470 | /* STREAMS stuff */ |
| 471 | int sys_getpmsg(); |
| 472 | int sys_putpmsg(); |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 473 | #endif |
| 474 | |
Wichert Akkerman | 0cbfb32 | 2001-02-19 13:35:53 +0000 | [diff] [blame] | 475 | #ifdef MIPS |
Wichert Akkerman | d6b9249 | 2001-04-07 21:37:12 +0000 | [diff] [blame] | 476 | int sys_sysmips(); |
Wichert Akkerman | 0cbfb32 | 2001-02-19 13:35:53 +0000 | [diff] [blame] | 477 | #endif |
| 478 | |
Carmelo AMOROSO | f8e5650 | 2010-12-01 14:27:07 +0100 | [diff] [blame] | 479 | #if defined M68K || defined SH |
Wichert Akkerman | 2e2553a | 1999-05-09 00:29:58 +0000 | [diff] [blame] | 480 | int sys_cacheflush(); |
| 481 | #endif |
Roland McGrath | 542c2c6 | 2008-05-20 01:11:56 +0000 | [diff] [blame] | 482 | |
Roland McGrath | 4a6f652 | 2008-08-25 03:09:16 +0000 | [diff] [blame] | 483 | #ifdef POWERPC |
| 484 | int sys_subpage_prot(); |
| 485 | #endif |
Dmitry V. Levin | 87ea1f4 | 2008-11-10 22:21:41 +0000 | [diff] [blame] | 486 | |
| 487 | #ifdef BFIN |
Mike Frysinger | 260e571 | 2010-09-11 15:04:18 -0400 | [diff] [blame] | 488 | int sys_cacheflush(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 489 | int sys_sram_alloc(); |
Dmitry V. Levin | 87ea1f4 | 2008-11-10 22:21:41 +0000 | [diff] [blame] | 490 | #endif |
Mike Frysinger | 330a895 | 2011-02-19 15:48:52 -0500 | [diff] [blame] | 491 | |
| 492 | #if defined SPARC || defined SPARC64 |
| 493 | #include "sparc/syscall1.h" |
| 494 | int sys_execv(); |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 495 | int sys_getmsg(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 496 | int sys_msgsys(); |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 497 | int sys_putmsg(); |
Dmitry V. Levin | dd76085 | 2011-11-28 23:25:13 +0000 | [diff] [blame] | 498 | int sys_semsys(); |
Dmitry V. Levin | a12c70d | 2011-11-28 23:41:58 +0000 | [diff] [blame] | 499 | int sys_shmsys(); |
Mike Frysinger | 330a895 | 2011-02-19 15:48:52 -0500 | [diff] [blame] | 500 | #define SYS_semsys_subcall 200 |
| 501 | #define SYS_semsys_nsubcalls 3 |
| 502 | #define SYS_semctl (SYS_semsys_subcall + 0) |
| 503 | #define SYS_semget (SYS_semsys_subcall + 1) |
| 504 | #define SYS_semop (SYS_semsys_subcall + 2) |
Mike Frysinger | 330a895 | 2011-02-19 15:48:52 -0500 | [diff] [blame] | 505 | #define SYS_msgsys_subcall 203 |
| 506 | #define SYS_msgsys_nsubcalls 4 |
| 507 | #define SYS_msgget (SYS_msgsys_subcall + 0) |
| 508 | #define SYS_msgctl (SYS_msgsys_subcall + 1) |
| 509 | #define SYS_msgrcv (SYS_msgsys_subcall + 2) |
| 510 | #define SYS_msgsnd (SYS_msgsys_subcall + 3) |
Mike Frysinger | 330a895 | 2011-02-19 15:48:52 -0500 | [diff] [blame] | 511 | #define SYS_shmsys_subcall 207 |
| 512 | #define SYS_shmsys_nsubcalls 4 |
| 513 | #define SYS_shmat (SYS_shmsys_subcall + 0) |
| 514 | #define SYS_shmctl (SYS_shmsys_subcall + 1) |
| 515 | #define SYS_shmdt (SYS_shmsys_subcall + 2) |
| 516 | #define SYS_shmget (SYS_shmsys_subcall + 3) |
| 517 | #endif |