syscalls.master revision 1.28
1 $NetBSD: syscalls.master,v 1.28 1995/10/07 06:28:38 mycroft Exp $ 2 3; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 4 5; NetBSD 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; 20; The compat options are defined in the syscalls.conf file, and the 21; compat option name is prefixed to the syscall name. Other than 22; that, they're like NODEF (for 'compat' options), or STD (for 23; 'libcompat' options). 24; 25; The type-dependent arguments are as follows: 26; For STD, NODEF, NOARGS, and compat syscalls: 27; { pseudo-proto } [alias] 28; For other syscalls: 29; [comment] 30; 31; #ifdef's, etc. may be included, and are copied to the output files. 32; #include's are copied to the syscall switch definition file only. 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/signal.h> 37#include <sys/mount.h> 38#include <sys/syscallargs.h> 39 40; Reserved/unimplemented system calls in the range 0-150 inclusive 41; are reserved for use in future Berkeley releases. 42; Additional system calls implemented in vendor and other 43; redistributions should be placed in the reserved range at the end 44; of the current calls. 45 460 STD { int sys_nosys(void); } syscall 471 STD { int sys_exit(int rval); } 482 STD { int sys_fork(void); } 493 STD { int sys_read(int fd, char *buf, u_int nbyte); } 504 STD { int sys_write(int fd, char *buf, u_int nbyte); } 515 STD { int sys_open(char *path, int flags, int mode); } 526 STD { int sys_close(int fd); } 537 STD { int sys_wait4(int pid, int *status, int options, \ 54 struct rusage *rusage); } 558 COMPAT_43 { int sys_creat(char *path, int mode); } 569 STD { int sys_link(char *path, char *link); } 5710 STD { int sys_unlink(char *path); } 5811 OBSOL execv 5912 STD { int sys_chdir(char *path); } 6013 STD { int sys_fchdir(int fd); } 6114 STD { int sys_mknod(char *path, int mode, int dev); } 6215 STD { int sys_chmod(char *path, int mode); } 6316 STD { int sys_chown(char *path, int uid, int gid); } 6417 STD { int sys_obreak(char *nsize); } break 6518 STD { int sys_getfsstat(struct statfs *buf, long bufsize, \ 66 int flags); } 6719 COMPAT_43 { long sys_lseek(int fd, long offset, int whence); } 6820 STD { pid_t sys_getpid(void); } 6921 STD { int sys_mount(char *type, char *path, int flags, \ 70 caddr_t data); } 7122 STD { int sys_unmount(char *path, int flags); } 7223 STD { int sys_setuid(uid_t uid); } 7324 STD { uid_t sys_getuid(void); } 7425 STD { uid_t sys_geteuid(void); } 7526 STD { int sys_ptrace(int req, pid_t pid, caddr_t addr, \ 76 int data); } 7727 STD { int sys_recvmsg(int s, struct msghdr *msg, \ 78 int flags); } 7928 STD { int sys_sendmsg(int s, caddr_t msg, int flags); } 8029 STD { int sys_recvfrom(int s, caddr_t buf, size_t len, \ 81 int flags, caddr_t from, int *fromlenaddr); } 8230 STD { int sys_accept(int s, caddr_t name, int *anamelen); } 8331 STD { int sys_getpeername(int fdes, caddr_t asa, \ 84 int *alen); } 8532 STD { int sys_getsockname(int fdes, caddr_t asa, \ 86 int *alen); } 8733 STD { int sys_access(char *path, int flags); } 8834 STD { int sys_chflags(char *path, int flags); } 8935 STD { int sys_fchflags(int fd, int flags); } 9036 STD { int sys_sync(void); } 9137 STD { int sys_kill(int pid, int signum); } 9238 COMPAT_43 { int sys_stat(char *path, struct ostat *ub); } 9339 STD { pid_t sys_getppid(void); } 9440 COMPAT_43 { int sys_lstat(char *path, struct ostat *ub); } 9541 STD { int sys_dup(u_int fd); } 9642 STD { int sys_pipe(void); } 9743 STD { gid_t sys_getegid(void); } 9844 STD { int sys_profil(caddr_t samples, u_int size, \ 99 u_int offset, u_int scale); } 100#ifdef KTRACE 10145 STD { int sys_ktrace(char *fname, int ops, int facs, \ 102 int pid); } 103#else 10445 UNIMPL ktrace 105#endif 10646 STD { int sys_sigaction(int signum, struct sigaction *nsa, \ 107 struct sigaction *osa); } 10847 STD { gid_t sys_getgid(void); } 10948 STD { int sys_sigprocmask(int how, sigset_t mask); } 11049 STD { int sys_getlogin(char *namebuf, u_int namelen); } 11150 STD { int sys_setlogin(char *namebuf); } 11251 STD { int sys_acct(char *path); } 11352 STD { int sys_sigpending(void); } 11453 STD { int sys_sigaltstack(struct sigaltstack *nss, \ 115 struct sigaltstack *oss); } 11654 STD { int sys_ioctl(int fd, u_long com, caddr_t data); } 11755 STD { int sys_reboot(int opt); } 11856 STD { int sys_revoke(char *path); } 11957 STD { int sys_symlink(char *path, char *link); } 12058 STD { int sys_readlink(char *path, char *buf, int count); } 12159 STD { int sys_execve(char *path, char **argp, \ 122 char **envp); } 12360 STD { int sys_umask(int newmask); } 12461 STD { int sys_chroot(char *path); } 12562 COMPAT_43 { int sys_fstat(int fd, struct ostat *sb); } 12663 COMPAT_43 { int sys_getkerninfo(int op, char *where, int *size, \ 127 int arg); } 12864 COMPAT_43 { int sys_getpagesize(void); } 12965 STD { int sys_msync(caddr_t addr, size_t len); } 13066 STD { int sys_vfork(void); } 13167 OBSOL vread 13268 OBSOL vwrite 13369 STD { int sys_sbrk(int incr); } 13470 STD { int sys_sstk(int incr); } 13571 COMPAT_43 { int sys_mmap(caddr_t addr, size_t len, int prot, \ 136 int flags, int fd, long pos); } 13772 STD { int sys_ovadvise(int anom); } vadvise 13873 STD { int sys_munmap(caddr_t addr, size_t len); } 13974 STD { int sys_mprotect(caddr_t addr, size_t len, \ 140 int prot); } 14175 STD { int sys_madvise(caddr_t addr, size_t len, \ 142 int behav); } 14376 OBSOL vhangup 14477 OBSOL vlimit 14578 STD { int sys_mincore(caddr_t addr, size_t len, \ 146 char *vec); } 14779 STD { int sys_getgroups(u_int gidsetsize, gid_t *gidset); } 14880 STD { int sys_setgroups(u_int gidsetsize, gid_t *gidset); } 14981 STD { int sys_getpgrp(void); } 15082 STD { int sys_setpgid(int pid, int pgid); } 15183 STD { int sys_setitimer(u_int which, \ 152 struct itimerval *itv, struct itimerval *oitv); } 15384 COMPAT_43 { int sys_wait(void); } 15485 STD { int sys_swapon(char *name); } 15586 STD { int sys_getitimer(u_int which, \ 156 struct itimerval *itv); } 15787 COMPAT_43 { int sys_gethostname(char *hostname, u_int len); } 15888 COMPAT_43 { int sys_sethostname(char *hostname, u_int len); } 15989 COMPAT_43 { int sys_getdtablesize(void); } 16090 STD { int sys_dup2(u_int from, u_int to); } 16191 UNIMPL getdopt 16292 STD { int sys_fcntl(int fd, int cmd, void *arg); } 16393 STD { int sys_select(u_int nd, fd_set *in, fd_set *ou, \ 164 fd_set *ex, struct timeval *tv); } 16594 UNIMPL setdopt 16695 STD { int sys_fsync(int fd); } 16796 STD { int sys_setpriority(int which, int who, int prio); } 16897 STD { int sys_socket(int domain, int type, int protocol); } 16998 STD { int sys_connect(int s, caddr_t name, int namelen); } 17099 COMPAT_43 { int sys_accept(int s, caddr_t name, int *anamelen); } 171100 STD { int sys_getpriority(int which, int who); } 172101 COMPAT_43 { int sys_send(int s, caddr_t buf, int len, \ 173 int flags); } 174102 COMPAT_43 { int sys_recv(int s, caddr_t buf, int len, \ 175 int flags); } 176103 STD { int sys_sigreturn(struct sigcontext *sigcntxp); } 177104 STD { int sys_bind(int s, caddr_t name, int namelen); } 178105 STD { int sys_setsockopt(int s, int level, int name, \ 179 caddr_t val, int valsize); } 180106 STD { int sys_listen(int s, int backlog); } 181107 OBSOL vtimes 182108 COMPAT_43 { int sys_sigvec(int signum, struct sigvec *nsv, \ 183 struct sigvec *osv); } 184109 COMPAT_43 { int sys_sigblock(int mask); } 185110 COMPAT_43 { int sys_sigsetmask(int mask); } 186111 STD { int sys_sigsuspend(int mask); } 187112 COMPAT_43 { int sys_sigstack(struct sigstack *nss, \ 188 struct sigstack *oss); } 189113 COMPAT_43 { int sys_recvmsg(int s, struct omsghdr *msg, \ 190 int flags); } 191114 COMPAT_43 { int sys_sendmsg(int s, caddr_t msg, int flags); } 192#ifdef TRACE 193115 STD { int sys_vtrace(int request, int value); } 194#else 195115 OBSOL vtrace 196#endif 197116 STD { int sys_gettimeofday(struct timeval *tp, \ 198 struct timezone *tzp); } 199117 STD { int sys_getrusage(int who, struct rusage *rusage); } 200118 STD { int sys_getsockopt(int s, int level, int name, \ 201 caddr_t val, int *avalsize); } 202119 OBSOL resuba 203120 STD { int sys_readv(int fd, struct iovec *iovp, \ 204 u_int iovcnt); } 205121 STD { int sys_writev(int fd, struct iovec *iovp, \ 206 u_int iovcnt); } 207122 STD { int sys_settimeofday(struct timeval *tv, \ 208 struct timezone *tzp); } 209123 STD { int sys_fchown(int fd, int uid, int gid); } 210124 STD { int sys_fchmod(int fd, int mode); } 211125 COMPAT_43 { int sys_recvfrom(int s, caddr_t buf, size_t len, \ 212 int flags, caddr_t from, int *fromlenaddr); } 213126 COMPAT_43 { int sys_setreuid(int ruid, int euid); } 214127 COMPAT_43 { int sys_setregid(int rgid, int egid); } 215128 STD { int sys_rename(char *from, char *to); } 216129 COMPAT_43 { int sys_truncate(char *path, long length); } 217130 COMPAT_43 { int sys_ftruncate(int fd, long length); } 218131 STD { int sys_flock(int fd, int how); } 219132 STD { int sys_mkfifo(char *path, int mode); } 220133 STD { int sys_sendto(int s, caddr_t buf, size_t len, \ 221 int flags, caddr_t to, int tolen); } 222134 STD { int sys_shutdown(int s, int how); } 223135 STD { int sys_socketpair(int domain, int type, \ 224 int protocol, int *rsv); } 225136 STD { int sys_mkdir(char *path, int mode); } 226137 STD { int sys_rmdir(char *path); } 227138 STD { int sys_utimes(char *path, struct timeval *tptr); } 228139 OBSOL 4.2 sigreturn 229140 STD { int sys_adjtime(struct timeval *delta, \ 230 struct timeval *olddelta); } 231141 COMPAT_43 { int sys_getpeername(int fdes, caddr_t asa, \ 232 int *alen); } 233142 COMPAT_43 { int32_t sys_gethostid(void); } 234143 COMPAT_43 { int sys_sethostid(int32_t hostid); } 235144 COMPAT_43 { int sys_getrlimit(u_int which, \ 236 struct ogetrlimit *rlp); } 237145 COMPAT_43 { int sys_setrlimit(u_int which, \ 238 struct ogetrlimit *rlp); } 239146 COMPAT_43 { int sys_killpg(int pgid, int signum); } 240147 STD { int sys_setsid(void); } 241148 STD { int sys_quotactl(char *path, int cmd, int uid, \ 242 caddr_t arg); } 243149 COMPAT_43 { int sys_quota(void); } 244150 COMPAT_43 { int sys_getsockname(int fdec, caddr_t asa, \ 245 int *alen); } 246 247; Syscalls 151-180 inclusive are reserved for vendor-specific 248; system calls. (This includes various calls added for compatibity 249; with other Unix variants.) 250; Some of these calls are now supported by BSD... 251151 UNIMPL 252152 UNIMPL 253153 UNIMPL 254154 UNIMPL 255#if defined(NFSCLIENT) || defined(NFSSERVER) 256155 STD { int sys_nfssvc(int flag, caddr_t argp); } 257#else 258155 UNIMPL 259#endif 260156 COMPAT_43 { int sys_getdirentries(int fd, char *buf, \ 261 u_int count, long *basep); } 262157 STD { int sys_statfs(char *path, struct statfs *buf); } 263158 STD { int sys_fstatfs(int fd, struct statfs *buf); } 264159 UNIMPL 265160 UNIMPL 266#ifdef NFSCLIENT 267161 STD { int sys_getfh(char *fname, fhandle_t *fhp); } 268#else 269161 UNIMPL getfh 270#endif 271162 COMPAT_09 { int sys_getdomainname(char *domainname, int len); } 272163 COMPAT_09 { int sys_setdomainname(char *domainname, int len); } 273164 COMPAT_09 { int sys_uname(struct outsname *name); } 274165 STD { int sys_sysarch(int op, char *parms); } 275166 UNIMPL 276167 UNIMPL 277168 UNIMPL 278; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 279#if defined(SYSVSEM) && !defined(alpha) 280169 COMPAT_10 { int sys_semsys(int which, int a2, int a3, int a4, \ 281 int a5); } 282#else 283169 UNIMPL 1.0 semsys 284#endif 285; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 286#if defined(SYSVMSG) && !defined(alpha) 287170 COMPAT_10 { int sys_msgsys(int which, int a2, int a3, int a4, \ 288 int a5, int a6); } 289#else 290170 UNIMPL 1.0 msgsys 291#endif 292; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 293#if defined(SYSVSHM) && !defined(alpha) 294171 COMPAT_10 { int sys_shmsys(int which, int a2, int a3, int a4); } 295#else 296171 UNIMPL 1.0 shmsys 297#endif 298172 UNIMPL 299173 UNIMPL 300174 UNIMPL 301175 UNIMPL 302176 UNIMPL 303177 UNIMPL 304178 UNIMPL 305179 UNIMPL 306180 UNIMPL 307 308; Syscalls 180-199 are used by/reserved for BSD 309181 STD { int sys_setgid(gid_t gid); } 310182 STD { int sys_setegid(gid_t egid); } 311183 STD { int sys_seteuid(uid_t euid); } 312#ifdef LFS 313184 STD { int lfs_bmapv(fsid_t *fsidp, \ 314 struct block_info *blkiov, int blkcnt); } 315185 STD { int lfs_markv(fsid_t *fsidp, \ 316 struct block_info *blkiov, int blkcnt); } 317186 STD { int lfs_segclean(fsid_t *fsidp, u_long segment); } 318187 STD { int lfs_segwait(fsid_t *fsidp, struct timeval *tv); } 319#else 320184 UNIMPL 321185 UNIMPL 322186 UNIMPL 323187 UNIMPL 324#endif 325188 STD { int sys_stat(char *path, struct stat *ub); } 326189 STD { int sys_fstat(int fd, struct stat *sb); } 327190 STD { int sys_lstat(char *path, struct stat *ub); } 328191 STD { int sys_pathconf(char *path, int name); } 329192 STD { int sys_fpathconf(int fd, int name); } 330193 UNIMPL 331194 STD { int sys_getrlimit(u_int which, struct rlimit *rlp); } 332195 STD { int sys_setrlimit(u_int which, struct rlimit *rlp); } 333196 STD { int sys_getdirentries(int fd, char *buf, \ 334 u_int count, long *basep); } 335197 STD { caddr_t sys_mmap(caddr_t addr, size_t len, int prot, \ 336 int flags, int fd, long pad, off_t pos); } 337198 STD { int sys_nosys(void); } __syscall 338199 STD { off_t sys_lseek(int fd, int pad, off_t offset, \ 339 int whence); } 340200 STD { int sys_truncate(char *path, int pad, off_t length); } 341201 STD { int sys_ftruncate(int fd, int pad, off_t length); } 342202 STD { int sys___sysctl(int *name, u_int namelen, \ 343 void *old, size_t *oldlenp, void *new, \ 344 size_t newlen); } 345203 STD { int sys_mlock(caddr_t addr, size_t len); } 346204 STD { int sys_munlock(caddr_t addr, size_t len); } 347205 STD { int sys_undelete(char *path); } 348206 UNIMPL 349207 UNIMPL 350208 UNIMPL 351209 UNIMPL 352; 353; Syscalls 210-219 are reserved for dynamically loaded syscalls 354; 355#ifdef LKM 356210 NODEF { int sys_lkmnosys(void); } 357211 NODEF { int sys_lkmnosys(void); } 358212 NODEF { int sys_lkmnosys(void); } 359213 NODEF { int sys_lkmnosys(void); } 360214 NODEF { int sys_lkmnosys(void); } 361215 NODEF { int sys_lkmnosys(void); } 362216 NODEF { int sys_lkmnosys(void); } 363217 NODEF { int sys_lkmnosys(void); } 364218 NODEF { int sys_lkmnosys(void); } 365219 NODEF { int sys_lkmnosys(void); } 366#else /* !LKM */ 367210 UNIMPL 368211 UNIMPL 369212 UNIMPL 370213 UNIMPL 371214 UNIMPL 372215 UNIMPL 373216 UNIMPL 374217 UNIMPL 375218 UNIMPL 376219 UNIMPL 377#endif /* !LKM */ 378; System calls 220-240 are reserved for use by NetBSD 379#ifdef SYSVSEM 380220 STD { int sys___semctl(int semid, int semnum, int cmd, \ 381 union semun *arg); } 382221 STD { int sys_semget(key_t key, int nsems, int semflg); } 383222 STD { int sys_semop(int semid, struct sembuf *sops, \ 384 u_int nsops); } 385223 STD { int sys_semconfig(int flag); } 386#else 387220 UNIMPL semctl 388221 UNIMPL semget 389222 UNIMPL semop 390223 UNIMPL semconfig 391#endif 392#ifdef SYSVMSG 393224 STD { int sys_msgctl(int msqid, int cmd, \ 394 struct msqid_ds *buf); } 395225 STD { int sys_msgget(key_t key, int msgflg); } 396226 STD { int sys_msgsnd(int msqid, void *msgp, size_t msgsz, \ 397 int msgflg); } 398227 STD { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \ 399 long msgtyp, int msgflg); } 400#else 401224 UNIMPL msgctl 402225 UNIMPL msgget 403226 UNIMPL msgsnd 404227 UNIMPL msgrcv 405#endif 406#ifdef SYSVSHM 407228 STD { int sys_shmat(int shmid, void *shmaddr, int shmflg); } 408229 STD { int sys_shmctl(int shmid, int cmd, \ 409 struct shmid_ds *buf); } 410230 STD { int sys_shmdt(void *shmaddr); } 411231 STD { int sys_shmget(key_t key, int size, int shmflg); } 412#else 413228 UNIMPL shmat 414229 UNIMPL shmctl 415230 UNIMPL shmdt 416231 UNIMPL shmget 417#endif 418