1 $NetBSD: syscalls.master,v 1.13 2000/02/03 10:03:00 abs Exp $ 2 3; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 4 5; NetBSD m68k COMPAT_LINUX system call name/number "master" file. 6; (See syscalls.conf to see what it is processed into.) 7; 8; Fields: number type [type-dependent ...] 9; number system call number, must be in order 10; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of 11; the compatibility options defined in syscalls.conf. 12; 13; types: 14; STD always included 15; OBSOL obsolete, not included in system 16; UNIMPL unimplemented, not included in system 17; NODEF included, but don't define the syscall number 18; NOARGS included, but don't define the syscall args structure 19; INDIR included, but don't define the syscall args structure 20; and allow it to be "really" varargs. 21; 22; The compat options are defined in the syscalls.conf file, and the 23; compat option name is prefixed to the syscall name. Other than 24; that, they're like NODEF (for 'compat' options), or STD (for 25; 'libcompat' options). 26; 27; The type-dependent arguments are as follows: 28; For STD, NODEF, NOARGS, and compat syscalls: 29; { pseudo-proto } [alias] 30; For other syscalls: 31; [comment] 32; 33; #ifdef's, etc. may be included, and are copied to the output files. 34; #include's are copied to the syscall names and switch definition files only. 35 36#include "opt_compat_netbsd.h" 37#include "opt_compat_43.h" 38 39#include <sys/param.h> 40#include <sys/poll.h> 41#include <sys/systm.h> 42#include <sys/signal.h> 43#include <sys/mount.h> 44#include <sys/syscallargs.h> 45 46#include <compat/linux/common/linux_types.h> 47#include <compat/linux/common/linux_signal.h> 48#include <compat/linux/common/linux_siginfo.h> 49#include <compat/linux/common/linux_machdep.h> 50 51#include <compat/linux/linux_syscallargs.h> 52 53 540 NOARGS { int sys_nosys(void); } syscall 551 NOARGS { int sys_exit(int rval); } 562 NOARGS { int sys_fork(void); } 573 NOARGS { int sys_read(int fd, char *buf, u_int nbyte); } 584 NOARGS { int sys_write(int fd, char *buf, u_int nbyte); } 595 STD { int linux_sys_open(const char *path, int flags, \ 60 int mode); } 616 NOARGS { int sys_close(int fd); } 627 STD { int linux_sys_waitpid(int pid, int *status, \ 63 int options);} 648 STD { int linux_sys_creat(const char *path, int mode); } 659 NOARGS { int sys_link(const char *path, const char *link); } 6610 STD { int linux_sys_unlink(const char *path); } 6711 STD { int linux_sys_execve(const char *path, char **argp, \ 68 char **envp); } 6912 STD { int linux_sys_chdir(const char *path); } 7013 STD { int linux_sys_time(linux_time_t *t); } 7114 STD { int linux_sys_mknod(const char *path, int mode, \ 72 int dev); } 7315 STD { int linux_sys_chmod(const char *path, int mode); } 74;16 lchown on i386; chown on m68k. 7516 STD { int linux_sys_chown(const char *path, \ 76 int uid, int gid); } 7717 OBSOL break 7818 OBSOL ostat 79#if !defined(_KERNEL) || defined(COMPAT_43) 8019 NOARGS { long compat_43_sys_lseek(int fd, long offset, \ 81 int whence); } 82#else 8319 UNIMPL compat_43_sys_lseek 84#endif 8520 NOARGS { pid_t sys_getpid(void); } 8621 UNIMPL mount 8722 OBSOL umount 8823 NOARGS { int sys_setuid(uid_t uid); } 8924 NOARGS { uid_t sys_getuid(void); } 9025 STD { int linux_sys_stime(linux_time_t *t); } 9126 STD { int linux_sys_ptrace(int request, int pid, \ 92 int addr, int data); } 9327 STD { int linux_sys_alarm(unsigned int secs); } 9428 OBSOL ofstat 9529 STD { int linux_sys_pause(void); } 9630 STD { int linux_sys_utime(const char *path, \ 97 struct linux_utimbuf *times); } 9831 OBSOL stty 9932 OBSOL gtty 10033 STD { int linux_sys_access(const char *path, int flags); } 10134 STD { int linux_sys_nice(int incr); } 10235 OBSOL ftime 10336 NOARGS { int sys_sync(void); } 10437 STD { int linux_sys_kill(int pid, int signum); } 10538 STD { int linux_sys_rename(const char *from, \ 106 const char *to); } 10739 STD { int linux_sys_mkdir(const char *path, int mode); } 10840 STD { int linux_sys_rmdir(const char *path); } 10941 NOARGS { int sys_dup(u_int fd); } 11042 STD { int linux_sys_pipe(int *pfds); } 11143 STD { int linux_sys_times(struct times *tms); } 11244 OBSOL prof 11345 STD { int linux_sys_brk(char *nsize); } 11446 NOARGS { int sys_setgid(gid_t gid); } 11547 NOARGS { gid_t sys_getgid(void); } 11648 STD { int linux_sys_signal(int signum, \ 117 linux_handler_t handler); } 11849 NOARGS { uid_t sys_geteuid(void); } 11950 NOARGS { gid_t sys_getegid(void); } 12051 NOARGS { int sys_acct(char *path); } 12152 UNIMPL umount 12253 OBSOL lock 12354 STD { int linux_sys_ioctl(int fd, u_long com, \ 124 caddr_t data); } 12555 STD { int linux_sys_fcntl(int fd, int cmd, void *arg); } 12656 OBSOL mpx 12757 NOARGS { int sys_setpgid(int pid, int pgid); } 12858 OBSOL ulimit 12959 UNIMPL oldolduname 13060 NOARGS { int sys_umask(int newmask); } 13161 NOARGS { int sys_chroot(char *path); } 13262 UNIMPL ustat 13363 NOARGS { int sys_dup2(u_int from, u_int to); } 13464 NOARGS { pid_t sys_getppid(void); } 13565 NOARGS { int sys_getpgrp(void); } 13666 NOARGS { int sys_setsid(void); } 13767 STD { int linux_sys_sigaction(int signum, \ 138 const struct linux_old_sigaction *nsa, \ 139 struct linux_old_sigaction *osa); } 14068 STD { int linux_sys_siggetmask(void); } 14169 STD { int linux_sys_sigsetmask(linux_old_sigset_t mask); } 14270 STD { int linux_sys_setreuid(int ruid, int euid); } 14371 STD { int linux_sys_setregid(int rgid, int egid); } 14472 STD { int linux_sys_sigsuspend(caddr_t restart, \ 145 int oldmask, int mask); } 14673 STD { int linux_sys_sigpending(linux_old_sigset_t *set); } 147#if !defined(_KERNEL) || defined(COMPAT_43) 14874 NOARGS { int compat_43_sys_sethostname(char *hostname, \ 149 u_int len);} 15075 NOARGS { int compat_43_sys_setrlimit(u_int which, \ 151 struct orlimit *rlp); } 15276 NOARGS { int compat_43_sys_getrlimit(u_int which, \ 153 struct orlimit *rlp); } 154#else 15574 UNIMPL compat_43_sys_sethostname 15675 UNIMPL compat_43_sys_setrlimit 15776 UNIMPL compat_43_sys_getrlimit 158#endif 15977 NOARGS { int sys_getrusage(int who, struct rusage *rusage); } 16078 NOARGS { int sys_gettimeofday(struct timeval *tp, \ 161 struct timezone *tzp); } 16279 NOARGS { int sys_settimeofday(struct timeval *tp, \ 163 struct timezone *tzp); } 16480 NOARGS { int sys_getgroups(u_int gidsetsize, gid_t *gidset); } 16581 NOARGS { int sys_setgroups(u_int gidsetsize, gid_t *gidset); } 16682 STD { int linux_sys_oldselect(struct linux_oldselect *lsp); } 16783 STD { int linux_sys_symlink(const char *path, \ 168 const char *to); } 169#if !defined(_KERNEL) || defined(COMPAT_43) 17084 NOARGS { int compat_43_sys_lstat(const char *path, \ 171 struct stat43 *up); } oolstat 172#else 17384 UNIMPL compat_43_sys_lstat 174#endif 17585 STD { int linux_sys_readlink(const char *name, char *buf, \ 176 int count); } 17786 STD { int linux_sys_uselib(const char *path); } 178#if !defined(_KERNEL) || defined(COMPAT_12) 17987 NOARGS { int compat_12_sys_swapon(char *name); } 180#else 18187 UNIMPL compat_12_sys_swapon 182#endif 18388 NOARGS { int sys_reboot(int opt); } 18489 STD { int linux_sys_readdir(int fd, caddr_t dent, \ 185 unsigned int count); } 18690 STD { int linux_sys_old_mmap(struct linux_oldmmap *lmp); } 18791 NOARGS { int sys_munmap(caddr_t addr, int len); } 18892 STD { int linux_sys_truncate(const char *path, \ 189 long length); } 190#if !defined(_KERNEL) || defined(COMPAT_43) 19193 NOARGS { int compat_43_sys_ftruncate(int fd, long length); } 192#else 19393 UNIMPL compat_43_sys_ftruncate 194#endif 19594 NOARGS { int sys_fchmod(int fd, int mode); } 19695 STD { int linux_sys_fchown(int fd, int uid, int gid); } 19796 NOARGS { int sys_getpriority(int which, int who); } 19897 NOARGS { int sys_setpriority(int which, int who, int prio); } 19998 NOARGS { int sys_profil(caddr_t samples, u_int size, \ 200 u_int offset, u_int scale); } 20199 STD { int linux_sys_statfs(const char *path, \ 202 struct linux_statfs *sp); } 203100 STD { int linux_sys_fstatfs(int fd, \ 204 struct linux_statfs *sp); } 205101 UNIMPL ioperm 206102 STD { int linux_sys_socketcall(int what, void *args); } 207103 UNIMPL syslog 208104 NOARGS { int sys_setitimer(u_int which, \ 209 struct itimerval *itv, struct itimerval *oitv); } 210105 NOARGS { int sys_getitimer(u_int which, \ 211 struct itimerval *itv); } 212106 STD { int linux_sys_stat(const char *path, \ 213 struct linux_stat *sp); } 214107 STD { int linux_sys_lstat(const char *path, \ 215 struct linux_stat *sp); } 216108 STD { int linux_sys_fstat(int fd, struct linux_stat *sp); } 217109 UNIMPL olduname 218110 UNIMPL iopl 219111 UNIMPL vhangup 220112 UNIMPL idle 221113 UNIMPL vm86old 222114 STD { int linux_sys_wait4(int pid, int *status, \ 223 int options, struct rusage *rusage); } 224115 UNIMPL swapoff 225116 UNIMPL sysinfo 226117 STD { int linux_sys_ipc(int what, int a1, int a2, int a3, \ 227 caddr_t ptr); } 228118 NOARGS { int sys_fsync(int fd); } 229119 STD { int linux_sys_sigreturn(void); } 230120 STD { int linux_sys_clone(int flags, void *stack); } 231#if !defined(_KERNEL) || defined(COMPAT_09) 232121 NOARGS { int compat_09_sys_setdomainname(char *name, \ 233 int len); } 234#else 235121 UNIMPL compat_09_sys_setdomainname 236#endif 237122 STD { int linux_sys_uname(struct linux_utsname *up); } 238123 STD { int linux_sys_cacheflush(unsigned long addr, \ 239 int scope, int cache, unsigned long len); } 240124 UNIMPL adjtimex 241125 NOARGS { int sys_mprotect(caddr_t addr, int len, int prot); } 242126 STD { int linux_sys_sigprocmask(int how, \ 243 const linux_old_sigset_t *set, \ 244 linux_old_sigset_t *oset); } 245127 UNIMPL create_module 246128 UNIMPL init_module 247129 UNIMPL delete_module 248130 UNIMPL get_kernel_syms 249131 UNIMPL quotactl 250132 STD { int linux_sys_getpgid(int pid); } 251133 NOARGS { int sys_fchdir(int fd); } 252134 UNIMPL bdflush 253135 UNIMPL sysfs 254136 STD { int linux_sys_personality(int per); } 255137 UNIMPL afs_syscall 256138 STD { int linux_sys_setfsuid(uid_t uid); } 257139 NOARGS { int linux_sys_getfsuid(void); } 258140 STD { int linux_sys_llseek(int fd, u_int32_t ohigh, \ 259 u_int32_t olow, caddr_t res, int whence); } 260141 STD { int linux_sys_getdents(int fd, \ 261 struct linux_dirent *dent, unsigned int count); } 262142 STD { int linux_sys_select(int nfds, fd_set *readfds, \ 263 fd_set *writefds, fd_set *exceptfds, \ 264 struct timeval *timeout); } 265143 NOARGS { int sys_flock(int fd, int how); } 266144 STD { int linux_sys_msync(caddr_t addr, int len, int fl); } 267145 NOARGS { int sys_readv(int fd, struct iovec *iovp, \ 268 u_int iovcnt); } 269146 NOARGS { int sys_writev(int fd, struct iovec *iovp, \ 270 u_int iovcnt); } 271147 NOARGS { pid_t sys_getsid(pid_t pid); } 272148 STD { int linux_sys_fdatasync(int fd); } 273149 STD { int linux_sys___sysctl(struct linux___sysctl *lsp); } 274150 NOARGS { int sys_mlock(caddr_t addr, size_t len); } 275151 NOARGS { int sys_munlock(caddr_t addr, size_t len); } 276152 UNIMPL mlockall 277153 UNIMPL munlockall 278154 STD { int linux_sys_sched_setparam(pid_t pid, \ 279 const struct linux_sched_param *sp); } 280155 STD { int linux_sys_sched_getparam(pid_t pid, \ 281 struct linux_sched_param *sp); } 282156 STD { int linux_sys_sched_setscheduler(pid_t pid, \ 283 int policy, const struct linux_sched_param *sp); } 284157 STD { int linux_sys_sched_getscheduler(pid_t pid); } 285158 STD { int linux_sys_sched_yield(void); } 286159 STD { int linux_sys_sched_get_priority_max(int policy); } 287160 STD { int linux_sys_sched_get_priority_min(int policy); } 288161 UNIMPL sched_rr_get_interval 289162 NOARGS { int sys_nanosleep(const struct timespec *rqtp, \ 290 struct timespec *rmtp); } 291163 STD { void *linux_sys_mremap(void *old_address, \ 292 size_t old_size, size_t new_size, u_long flags); } 293164 STD { int linux_sys_setresuid(uid_t ruid, uid_t euid, \ 294 uid_t suid); } 295165 STD { int linux_sys_getresuid(uid_t *ruid, uid_t *euid, \ 296 uid_t *suid); } 297166 UNIMPL vm86 298167 UNIMPL query_module 299168 NOARGS { int sys_poll(struct pollfd *fds, u_int nfds, \ 300 int timeout); } 301169 UNIMPL nfsservctl 302170 STD { int linux_sys_setresgid(gid_t rgid, gid_t egid, \ 303 gid_t sgid); } 304171 STD { int linux_sys_getresgid(gid_t *rgid, gid_t *egid, \ 305 gid_t *sgid); } 306172 UNIMPL prctl 307173 STD { int linux_sys_rt_sigreturn(void); } 308174 STD { int linux_sys_rt_sigaction(int signum, \ 309 const struct linux_sigaction *nsa, \ 310 struct linux_sigaction *osa, \ 311 size_t sigsetsize); } 312175 STD { int linux_sys_rt_sigprocmask(int how, \ 313 const linux_sigset_t *set, \ 314 linux_sigset_t *oset, \ 315 size_t sigsetsize); } 316176 STD { int linux_sys_rt_sigpending( \ 317 linux_sigset_t *set, \ 318 size_t sigsetsize); } 319177 UNIMPL rt_sigtimedwait 320; XXX XAX int here? sigset_t here? siginfo_t 321178 STD { int linux_sys_rt_queueinfo(int pid, int signum, \ 322 void *uinfo); } 323179 STD { int linux_sys_rt_sigsuspend(linux_sigset_t *unewset, \ 324 size_t sigsetsize); } 325180 STD { int linux_sys_pread(int fd, char *buf, \ 326 size_t nbyte, linux_off_t offset); } 327181 STD { int linux_sys_pwrite(int fd, char *buf, \ 328 size_t nbyte, linux_off_t offset); } 329;182 chown on i386; lchown on m68k. 330182 STD { int linux_sys_lchown(const char *path, int uid, \ 331 int gid); } 332183 NOARGS { int sys___getcwd(char *bufp, size_t length); } 333184 UNIMPL capget 334185 UNIMPL capset 335186 UNIMPL sigaltstack 336187 UNIMPL sendfile 337188 UNIMPL getpmsg 338189 UNIMPL putpmsg 339190 NOARGS { int sys___vfork14(void); } 340