1 1.1 fvdl /* 2 1.1 fvdl * System call numbers. 3 1.1 fvdl * 4 1.1 fvdl * DO NOT EDIT-- this file is automatically generated. 5 1.24 perry * $NetBSD: linux_syscall.h,v 1.24 1998/01/05 18:23:10 perry Exp $ 6 1.23 christos * created from NetBSD: syscalls.master,v 1.21 1997/10/16 23:53:07 christos Exp 7 1.1 fvdl */ 8 1.1 fvdl 9 1.18 thorpej /* syscall: "syscall" ret: "int" args: */ 10 1.1 fvdl #define LINUX_SYS_syscall 0 11 1.18 thorpej 12 1.18 thorpej /* syscall: "exit" ret: "int" args: "int" */ 13 1.1 fvdl #define LINUX_SYS_exit 1 14 1.18 thorpej 15 1.18 thorpej /* syscall: "fork" ret: "int" args: */ 16 1.14 mycroft #define LINUX_SYS_fork 2 17 1.18 thorpej 18 1.18 thorpej /* syscall: "read" ret: "int" args: "int" "char *" "u_int" */ 19 1.1 fvdl #define LINUX_SYS_read 3 20 1.18 thorpej 21 1.18 thorpej /* syscall: "write" ret: "int" args: "int" "char *" "u_int" */ 22 1.1 fvdl #define LINUX_SYS_write 4 23 1.18 thorpej 24 1.18 thorpej /* syscall: "open" ret: "int" args: "char *" "int" "int" */ 25 1.14 mycroft #define LINUX_SYS_open 5 26 1.18 thorpej 27 1.18 thorpej /* syscall: "close" ret: "int" args: "int" */ 28 1.1 fvdl #define LINUX_SYS_close 6 29 1.18 thorpej 30 1.18 thorpej /* syscall: "waitpid" ret: "int" args: "int" "int *" "int" */ 31 1.14 mycroft #define LINUX_SYS_waitpid 7 32 1.18 thorpej 33 1.18 thorpej /* syscall: "creat" ret: "int" args: "char *" "int" */ 34 1.14 mycroft #define LINUX_SYS_creat 8 35 1.18 thorpej 36 1.18 thorpej /* syscall: "link" ret: "int" args: "char *" "char *" */ 37 1.1 fvdl #define LINUX_SYS_link 9 38 1.18 thorpej 39 1.18 thorpej /* syscall: "unlink" ret: "int" args: "char *" */ 40 1.14 mycroft #define LINUX_SYS_unlink 10 41 1.18 thorpej 42 1.18 thorpej /* syscall: "execve" ret: "int" args: "char *" "char **" "char **" */ 43 1.14 mycroft #define LINUX_SYS_execve 11 44 1.18 thorpej 45 1.18 thorpej /* syscall: "chdir" ret: "int" args: "char *" */ 46 1.14 mycroft #define LINUX_SYS_chdir 12 47 1.18 thorpej 48 1.18 thorpej /* syscall: "time" ret: "int" args: "linux_time_t *" */ 49 1.14 mycroft #define LINUX_SYS_time 13 50 1.18 thorpej 51 1.18 thorpej /* syscall: "mknod" ret: "int" args: "char *" "int" "int" */ 52 1.14 mycroft #define LINUX_SYS_mknod 14 53 1.18 thorpej 54 1.18 thorpej /* syscall: "chmod" ret: "int" args: "char *" "int" */ 55 1.14 mycroft #define LINUX_SYS_chmod 15 56 1.18 thorpej 57 1.18 thorpej /* syscall: "chown" ret: "int" args: "char *" "int" "int" */ 58 1.14 mycroft #define LINUX_SYS_chown 16 59 1.18 thorpej 60 1.18 thorpej /* syscall: "break" ret: "int" args: "char *" */ 61 1.14 mycroft #define LINUX_SYS_break 17 62 1.18 thorpej 63 1.14 mycroft /* 18 is obsolete ostat */ 64 1.18 thorpej /* syscall: "lseek" ret: "long" args: "int" "long" "int" */ 65 1.14 mycroft #define LINUX_SYS_lseek 19 66 1.18 thorpej 67 1.18 thorpej /* syscall: "getpid" ret: "pid_t" args: */ 68 1.1 fvdl #define LINUX_SYS_getpid 20 69 1.18 thorpej 70 1.18 thorpej /* syscall: "setuid" ret: "int" args: "uid_t" */ 71 1.1 fvdl #define LINUX_SYS_setuid 23 72 1.18 thorpej 73 1.18 thorpej /* syscall: "getuid" ret: "uid_t" args: */ 74 1.1 fvdl #define LINUX_SYS_getuid 24 75 1.18 thorpej 76 1.18 thorpej /* syscall: "alarm" ret: "int" args: "unsigned int" */ 77 1.14 mycroft #define LINUX_SYS_alarm 27 78 1.18 thorpej 79 1.14 mycroft /* 28 is obsolete ofstat */ 80 1.18 thorpej /* syscall: "pause" ret: "int" args: */ 81 1.14 mycroft #define LINUX_SYS_pause 29 82 1.18 thorpej 83 1.18 thorpej /* syscall: "utime" ret: "int" args: "char *" "struct linux_utimbuf *" */ 84 1.14 mycroft #define LINUX_SYS_utime 30 85 1.18 thorpej 86 1.18 thorpej /* syscall: "access" ret: "int" args: "char *" "int" */ 87 1.14 mycroft #define LINUX_SYS_access 33 88 1.19 augustss 89 1.19 augustss /* syscall: "nice" ret: "int" args: "int" */ 90 1.19 augustss #define LINUX_SYS_nice 34 91 1.18 thorpej 92 1.18 thorpej /* syscall: "sync" ret: "int" args: */ 93 1.1 fvdl #define LINUX_SYS_sync 36 94 1.18 thorpej 95 1.18 thorpej /* syscall: "kill" ret: "int" args: "int" "int" */ 96 1.14 mycroft #define LINUX_SYS_kill 37 97 1.18 thorpej 98 1.18 thorpej /* syscall: "rename" ret: "int" args: "char *" "char *" */ 99 1.14 mycroft #define LINUX_SYS_rename 38 100 1.18 thorpej 101 1.18 thorpej /* syscall: "mkdir" ret: "int" args: "char *" "int" */ 102 1.14 mycroft #define LINUX_SYS_mkdir 39 103 1.18 thorpej 104 1.18 thorpej /* syscall: "rmdir" ret: "int" args: "char *" */ 105 1.14 mycroft #define LINUX_SYS_rmdir 40 106 1.18 thorpej 107 1.18 thorpej /* syscall: "dup" ret: "int" args: "u_int" */ 108 1.1 fvdl #define LINUX_SYS_dup 41 109 1.18 thorpej 110 1.18 thorpej /* syscall: "pipe" ret: "int" args: "int *" */ 111 1.14 mycroft #define LINUX_SYS_pipe 42 112 1.18 thorpej 113 1.18 thorpej /* syscall: "times" ret: "int" args: "struct times *" */ 114 1.14 mycroft #define LINUX_SYS_times 43 115 1.18 thorpej 116 1.18 thorpej /* syscall: "brk" ret: "int" args: "char *" */ 117 1.14 mycroft #define LINUX_SYS_brk 45 118 1.18 thorpej 119 1.18 thorpej /* syscall: "setgid" ret: "int" args: "gid_t" */ 120 1.1 fvdl #define LINUX_SYS_setgid 46 121 1.18 thorpej 122 1.18 thorpej /* syscall: "getgid" ret: "gid_t" args: */ 123 1.1 fvdl #define LINUX_SYS_getgid 47 124 1.18 thorpej 125 1.18 thorpej /* syscall: "signal" ret: "int" args: "int" "linux_handler_t" */ 126 1.14 mycroft #define LINUX_SYS_signal 48 127 1.18 thorpej 128 1.18 thorpej /* syscall: "geteuid" ret: "uid_t" args: */ 129 1.1 fvdl #define LINUX_SYS_geteuid 49 130 1.18 thorpej 131 1.18 thorpej /* syscall: "getegid" ret: "gid_t" args: */ 132 1.1 fvdl #define LINUX_SYS_getegid 50 133 1.18 thorpej 134 1.18 thorpej /* syscall: "acct" ret: "int" args: "char *" */ 135 1.1 fvdl #define LINUX_SYS_acct 51 136 1.18 thorpej 137 1.18 thorpej /* syscall: "ioctl" ret: "int" args: "int" "u_long" "caddr_t" */ 138 1.14 mycroft #define LINUX_SYS_ioctl 54 139 1.18 thorpej 140 1.18 thorpej /* syscall: "fcntl" ret: "int" args: "int" "int" "void *" */ 141 1.14 mycroft #define LINUX_SYS_fcntl 55 142 1.18 thorpej 143 1.18 thorpej /* syscall: "setpgid" ret: "int" args: "int" "int" */ 144 1.1 fvdl #define LINUX_SYS_setpgid 57 145 1.18 thorpej 146 1.18 thorpej /* syscall: "oldolduname" ret: "int" args: "struct linux_oldold_utsname *" */ 147 1.14 mycroft #define LINUX_SYS_oldolduname 59 148 1.18 thorpej 149 1.18 thorpej /* syscall: "umask" ret: "int" args: "int" */ 150 1.1 fvdl #define LINUX_SYS_umask 60 151 1.18 thorpej 152 1.18 thorpej /* syscall: "chroot" ret: "int" args: "char *" */ 153 1.1 fvdl #define LINUX_SYS_chroot 61 154 1.18 thorpej 155 1.18 thorpej /* syscall: "dup2" ret: "int" args: "u_int" "u_int" */ 156 1.1 fvdl #define LINUX_SYS_dup2 63 157 1.18 thorpej 158 1.18 thorpej /* syscall: "getppid" ret: "pid_t" args: */ 159 1.1 fvdl #define LINUX_SYS_getppid 64 160 1.18 thorpej 161 1.18 thorpej /* syscall: "getpgrp" ret: "int" args: */ 162 1.1 fvdl #define LINUX_SYS_getpgrp 65 163 1.18 thorpej 164 1.18 thorpej /* syscall: "setsid" ret: "int" args: */ 165 1.1 fvdl #define LINUX_SYS_setsid 66 166 1.18 thorpej 167 1.18 thorpej /* syscall: "sigaction" ret: "int" args: "int" "struct linux_sigaction *" "struct linux_sigaction *" */ 168 1.14 mycroft #define LINUX_SYS_sigaction 67 169 1.18 thorpej 170 1.18 thorpej /* syscall: "siggetmask" ret: "int" args: */ 171 1.14 mycroft #define LINUX_SYS_siggetmask 68 172 1.18 thorpej 173 1.18 thorpej /* syscall: "sigsetmask" ret: "int" args: "linux_sigset_t" */ 174 1.14 mycroft #define LINUX_SYS_sigsetmask 69 175 1.18 thorpej 176 1.18 thorpej /* syscall: "setreuid" ret: "int" args: "int" "int" */ 177 1.14 mycroft #define LINUX_SYS_setreuid 70 178 1.18 thorpej 179 1.18 thorpej /* syscall: "setregid" ret: "int" args: "int" "int" */ 180 1.14 mycroft #define LINUX_SYS_setregid 71 181 1.18 thorpej 182 1.18 thorpej /* syscall: "sigsuspend" ret: "int" args: "caddr_t" "int" "int" */ 183 1.14 mycroft #define LINUX_SYS_sigsuspend 72 184 1.18 thorpej 185 1.18 thorpej /* syscall: "sigpending" ret: "int" args: "linux_sigset_t *" */ 186 1.14 mycroft #define LINUX_SYS_sigpending 73 187 1.18 thorpej 188 1.18 thorpej /* syscall: "sethostname" ret: "int" args: "char *" "u_int" */ 189 1.14 mycroft #define LINUX_SYS_sethostname 74 190 1.18 thorpej 191 1.22 mycroft /* syscall: "setrlimit" ret: "int" args: "u_int" "struct orlimit *" */ 192 1.14 mycroft #define LINUX_SYS_setrlimit 75 193 1.18 thorpej 194 1.22 mycroft /* syscall: "getrlimit" ret: "int" args: "u_int" "struct orlimit *" */ 195 1.14 mycroft #define LINUX_SYS_getrlimit 76 196 1.18 thorpej 197 1.18 thorpej /* syscall: "getrusage" ret: "int" args: "int" "struct rusage *" */ 198 1.1 fvdl #define LINUX_SYS_getrusage 77 199 1.18 thorpej 200 1.18 thorpej /* syscall: "gettimeofday" ret: "int" args: "struct timeval *" "struct timezone *" */ 201 1.1 fvdl #define LINUX_SYS_gettimeofday 78 202 1.18 thorpej 203 1.18 thorpej /* syscall: "settimeofday" ret: "int" args: "struct timeval *" "struct timezone *" */ 204 1.1 fvdl #define LINUX_SYS_settimeofday 79 205 1.18 thorpej 206 1.18 thorpej /* syscall: "getgroups" ret: "int" args: "u_int" "gid_t *" */ 207 1.1 fvdl #define LINUX_SYS_getgroups 80 208 1.18 thorpej 209 1.18 thorpej /* syscall: "setgroups" ret: "int" args: "u_int" "gid_t *" */ 210 1.1 fvdl #define LINUX_SYS_setgroups 81 211 1.18 thorpej 212 1.18 thorpej /* syscall: "oldselect" ret: "int" args: "struct linux_select *" */ 213 1.14 mycroft #define LINUX_SYS_oldselect 82 214 1.18 thorpej 215 1.18 thorpej /* syscall: "symlink" ret: "int" args: "char *" "char *" */ 216 1.14 mycroft #define LINUX_SYS_symlink 83 217 1.18 thorpej 218 1.23 christos /* syscall: "oolstat" ret: "int" args: "char *" "struct stat43 *" */ 219 1.23 christos #define LINUX_SYS_oolstat 84 220 1.18 thorpej 221 1.18 thorpej /* syscall: "readlink" ret: "int" args: "char *" "char *" "int" */ 222 1.14 mycroft #define LINUX_SYS_readlink 85 223 1.18 thorpej 224 1.18 thorpej /* syscall: "uselib" ret: "int" args: "char *" */ 225 1.14 mycroft #define LINUX_SYS_uselib 86 226 1.18 thorpej 227 1.18 thorpej /* syscall: "swapon" ret: "int" args: "char *" */ 228 1.1 fvdl #define LINUX_SYS_swapon 87 229 1.18 thorpej 230 1.18 thorpej /* syscall: "reboot" ret: "int" args: "int" */ 231 1.1 fvdl #define LINUX_SYS_reboot 88 232 1.18 thorpej 233 1.18 thorpej /* syscall: "readdir" ret: "int" args: "int" "caddr_t" "unsigned int" */ 234 1.14 mycroft #define LINUX_SYS_readdir 89 235 1.18 thorpej 236 1.18 thorpej /* syscall: "mmap" ret: "int" args: "struct linux_mmap *" */ 237 1.14 mycroft #define LINUX_SYS_mmap 90 238 1.18 thorpej 239 1.18 thorpej /* syscall: "munmap" ret: "int" args: "caddr_t" "int" */ 240 1.1 fvdl #define LINUX_SYS_munmap 91 241 1.18 thorpej 242 1.18 thorpej /* syscall: "truncate" ret: "int" args: "char *" "long" */ 243 1.14 mycroft #define LINUX_SYS_truncate 92 244 1.18 thorpej 245 1.18 thorpej /* syscall: "ftruncate" ret: "int" args: "int" "long" */ 246 1.14 mycroft #define LINUX_SYS_ftruncate 93 247 1.18 thorpej 248 1.18 thorpej /* syscall: "fchmod" ret: "int" args: "int" "int" */ 249 1.1 fvdl #define LINUX_SYS_fchmod 94 250 1.18 thorpej 251 1.18 thorpej /* syscall: "fchown" ret: "int" args: "int" "int" "int" */ 252 1.14 mycroft #define LINUX_SYS_fchown 95 253 1.18 thorpej 254 1.18 thorpej /* syscall: "getpriority" ret: "int" args: "int" "int" */ 255 1.1 fvdl #define LINUX_SYS_getpriority 96 256 1.18 thorpej 257 1.18 thorpej /* syscall: "setpriority" ret: "int" args: "int" "int" "int" */ 258 1.1 fvdl #define LINUX_SYS_setpriority 97 259 1.18 thorpej 260 1.18 thorpej /* syscall: "profil" ret: "int" args: "caddr_t" "u_int" "u_int" "u_int" */ 261 1.1 fvdl #define LINUX_SYS_profil 98 262 1.18 thorpej 263 1.18 thorpej /* syscall: "statfs" ret: "int" args: "char *" "struct linux_statfs *" */ 264 1.14 mycroft #define LINUX_SYS_statfs 99 265 1.18 thorpej 266 1.18 thorpej /* syscall: "fstatfs" ret: "int" args: "int" "struct linux_statfs *" */ 267 1.14 mycroft #define LINUX_SYS_fstatfs 100 268 1.18 thorpej 269 1.18 thorpej /* syscall: "ioperm" ret: "int" args: "unsigned int" "unsigned int" "int" */ 270 1.14 mycroft #define LINUX_SYS_ioperm 101 271 1.18 thorpej 272 1.18 thorpej /* syscall: "socketcall" ret: "int" args: "int" "void *" */ 273 1.14 mycroft #define LINUX_SYS_socketcall 102 274 1.18 thorpej 275 1.18 thorpej /* syscall: "setitimer" ret: "int" args: "u_int" "struct itimerval *" "struct itimerval *" */ 276 1.1 fvdl #define LINUX_SYS_setitimer 104 277 1.18 thorpej 278 1.18 thorpej /* syscall: "getitimer" ret: "int" args: "u_int" "struct itimerval *" */ 279 1.1 fvdl #define LINUX_SYS_getitimer 105 280 1.18 thorpej 281 1.18 thorpej /* syscall: "stat" ret: "int" args: "char *" "struct linux_stat *" */ 282 1.14 mycroft #define LINUX_SYS_stat 106 283 1.18 thorpej 284 1.18 thorpej /* syscall: "lstat" ret: "int" args: "char *" "struct linux_stat *" */ 285 1.14 mycroft #define LINUX_SYS_lstat 107 286 1.18 thorpej 287 1.18 thorpej /* syscall: "fstat" ret: "int" args: "int" "struct linux_stat *" */ 288 1.14 mycroft #define LINUX_SYS_fstat 108 289 1.18 thorpej 290 1.18 thorpej /* syscall: "olduname" ret: "int" args: "struct linux_old_utsname *" */ 291 1.14 mycroft #define LINUX_SYS_olduname 109 292 1.18 thorpej 293 1.18 thorpej /* syscall: "iopl" ret: "int" args: "int" */ 294 1.14 mycroft #define LINUX_SYS_iopl 110 295 1.18 thorpej 296 1.18 thorpej /* syscall: "wait4" ret: "int" args: "int" "int *" "int" "struct rusage *" */ 297 1.14 mycroft #define LINUX_SYS_wait4 114 298 1.18 thorpej 299 1.18 thorpej /* syscall: "ipc" ret: "int" args: "int" "int" "int" "int" "caddr_t" */ 300 1.14 mycroft #define LINUX_SYS_ipc 117 301 1.18 thorpej 302 1.18 thorpej /* syscall: "fsync" ret: "int" args: "int" */ 303 1.1 fvdl #define LINUX_SYS_fsync 118 304 1.18 thorpej 305 1.18 thorpej /* syscall: "sigreturn" ret: "int" args: "struct linux_sigcontext *" */ 306 1.14 mycroft #define LINUX_SYS_sigreturn 119 307 1.18 thorpej 308 1.18 thorpej /* syscall: "setdomainname" ret: "int" args: "char *" "int" */ 309 1.14 mycroft #define LINUX_SYS_setdomainname 121 310 1.18 thorpej 311 1.18 thorpej /* syscall: "uname" ret: "int" args: "struct linux_utsname *" */ 312 1.14 mycroft #define LINUX_SYS_uname 122 313 1.18 thorpej 314 1.18 thorpej /* syscall: "modify_ldt" ret: "int" args: "int" "void *" "size_t" */ 315 1.14 mycroft #define LINUX_SYS_modify_ldt 123 316 1.18 thorpej 317 1.18 thorpej /* syscall: "mprotect" ret: "int" args: "caddr_t" "int" "int" */ 318 1.1 fvdl #define LINUX_SYS_mprotect 125 319 1.18 thorpej 320 1.18 thorpej /* syscall: "sigprocmask" ret: "int" args: "int" "linux_sigset_t *" "linux_sigset_t *" */ 321 1.14 mycroft #define LINUX_SYS_sigprocmask 126 322 1.18 thorpej 323 1.18 thorpej /* syscall: "getpgid" ret: "int" args: "int" */ 324 1.14 mycroft #define LINUX_SYS_getpgid 132 325 1.18 thorpej 326 1.18 thorpej /* syscall: "fchdir" ret: "int" args: "int" */ 327 1.1 fvdl #define LINUX_SYS_fchdir 133 328 1.18 thorpej 329 1.18 thorpej /* syscall: "personality" ret: "int" args: "int" */ 330 1.14 mycroft #define LINUX_SYS_personality 136 331 1.18 thorpej 332 1.18 thorpej /* syscall: "llseek" ret: "int" args: "int" "u_int32_t" "u_int32_t" "caddr_t" "int" */ 333 1.14 mycroft #define LINUX_SYS_llseek 140 334 1.18 thorpej 335 1.18 thorpej /* syscall: "getdents" ret: "int" args: "int" "void *" "unsigned" */ 336 1.14 mycroft #define LINUX_SYS_getdents 141 337 1.18 thorpej 338 1.18 thorpej /* syscall: "select" ret: "int" args: "int" "fd_set *" "fd_set *" "fd_set *" "struct timeval *" */ 339 1.14 mycroft #define LINUX_SYS_select 142 340 1.18 thorpej 341 1.18 thorpej /* syscall: "flock" ret: "int" args: "int" "int" */ 342 1.11 fvdl #define LINUX_SYS_flock 143 343 1.18 thorpej 344 1.18 thorpej /* syscall: "msync" ret: "int" args: "caddr_t" "int" "int" */ 345 1.16 fvdl #define LINUX_SYS_msync 144 346 1.18 thorpej 347 1.18 thorpej /* syscall: "readv" ret: "int" args: "int" "struct iovec *" "u_int" */ 348 1.16 fvdl #define LINUX_SYS_readv 145 349 1.18 thorpej 350 1.18 thorpej /* syscall: "writev" ret: "int" args: "int" "struct iovec *" "u_int" */ 351 1.16 fvdl #define LINUX_SYS_writev 146 352 1.18 thorpej 353 1.18 thorpej /* syscall: "getsid" ret: "int" args: "int" */ 354 1.17 fvdl #define LINUX_SYS_getsid 147 355 1.18 thorpej 356 1.18 thorpej /* syscall: "fdatasync" ret: "int" args: "int" */ 357 1.17 fvdl #define LINUX_SYS_fdatasync 148 358 1.18 thorpej 359 1.18 thorpej /* syscall: "__sysctl" ret: "int" args: "struct linux___sysctl *" */ 360 1.17 fvdl #define LINUX_SYS___sysctl 149 361 1.18 thorpej 362 1.18 thorpej /* syscall: "mlock" ret: "int" args: "caddr_t" "size_t" */ 363 1.17 fvdl #define LINUX_SYS_mlock 150 364 1.18 thorpej 365 1.18 thorpej /* syscall: "munlock" ret: "int" args: "caddr_t" "size_t" */ 366 1.17 fvdl #define LINUX_SYS_munlock 151 367 1.21 mycroft 368 1.21 mycroft /* syscall: "mremap" ret: "void *" args: "void *" "size_t" "size_t" "u_long" */ 369 1.21 mycroft #define LINUX_SYS_mremap 163 370 1.18 thorpej 371 1.17 fvdl #define LINUX_SYS_MAXSYSCALL 164 372