syscalls.master revision 1.45
1 $NetBSD: syscalls.master,v 1.45 1996/12/22 07:47:43 cgd 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; INDIR included, but don't define the syscall args structure, 20; and allow it to be "really" varargs. 21; 22; The compat options are defined in the syscalls.conf file, and the 23; compat option name is prefixed to the syscall name. Other than 24; that, they're like NODEF (for 'compat' options), or STD (for 25; 'libcompat' options). 26; 27; The type-dependent arguments are as follows: 28; For STD, NODEF, NOARGS, and compat syscalls: 29; { pseudo-proto } [alias] 30; For other syscalls: 31; [comment] 32; 33; #ifdef's, etc. may be included, and are copied to the output files. 34; #include's are copied to the syscall switch definition file only. 35 36#include <sys/param.h> 37#include <sys/systm.h> 38#include <sys/signal.h> 39#include <sys/mount.h> 40#include <sys/syscallargs.h> 41 42; Reserved/unimplemented system calls in the range 0-150 inclusive 43; are reserved for use in future Berkeley releases. 44; Additional system calls implemented in vendor and other 45; redistributions should be placed in the reserved range at the end 46; of the current calls. 47 480 INDIR { int sys_syscall(int number, ...); } 491 STD { void sys_exit(int rval); } 502 STD { int sys_fork(void); } 513 STD { ssize_t sys_read(int fd, char *buf, u_int nbyte); } 524 STD { ssize_t sys_write(int fd, char *buf, u_int nbyte); } 535 STD { int sys_open(char *path, int flags, ... int mode); } 546 STD { int sys_close(int fd); } 557 STD { int sys_wait4(int pid, int *status, int options, \ 56 struct rusage *rusage); } 578 COMPAT_43 { int sys_creat(char *path, int mode); } ocreat 589 STD { int sys_link(char *path, char *link); } 5910 STD { int sys_unlink(char *path); } 6011 OBSOL execv 6112 STD { int sys_chdir(char *path); } 6213 STD { int sys_fchdir(int fd); } 6314 STD { int sys_mknod(char *path, int mode, int dev); } 6415 STD { int sys_chmod(char *path, int mode); } 6516 STD { int sys_chown(char *path, int uid, int gid); } 6617 STD { int sys_obreak(char *nsize); } break 6718 STD { int sys_getfsstat(struct statfs *buf, long bufsize, \ 68 int flags); } 6919 COMPAT_43 { long sys_lseek(int fd, long offset, int whence); } \ 70 olseek 7120 STD { pid_t sys_getpid(void); } 7221 STD { int sys_mount(char *type, char *path, int flags, \ 73 caddr_t data); } 7422 STD { int sys_unmount(char *path, int flags); } 7523 STD { int sys_setuid(uid_t uid); } 7624 STD { uid_t sys_getuid(void); } 7725 STD { uid_t sys_geteuid(void); } 7826 STD { int sys_ptrace(int req, pid_t pid, caddr_t addr, \ 79 int data); } 8027 STD { ssize_t sys_recvmsg(int s, struct msghdr *msg, \ 81 int flags); } 8228 STD { ssize_t sys_sendmsg(int s, caddr_t msg, int flags); } 8329 STD { ssize_t sys_recvfrom(int s, caddr_t buf, size_t len, \ 84 int flags, caddr_t from, int *fromlenaddr); } 8530 STD { int sys_accept(int s, caddr_t name, int *anamelen); } 8631 STD { int sys_getpeername(int fdes, caddr_t asa, \ 87 int *alen); } 8832 STD { int sys_getsockname(int fdes, caddr_t asa, \ 89 int *alen); } 9033 STD { int sys_access(char *path, int flags); } 9134 STD { int sys_chflags(char *path, int flags); } 9235 STD { int sys_fchflags(int fd, int flags); } 9336 STD { void sys_sync(void); } 9437 STD { int sys_kill(int pid, int signum); } 9538 COMPAT_43 { int sys_stat(char *path, struct ostat *ub); } ostat 9639 STD { pid_t sys_getppid(void); } 9740 COMPAT_43 { int sys_lstat(char *path, struct ostat *ub); } olstat 9841 STD { int sys_dup(u_int fd); } 9942 STD { int sys_pipe(void); } 10043 STD { gid_t sys_getegid(void); } 10144 STD { int sys_profil(caddr_t samples, size_t size, \ 102 u_long offset, u_int scale); } 103#ifdef KTRACE 10445 STD { int sys_ktrace(char *fname, int ops, int facs, \ 105 int pid); } 106#else 10745 UNIMPL ktrace 108#endif 10946 STD { int sys_sigaction(int signum, struct sigaction *nsa, \ 110 struct sigaction *osa); } 11147 STD { gid_t sys_getgid(void); } 11248 STD { int sys_sigprocmask(int how, sigset_t mask); } 11349 STD { int sys___getlogin(char *namebuf, u_int namelen); } 11450 STD { int sys_setlogin(char *namebuf); } 11551 STD { int sys_acct(char *path); } 11652 STD { int sys_sigpending(void); } 11753 STD { int sys_sigaltstack(struct sigaltstack *nss, \ 118 struct sigaltstack *oss); } 11954 STD { int sys_ioctl(int fd, u_long com, ... caddr_t data); } 12055 COMPAT_12 { int sys_reboot(int opt); } oreboot 12156 STD { int sys_revoke(char *path); } 12257 STD { int sys_symlink(char *path, char *link); } 12358 STD { int sys_readlink(char *path, char *buf, int count); } 12459 STD { int sys_execve(char *path, char **argp, \ 125 char **envp); } 12660 STD { int sys_umask(int newmask); } 12761 STD { int sys_chroot(char *path); } 12862 COMPAT_43 { int sys_fstat(int fd, struct ostat *sb); } ofstat 12963 COMPAT_43 { int sys_getkerninfo(int op, char *where, int *size, \ 130 int arg); } ogetkerninfo 13164 COMPAT_43 { int sys_getpagesize(void); } ogetpagesize 13265 STD { int sys_msync(caddr_t addr, size_t len); } 13366 STD { int sys_vfork(void); } 13467 OBSOL vread 13568 OBSOL vwrite 13669 STD { int sys_sbrk(int incr); } 13770 STD { int sys_sstk(int incr); } 13871 COMPAT_43 { int sys_mmap(caddr_t addr, size_t len, int prot, \ 139 int flags, int fd, long pos); } ommap 14072 STD { int sys_ovadvise(int anom); } vadvise 14173 STD { int sys_munmap(caddr_t addr, size_t len); } 14274 STD { int sys_mprotect(caddr_t addr, size_t len, \ 143 int prot); } 14475 STD { int sys_madvise(caddr_t addr, size_t len, \ 145 int behav); } 14676 OBSOL vhangup 14777 OBSOL vlimit 14878 STD { int sys_mincore(caddr_t addr, size_t len, \ 149 char *vec); } 15079 STD { int sys_getgroups(u_int gidsetsize, gid_t *gidset); } 15180 STD { int sys_setgroups(u_int gidsetsize, gid_t *gidset); } 15281 STD { int sys_getpgrp(void); } 15382 STD { int sys_setpgid(int pid, int pgid); } 15483 STD { int sys_setitimer(u_int which, \ 155 struct itimerval *itv, struct itimerval *oitv); } 15684 COMPAT_43 { int sys_wait(void); } owait 15785 STD { int sys_swapon(char *name); } 15886 STD { int sys_getitimer(u_int which, \ 159 struct itimerval *itv); } 16087 COMPAT_43 { int sys_gethostname(char *hostname, u_int len); } \ 161 ogethostname 16288 COMPAT_43 { int sys_sethostname(char *hostname, u_int len); } \ 163 osethostname 16489 COMPAT_43 { int sys_getdtablesize(void); } ogetdtablesize 16590 STD { int sys_dup2(u_int from, u_int to); } 16691 UNIMPL getdopt 16792 STD { int sys_fcntl(int fd, int cmd, ... void *arg); } 16893 STD { int sys_select(u_int nd, fd_set *in, fd_set *ou, \ 169 fd_set *ex, struct timeval *tv); } 17094 UNIMPL setdopt 17195 STD { int sys_fsync(int fd); } 17296 STD { int sys_setpriority(int which, int who, int prio); } 17397 STD { int sys_socket(int domain, int type, int protocol); } 17498 STD { int sys_connect(int s, caddr_t name, int namelen); } 17599 COMPAT_43 { int sys_accept(int s, caddr_t name, int *anamelen); } \ 176 oaccept 177100 STD { int sys_getpriority(int which, int who); } 178101 COMPAT_43 { int sys_send(int s, caddr_t buf, int len, \ 179 int flags); } osend 180102 COMPAT_43 { int sys_recv(int s, caddr_t buf, int len, \ 181 int flags); } orecv 182103 STD { int sys_sigreturn(struct sigcontext *sigcntxp); } 183104 STD { int sys_bind(int s, caddr_t name, int namelen); } 184105 STD { int sys_setsockopt(int s, int level, int name, \ 185 caddr_t val, int valsize); } 186106 STD { int sys_listen(int s, int backlog); } 187107 OBSOL vtimes 188108 COMPAT_43 { int sys_sigvec(int signum, struct sigvec *nsv, \ 189 struct sigvec *osv); } osigvec 190109 COMPAT_43 { int sys_sigblock(int mask); } osigblock 191110 COMPAT_43 { int sys_sigsetmask(int mask); } osigsetmask 192111 STD { int sys_sigsuspend(int mask); } 193112 COMPAT_43 { int sys_sigstack(struct sigstack *nss, \ 194 struct sigstack *oss); } osigstack 195113 COMPAT_43 { int sys_recvmsg(int s, struct omsghdr *msg, \ 196 int flags); } orecvmsg 197114 COMPAT_43 { int sys_sendmsg(int s, caddr_t msg, int flags); } \ 198 osendmsg 199#ifdef TRACE 200115 STD { int sys_vtrace(int request, int value); } 201#else 202115 OBSOL vtrace 203#endif 204116 STD { int sys_gettimeofday(struct timeval *tp, \ 205 struct timezone *tzp); } 206117 STD { int sys_getrusage(int who, struct rusage *rusage); } 207118 STD { int sys_getsockopt(int s, int level, int name, \ 208 caddr_t val, int *avalsize); } 209119 OBSOL resuba 210120 STD { ssize_t sys_readv(int fd, struct iovec *iovp, \ 211 u_int iovcnt); } 212121 STD { ssize_t sys_writev(int fd, struct iovec *iovp, \ 213 u_int iovcnt); } 214122 STD { int sys_settimeofday(struct timeval *tv, \ 215 struct timezone *tzp); } 216123 STD { int sys_fchown(int fd, int uid, int gid); } 217124 STD { int sys_fchmod(int fd, int mode); } 218125 COMPAT_43 { int sys_recvfrom(int s, caddr_t buf, size_t len, \ 219 int flags, caddr_t from, int *fromlenaddr); } \ 220 orecvfrom 221126 STD { int sys_setreuid(int ruid, int euid); } 222127 STD { int sys_setregid(int rgid, int egid); } 223128 STD { int sys_rename(char *from, char *to); } 224129 COMPAT_43 { int sys_truncate(char *path, long length); } \ 225 otruncate 226130 COMPAT_43 { int sys_ftruncate(int fd, long length); } oftruncate 227131 STD { int sys_flock(int fd, int how); } 228132 STD { int sys_mkfifo(char *path, int mode); } 229133 STD { ssize_t sys_sendto(int s, caddr_t buf, size_t len, \ 230 int flags, caddr_t to, int tolen); } 231134 STD { int sys_shutdown(int s, int how); } 232135 STD { int sys_socketpair(int domain, int type, \ 233 int protocol, int *rsv); } 234136 STD { int sys_mkdir(char *path, int mode); } 235137 STD { int sys_rmdir(char *path); } 236138 STD { int sys_utimes(char *path, struct timeval *tptr); } 237139 OBSOL 4.2 sigreturn 238140 STD { int sys_adjtime(struct timeval *delta, \ 239 struct timeval *olddelta); } 240141 COMPAT_43 { int sys_getpeername(int fdes, caddr_t asa, \ 241 int *alen); } ogetpeername 242142 COMPAT_43 { int32_t sys_gethostid(void); } ogethostid 243143 COMPAT_43 { int sys_sethostid(int32_t hostid); } osethostid 244144 COMPAT_43 { int sys_getrlimit(u_int which, \ 245 struct ogetrlimit *rlp); } ogetrlimit 246145 COMPAT_43 { int sys_setrlimit(u_int which, \ 247 struct ogetrlimit *rlp); } osetrlimit 248146 COMPAT_43 { int sys_killpg(int pgid, int signum); } okillpg 249147 STD { int sys_setsid(void); } 250148 STD { int sys_quotactl(char *path, int cmd, int uid, \ 251 caddr_t arg); } 252149 COMPAT_43 { int sys_quota(void); } oquota 253150 COMPAT_43 { int sys_getsockname(int fdec, caddr_t asa, \ 254 int *alen); } ogetsockname 255 256; Syscalls 151-180 inclusive are reserved for vendor-specific 257; system calls. (This includes various calls added for compatibity 258; with other Unix variants.) 259; Some of these calls are now supported by BSD... 260151 UNIMPL 261152 UNIMPL 262153 UNIMPL 263154 UNIMPL 264#if defined(NFSCLIENT) || defined(NFSSERVER) 265155 STD { int sys_nfssvc(int flag, caddr_t argp); } 266#else 267155 UNIMPL 268#endif 269156 COMPAT_43 { int sys_getdirentries(int fd, char *buf, \ 270 u_int count, long *basep); } ogetdirentries 271157 STD { int sys_statfs(char *path, struct statfs *buf); } 272158 STD { int sys_fstatfs(int fd, struct statfs *buf); } 273159 UNIMPL 274160 UNIMPL 275#if defined(NFSCLIENT) || defined(NFSSERVER) 276161 STD { int sys_getfh(char *fname, fhandle_t *fhp); } 277#else 278161 UNIMPL getfh 279#endif 280162 COMPAT_09 { int sys_getdomainname(char *domainname, int len); } \ 281 ogetdomainname 282163 COMPAT_09 { int sys_setdomainname(char *domainname, int len); } \ 283 osetdomainname 284164 COMPAT_09 { int sys_uname(struct outsname *name); } ouname 285165 STD { int sys_sysarch(int op, char *parms); } 286166 UNIMPL 287167 UNIMPL 288168 UNIMPL 289; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 290#if defined(SYSVSEM) && !defined(alpha) 291169 COMPAT_10 { int sys_semsys(int which, int a2, int a3, int a4, \ 292 int a5); } osemsys 293#else 294169 UNIMPL 1.0 semsys 295#endif 296; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 297#if defined(SYSVMSG) && !defined(alpha) 298170 COMPAT_10 { int sys_msgsys(int which, int a2, int a3, int a4, \ 299 int a5, int a6); } omsgsys 300#else 301170 UNIMPL 1.0 msgsys 302#endif 303; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 304#if defined(SYSVSHM) && !defined(alpha) 305171 COMPAT_10 { int sys_shmsys(int which, int a2, int a3, int a4); } \ 306 oshmsys 307#else 308171 UNIMPL 1.0 shmsys 309#endif 310172 UNIMPL 311173 UNIMPL 312174 UNIMPL 313175 STD { int sys_ntp_gettime(struct ntptimeval *ntvp); } 314176 STD { int sys_ntp_adjtime(struct timex *tp); } 315177 UNIMPL 316178 UNIMPL 317179 UNIMPL 318180 UNIMPL 319 320; Syscalls 180-199 are used by/reserved for BSD 321181 STD { int sys_setgid(gid_t gid); } 322182 STD { int sys_setegid(gid_t egid); } 323183 STD { int sys_seteuid(uid_t euid); } 324#ifdef LFS 325184 STD { int lfs_bmapv(fsid_t *fsidp, \ 326 struct block_info *blkiov, int blkcnt); } 327185 STD { int lfs_markv(fsid_t *fsidp, \ 328 struct block_info *blkiov, int blkcnt); } 329186 STD { int lfs_segclean(fsid_t *fsidp, u_long segment); } 330187 STD { int lfs_segwait(fsid_t *fsidp, struct timeval *tv); } 331#else 332184 UNIMPL 333185 UNIMPL 334186 UNIMPL 335187 UNIMPL 336#endif 337188 STD { int sys_stat(char *path, struct stat *ub); } 338189 STD { int sys_fstat(int fd, struct stat *sb); } 339190 STD { int sys_lstat(char *path, struct stat *ub); } 340191 STD { long sys_pathconf(char *path, int name); } 341192 STD { long sys_fpathconf(int fd, int name); } 342193 UNIMPL 343194 STD { int sys_getrlimit(u_int which, struct rlimit *rlp); } 344195 STD { int sys_setrlimit(u_int which, struct rlimit *rlp); } 345196 STD { int sys_getdirentries(int fd, char *buf, \ 346 u_int count, long *basep); } 347197 STD { caddr_t sys_mmap(caddr_t addr, size_t len, int prot, \ 348 int flags, int fd, long pad, off_t pos); } 349198 INDIR { quad_t sys___syscall(quad_t num, ...); } 350199 STD { off_t sys_lseek(int fd, int pad, off_t offset, \ 351 int whence); } 352200 STD { int sys_truncate(char *path, int pad, off_t length); } 353201 STD { int sys_ftruncate(int fd, int pad, off_t length); } 354202 STD { int sys___sysctl(int *name, u_int namelen, \ 355 void *old, size_t *oldlenp, void *new, \ 356 size_t newlen); } 357203 STD { int sys_mlock(caddr_t addr, size_t len); } 358204 STD { int sys_munlock(caddr_t addr, size_t len); } 359205 STD { int sys_undelete(char *path); } 360206 STD { int sys_futimes(int fd, struct timeval *tptr); } 361207 STD { int sys_getpgid(pid_t pid); } 362208 STD { int sys_reboot(int opt, char *bootstr); } 363209 STD { int sys_poll(struct pollfd *fds, u_int nfds, \ 364 int timeout); } 365; 366; Syscalls 210-219 are reserved for dynamically loaded syscalls 367; 368#ifdef LKM 369210 NODEF { int sys_lkmnosys(void); } 370211 NODEF { int sys_lkmnosys(void); } 371212 NODEF { int sys_lkmnosys(void); } 372213 NODEF { int sys_lkmnosys(void); } 373214 NODEF { int sys_lkmnosys(void); } 374215 NODEF { int sys_lkmnosys(void); } 375216 NODEF { int sys_lkmnosys(void); } 376217 NODEF { int sys_lkmnosys(void); } 377218 NODEF { int sys_lkmnosys(void); } 378219 NODEF { int sys_lkmnosys(void); } 379#else /* !LKM */ 380210 UNIMPL 381211 UNIMPL 382212 UNIMPL 383213 UNIMPL 384214 UNIMPL 385215 UNIMPL 386216 UNIMPL 387217 UNIMPL 388218 UNIMPL 389219 UNIMPL 390#endif /* !LKM */ 391; System calls 220-240 are reserved for use by NetBSD 392#ifdef SYSVSEM 393220 STD { int sys___semctl(int semid, int semnum, int cmd, \ 394 union semun *arg); } 395221 STD { int sys_semget(key_t key, int nsems, int semflg); } 396222 STD { int sys_semop(int semid, struct sembuf *sops, \ 397 u_int nsops); } 398223 STD { int sys_semconfig(int flag); } 399#else 400220 UNIMPL semctl 401221 UNIMPL semget 402222 UNIMPL semop 403223 UNIMPL semconfig 404#endif 405#ifdef SYSVMSG 406224 STD { int sys_msgctl(int msqid, int cmd, \ 407 struct msqid_ds *buf); } 408225 STD { int sys_msgget(key_t key, int msgflg); } 409226 STD { int sys_msgsnd(int msqid, void *msgp, size_t msgsz, \ 410 int msgflg); } 411227 STD { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \ 412 long msgtyp, int msgflg); } 413#else 414224 UNIMPL msgctl 415225 UNIMPL msgget 416226 UNIMPL msgsnd 417227 UNIMPL msgrcv 418#endif 419#ifdef SYSVSHM 420228 STD { void *sys_shmat(int shmid, void *shmaddr, \ 421 int shmflg); } 422229 STD { int sys_shmctl(int shmid, int cmd, \ 423 struct shmid_ds *buf); } 424230 STD { int sys_shmdt(void *shmaddr); } 425231 STD { int sys_shmget(key_t key, int size, int shmflg); } 426#else 427228 UNIMPL shmat 428229 UNIMPL shmctl 429230 UNIMPL shmdt 430231 UNIMPL shmget 431#endif 432232 STD { int sys_clock_gettime(clockid_t clock_id, \ 433 struct timespec *tp); } 434233 STD { int sys_clock_settime(clockid_t clock_id, \ 435 const struct timespec *tp); } 436234 STD { int sys_clock_getres(clockid_t clock_id, \ 437 struct timespec *tp); } 438235 UNIMPL timer_create 439236 UNIMPL timer_delete 440237 UNIMPL timer_settime 441238 UNIMPL timer_gettime 442239 UNIMPL timer_getoverrun 443240 UNIMPL nanosleep 444