1 $NetBSD: syscalls.master,v 1.25 1994/12/14 16:29:57 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, int 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, int len, int prot, \ 131 int flags, int fd, long pos); } 13272 STD { int ovadvise(int anom); } vadvise 13373 STD { int munmap(caddr_t addr, int len); } 13474 STD { int mprotect(caddr_t addr, int len, int prot); } 13575 STD { int madvise(caddr_t addr, int len, int behav); } 13676 OBSOL vhangup 13777 OBSOL vlimit 13878 STD { int mincore(caddr_t addr, int 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); } 190#ifdef vax 191119 STD { int resuba(int value); } 192#else 193119 UNIMPL resuba 194#endif 195120 STD { int readv(int fd, struct iovec *iovp, u_int iovcnt); } 196121 STD { int writev(int fd, struct iovec *iovp, \ 197 u_int iovcnt); } 198122 STD { int settimeofday(struct timeval *tv, \ 199 struct timezone *tzp); } 200123 STD { int fchown(int fd, int uid, int gid); } 201124 STD { int fchmod(int fd, int mode); } 202125 COMPAT_43 { int recvfrom(int s, caddr_t buf, size_t len, \ 203 int flags, caddr_t from, int *fromlenaddr); } 204126 COMPAT_43 { int setreuid(int ruid, int euid); } 205127 COMPAT_43 { int setregid(int rgid, int egid); } 206128 STD { int rename(char *from, char *to); } 207129 COMPAT_43 { int truncate(char *path, long length); } 208130 COMPAT_43 { int ftruncate(int fd, long length); } 209131 STD { int flock(int fd, int how); } 210132 STD { int mkfifo(char *path, int mode); } 211133 STD { int sendto(int s, caddr_t buf, size_t len, \ 212 int flags, caddr_t to, int tolen); } 213134 STD { int shutdown(int s, int how); } 214135 STD { int socketpair(int domain, int type, int protocol, \ 215 int *rsv); } 216136 STD { int mkdir(char *path, int mode); } 217137 STD { int rmdir(char *path); } 218138 STD { int utimes(char *path, struct timeval *tptr); } 219139 OBSOL 4.2 sigreturn 220140 STD { int adjtime(struct timeval *delta, \ 221 struct timeval *olddelta); } 222141 COMPAT_43 { int getpeername(int fdes, caddr_t asa, int *alen); } 223142 COMPAT_43 { int32_t gethostid(void); } 224143 COMPAT_43 { int sethostid(int32_t hostid); } 225144 COMPAT_43 { int getrlimit(u_int which, struct ogetrlimit *rlp); } 226145 COMPAT_43 { int setrlimit(u_int which, struct ogetrlimit *rlp); } 227146 COMPAT_43 { int killpg(int pgid, int signum); } 228147 STD { int setsid(void); } 229148 STD { int quotactl(char *path, int cmd, int uid, \ 230 caddr_t arg); } 231149 COMPAT_43 { int quota(void); } 232150 COMPAT_43 { int getsockname(int fdec, caddr_t asa, int *alen); } 233 234; Syscalls 151-180 inclusive are reserved for vendor-specific 235; system calls. (This includes various calls added for compatibity 236; with other Unix variants.) 237; Some of these calls are now supported by BSD... 238151 UNIMPL 239152 UNIMPL 240153 UNIMPL 241154 UNIMPL 242#if defined(NFSCLIENT) || defined(NFSSERVER) 243155 STD { int nfssvc(int flag, caddr_t argp); } 244#else 245155 UNIMPL 246#endif 247156 COMPAT_43 { int getdirentries(int fd, char *buf, u_int count, \ 248 long *basep); } 249157 STD { int statfs(char *path, struct statfs *buf); } 250158 STD { int fstatfs(int fd, struct statfs *buf); } 251159 UNIMPL 252160 UNIMPL 253#ifdef NFSCLIENT 254161 STD { int getfh(char *fname, fhandle_t *fhp); } 255#else 256161 UNIMPL getfh 257#endif 258162 COMPAT_09 { int getdomainname(char *domainname, int len); } 259163 COMPAT_09 { int setdomainname(char *domainname, int len); } 260164 COMPAT_09 { int uname(struct outsname *name); } 261165 STD { int sysarch(int op, char *parms); } 262166 UNIMPL 263167 UNIMPL 264168 UNIMPL 265; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 266#if defined(SYSVSEM) && !defined(alpha) 267169 COMPAT_10 { int semsys(int which, int a2, int a3, int a4, \ 268 int a5); } 269#else 270169 UNIMPL 1.0 semsys 271#endif 272; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 273#if defined(SYSVMSG) && !defined(alpha) 274170 COMPAT_10 { int msgsys(int which, int a2, int a3, int a4, \ 275 int a5, int a6); } 276#else 277170 UNIMPL 1.0 msgsys 278#endif 279; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 280#if defined(SYSVSHM) && !defined(alpha) 281171 COMPAT_10 { int shmsys(int which, int a2, int a3, int a4); } 282#else 283171 UNIMPL 1.0 shmsys 284#endif 285172 UNIMPL 286173 UNIMPL 287174 UNIMPL 288175 UNIMPL 289176 UNIMPL 290177 UNIMPL 291178 UNIMPL 292179 UNIMPL 293180 UNIMPL 294 295; Syscalls 180-199 are used by/reserved for BSD 296181 STD { int setgid(gid_t gid); } 297182 STD { int setegid(gid_t egid); } 298183 STD { int seteuid(uid_t euid); } 299#ifdef LFS 300184 STD { int lfs_bmapv(fsid_t *fsidp, \ 301 struct block_info *blkiov, int blkcnt); } 302185 STD { int lfs_markv(fsid_t *fsidp, \ 303 struct block_info *blkiov, int blkcnt); } 304186 STD { int lfs_segclean(fsid_t *fsidp, u_long segment); } 305187 STD { int lfs_segwait(fsid_t *fsidp, struct timeval *tv); } 306#else 307184 UNIMPL 308185 UNIMPL 309186 UNIMPL 310187 UNIMPL 311#endif 312188 STD { int stat(char *path, struct stat *ub); } 313189 STD { int fstat(int fd, struct stat *sb); } 314190 STD { int lstat(char *path, struct stat *ub); } 315191 STD { int pathconf(char *path, int name); } 316192 STD { int fpathconf(int fd, int name); } 317193 UNIMPL 318194 STD { int getrlimit(u_int which, struct rlimit *rlp); } 319195 STD { int setrlimit(u_int which, struct rlimit *rlp); } 320196 STD { int getdirentries(int fd, char *buf, u_int count, \ 321 long *basep); } 322197 STD { caddr_t mmap(caddr_t addr, size_t len, int prot, \ 323 int flags, int fd, long pad, off_t pos); } 324198 STD { int nosys(void); } __syscall 325199 STD { off_t lseek(int fd, int pad, off_t offset, \ 326 int whence); } 327200 STD { int truncate(char *path, int pad, off_t length); } 328201 STD { int ftruncate(int fd, int pad, off_t length); } 329202 STD { int __sysctl(int *name, u_int namelen, void *old, \ 330 size_t *oldlenp, void *new, size_t newlen); } 331203 STD { int mlock(caddr_t addr, size_t len); } 332204 STD { int munlock(caddr_t addr, size_t len); } 333205 STD { int undelete(char *path); } 334206 UNIMPL 335207 UNIMPL 336208 UNIMPL 337209 UNIMPL 338; 339; Syscalls 210-219 are reserved for dynamically loaded syscalls 340; 341#ifdef LKM 342210 NODEF { int lkmnosys(void); } 343211 NODEF { int lkmnosys(void); } 344212 NODEF { int lkmnosys(void); } 345213 NODEF { int lkmnosys(void); } 346214 NODEF { int lkmnosys(void); } 347215 NODEF { int lkmnosys(void); } 348216 NODEF { int lkmnosys(void); } 349217 NODEF { int lkmnosys(void); } 350218 NODEF { int lkmnosys(void); } 351219 NODEF { int lkmnosys(void); } 352#else /* !LKM */ 353210 UNIMPL 354211 UNIMPL 355212 UNIMPL 356213 UNIMPL 357214 UNIMPL 358215 UNIMPL 359216 UNIMPL 360217 UNIMPL 361218 UNIMPL 362219 UNIMPL 363#endif /* !LKM */ 364; System calls 220-240 are reserved for use by NetBSD 365#ifdef SYSVSEM 366220 STD { int __semctl(int semid, int semnum, int cmd, \ 367 union semun *arg); } 368221 STD { int semget(key_t key, int nsems, int semflg); } 369222 STD { int semop(int semid, struct sembuf *sops, \ 370 u_int nsops); } 371223 STD { int semconfig(int flag); } 372#else 373220 UNIMPL semctl 374221 UNIMPL semget 375222 UNIMPL semop 376223 UNIMPL semconfig 377#endif 378#ifdef SYSVMSG 379224 STD { int msgctl(int msqid, int cmd, \ 380 struct msqid_ds *buf); } 381225 STD { int msgget(key_t key, int msgflg); } 382226 STD { int msgsnd(int msqid, void *msgp, size_t msgsz, \ 383 int msgflg); } 384227 STD { int msgrcv(int msqid, void *msgp, size_t msgsz, \ 385 long msgtyp, int msgflg); } 386#else 387224 UNIMPL msgctl 388225 UNIMPL msgget 389226 UNIMPL msgsnd 390227 UNIMPL msgrcv 391#endif 392#ifdef SYSVSHM 393228 STD { int shmat(int shmid, void *shmaddr, int shmflg); } 394229 STD { int shmctl(int shmid, int cmd, \ 395 struct shmid_ds *buf); } 396230 STD { int shmdt(void *shmaddr); } 397231 STD { int shmget(key_t key, int size, int shmflg); } 398#else 399228 UNIMPL shmat 400229 UNIMPL shmctl 401230 UNIMPL shmdt 402231 UNIMPL shmget 403#endif 404