1 $FreeBSD$ 2 3; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 4; System call name/number master file (or rather, slave, from LINUX). 5; Processed to create linux_sysent.c, linux_proto.h and linux_syscall.h. 6 7; Columns: number type nargs name alt{name,tag,rtyp}/comments 8; number system call number, must be in order 9; type one of STD, OBSOL, UNIMPL, COMPAT 10; name psuedo-prototype of syscall routine 11; If one of the following alts is different, then all appear: 12; altname name of system call if different 13; alttag name of args struct tag if different from [o]`name'"_args" 14; altrtyp return type if not int (bogus - syscalls always return int) 15; for UNIMPL/OBSOL, name continues with comments 16 17; types: 18; STD always included 19; COMPAT included on COMPAT #ifdef 20; LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h 21; OBSOL obsolete, not included in system, only specifies name 22; UNIMPL not implemented, placeholder only 23 24#include "opt_compat.h" 25#include <sys/param.h> 26#include <sys/sysent.h> 27#include <sys/sysproto.h> 28#include <i386/linux/linux.h> 29#include <i386/linux/linux_proto.h> 30 31; #ifdef's, etc. may be included, and are copied to the output files. 32 330 UNIMPL setup 341 MNOPROTO { void sys_exit(int rval); } exit sys_exit_args void 352 MSTD { int linux_fork(void); } 363 MNOPROTO { int read(int fd, char *buf, u_int nbyte); } 374 MNOPROTO { int write(int fd, char *buf, u_int nbyte); } 385 STD { int linux_open(char *path, l_int flags, l_int mode); } 396 MNOPROTO { int close(int fd); } 407 MSTD { int linux_waitpid(l_pid_t pid, l_int *status, l_int options); } 418 STD { int linux_creat(char *path, l_int mode); } 429 STD { int linux_link(char *path, char *to); } 4310 STD { int linux_unlink(char *path); } 4411 STD { int linux_execve(char *path, char **argp, char **envp); } 4512 STD { int linux_chdir(char *path); } 4613 STD { int linux_time(l_time_t *tm); } 4714 STD { int linux_mknod(char *path, l_int mode, l_dev_t dev); } 4815 STD { int linux_chmod(char *path, l_mode_t mode); } 4916 STD { int linux_lchown16(char *path, l_uid16_t uid, \ 50 l_gid16_t gid); } 5117 UNIMPL break 5218 STD { int linux_stat(char *path, struct ostat *up); } 5319 STD { int linux_lseek(l_uint fdes, l_off_t off, l_int whence); } 5420 MSTD { int linux_getpid(void); } 5521 STD { int linux_mount(char *specialfile, char *dir, \ 56 char *filesystemtype, l_ulong rwflag, \ 57 void *data); } 5822 STD { int linux_oldumount(char *path); } 5923 MSTD { int linux_setuid16(l_uid16_t uid); } 6024 MSTD { int linux_getuid16(void); } 6125 STD { int linux_stime(void); } 6226 MSTD { int linux_ptrace(l_long req, l_long pid, l_long addr, \ 63 l_long data); } 6427 STD { int linux_alarm(l_uint secs); } 6528 STD { int linux_fstat(l_uint fd, struct ostat *up); } 6629 MSTD { int linux_pause(void); } 6730 STD { int linux_utime(char *fname, struct l_utimbuf *times); } 6831 UNIMPL stty 6932 UNIMPL gtty 7033 STD { int linux_access(char *path, l_int flags); } 7134 MSTD { int linux_nice(l_int inc); } 7235 UNIMPL ftime 7336 NOPROTO { int sync(void); } 7437 MSTD { int linux_kill(l_int pid, l_int signum); } 7538 STD { int linux_rename(char *from, char *to); } 7639 STD { int linux_mkdir(char *path, l_int mode); } 7740 STD { int linux_rmdir(char *path); } 7841 MNOPROTO { int dup(u_int fd); } 7942 MSTD { int linux_pipe(l_ulong *pipefds); } 8043 STD { int linux_times(struct l_times_argv *buf); } 8144 UNIMPL prof 8245 STD { int linux_brk(l_ulong dsend); } 8346 MSTD { int linux_setgid16(l_gid16_t gid); } 8447 MSTD { int linux_getgid16(void); } 8548 MSTD { int linux_signal(l_int sig, l_handler_t handler); } 8649 MSTD { int linux_geteuid16(void); } 8750 MSTD { int linux_getegid16(void); } 8851 MNOPROTO { int acct(char *path); } 8952 STD { int linux_umount(char *path, l_int flags); } 9053 UNIMPL lock 9154 STD { int linux_ioctl(l_uint fd, l_uint cmd, l_ulong arg); } 9255 STD { int linux_fcntl(l_uint fd, l_uint cmd, l_ulong arg); } 9356 UNIMPL mpx 9457 MNOPROTO { int setpgid(int pid, int pgid); } 9558 UNIMPL ulimit 9659 STD { int linux_olduname(void); } 9760 MNOPROTO { int umask(int newmask); } 9861 NOPROTO { int chroot(char *path); } 9962 STD { int linux_ustat(l_dev_t dev, struct l_ustat *ubuf); } 10063 MNOPROTO { int dup2(u_int from, u_int to); } 10164 MNOPROTO { int getppid(void); } 10265 MNOPROTO { int getpgrp(void); } 10366 MNOPROTO { int setsid(void); } 10467 MSTD { int linux_sigaction(l_int sig, l_osigaction_t *nsa, \ 105 l_osigaction_t *osa); } 10668 MSTD { int linux_sgetmask(void); } 10769 MSTD { int linux_ssetmask(l_osigset_t mask); } 10870 MSTD { int linux_setreuid16(l_uid16_t ruid, l_uid16_t euid); } 10971 MSTD { int linux_setregid16(l_gid16_t rgid, l_gid16_t egid); } 11072 MSTD { int linux_sigsuspend(l_int hist0, l_int hist1, \ 111 l_osigset_t mask); } 11273 MSTD { int linux_sigpending(l_osigset_t *mask); } 11374 MNOPROTO { int osethostname(char *hostname, u_int len); } \ 114 osethostname sethostname_args int 11575 MSTD { int linux_setrlimit(l_uint resource, struct l_rlimit *rlim); } 11676 MSTD { int linux_old_getrlimit(l_uint resource, \ 117 struct l_rlimit *rlim); } 11877 MNOPROTO { int getrusage(int who, struct rusage *rusage); } 11978 MNOPROTO { int gettimeofday(struct timeval *tp, struct timezone *tzp); } 12079 MNOPROTO { int settimeofday(struct timeval *tp, struct timezone *tzp); } 12180 MSTD { int linux_getgroups16(l_uint gidsetsize, l_gid16_t *gidset); } 12281 MSTD { int linux_setgroups16(l_uint gidsetsize, l_gid16_t *gidset); } 12382 STD { int linux_old_select(struct l_old_select_argv *ptr); } 12483 STD { int linux_symlink(char *path, char *to); } 12584 NOPROTO { int ostat(char *path, struct ostat *up); } 12685 STD { int linux_readlink(char *name, char *buf, l_int count); } 12786 STD { int linux_uselib(char *library); } 12887 NOPROTO { int swapon(char *name); } 12988 STD { int linux_reboot(l_int magic1, l_int magic2, l_uint cmd, \ 130 void *arg); } 13189 STD { int linux_readdir(l_uint fd, struct l_dirent *dent, \ 132 l_uint count); } 13390 STD { int linux_mmap(struct l_mmap_argv *ptr); } 13491 NOPROTO { int munmap(caddr_t addr, int len); } 13592 STD { int linux_truncate(char *path, l_ulong length); } 13693 NOPROTO { int oftruncate(int fd, long length); } 13794 NOPROTO { int fchmod(int fd, int mode); } 13895 NOPROTO { int fchown(int fd, int uid, int gid); } 13996 MNOPROTO { int getpriority(int which, int who); } 14097 MNOPROTO { int setpriority(int which, int who, int prio); } 14198 UNIMPL profil 14299 STD { int linux_statfs(char *path, struct l_statfs_buf *buf); } 143100 STD { int linux_fstatfs(l_uint fd, struct l_statfs_buf *buf); } 144101 STD { int linux_ioperm(l_ulong start, l_ulong length, \ 145 l_int enable); } 146102 STD { int linux_socketcall(l_int what, l_ulong args); } 147103 STD { int linux_syslog(l_int type, char *buf, l_int len); } 148104 STD { int linux_setitimer(l_int which, struct l_itimerval *itv, \ 149 struct l_itimerval *oitv); } 150105 STD { int linux_getitimer(l_int which, struct l_itimerval *itv); } 151106 STD { int linux_newstat(char *path, struct l_newstat *buf); } 152107 STD { int linux_newlstat(char *path, struct l_newstat *buf); } 153108 STD { int linux_newfstat(l_uint fd, struct l_newstat *buf); } 154109 STD { int linux_uname(void); } 155110 STD { int linux_iopl(l_ulong level); } 156111 STD { int linux_vhangup(void); } 157112 UNIMPL idle 158113 STD { int linux_vm86old(void); } 159114 MSTD { int linux_wait4(l_pid_t pid, l_uint *status, \ 160 l_int options, struct l_rusage *rusage); } 161115 STD { int linux_swapoff(void); } 162116 STD { int linux_sysinfo(struct l_sysinfo *info); } 163117 STD { int linux_ipc(l_uint what, l_int arg1, l_int arg2, \ 164 l_int arg3, void *ptr, l_long arg5); } 165118 NOPROTO { int fsync(int fd); } 166119 MSTD { int linux_sigreturn(struct l_sigframe *sfp); } 167120 MSTD { int linux_clone(l_int flags, void *stack); } 168121 MNOPROTO { int setdomainname(char *name, int len); } 169122 STD { int linux_newuname(struct l_new_utsname *buf); } 170123 STD { int linux_modify_ldt(l_int func, void *ptr, \ 171 l_ulong bytecount); } 172124 STD { int linux_adjtimex(void); } 173125 NOPROTO { int mprotect(caddr_t addr, int len, int prot); } 174126 MSTD { int linux_sigprocmask(l_int how, l_osigset_t *mask, \ 175 l_osigset_t *omask); } 176127 STD { int linux_create_module(void); } 177128 STD { int linux_init_module(void); } 178129 STD { int linux_delete_module(void); } 179130 STD { int linux_get_kernel_syms(void); } 180131 STD { int linux_quotactl(void); } 181132 NOPROTO { int getpgid(int pid); } 182133 NOPROTO { int fchdir(int fd); } 183134 STD { int linux_bdflush(void); } 184135 STD { int linux_sysfs(l_int option, l_ulong arg1, l_ulong arg2); } 185136 STD { int linux_personality(l_ulong per); } 186137 UNIMPL afs_syscall 187138 STD { int linux_setfsuid16(l_uid16_t uid); } 188139 STD { int linux_setfsgid16(l_gid16_t gid); } 189140 STD { int linux_llseek(l_int fd, l_ulong ohigh, l_ulong olow, \ 190 l_loff_t *res, l_uint whence); } 191141 STD { int linux_getdents(l_uint fd, void *dent, l_uint count); } 192142 STD { int linux_select(l_int nfds, l_fd_set *readfds, \ 193 l_fd_set *writefds, l_fd_set *exceptfds, \ 194 struct l_timeval *timeout); } 195143 NOPROTO { int flock(int fd, int how); } 196144 STD { int linux_msync(l_ulong addr, l_size_t len, l_int fl); } 197145 NOPROTO { int readv(int fd, struct iovec *iovp, u_int iovcnt); } 198146 NOPROTO { int writev(int fd, struct iovec *iovp, u_int iovcnt); } 199147 MSTD { int linux_getsid(l_pid_t pid); } 200148 STD { int linux_fdatasync(l_uint fd); } 201149 STD { int linux_sysctl(struct l___sysctl_args *args); } 202150 MNOPROTO { int mlock(const void *addr, size_t len); } 203151 MNOPROTO { int munlock(const void *addr, size_t len); } 204152 MNOPROTO { int mlockall(int how); } 205153 MNOPROTO { int munlockall(void); } 206154 MNOPROTO { int sched_setparam(pid_t pid, \ 207 const struct sched_param *param); } 208155 MNOPROTO { int sched_getparam(pid_t pid, \ 209 struct sched_param *param); } 210156 MSTD { int linux_sched_setscheduler(l_pid_t pid, \ 211 l_int policy, struct l_sched_param *param); } 212157 MSTD { int linux_sched_getscheduler(l_pid_t pid); } 213158 NOPROTO { int sched_yield(void); } 214159 MSTD { int linux_sched_get_priority_max(l_int policy); } 215160 MSTD { int linux_sched_get_priority_min(l_int policy); } 216161 MNOPROTO { int sched_rr_get_interval(l_pid_t pid, \ 217 struct l_timespec *interval); } 218162 MNOPROTO { int nanosleep(const struct timespec *rqtp, \ 219 struct timespec *rmtp); } 220163 STD { int linux_mremap(l_ulong addr, l_ulong old_len, \ 221 l_ulong new_len, l_ulong flags, \ 222 l_ulong new_addr); } 223164 MSTD { int linux_setresuid16(l_uid16_t ruid, \ 224 l_uid16_t euid, l_uid16_t suid); } 225165 MSTD { int linux_getresuid16(l_uid16_t *ruid, \ 226 l_uid16_t *euid, l_uid16_t *suid); } 227166 STD { int linux_vm86(void); } 228167 STD { int linux_query_module(void); } 229168 NOPROTO { int poll(struct pollfd*, unsigned int nfds, long timeout); } 230169 STD { int linux_nfsservctl(void); } 231170 MSTD { int linux_setresgid16(l_gid16_t rgid, \ 232 l_gid16_t egid, l_gid16_t sgid); } 233171 MSTD { int linux_getresgid16(l_gid16_t *rgid, \ 234 l_gid16_t *egid, l_gid16_t *sgid); } 235172 STD { int linux_prctl(void); } 236173 STD { int linux_rt_sigreturn(struct l_ucontext *ucp); } 237174 MSTD { int linux_rt_sigaction(l_int sig, \ 238 l_sigaction_t *act, l_sigaction_t *oact, \ 239 l_size_t sigsetsize); } 240175 MSTD { int linux_rt_sigprocmask(l_int how, \ 241 l_sigset_t *mask, l_sigset_t *omask, \ 242 l_size_t sigsetsize); } 243176 STD { int linux_rt_sigpending(void); } 244177 STD { int linux_rt_sigtimedwait(void); } 245178 STD { int linux_rt_sigqueueinfo(void); } 246179 MSTD { int linux_rt_sigsuspend(l_sigset_t *newset, \ 247 l_size_t sigsetsize); } 248180 STD { int linux_pread(l_uint fd, char *buf, \ 249 l_size_t nbyte, l_loff_t offset); } 250181 STD { int linux_pwrite(l_uint fd, char *buf, \ 251 l_size_t nbyte, l_loff_t offset); } 252182 STD { int linux_chown16(char *path, l_uid16_t uid, l_gid16_t gid); } 253183 STD { int linux_getcwd(char *buf, l_ulong bufsize); } 254184 STD { int linux_capget(void); } 255185 STD { int linux_capset(void); } 256186 STD { int linux_sigaltstack(l_stack_t *uss, l_stack_t *uoss); } 257187 STD { int linux_sendfile(void); } 258188 UNIMPL getpmsg 259189 UNIMPL putpmsg 260190 MSTD { int linux_vfork(void); } 261191 MSTD { int linux_getrlimit(l_uint resource, struct l_rlimit *rlim); } 262192 STD { int linux_mmap2(l_ulong addr, l_ulong len, \ 263 l_ulong prot, l_ulong flags, l_ulong fd, \ 264 l_ulong pgoff); } 265193 STD { int linux_truncate64(char *path, l_loff_t length); } 266194 STD { int linux_ftruncate64(l_uint fd, l_loff_t length); } 267195 STD { int linux_stat64(char *filename, \ 268 struct l_stat64 *statbuf, l_long flags); } 269196 STD { int linux_lstat64(char *filename, \ 270 struct l_stat64 *statbuf, l_long flags); } 271197 STD { int linux_fstat64(l_ulong fd, \ 272 struct l_stat64 *statbuf, l_long flags); } 273198 STD { int linux_lchown(char *path, l_uid_t uid, \ 274 l_gid_t gid); } 275199 MSTD { int linux_getuid(void); } 276200 MSTD { int linux_getgid(void); } 277201 MNOPROTO { int geteuid(void); } 278202 MNOPROTO { int getegid(void); } 279203 MNOPROTO { int setreuid(uid_t ruid, uid_t euid); } 280204 MNOPROTO { int setregid(gid_t rgid, gid_t egid); } 281205 MSTD { int linux_getgroups(l_int gidsetsize, l_gid_t *grouplist); } 282206 MSTD { int linux_setgroups(l_int gidsetsize, l_gid_t *grouplist); } 283207 NODEF fchown fchown fchown_args int 284208 MNOPROTO { int setresuid(uid_t ruid, uid_t euid, uid_t suid); } 285209 MNOPROTO { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); } 286210 MNOPROTO { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); } 287211 MNOPROTO { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); } 288212 STD { int linux_chown(char *path, l_uid_t uid, l_gid_t gid); } 289213 MNOPROTO { int setuid(uid_t uid); } 290214 MNOPROTO { int setgid(gid_t gid); } 291215 STD { int linux_setfsuid(l_uid_t uid); } 292216 STD { int linux_setfsgid(l_gid_t gid); } 293217 STD { int linux_pivot_root(char *new_root, char *put_old); } 294218 STD { int linux_mincore(l_ulong start, l_size_t len, u_char *vec); } 295219 MNOPROTO { int madvise(void *addr, size_t len, int behav); } 296220 STD { int linux_getdents64(l_uint fd, void *dirent, l_uint count); } 297221 STD { int linux_fcntl64(l_uint fd, l_uint cmd, l_ulong arg); } 298222 UNIMPL 299223 UNIMPL 300224 UNIMPL linux_gettid 301225 UNIMPL linux_readahead 302226 STD { int linux_setxattr(void); } 303227 STD { int linux_lsetxattr(void); } 304228 STD { int linux_fsetxattr(void); } 305229 STD { int linux_getxattr(void); } 306230 STD { int linux_lgetxattr(void); } 307231 STD { int linux_fgetxattr(void); } 308232 STD { int linux_listxattr(void); } 309233 STD { int linux_llistxattr(void); } 310234 STD { int linux_flistxattr(void); } 311235 STD { int linux_removexattr(void); } 312236 STD { int linux_lremovexattr(void); } 313237 STD { int linux_fremovexattr(void); } 314238 UNIMPL linux_tkill 315239 UNIMPL linux_sendfile64 316240 UNIMPL linux_futex 317241 UNIMPL linux_sched_setaffinity 318242 UNIMPL linux_sched_getaffinity 319243 UNIMPL linux_set_thread_area 320244 UNIMPL linux_get_thread_area 321245 UNIMPL linux_io_setup 322246 UNIMPL linux_io_destroy 323247 UNIMPL linux_io_getevents 324248 UNIMPL linux_io_submit 325249 UNIMPL linux_io_cancel 326250 STD { int linux_fadvise64(void); } 327251 UNIMPL 328252 MNOPROTO { void sys_exit(int rval); } exit_group sys_exit_args void 329253 UNIMPL linux_lookup_dcookie 330254 UNIMPL linux_epoll_create 331255 UNIMPL linux_epoll_ctl 332256 UNIMPL linux_epoll_wait 333257 UNIMPL linux_remap_file_pages 334258 UNIMPL linux_set_tid_address 335259 UNIMPL linux_timer_create 336260 UNIMPL linux_timer_settime 337261 UNIMPL linux_timer_gettime 338262 UNIMPL linux_timer_getoverrun 339263 UNIMPL linux_timer_delete 340264 UNIMPL linux_clock_settime 341265 UNIMPL linux_clock_gettime 342266 UNIMPL linux_clock_getres 343267 UNIMPL linux_clock_nanosleep 344