$NetBSD: syscalls.master,v 1.44 2012/09/19 21:19:15 pooka Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 ; Derived from NetBSD's sys/compat/linux/arch/powerpc/syscalls.master ; from Linux's arch/mips/kernel/syscalls.h ; NetBSD mips COMPAT_LINUX system call name/number "master" file. ; (See syscalls.conf to see what it is processed into.) ; ; Expect problems with ; 48 signal: undefined in Linux??? ; 86 uselib: needs a.out ; ; Fields: number type [type-dependent ...] ; number system call number, must be in order ; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of ; the compatibility options defined in syscalls.conf. ; ; types: ; STD always included ; OBSOL obsolete, not included in system ; UNIMPL unimplemented, not included in system ; NODEF included, but don't define the syscall number ; NOARGS included, but don't define the syscall args structure ; INDIR included, but don't define the syscall args structure ; and allow it to be "really" varargs. ; ; The compat options are defined in the syscalls.conf file, and the ; compat option name is prefixed to the syscall name. Other than ; that, they're like NODEF (for 'compat' options), or STD (for ; 'libcompat' options). ; ; The type-dependent arguments are as follows: ; For STD, NODEF, NOARGS, and compat syscalls: ; { pseudo-proto } [alias] ; For other syscalls: ; [comment] ; ; #ifdef's, etc. may be included, and are copied to the output files. ; #include's are copied to the syscall names and switch definition files only. #include #include #include #include #include #include #include #include #include #include #include #include #include 0 NOARGS { int|linux_sys||nosys(void); } syscall 1 STD { int|linux_sys||exit(int rval); } 2 NOARGS { int|sys||fork(void); } 3 NOARGS { int|sys||read(int fd, char *buf, u_int nbyte); } 4 NOARGS { int|sys||write(int fd, char *buf, u_int nbyte); } 5 STD { int|linux_sys||open(const char *path, int flags, \ int mode); } 6 NOARGS { int|sys||close(int fd); } 7 STD { int|linux_sys||waitpid(int pid, int *status, \ int options);} 8 STD { int|linux_sys||creat(const char *path, int mode); } 9 NOARGS { int|sys||link(const char *path, const char *link); } 10 STD { int|linux_sys||unlink(const char *path); } 11 NOARGS { int|sys||execve(const char *path, char **argp, \ char **envp); } 12 NOARGS { int|sys||chdir(const char *path); } 13 STD { int|linux_sys||time(linux_time_t *t); } 14 STD { int|linux_sys||mknod(const char *path, int mode, \ int dev); } 15 NOARGS { int|sys||chmod(const char *path, int mode); } 16 NOARGS { int|sys||__posix_lchown(const char *path, int uid, \ int gid); } 17 UNIMPL 18 OBSOL ostat 19 NOARGS { long|compat_43_sys||lseek(int fd, long offset, \ int whence); } 20 NOARGS { pid_t|sys||getpid(void); } 21 UNIMPL mount 22 OBSOL umount 23 NOARGS { int|sys||setuid(uid_t uid); } 24 NOARGS { uid_t|sys||getuid(void); } 25 STD { int|linux_sys||stime(linux_time_t *t); } 26 STD { int|linux_sys||ptrace(long request, long pid, \ long addr, long data); } 27 STD { int|linux_sys||alarm(unsigned int secs); } 28 OBSOL ofstat 29 STD { int|linux_sys||pause(void); } 30 STD { int|linux_sys||utime(const char *path, \ struct linux_utimbuf *times); } 31 UNIMPL 32 UNIMPL 33 NOARGS { int|sys||access(const char *path, int flags); } 34 STD { int|linux_sys||nice(int incr); } 35 UNIMPL 36 NOARGS { int|sys||sync(void); } 37 STD { int|linux_sys||kill(int pid, int signum); } 38 NOARGS { int|sys||__posix_rename(const char *from, \ const char *to); } 39 NOARGS { int|sys||mkdir(const char *path, int mode); } 40 NOARGS { int|sys||rmdir(const char *path); } 41 NOARGS { int|sys||dup(u_int fd); } 42 STD { int|linux_sys||pipe(int *pfds); } 43 STD { int|linux_sys||times(struct times *tms); } 44 UNIMPL 45 STD { int|linux_sys||brk(char *nsize); } 46 NOARGS { int|sys||setgid(gid_t gid); } 47 NOARGS { gid_t|sys||getgid(void); } 48 STD { int|linux_sys||signal(int signum, \ linux___sighandler_t handler); } 49 NOARGS { uid_t|sys||geteuid(void); } 50 NOARGS { gid_t|sys||getegid(void); } 51 NOARGS { int|sys||acct(char *path); } 52 UNIMPL umount 53 UNIMPL 54 STD { int|linux_sys||ioctl(int fd, u_long com, \ void *data); } 55 STD { int|linux_sys||fcntl(int fd, int cmd, void *arg); } 56 OBSOL mpx 57 NOARGS { int|sys||setpgid(int pid, int pgid); } 58 UNIMPL 59 STD { int|linux_sys||olduname(struct linux_old_utsname \ *up); } 60 NOARGS { int|sys||umask(int newmask); } 61 NOARGS { int|sys||chroot(char *path); } 62 UNIMPL ustat 63 NOARGS { int|sys||dup2(u_int from, u_int to); } 64 NOARGS { pid_t|sys||getppid(void); } 65 NOARGS { int|sys||getpgrp(void); } 66 NOARGS { int|sys||setsid(void); } 67 STD { int|linux_sys||sigaction(int signum, \ const struct linux_old_sigaction *nsa, \ struct linux_old_sigaction *osa); } 68 STD { int|linux_sys||siggetmask(void); } 69 STD { int|linux_sys||sigsetmask(linux_old_sigset_t mask); } 70 NOARGS { int|sys||setreuid(uid_t ruid, uid_t euid); } 71 NOARGS { int|sys||setregid(gid_t rgid, gid_t egid); } 72 STD { int|linux_sys||sigsuspend(void *restart, \ int oldmask, int mask); } 73 STD { int|linux_sys||sigpending(linux_old_sigset_t *set); } 74 NOARGS { int|compat_43_sys||sethostname(char *hostname, \ u_int len);} 75 STD { int|linux_sys||setrlimit(u_int which, \ struct orlimit *rlp); } 76 STD { int|linux_sys||getrlimit(u_int which, \ struct orlimit *rlp); } 77 NOARGS { int|compat_50_sys||getrusage(int who, \ struct rusage50 *rusage); } 78 STD { int|linux_sys||gettimeofday(struct timeval50 *tp, \ struct timezone *tzp); } 79 STD { int|linux_sys||settimeofday(struct timeval50 *tp, \ struct timezone *tzp); } 80 NOARGS { int|sys||getgroups(u_int gidsetsize, gid_t *gidset); } 81 NOARGS { int|sys||setgroups(u_int gidsetsize, gid_t *gidset); } 82 UNIMPL old_select 83 NOARGS { int|sys||symlink(const char *path, const char *to); } 84 NOARGS { int|compat_43_sys||lstat(const char *path, \ struct stat43 *up); } oolstat 85 NOARGS { int|sys||readlink(const char *name, char *buf, \ int count); } 86 UNIMPL uselib ;86 STD { int|linux_sys||uselib(const char *path); } 87 STD { int|linux_sys||swapon(char *name); } 88 STD { int|linux_sys||reboot(int magic1, int magic2, \ int cmd, void *arg); } 89 STD { int|linux_sys||readdir(int fd, void *dent, \ unsigned int count); } 90 NOARGS { int|linux_sys||mmap(unsigned long addr, size_t len, \ int prot, int flags, int fd, linux_off_t offset); } 91 NOARGS { int|sys||munmap(void *addr, int len); } 92 NOARGS { int|compat_43_sys||truncate(const char *path, \ long length); } 93 NOARGS { int|compat_43_sys||ftruncate(int fd, long length); } 94 NOARGS { int|sys||fchmod(int fd, int mode); } 95 NOARGS { int|sys||__posix_fchown(int fd, int uid, int gid); } 96 STD { int|linux_sys||getpriority(int which, int who); } 97 NOARGS { int|sys||setpriority(int which, int who, int prio); } 98 UNIMPL 99 STD { int|linux_sys||statfs(const char *path, \ struct linux_statfs *sp); } 100 STD { int|linux_sys||fstatfs(int fd, \ struct linux_statfs *sp); } 101 STD { int|linux_sys||ioperm(unsigned int lo, \ unsigned int hi, int val); } 102 STD { int|linux_sys||socketcall(int what, void *args); } 103 UNIMPL syslog 104 NOARGS { int|compat_50_sys||setitimer(int which, \ struct itimerval50 *itv, \ struct itimerval50 *oitv); } 105 NOARGS { int|compat_50_sys||getitimer(int which, \ struct itimerval50 *itv); } 106 STD { int|linux_sys||stat(const char *path, \ struct linux_stat *sp); } 107 STD { int|linux_sys||lstat(const char *path, \ struct linux_stat *sp); } 108 STD { int|linux_sys||fstat(int fd, struct linux_stat *sp); } 109 STD { int|linux_sys||uname(struct linux_utsname *up); } 110 UNIMPL iopl 111 UNIMPL vhangup 112 UNIMPL idle 113 UNIMPL vm86old 114 STD { int|linux_sys||wait4(int pid, int *status, \ int options, struct rusage50 *rusage); } 115 STD { int|linux_sys||swapoff(const char *path); } 116 STD { int|linux_sys||sysinfo(struct linux_sysinfo *arg); } 117 STD { int|linux_sys||ipc(int what, long a1, long a2, \ long a3, void *ptr); } 118 NOARGS { int|sys||fsync(int fd); } 119 STD { int|linux_sys||sigreturn(struct linux_sigframe *sf); } 120 STD { int|linux_sys||clone(int flags, void *stack, \ void *parent_tidptr, void *tls, void *child_tidptr); } 121 STD { int|linux_sys||setdomainname(char *domainname, \ int len); } 122 STD { int|linux_sys||new_uname(struct linux_utsname *up); } 123 UNIMPL modify_ldt 124 UNIMPL adjtimex 125 STD { int|linux_sys||mprotect(const void *start, \ unsigned long len, int prot); } 126 STD { int|linux_sys||sigprocmask(int how, \ const linux_old_sigset_t *set, \ linux_old_sigset_t *oset); } 127 UNIMPL create_module 128 UNIMPL init_module 129 UNIMPL delete_module 130 UNIMPL get_kernel_syms 131 UNIMPL quotactl 132 NOARGS { pid_t|sys||getpgid(pid_t pid); } 133 NOARGS { int|sys||fchdir(int fd); } 134 UNIMPL bdflush 135 UNIMPL sysfs 136 STD { int|linux_sys||personality(unsigned long per); } 137 UNIMPL afs_syscall 138 STD { int|linux_sys||setfsuid(uid_t uid); } 139 STD { int|linux_sys||setfsgid(gid_t gid); } 140 STD { int|linux_sys||llseek(int fd, u_int32_t ohigh, \ u_int32_t olow, void *res, int whence); } 141 STD { int|linux_sys||getdents(int fd, \ struct linux_dirent *dent, unsigned int count); } 142 STD { int|linux_sys||select(int nfds, fd_set *readfds, \ fd_set *writefds, fd_set *exceptfds, \ struct timeval50 *timeout); } 143 NOARGS { int|sys||flock(int fd, int how); } 144 NOARGS { int|sys|13|msync(void *addr, size_t len, int flags); } 145 NOARGS { int|sys||readv(int fd, struct iovec *iovp, \ u_int iovcnt); } 146 NOARGS { int|sys||writev(int fd, struct iovec *iovp, \ u_int iovcnt); } 147 STD { int|linux_sys||cacheflush(void *addr, \ int bytes, int cache); } 148 UNIMPL cachectl 149 STD { int|linux_sys||sysmips(long cmd, long arg1, \ long arg2, long arg3); } 150 UNIMPL 151 NOARGS { pid_t|sys||getsid(pid_t pid); } 152 STD { int|linux_sys||fdatasync(int fd); } 153 STD { int|linux_sys||__sysctl(struct linux___sysctl *lsp); } 154 NOARGS { int|sys||mlock(void *addr, size_t len); } 155 NOARGS { int|sys||munlock(void *addr, size_t len); } 156 NOARGS { int|sys||mlockall(int flags); } 157 NOARGS { int|sys||munlockall(void); } 158 STD { int|linux_sys||sched_setparam(pid_t pid, \ const struct linux_sched_param *sp); } 159 STD { int|linux_sys||sched_getparam(pid_t pid, \ struct linux_sched_param *sp); } 160 STD { int|linux_sys||sched_setscheduler(pid_t pid, \ int policy, const struct linux_sched_param *sp); } 161 STD { int|linux_sys||sched_getscheduler(pid_t pid); } 162 STD { int|linux_sys||sched_yield(void); } 163 STD { int|linux_sys||sched_get_priority_max(int policy); } 164 STD { int|linux_sys||sched_get_priority_min(int policy); } 165 UNIMPL sched_rr_get_interval 166 STD { int|linux_sys||nanosleep( \ const struct linux_timespec *rqtp, \ struct linux_timespec *rmtp); } 167 STD { void *|linux_sys||mremap(void *old_address, \ size_t old_size, size_t new_size, u_long flags); } 168 NOARGS { int|linux_sys||accept(int s, \ struct osockaddr *name, int *anamelen); } 169 NOARGS { int|linux_sys||bind(int s, \ const struct osockaddr *name, int namelen); } 170 NOARGS { int|linux_sys||connect(int s, \ const struct sockaddr *name, int namelen); } 171 NOARGS { int|linux_sys||getpeername(int fdes, void *asa, \ int *alen); } 172 NOARGS { int|linux_sys||getsockname(int fdes, void *asa, \ int *alen); } 173 NOARGS { int|linux_sys||getsockopt(int s, int level, \ int optname, void *optval, int *optlen); } 174 NOARGS { int|sys||listen(int s, int backlog); } 175 NOARGS { int|linux_sys||recv(int s, void *buf, int len, \ int flags); } 176 NOARGS { int|linux_sys||recvfrom(int s, void *buf, int len, \ int flags, struct osockaddr *from, \ int *fromlenaddr); } 177 NOARGS { int|linux_sys||recvmsg(int s, \ struct linux_msghdr *msg, u_int flags); } 178 NOARGS { int|linux_sys||send(int s, void *buf, int len, \ int flags); } 179 NOARGS { int|linux_sys||sendmsg(int s, \ struct linux_msghdr *msg, u_int flags); } 180 NOARGS { int|linux_sys||sendto(int s, void *msg, \ int len, int flags, struct osockaddr *to, \ int tolen); } 181 NOARGS { int|linux_sys||setsockopt(int s, int level, \ int optname, void *optval, int optlen); } 182 UNIMPL shutdown 183 NOARGS { int|linux_sys||socket(int domain, int type, \ int protocol); } 184 NOARGS { int|linux_sys||socketpair(int domain, int type, \ int protocol, int *rsv); } 185 STD { int|linux_sys||setresuid(uid_t ruid, uid_t euid, \ uid_t suid); } 186 STD { int|linux_sys||getresuid(uid_t *ruid, uid_t *euid, \ uid_t *suid); } 187 UNIMPL query_module 188 NOARGS { int|sys||poll(struct pollfd *fds, u_int nfds, \ int timeout); } 189 UNIMPL nfsservctl 190 STD { int|linux_sys||setresgid(gid_t rgid, gid_t egid, \ gid_t sgid); } 191 STD { int|linux_sys||getresgid(gid_t *rgid, gid_t *egid, \ gid_t *sgid); } 192 UNIMPL prctl 193 STD { int|linux_sys||rt_sigreturn( \ struct linux_pt_regs *regs); } 194 STD { int|linux_sys||rt_sigaction(int signum, \ const struct linux_sigaction *nsa, \ struct linux_sigaction *osa, \ size_t sigsetsize); } 195 STD { int|linux_sys||rt_sigprocmask(int how, \ const linux_sigset_t *set, \ linux_sigset_t *oset, \ size_t sigsetsize); } 196 STD { int|linux_sys||rt_sigpending( \ linux_sigset_t *set, \ size_t sigsetsize); } 197 STD { int|linux_sys||rt_sigtimedwait( \ const linux_sigset_t *set, \ linux_siginfo_t *info, \ const struct linux_timespec *timeout); } 198 STD { int|linux_sys||rt_queueinfo(int pid, int signum, \ linux_siginfo_t *uinfo); } 199 STD { int|linux_sys||rt_sigsuspend(linux_sigset_t *unewset, \ size_t sigsetsize); } 200 STD { int|linux_sys||pread(int fd, char *buf, \ size_t nbyte, linux_off_t offset); } 201 STD { int|linux_sys||pwrite(int fd, char *buf, \ size_t nbyte, linux_off_t offset); } 202 NOARGS { int|sys||__posix_chown(const char *path, \ int uid, int gid); } 203 NOARGS { int|sys||__getcwd(char *bufp, size_t length); } 204 UNIMPL capget 205 UNIMPL capset 206 STD { int|linux_sys||sigaltstack( \ const struct linux_sigaltstack *ss, \ struct linux_sigaltstack *oss); } 207 UNIMPL sendfile 208 UNIMPL 209 UNIMPL #define linux_sys_mmap2_args linux_sys_mmap_args 210 NOARGS { linux_off_t|linux_sys||mmap2(unsigned long addr, \ size_t len, int prot, int flags, int fd, \ linux_off_t offset); } 211 STD { int|linux_sys||truncate64(const char *path, \ off_t length); } 212 STD { int|linux_sys||ftruncate64(unsigned int fd, \ off_t length); } 213 STD { int|linux_sys||stat64(const char *path, \ struct linux_stat64 *sp); } 214 STD { int|linux_sys||lstat64(const char *path, \ struct linux_stat64 *sp); } 215 STD { int|linux_sys||fstat64(int fd, \ struct linux_stat64 *sp); } 216 UNIMPL pivot_root 217 NOARGS { int|sys||mincore(void *addr, size_t len, char *vec); } 218 NOARGS { int|sys||madvise(void *addr, size_t len, int behav); } 219 STD { int|linux_sys||getdents64(int fd, \ struct linux_dirent64 *dent, unsigned int count); } 220 STD { int|linux_sys||fcntl64(int fd, \ int cmd, void *arg); } 221 UNIMPL /* reserved */ 222 NOARGS { pid_t|linux_sys||gettid(void); } 223 UNIMPL readahead 224 STD { int|linux_sys||setxattr(char *path, char *name, \ void *value, size_t size, int flags); } 225 STD { int|linux_sys||lsetxattr(char *path, char *name, \ void *value, size_t size, int flags); } 226 STD { int|linux_sys||fsetxattr(int fd, char *name, \ void *value, size_t size, int flags); } 227 STD { ssize_t|linux_sys||getxattr(char *path, char *name, \ void *value, size_t size); } 228 STD { ssize_t|linux_sys||lgetxattr(char *path, char *name, \ void *value, size_t size); } 229 STD { ssize_t|linux_sys||fgetxattr(int fd, char *name, \ void *value, size_t size); } 230 STD { ssize_t|linux_sys||listxattr(char *path, char *list, \ size_t size); } 231 STD { ssize_t|linux_sys||llistxattr(char *path, char *list, \ size_t size); } 232 STD { ssize_t|linux_sys||flistxattr(int fd, char *list, \ size_t size); } 233 STD { int|linux_sys||removexattr(char *path, char *name); } 234 STD { int|linux_sys||lremovexattr(char *path, char *name); } 235 STD { int|linux_sys||fremovexattr(int fd, char *name); } 236 STD { int|linux_sys||tkill(int tid, int sig); } 237 UNIMPL sendfile64 238 STD { int|linux_sys||futex(int *uaddr, int op, int val, \ const struct linux_timespec *timeout, int *uaddr2, \ int val3); } 239 STD { int|linux_sys||sched_setaffinity(pid_t pid, \ unsigned int len, unsigned long *mask); } 240 STD { int|linux_sys||sched_getaffinity(pid_t pid, \ unsigned int len, unsigned long *mask); } 241 UNIMPL io_setup 242 UNIMPL io_destroy 243 UNIMPL io_getevents 244 UNIMPL io_submit 245 UNIMPL io_cancel 246 STD { int|linux_sys||exit_group(int error_code); } 247 UNIMPL lookup_dcookie 248 UNIMPL epoll_create 249 UNIMPL epoll_ctl 250 UNIMPL epoll_wait 251 UNIMPL remap_file_pages 252 STD { int|linux_sys||set_tid_address(int *tid); } 253 UNIMPL restart_syscall 254 STD { int|linux_sys||fadvise64(int fd, \ linux_off_t offset, size_t len, int advice); } 255 STD { int|linux_sys||statfs64(const char *path, \ size_t sz, struct linux_statfs64 *sp); } 256 STD { int|linux_sys||fstatfs64(int fd, \ size_t sz, struct linux_statfs64 *sp); } 257 UNIMPL timer_create 258 UNIMPL timer_settime 259 UNIMPL timer_gettime 260 UNIMPL timer_getoverrun 261 UNIMPL timer_delete 262 STD { int|linux_sys||clock_settime(clockid_t which, \ struct linux_timespec *tp); } 263 STD { int|linux_sys||clock_gettime(clockid_t which, \ struct linux_timespec *tp); } 264 STD { int|linux_sys||clock_getres(clockid_t which, \ struct linux_timespec *tp); } 265 STD { int|linux_sys||clock_nanosleep(clockid_t which, \ int flags, struct linux_timespec *rqtp, \ struct linux_timespec *rmtp); } 266 STD { int|linux_sys||tgkill(int tgid, int tid, int sig); } 267 UNIMPL utimes 268 UNIMPL mbind 269 UNIMPL get_mempolicy 270 UNIMPL set_mempolicy 271 UNIMPL mq_open 272 UNIMPL mq_unlink 273 UNIMPL mq_timedsend 274 UNIMPL mq_timedreceive 275 UNIMPL mq_notify 276 UNIMPL mq_getsetattr 277 UNIMPL vserve 278 UNIMPL waitid 279 UNIMPL setaltroot 280 UNIMPL add_key 281 UNIMPL request_key 282 UNIMPL keyctl 283 STD { int|linux_sys||set_thread_area(void *tls); } 284 UNIMPL inotify_init 285 UNIMPL inotify_add_watch 286 UNIMPL inotify_rm_watch 287 UNIMPL migrate_pages 288 UNIMPL openat 289 UNIMPL mkdirat 290 UNIMPL mknodat 291 UNIMPL fchownat 292 UNIMPL futimesat 293 UNIMPL fstatat64 294 UNIMPL unlinkat 295 UNIMPL renameat 296 UNIMPL linkat 297 UNIMPL symlinkat 298 UNIMPL readlinkat 299 UNIMPL fchmodat 300 UNIMPL faccessat 301 UNIMPL pselect6 302 STD { int|linux_sys||ppoll(struct pollfd *fds, int nfds, \ struct linux_timespec *timeout, \ linux_sigset_t *sigset); } 303 UNIMPL unshare 304 UNIMPL splice 305 UNIMPL sync_file_range 306 UNIMPL tee 307 UNIMPL vmsplice 308 UNIMPL move_pages 309 STD { int|linux_sys||set_robust_list( \ struct linux_robust_list_head *head, size_t len); } 310 STD { int|linux_sys||get_robust_list(int pid, \ struct linux_robust_list_head **head, \ size_t *len); } 311 UNIMPL kexec_load 312 UNIMPL getcpu 313 UNIMPL epoll_pwait 314 UNIMPL ioprio_set 315 UNIMPL ioprio_get 316 UNIMPL utimensat 317 UNIMPL signalfd 318 UNIMPL timerfd 319 UNIMPL eventfd 320 UNIMPL fallocate 321 UNIMPL timerfd_create 322 UNIMPL timerfd_gettime 323 UNIMPL timerfd_settime 324 UNIMPL signalfd4 325 UNIMPL eventfd2 326 UNIMPL epoll_create1 327 STD { int|linux_sys||dup3(int from, int to, int flags); } 328 STD { int|linux_sys||pipe2(int *pfds, int flags); } 329 UNIMPL inotify_init1 330 UNIMPL preadv 331 UNIMPL pwritev 332 UNIMPL rt_tgsigqueueinfo 333 UNIMPL perf_event_open 334 UNIMPL accept4 335 UNIMPL recvmmsg