diff options
Diffstat (limited to 'sys/kern/syscalls.master')
-rw-r--r-- | sys/kern/syscalls.master | 557 |
1 files changed, 318 insertions, 239 deletions
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 1b8de14..b57cd73 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1,23 +1,38 @@ - @(#)syscalls.master 8.2 (Berkeley) 1/13/94 -; System call name/number master file. -; Processed to created init_sysent.c, syscalls.c and syscall.h. - -; Columns: number type nargs name altname/comments + @(#)syscalls.master 8.6 (Berkeley) 3/30/95 +; System call name/number "master" file. +; (See syscalls.conf to see what it is processed into.) +; +; Fields: number type [type-dependent ...] ; number system call number, must be in order -; type one of STD, OBSOL, UNIMPL, COMPAT -; nargs number of arguments -; name name of syscall routine -; altname name of system call if different -; for UNIMPL/OBSOL, name continues with comments - +; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of +; the compatibility options defined in syscalls.conf. +; ; types: ; STD always included -; COMPAT included on COMPAT #ifdef -; LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h -; OBSOL obsolete, not included in system, only specifies name -; UNIMPL not implemented, placeholder only - +; 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 +; +; 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 switch definition file only. + +#include <sys/param.h> +#include <sys/systm.h> +#include <sys/signal.h> +#include <sys/mount.h> +#include <sys/syscallargs.h> ; Reserved/unimplemented system calls in the range 0-150 inclusive ; are reserved for use in future Berkeley releases. @@ -25,252 +40,316 @@ ; redistributions should be placed in the reserved range at the end ; of the current calls. -0 STD 0 nosys syscall -1 STD 1 exit -2 STD 0 fork -3 STD 3 read -4 STD 3 write -5 STD 3 open -6 STD 1 close -7 STD 4 wait4 -8 COMPAT 2 creat -9 STD 2 link -10 STD 1 unlink -11 OBSOL 2 execv -12 STD 1 chdir -13 STD 1 fchdir -14 STD 3 mknod -15 STD 2 chmod -16 STD 3 chown -17 STD 1 obreak break -18 STD 3 getfsstat -19 COMPAT 3 lseek -20 STD 0 getpid -21 STD 4 mount -22 STD 2 unmount -23 STD 1 setuid -24 STD 0 getuid -25 STD 0 geteuid -26 STD 4 ptrace -27 STD 3 recvmsg -28 STD 3 sendmsg -29 STD 6 recvfrom -30 STD 3 accept -31 STD 3 getpeername -32 STD 3 getsockname -33 STD 2 access -34 STD 2 chflags -35 STD 2 fchflags -36 STD 0 sync -37 STD 2 kill -38 COMPAT 2 stat -39 STD 0 getppid -40 COMPAT 2 lstat -41 STD 2 dup -42 STD 0 pipe -43 STD 0 getegid -44 STD 4 profil +0 STD { int nosys(void); } syscall +1 STD { int exit(int rval); } +2 STD { int fork(void); } +3 STD { int read(int fd, char *buf, u_int nbyte); } +4 STD { int write(int fd, char *buf, u_int nbyte); } +5 STD { int open(char *path, int flags, int mode); } +6 STD { int close(int fd); } +7 STD { int wait4(int pid, int *status, int options, \ + struct rusage *rusage); } +8 COMPAT_43 { int creat(char *path, int mode); } +9 STD { int link(char *path, char *link); } +10 STD { int unlink(char *path); } +11 OBSOL execv +12 STD { int chdir(char *path); } +13 STD { int fchdir(int fd); } +14 STD { int mknod(char *path, int mode, int dev); } +15 STD { int chmod(char *path, int mode); } +16 STD { int chown(char *path, int uid, int gid); } +17 STD { int obreak(char *nsize); } break +18 STD { int getfsstat(struct statfs *buf, long bufsize, \ + int flags); } +19 COMPAT_43 { long lseek(int fd, long offset, int whence); } +20 STD { pid_t getpid(void); } +21 STD { int mount(char *type, char *path, int flags, \ + caddr_t data); } +22 STD { int unmount(char *path, int flags); } +23 STD { int setuid(uid_t uid); } +24 STD { uid_t getuid(void); } +25 STD { uid_t geteuid(void); } +26 STD { int ptrace(int req, pid_t pid, caddr_t addr, \ + int data); } +27 STD { int recvmsg(int s, struct msghdr *msg, int flags); } +28 STD { int sendmsg(int s, caddr_t msg, int flags); } +29 STD { int recvfrom(int s, caddr_t buf, size_t len, \ + int flags, caddr_t from, int *fromlenaddr); } +30 STD { int accept(int s, caddr_t name, int *anamelen); } +31 STD { int getpeername(int fdes, caddr_t asa, int *alen); } +32 STD { int getsockname(int fdes, caddr_t asa, int *alen); } +33 STD { int access(char *path, int flags); } +34 STD { int chflags(char *path, int flags); } +35 STD { int fchflags(int fd, int flags); } +36 STD { int sync(void); } +37 STD { int kill(int pid, int signum); } +38 COMPAT_43 { int stat(char *path, struct ostat *ub); } +39 STD { pid_t getppid(void); } +40 COMPAT_43 { int lstat(char *path, struct ostat *ub); } +41 STD { int dup(u_int fd); } +42 STD { int pipe(void); } +43 STD { gid_t getegid(void); } +44 STD { int profil(caddr_t samples, u_int size, \ + u_int offset, u_int scale); } #ifdef KTRACE -45 STD 4 ktrace +45 STD { int ktrace(char *fname, int ops, int facs, \ + int pid); } #else -45 UNIMPL 0 ktrace +45 UNIMPL ktrace #endif -46 STD 3 sigaction -47 STD 0 getgid -48 STD 2 sigprocmask -49 STD 2 getlogin -50 STD 1 setlogin -51 STD 1 acct -52 STD 0 sigpending -53 STD 2 sigaltstack -54 STD 3 ioctl -55 STD 1 reboot -56 STD 1 revoke -57 STD 2 symlink -58 STD 3 readlink -59 STD 3 execve -60 STD 1 umask -61 STD 1 chroot -62 COMPAT 2 fstat -63 COMPAT 4 getkerninfo -64 COMPAT 0 getpagesize -65 STD 2 msync -66 STD 0 vfork -67 OBSOL 0 vread -68 OBSOL 0 vwrite -69 STD 1 sbrk -70 STD 1 sstk -71 COMPAT 7 mmap -72 STD 1 ovadvise vadvise -73 STD 2 munmap -74 STD 3 mprotect -75 STD 3 madvise -76 OBSOL 0 vhangup -77 OBSOL 0 vlimit -78 STD 3 mincore -79 STD 2 getgroups -80 STD 2 setgroups -81 STD 0 getpgrp -82 STD 2 setpgid -83 STD 3 setitimer -84 COMPAT 0 wait -85 STD 1 swapon -86 STD 2 getitimer -87 COMPAT 2 gethostname -88 COMPAT 2 sethostname -89 STD 0 getdtablesize -90 STD 2 dup2 -91 UNIMPL 2 getdopt -92 STD 3 fcntl -93 STD 5 select -94 UNIMPL 2 setdopt -95 STD 1 fsync -96 STD 3 setpriority -97 STD 3 socket -98 STD 3 connect -99 COMPAT 3 accept -100 STD 2 getpriority -101 COMPAT 4 send -102 COMPAT 4 recv -103 STD 1 sigreturn -104 STD 3 bind -105 STD 5 setsockopt -106 STD 2 listen -107 OBSOL 0 vtimes -108 COMPAT 3 sigvec -109 COMPAT 1 sigblock -110 COMPAT 1 sigsetmask -111 STD 1 sigsuspend -112 COMPAT 2 sigstack -113 COMPAT 3 recvmsg -114 COMPAT 3 sendmsg +46 STD { int sigaction(int signum, struct sigaction *nsa, \ + struct sigaction *osa); } +47 STD { gid_t getgid(void); } +48 STD { int sigprocmask(int how, sigset_t mask); } +49 STD { int getlogin(char *namebuf, u_int namelen); } +50 STD { int setlogin(char *namebuf); } +51 STD { int acct(char *path); } +52 STD { int sigpending(void); } +53 STD { int sigaltstack(struct sigaltstack *nss, \ + struct sigaltstack *oss); } +54 STD { int ioctl(int fd, u_long com, caddr_t data); } +55 STD { int reboot(int opt); } +56 STD { int revoke(char *path); } +57 STD { int symlink(char *path, char *link); } +58 STD { int readlink(char *path, char *buf, int count); } +59 STD { int execve(char *path, char **argp, char **envp); } +60 STD { int umask(int newmask); } +61 STD { int chroot(char *path); } +62 COMPAT_43 { int fstat(int fd, struct ostat *sb); } +63 COMPAT_43 { int getkerninfo(int op, char *where, int *size, \ + int arg); } +64 COMPAT_43 { int getpagesize(void); } +65 STD { int msync(caddr_t addr, int len); } +66 STD { int vfork(void); } +67 OBSOL vread +68 OBSOL vwrite +69 STD { int sbrk(int incr); } +70 STD { int sstk(int incr); } +71 COMPAT_43 { int mmap(caddr_t addr, int len, int prot, \ + int flags, int fd, long pos); } +72 STD { int ovadvise(int anom); } vadvise +73 STD { int munmap(caddr_t addr, int len); } +74 STD { int mprotect(caddr_t addr, int len, int prot); } +75 STD { int madvise(caddr_t addr, int len, int behav); } +76 OBSOL vhangup +77 OBSOL vlimit +78 STD { int mincore(caddr_t addr, int len, char *vec); } +79 STD { int getgroups(u_int gidsetsize, gid_t *gidset); } +80 STD { int setgroups(u_int gidsetsize, gid_t *gidset); } +81 STD { int getpgrp(void); } +82 STD { int setpgid(int pid, int pgid); } +83 STD { int setitimer(u_int which, struct itimerval *itv, \ + struct itimerval *oitv); } +84 COMPAT_43 { int wait(void); } +85 STD { int swapon(char *name); } +86 STD { int getitimer(u_int which, struct itimerval *itv); } +87 COMPAT_43 { int gethostname(char *hostname, u_int len); } +88 COMPAT_43 { int sethostname(char *hostname, u_int len); } +89 STD { int getdtablesize(void); } +90 STD { int dup2(u_int from, u_int to); } +91 UNIMPL getdopt +92 STD { int fcntl(int fd, int cmd, void *arg); } +93 STD { int select(u_int nd, fd_set *in, fd_set *ou, \ + fd_set *ex, struct timeval *tv); } +94 UNIMPL setdopt +95 STD { int fsync(int fd); } +96 STD { int setpriority(int which, int who, int prio); } +97 STD { int socket(int domain, int type, int protocol); } +98 STD { int connect(int s, caddr_t name, int namelen); } +99 COMPAT_43 { int accept(int s, caddr_t name, int *anamelen); } +100 STD { int getpriority(int which, int who); } +101 COMPAT_43 { int send(int s, caddr_t buf, int len, int flags); } +102 COMPAT_43 { int recv(int s, caddr_t buf, int len, int flags); } +103 STD { int sigreturn(struct sigcontext *sigcntxp); } +104 STD { int bind(int s, caddr_t name, int namelen); } +105 STD { int setsockopt(int s, int level, int name, \ + caddr_t val, int valsize); } +106 STD { int listen(int s, int backlog); } +107 OBSOL vtimes +108 COMPAT_43 { int sigvec(int signum, struct sigvec *nsv, \ + struct sigvec *osv); } +109 COMPAT_43 { int sigblock(int mask); } +110 COMPAT_43 { int sigsetmask(int mask); } +111 STD { int sigsuspend(int mask); } +112 COMPAT_43 { int sigstack(struct sigstack *nss, \ + struct sigstack *oss); } +113 COMPAT_43 { int recvmsg(int s, struct omsghdr *msg, int flags); } +114 COMPAT_43 { int sendmsg(int s, caddr_t msg, int flags); } #ifdef TRACE -115 STD 2 vtrace +115 STD { int vtrace(int request, int value); } #else -115 OBSOL 2 vtrace +115 OBSOL vtrace #endif -116 STD 2 gettimeofday -117 STD 2 getrusage -118 STD 5 getsockopt +116 STD { int gettimeofday(struct timeval *tp, \ + struct timezone *tzp); } +117 STD { int getrusage(int who, struct rusage *rusage); } +118 STD { int getsockopt(int s, int level, int name, \ + caddr_t val, int *avalsize); } #ifdef vax -119 STD 1 resuba +119 STD { int resuba(int value); } #else -119 UNIMPL 0 nosys +119 UNIMPL resuba #endif -120 STD 3 readv -121 STD 3 writev -122 STD 2 settimeofday -123 STD 3 fchown -124 STD 2 fchmod -125 COMPAT 6 recvfrom -126 COMPAT 2 setreuid -127 COMPAT 2 setregid -128 STD 2 rename -129 COMPAT 2 truncate -130 COMPAT 2 ftruncate -131 STD 2 flock -132 STD 2 mkfifo -133 STD 6 sendto -134 STD 2 shutdown -135 STD 5 socketpair -136 STD 2 mkdir -137 STD 1 rmdir -138 STD 2 utimes -139 OBSOL 0 4.2 sigreturn -140 STD 2 adjtime -141 COMPAT 3 getpeername -142 COMPAT 0 gethostid -143 COMPAT 1 sethostid -144 COMPAT 2 getrlimit -145 COMPAT 2 setrlimit -146 COMPAT 2 killpg -147 STD 0 setsid -148 STD 4 quotactl -149 COMPAT 4 quota -150 COMPAT 3 getsockname +120 STD { int readv(int fd, struct iovec *iovp, u_int iovcnt); } +121 STD { int writev(int fd, struct iovec *iovp, \ + u_int iovcnt); } +122 STD { int settimeofday(struct timeval *tv, \ + struct timezone *tzp); } +123 STD { int fchown(int fd, int uid, int gid); } +124 STD { int fchmod(int fd, int mode); } +125 COMPAT_43 { int recvfrom(int s, caddr_t buf, size_t len, \ + int flags, caddr_t from, int *fromlenaddr); } +126 COMPAT_43 { int setreuid(int ruid, int euid); } +127 COMPAT_43 { int setregid(int rgid, int egid); } +128 STD { int rename(char *from, char *to); } +129 COMPAT_43 { int truncate(char *path, long length); } +130 COMPAT_43 { int ftruncate(int fd, long length); } +131 STD { int flock(int fd, int how); } +132 STD { int mkfifo(char *path, int mode); } +133 STD { int sendto(int s, caddr_t buf, size_t len, \ + int flags, caddr_t to, int tolen); } +134 STD { int shutdown(int s, int how); } +135 STD { int socketpair(int domain, int type, int protocol, \ + int *rsv); } +136 STD { int mkdir(char *path, int mode); } +137 STD { int rmdir(char *path); } +138 STD { int utimes(char *path, struct timeval *tptr); } +139 OBSOL 4.2 sigreturn +140 STD { int adjtime(struct timeval *delta, \ + struct timeval *olddelta); } +141 COMPAT_43 { int getpeername(int fdes, caddr_t asa, int *alen); } +142 COMPAT_43 { int32_t gethostid(void); } +143 COMPAT_43 { int sethostid(int32_t hostid); } +144 COMPAT_43 { int getrlimit(u_int which, struct ogetrlimit *rlp); } +145 COMPAT_43 { int setrlimit(u_int which, struct ogetrlimit *rlp); } +146 COMPAT_43 { int killpg(int pgid, int signum); } +147 STD { int setsid(void); } +148 STD { int quotactl(char *path, int cmd, int uid, \ + caddr_t arg); } +149 COMPAT_43 { int quota(void); } +150 COMPAT_43 { int getsockname(int fdec, caddr_t asa, int *alen); } ; Syscalls 151-180 inclusive are reserved for vendor-specific ; system calls. (This includes various calls added for compatibity ; with other Unix variants.) ; Some of these calls are now supported by BSD... -151 UNIMPL 0 nosys -152 UNIMPL 0 nosys -153 UNIMPL 0 nosys -154 UNIMPL 0 nosys +151 UNIMPL +152 UNIMPL +153 UNIMPL +154 UNIMPL #ifdef NFS -155 STD 2 nfssvc +155 STD { int nfssvc(int flag, caddr_t argp); } #else -155 UNIMPL 0 nosys +155 UNIMPL nfssvc #endif -156 COMPAT 4 getdirentries -157 STD 2 statfs -158 STD 2 fstatfs -159 UNIMPL 0 nosys -160 UNIMPL 0 nosys +156 COMPAT_43 { int getdirentries(int fd, char *buf, u_int count, \ + long *basep); } +157 STD { int statfs(char *path, struct statfs *buf); } +158 STD { int fstatfs(int fd, struct statfs *buf); } +159 UNIMPL +160 UNIMPL #ifdef NFS -161 STD 2 getfh +161 STD { int getfh(char *fname, fhandle_t *fhp); } #else -161 UNIMPL 0 nosys +161 UNIMPL getfh #endif -162 UNIMPL 0 nosys -163 UNIMPL 0 nosys -164 UNIMPL 0 nosys -165 UNIMPL 0 nosys -166 UNIMPL 0 nosys -167 UNIMPL 0 nosys -168 UNIMPL 0 nosys -169 UNIMPL 0 nosys -170 UNIMPL 0 nosys -#ifdef SYSVSHM -171 STD 4 shmsys +162 UNIMPL getdomainname +163 UNIMPL setdomainname +164 UNIMPL +165 UNIMPL +166 UNIMPL +167 UNIMPL +168 UNIMPL +169 UNIMPL semsys +170 UNIMPL msgsys +; XXX more generally, never on machines where sizeof(void *) != sizeof(int) +#if defined(SYSVSHM) && !defined(alpha) +171 COMPAT_43 { int shmsys(int which, int a2, int a3, int a4); } #else -171 UNIMPL 0 nosys +171 UNIMPL shmsys #endif -172 UNIMPL 0 nosys -173 UNIMPL 0 nosys -174 UNIMPL 0 nosys -175 UNIMPL 0 nosys -176 UNIMPL 0 nosys -177 UNIMPL 0 nosys -178 UNIMPL 0 nosys -179 UNIMPL 0 nosys -180 UNIMPL 0 nosys +172 UNIMPL +173 UNIMPL +174 UNIMPL +175 UNIMPL +176 UNIMPL +177 UNIMPL +178 UNIMPL +179 UNIMPL +180 UNIMPL -; Syscalls 180-199 are used by/reserved for BSD -181 STD 1 setgid -182 STD 1 setegid -183 STD 1 seteuid +; Syscalls 180-209 are used by/reserved for BSD +181 STD { int setgid(gid_t gid); } +182 STD { int setegid(gid_t egid); } +183 STD { int seteuid(uid_t euid); } #ifdef LFS -184 STD 3 lfs_bmapv -185 STD 3 lfs_markv -186 STD 2 lfs_segclean -187 STD 2 lfs_segwait +184 STD { int lfs_bmapv(fsid_t *fsidp, \ + struct block_info *blkiov, int blkcnt); } +185 STD { int lfs_markv(fsid_t *fsidp, \ + struct block_info *blkiov, int blkcnt); } +186 STD { int lfs_segclean(fsid_t *fsidp, u_long segment); } +187 STD { int lfs_segwait(fsid_t *fsidp, struct timeval *tv); } +#else +184 UNIMPL lfs_bmapv +185 UNIMPL lfs_markv +186 UNIMPL lfs_segclean +187 UNIMPL lfs_segwait +#endif +188 STD { int stat(char *path, struct stat *ub); } +189 STD { int fstat(int fd, struct stat *sb); } +190 STD { int lstat(char *path, struct stat *ub); } +191 STD { int pathconf(char *path, int name); } +192 STD { int fpathconf(int fd, int name); } +193 UNIMPL +194 STD { int getrlimit(u_int which, struct rlimit *rlp); } +195 STD { int setrlimit(u_int which, struct rlimit *rlp); } +196 STD { int getdirentries(int fd, char *buf, u_int count, \ + long *basep); } +197 STD { caddr_t mmap(caddr_t addr, size_t len, int prot, \ + int flags, int fd, long pad, off_t pos); } +198 STD { int nosys(void); } __syscall +199 STD { off_t lseek(int fd, int pad, off_t offset, \ + int whence); } +200 STD { int truncate(char *path, int pad, off_t length); } +201 STD { int ftruncate(int fd, int pad, off_t length); } +202 STD { int __sysctl(int *name, u_int namelen, void *old, \ + size_t *oldlenp, void *new, size_t newlen); } +203 STD { int mlock(caddr_t addr, size_t len); } +204 STD { int munlock(caddr_t addr, size_t len); } +205 STD { int undelete(char *path); } +206 UNIMPL +207 UNIMPL +208 UNIMPL +209 UNIMPL +; Syscalls 210-219 are used by/reserved for vendor-specific system calls +210 UNIMPL +211 UNIMPL +212 UNIMPL +213 UNIMPL +214 UNIMPL +215 UNIMPL +216 UNIMPL +217 UNIMPL +218 UNIMPL +219 UNIMPL +; System calls 220-240 are reserved for use by BSD +220 UNIMPL semctl +221 UNIMPL semget +222 UNIMPL semop +223 UNIMPL semconfig +224 UNIMPL msgctl +225 UNIMPL msgget +226 UNIMPL msgsnd +227 UNIMPL msgrcv +#if defined(SYSVSHM) && 0 +228 STD { int shmat(int shmid, void *shmaddr, int shmflg); } +229 STD { int shmctl(int shmid, int cmd, \ + struct shmid_ds *buf); } +230 STD { int shmdt(void *shmaddr); } +231 STD { int shmget(key_t key, int size, int shmflg); } #else -184 UNIMPL 0 nosys -185 UNIMPL 0 nosys -186 UNIMPL 0 nosys -187 UNIMPL 0 nosys +228 UNIMPL shmat +229 UNIMPL shmctl +230 UNIMPL shmdt +231 UNIMPL shmget #endif -188 STD 2 stat -189 STD 2 fstat -190 STD 2 lstat -191 STD 2 pathconf -192 STD 2 fpathconf -193 UNIMPL 0 nosys -194 STD 2 getrlimit -195 STD 2 setrlimit -196 STD 4 getdirentries -197 STD 8 mmap -198 STD 0 nosys __syscall -199 STD 5 lseek -200 STD 4 truncate -201 STD 4 ftruncate -202 STD 6 __sysctl -203 STD 2 mlock -204 STD 2 munlock -205 UNIMPL 0 nosys -206 UNIMPL 0 nosys -207 UNIMPL 0 nosys -208 UNIMPL 0 nosys -209 UNIMPL 0 nosys -210 UNIMPL 0 nosys |