syscalls.master revision 1.27
1 $NetBSD: syscalls.master,v 1.27 1995/03/09 17:28:28 mycroft Exp $ 2; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 3 4; NetBSD system call name/number "master" file. 5; (See syscalls.conf to see what it is processed into.) 6; 7; Fields: number type [type-dependent ...] 8; number system call number, must be in order 9; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of 10; the compatibility options defined in syscalls.conf. 11; 12; types: 13; STD always included 14; OBSOL obsolete, not included in system 15; UNIMPL unimplemented, not included in system 16; NODEF included, but don't define the syscall number 17; NOARGS included, but don't define the syscall args structure 18; 19; The compat options are defined in the syscalls.conf file, and the 20; compat option name is prefixed to the syscall name. Other than 21; that, they're like NODEF (for 'compat' options), or STD (for 22; 'libcompat' options). 23; 24; The type-dependent arguments are as follows: 25; For STD, NODEF, NOARGS, and compat syscalls: 26; { pseudo-proto } [alias] 27; For other syscalls: 28; [comment] 29; 30; #ifdef's, etc. may be included, and are copied to the output files. 31; #include's are copied to the syscall switch definition file only. 32 33#include <sys/param.h> 34#include <sys/systm.h> 35#include <sys/signal.h> 36#include <sys/mount.h> 37#include <sys/syscallargs.h> 38 39; Reserved/unimplemented system calls in the range 0-150 inclusive 40; are reserved for use in future Berkeley releases. 41; Additional system calls implemented in vendor and other 42; redistributions should be placed in the reserved range at the end 43; of the current calls. 44 450 STD { int nosys(void); } syscall 461 STD { int exit(int rval); } 472 STD { int fork(void); } 483 STD { int read(int fd, char *buf, u_int nbyte); } 494 STD { int write(int fd, char *buf, u_int nbyte); } 505 STD { int open(char *path, int flags, int mode); } 516 STD { int close(int fd); } 527 STD { int wait4(int pid, int *status, int options, \ 53 struct rusage *rusage); } 548 COMPAT_43 { int creat(char *path, int mode); } 559 STD { int link(char *path, char *link); } 5610 STD { int unlink(char *path); } 5711 OBSOL execv 5812 STD { int chdir(char *path); } 5913 STD { int fchdir(int fd); } 6014 STD { int mknod(char *path, int mode, int dev); } 6115 STD { int chmod(char *path, int mode); } 6216 STD { int chown(char *path, int uid, int gid); } 6317 STD { int obreak(char *nsize); } break 6418 STD { int getfsstat(struct statfs *buf, long bufsize, \ 65 int flags); } 6619 COMPAT_43 { long lseek(int fd, long offset, int whence); } 6720 STD { pid_t getpid(void); } 6821 STD { int mount(char *type, char *path, int flags, \ 69 caddr_t data); } 7022 STD { int unmount(char *path, int flags); } 7123 STD { int setuid(uid_t uid); } 7224 STD { uid_t getuid(void); } 7325 STD { uid_t geteuid(void); } 7426 STD { int ptrace(int req, pid_t pid, caddr_t addr, \ 75 int data); } 7627 STD { int recvmsg(int s, struct msghdr *msg, int flags); } 7728 STD { int sendmsg(int s, caddr_t msg, int flags); } 7829 STD { int recvfrom(int s, caddr_t buf, size_t len, \ 79 int flags, caddr_t from, int *fromlenaddr); } 8030 STD { int accept(int s, caddr_t name, int *anamelen); } 8131 STD { int getpeername(int fdes, caddr_t asa, int *alen); } 8232 STD { int getsockname(int fdes, caddr_t asa, int *alen); } 8333 STD { int access(char *path, int flags); } 8434 STD { int chflags(char *path, int flags); } 8535 STD { int fchflags(int fd, int flags); } 8636 STD { int sync(void); } 8737 STD { int kill(int pid, int signum); } 8838 COMPAT_43 { int stat(char *path, struct ostat *ub); } 8939 STD { pid_t getppid(void); } 9040 COMPAT_43 { int lstat(char *path, struct ostat *ub); } 9141 STD { int dup(u_int fd); } 9242 STD { int pipe(void); } 9343 STD { gid_t getegid(void); } 9444 STD { int profil(caddr_t samples, u_int size, \ 95 u_int offset, u_int scale); } 96#ifdef KTRACE 9745 STD { int ktrace(char *fname, int ops, int facs, \ 98 int pid); } 99#else 10045 UNIMPL ktrace 101#endif 10246 STD { int sigaction(int signum, struct sigaction *nsa, \ 103 struct sigaction *osa); } 10447 STD { gid_t getgid(void); } 10548 STD { int sigprocmask(int how, sigset_t mask); } 10649 STD { int getlogin(char *namebuf, u_int namelen); } 10750 STD { int setlogin(char *namebuf); } 10851 STD { int acct(char *path); } 10952 STD { int sigpending(void); } 11053 STD { int sigaltstack(struct sigaltstack *nss, \ 111 struct sigaltstack *oss); } 11254 STD { int ioctl(int fd, u_long com, caddr_t data); } 11355 STD { int reboot(int opt); } 11456 STD { int revoke(char *path); } 11557 STD { int symlink(char *path, char *link); } 11658 STD { int readlink(char *path, char *buf, int count); } 11759 STD { int execve(char *path, char **argp, char **envp); } 11860 STD { int umask(int newmask); } 11961 STD { int chroot(char *path); } 12062 COMPAT_43 { int fstat(int fd, struct ostat *sb); } 12163 COMPAT_43 { int getkerninfo(int op, char *where, int *size, \ 122 int arg); } 12364 COMPAT_43 { int getpagesize(void); } 12465 STD { int msync(caddr_t addr, size_t len); } 12566 STD { int vfork(void); } 12667 OBSOL vread 12768 OBSOL vwrite 12869 STD { int sbrk(int incr); } 12970 STD { int sstk(int incr); } 13071 COMPAT_43 { int mmap(caddr_t addr, size_t len, int prot, \ 131 int flags, int fd, long pos); } 13272 STD { int ovadvise(int anom); } vadvise 13373 STD { int munmap(caddr_t addr, size_t len); } 13474 STD { int mprotect(caddr_t addr, size_t len, int prot); } 13575 STD { int madvise(caddr_t addr, size_t len, int behav); } 13676 OBSOL vhangup 13777 OBSOL vlimit 13878 STD { int mincore(caddr_t addr, size_t len, char *vec); } 13979 STD { int getgroups(u_int gidsetsize, gid_t *gidset); } 14080 STD { int setgroups(u_int gidsetsize, gid_t *gidset); } 14181 STD { int getpgrp(void); } 14282 STD { int setpgid(int pid, int pgid); } 14383 STD { int setitimer(u_int which, struct itimerval *itv, \ 144 struct itimerval *oitv); } 14584 COMPAT_43 { int wait(void); } 14685 STD { int swapon(char *name); } 14786 STD { int getitimer(u_int which, struct itimerval *itv); } 14887 COMPAT_43 { int gethostname(char *hostname, u_int len); } 14988 COMPAT_43 { int sethostname(char *hostname, u_int len); } 15089 COMPAT_43 { int getdtablesize(void); } 15190 STD { int dup2(u_int from, u_int to); } 15291 UNIMPL getdopt 15392 STD { int fcntl(int fd, int cmd, void *arg); } 15493 STD { int select(u_int nd, fd_set *in, fd_set *ou, \ 155 fd_set *ex, struct timeval *tv); } 15694 UNIMPL setdopt 15795 STD { int fsync(int fd); } 15896 STD { int setpriority(int which, int who, int prio); } 15997 STD { int socket(int domain, int type, int protocol); } 16098 STD { int connect(int s, caddr_t name, int namelen); } 16199 COMPAT_43 { int accept(int s, caddr_t name, int *anamelen); } 162100 STD { int getpriority(int which, int who); } 163101 COMPAT_43 { int send(int s, caddr_t buf, int len, int flags); } 164102 COMPAT_43 { int recv(int s, caddr_t buf, int len, int flags); } 165103 STD { int sigreturn(struct sigcontext *sigcntxp); } 166104 STD { int bind(int s, caddr_t name, int namelen); } 167105 STD { int setsockopt(int s, int level, int name, \ 168 caddr_t val, int valsize); } 169106 STD { int listen(int s, int backlog); } 170107 OBSOL vtimes 171108 COMPAT_43 { int sigvec(int signum, struct sigvec *nsv, \ 172 struct sigvec *osv); } 173109 COMPAT_43 { int sigblock(int mask); } 174110 COMPAT_43 { int sigsetmask(int mask); } 175111 STD { int sigsuspend(int mask); } 176112 COMPAT_43 { int sigstack(struct sigstack *nss, \ 177 struct sigstack *oss); } 178113 COMPAT_43 { int recvmsg(int s, struct omsghdr *msg, int flags); } 179114 COMPAT_43 { int sendmsg(int s, caddr_t msg, int flags); } 180#ifdef TRACE 181115 STD { int vtrace(int request, int value); } 182#else 183115 OBSOL vtrace 184#endif 185116 STD { int gettimeofday(struct timeval *tp, \ 186 struct timezone *tzp); } 187117 STD { int getrusage(int who, struct rusage *rusage); } 188118 STD { int getsockopt(int s, int level, int name, \ 189 caddr_t val, int *avalsize); } 190119 OBSOL resuba 191120 STD { int readv(int fd, struct iovec *iovp, u_int iovcnt); } 192121 STD { int writev(int fd, struct iovec *iovp, \ 193 u_int iovcnt); } 194122 STD { int settimeofday(struct timeval *tv, \ 195 struct timezone *tzp); } 196123 STD { int fchown(int fd, int uid, int gid); } 197124 STD { int fchmod(int fd, int mode); } 198125 COMPAT_43 { int recvfrom(int s, caddr_t buf, size_t len, \ 199 int flags, caddr_t from, int *fromlenaddr); } 200126 COMPAT_43 { int setreuid(int ruid, int euid); } 201127 COMPAT_43 { int setregid(int rgid, int egid); } 202128 STD { int rename(char *from, char *to); } 203129 COMPAT_43 { int truncate(char *path, long length); } 204130 COMPAT_43 { int ftruncate(int fd, long length); } 205131 STD { int flock(int fd, int how); } 206132 STD { int mkfifo(char *path, int mode); } 207133 STD { int sendto(int s, caddr_t buf, size_t len, \ 208 int flags, caddr_t to, int tolen); } 209134 STD { int shutdown(int s, int how); } 210135 STD { int socketpair(int domain, int type, int protocol, \ 211 int *rsv); } 212136 STD { int mkdir(char *path, int mode); } 213137 STD { int rmdir(char *path); } 214138 STD { int utimes(char *path, struct timeval *tptr); } 215139 OBSOL 4.2 sigreturn 216140 STD { int adjtime(struct timeval *delta, \ 217 struct timeval *olddelta); } 218141 COMPAT_43 { int getpeername(int fdes, caddr_t asa, int *alen); } 219142 COMPAT_43 { int32_t gethostid(void); } 220143 COMPAT_43 { int sethostid(int32_t hostid); } 221144 COMPAT_43 { int getrlimit(u_int which, struct ogetrlimit *rlp); } 222145 COMPAT_43 { int setrlimit(u_int which, struct ogetrlimit *rlp); } 223146 COMPAT_43 { int killpg(int pgid, int signum); } 224147 STD { int setsid(void); } 225148 STD { int quotactl(char *path, int cmd, int uid, \ 226 caddr_t arg); } 227149 COMPAT_43 { int quota(void); } 228150 COMPAT_43 { int getsockname(int fdec, caddr_t asa, int *alen); } 229 230; Syscalls 151-180 inclusive are reserved for vendor-specific 231; system calls. (This includes various calls added for compatibity 232; with other Unix variants.) 233; Some of these calls are now supported by BSD... 234151 UNIMPL 235152 UNIMPL 236153 UNIMPL 237154 UNIMPL 238#if defined(NFSCLIENT) || defined(NFSSERVER) 239155 STD { int nfssvc(int flag, caddr_t argp); } 240#else 241155 UNIMPL 242#endif 243156 COMPAT_43 { int getdirentries(int fd, char *buf, u_int count, \ 244 long *basep); } 245157 STD { int statfs(char *path, struct statfs *buf); } 246158 STD { int fstatfs(int fd, struct statfs *buf); } 247159 UNIMPL 248160 UNIMPL 249#ifdef NFSCLIENT 250161 STD { int getfh(char *fname, fhandle_t *fhp); } 251#else 252161 UNIMPL getfh 253#endif 254162 COMPAT_09 { int getdomainname(char *domainname, int len); } 255163 COMPAT_09 { int setdomainname(char *domainname, int len); } 256164 COMPAT_09 { int uname(struct outsname *name); } 257165 STD { int sysarch(int op, char *parms); } 258166 UNIMPL 259167 UNIMPL 260168 UNIMPL 261; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 262#if defined(SYSVSEM) && !defined(alpha) 263169 COMPAT_10 { int semsys(int which, int a2, int a3, int a4, \ 264 int a5); } 265#else 266169 UNIMPL 1.0 semsys 267#endif 268; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 269#if defined(SYSVMSG) && !defined(alpha) 270170 COMPAT_10 { int msgsys(int which, int a2, int a3, int a4, \ 271 int a5, int a6); } 272#else 273170 UNIMPL 1.0 msgsys 274#endif 275; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 276#if defined(SYSVSHM) && !defined(alpha) 277171 COMPAT_10 { int shmsys(int which, int a2, int a3, int a4); } 278#else 279171 UNIMPL 1.0 shmsys 280#endif 281172 UNIMPL 282173 UNIMPL 283174 UNIMPL 284175 UNIMPL 285176 UNIMPL 286177 UNIMPL 287178 UNIMPL 288179 UNIMPL 289180 UNIMPL 290 291; Syscalls 180-199 are used by/reserved for BSD 292181 STD { int setgid(gid_t gid); } 293182 STD { int setegid(gid_t egid); } 294183 STD { int seteuid(uid_t euid); } 295#ifdef LFS 296184 STD { int lfs_bmapv(fsid_t *fsidp, \ 297 struct block_info *blkiov, int blkcnt); } 298185 STD { int lfs_markv(fsid_t *fsidp, \ 299 struct block_info *blkiov, int blkcnt); } 300186 STD { int lfs_segclean(fsid_t *fsidp, u_long segment); } 301187 STD { int lfs_segwait(fsid_t *fsidp, struct timeval *tv); } 302#else 303184 UNIMPL 304185 UNIMPL 305186 UNIMPL 306187 UNIMPL 307#endif 308188 STD { int stat(char *path, struct stat *ub); } 309189 STD { int fstat(int fd, struct stat *sb); } 310190 STD { int lstat(char *path, struct stat *ub); } 311191 STD { int pathconf(char *path, int name); } 312192 STD { int fpathconf(int fd, int name); } 313193 UNIMPL 314194 STD { int getrlimit(u_int which, struct rlimit *rlp); } 315195 STD { int setrlimit(u_int which, struct rlimit *rlp); } 316196 STD { int getdirentries(int fd, char *buf, u_int count, \ 317 long *basep); } 318197 STD { caddr_t mmap(caddr_t addr, size_t len, int prot, \ 319 int flags, int fd, long pad, off_t pos); } 320198 STD { int nosys(void); } __syscall 321199 STD { off_t lseek(int fd, int pad, off_t offset, \ 322 int whence); } 323200 STD { int truncate(char *path, int pad, off_t length); } 324201 STD { int ftruncate(int fd, int pad, off_t length); } 325202 STD { int __sysctl(int *name, u_int namelen, void *old, \ 326 size_t *oldlenp, void *new, size_t newlen); } 327203 STD { int mlock(caddr_t addr, size_t len); } 328204 STD { int munlock(caddr_t addr, size_t len); } 329205 STD { int undelete(char *path); } 330206 UNIMPL 331207 UNIMPL 332208 UNIMPL 333209 UNIMPL 334; 335; Syscalls 210-219 are reserved for dynamically loaded syscalls 336; 337#ifdef LKM 338210 NODEF { int lkmnosys(void); } 339211 NODEF { int lkmnosys(void); } 340212 NODEF { int lkmnosys(void); } 341213 NODEF { int lkmnosys(void); } 342214 NODEF { int lkmnosys(void); } 343215 NODEF { int lkmnosys(void); } 344216 NODEF { int lkmnosys(void); } 345217 NODEF { int lkmnosys(void); } 346218 NODEF { int lkmnosys(void); } 347219 NODEF { int lkmnosys(void); } 348#else /* !LKM */ 349210 UNIMPL 350211 UNIMPL 351212 UNIMPL 352213 UNIMPL 353214 UNIMPL 354215 UNIMPL 355216 UNIMPL 356217 UNIMPL 357218 UNIMPL 358219 UNIMPL 359#endif /* !LKM */ 360; System calls 220-240 are reserved for use by NetBSD 361#ifdef SYSVSEM 362220 STD { int __semctl(int semid, int semnum, int cmd, \ 363 union semun *arg); } 364221 STD { int semget(key_t key, int nsems, int semflg); } 365222 STD { int semop(int semid, struct sembuf *sops, \ 366 u_int nsops); } 367223 STD { int semconfig(int flag); } 368#else 369220 UNIMPL semctl 370221 UNIMPL semget 371222 UNIMPL semop 372223 UNIMPL semconfig 373#endif 374#ifdef SYSVMSG 375224 STD { int msgctl(int msqid, int cmd, \ 376 struct msqid_ds *buf); } 377225 STD { int msgget(key_t key, int msgflg); } 378226 STD { int msgsnd(int msqid, void *msgp, size_t msgsz, \ 379 int msgflg); } 380227 STD { int msgrcv(int msqid, void *msgp, size_t msgsz, \ 381 long msgtyp, int msgflg); } 382#else 383224 UNIMPL msgctl 384225 UNIMPL msgget 385226 UNIMPL msgsnd 386227 UNIMPL msgrcv 387#endif 388#ifdef SYSVSHM 389228 STD { int shmat(int shmid, void *shmaddr, int shmflg); } 390229 STD { int shmctl(int shmid, int cmd, \ 391 struct shmid_ds *buf); } 392230 STD { int shmdt(void *shmaddr); } 393231 STD { int shmget(key_t key, int size, int shmflg); } 394#else 395228 UNIMPL shmat 396229 UNIMPL shmctl 397230 UNIMPL shmdt 398231 UNIMPL shmget 399#endif 400