syscalls.master revision 1.46
1 $NetBSD: syscalls.master,v 1.46 1996/12/22 08:04:06 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, void *buf, size_t nbyte); } 524 STD { ssize_t sys_write(int fd, const void *buf, \ 53 size_t nbyte); } 545 STD { int sys_open(const char *path, \ 55 int flags, ... int mode); } 566 STD { int sys_close(int fd); } 577 STD { int sys_wait4(int pid, int *status, int options, \ 58 struct rusage *rusage); } 598 COMPAT_43 { int sys_creat(char *path, int mode); } ocreat 609 STD { int sys_link(const char *path, const char *link); } 6110 STD { int sys_unlink(const char *path); } 6211 OBSOL execv 6312 STD { int sys_chdir(const char *path); } 6413 STD { int sys_fchdir(int fd); } 6514 STD { int sys_mknod(const char *path, int mode, int dev); } 6615 STD { int sys_chmod(const char *path, int mode); } 6716 STD { int sys_chown(const char *path, uid_t uid, \ 68 gid_t gid); } 6917 STD { int sys_obreak(char *nsize); } break 7018 STD { int sys_getfsstat(struct statfs *buf, long bufsize, \ 71 int flags); } 7219 COMPAT_43 { long sys_lseek(int fd, long offset, int whence); } \ 73 olseek 7420 STD { pid_t sys_getpid(void); } 7521 STD { int sys_mount(const char *type, const char *path, \ 76 int flags, void *data); } 7722 STD { int sys_unmount(const char *path, int flags); } 7823 STD { int sys_setuid(uid_t uid); } 7924 STD { uid_t sys_getuid(void); } 8025 STD { uid_t sys_geteuid(void); } 8126 STD { int sys_ptrace(int req, pid_t pid, caddr_t addr, \ 82 int data); } 8327 STD { ssize_t sys_recvmsg(int s, struct msghdr *msg, \ 84 int flags); } 8528 STD { ssize_t sys_sendmsg(int s, \ 86 const struct msghdr *msg, int flags); } 8729 STD { ssize_t sys_recvfrom(int s, void *buf, size_t len, \ 88 int flags, struct sockaddr *from, \ 89 int *fromlenaddr); } 9030 STD { int sys_accept(int s, struct sockaddr *name, \ 91 int *anamelen); } 9231 STD { int sys_getpeername(int fdes, struct sockaddr *asa, \ 93 int *alen); } 9432 STD { int sys_getsockname(int fdes, struct sockaddr *asa, \ 95 int *alen); } 9633 STD { int sys_access(const char *path, int flags); } 9734 STD { int sys_chflags(const char *path, u_long flags); } 9835 STD { int sys_fchflags(int fd, u_long flags); } 9936 STD { void sys_sync(void); } 10037 STD { int sys_kill(int pid, int signum); } 10138 COMPAT_43 { int sys_stat(char *path, struct ostat *ub); } ostat 10239 STD { pid_t sys_getppid(void); } 10340 COMPAT_43 { int sys_lstat(char *path, struct ostat *ub); } olstat 10441 STD { int sys_dup(u_int fd); } 10542 STD { int sys_pipe(void); } 10643 STD { gid_t sys_getegid(void); } 10744 STD { int sys_profil(caddr_t samples, size_t size, \ 108 u_long offset, u_int scale); } 109#ifdef KTRACE 11045 STD { int sys_ktrace(const char *fname, int ops, \ 111 int facs, int pid); } 112#else 11345 UNIMPL ktrace 114#endif 11546 STD { int sys_sigaction(int signum, \ 116 const struct sigaction *nsa, \ 117 struct sigaction *osa); } 11847 STD { gid_t sys_getgid(void); } 11948 STD { int sys_sigprocmask(int how, sigset_t mask); } 12049 STD { int sys___getlogin(char *namebuf, u_int namelen); } 12150 STD { int sys_setlogin(const char *namebuf); } 12251 STD { int sys_acct(const char *path); } 12352 STD { int sys_sigpending(void); } 12453 STD { int sys_sigaltstack(const struct sigaltstack *nss, \ 125 struct sigaltstack *oss); } 12654 STD { int sys_ioctl(int fd, \ 127 u_long com, ... caddr_t data); } 12855 COMPAT_12 { int sys_reboot(int opt); } oreboot 12956 STD { int sys_revoke(const char *path); } 13057 STD { int sys_symlink(const char *path, \ 131 const char *link); } 13258 STD { int sys_readlink(const char *path, char *buf, \ 133 int count); } 13459 STD { int sys_execve(const char *path, \ 135 char * const *argp, char * const *envp); } 13660 STD { int sys_umask(int newmask); } 13761 STD { int sys_chroot(const char *path); } 13862 COMPAT_43 { int sys_fstat(int fd, struct ostat *sb); } ofstat 13963 COMPAT_43 { int sys_getkerninfo(int op, char *where, int *size, \ 140 int arg); } ogetkerninfo 14164 COMPAT_43 { int sys_getpagesize(void); } ogetpagesize 14265 STD { int sys_msync(caddr_t addr, size_t len); } 14366 STD { int sys_vfork(void); } 14467 OBSOL vread 14568 OBSOL vwrite 14669 STD { int sys_sbrk(int incr); } 14770 STD { int sys_sstk(int incr); } 14871 COMPAT_43 { int sys_mmap(caddr_t addr, size_t len, int prot, \ 149 int flags, int fd, long pos); } ommap 15072 STD { int sys_ovadvise(int anom); } vadvise 15173 STD { int sys_munmap(caddr_t addr, size_t len); } 15274 STD { int sys_mprotect(caddr_t addr, size_t len, \ 153 int prot); } 15475 STD { int sys_madvise(caddr_t addr, size_t len, \ 155 int behav); } 15676 OBSOL vhangup 15777 OBSOL vlimit 15878 STD { int sys_mincore(caddr_t addr, size_t len, \ 159 char *vec); } 16079 STD { int sys_getgroups(u_int gidsetsize, gid_t *gidset); } 16180 STD { int sys_setgroups(u_int gidsetsize, \ 162 const gid_t *gidset); } 16381 STD { int sys_getpgrp(void); } 16482 STD { int sys_setpgid(int pid, int pgid); } 16583 STD { int sys_setitimer(u_int which, \ 166 const struct itimerval *itv, \ 167 struct itimerval *oitv); } 16884 COMPAT_43 { int sys_wait(void); } owait 16985 STD { int sys_swapon(const char *name); } 17086 STD { int sys_getitimer(u_int which, \ 171 struct itimerval *itv); } 17287 COMPAT_43 { int sys_gethostname(char *hostname, u_int len); } \ 173 ogethostname 17488 COMPAT_43 { int sys_sethostname(char *hostname, u_int len); } \ 175 osethostname 17689 COMPAT_43 { int sys_getdtablesize(void); } ogetdtablesize 17790 STD { int sys_dup2(u_int from, u_int to); } 17891 UNIMPL getdopt 17992 STD { int sys_fcntl(int fd, int cmd, ... void *arg); } 18093 STD { int sys_select(u_int nd, fd_set *in, fd_set *ou, \ 181 fd_set *ex, struct timeval *tv); } 18294 UNIMPL setdopt 18395 STD { int sys_fsync(int fd); } 18496 STD { int sys_setpriority(int which, int who, int prio); } 18597 STD { int sys_socket(int domain, int type, int protocol); } 18698 STD { int sys_connect(int s, const struct sockaddr *name, \ 187 int namelen); } 18899 COMPAT_43 { int sys_accept(int s, caddr_t name, \ 189 int *anamelen); } oaccept 190100 STD { int sys_getpriority(int which, int who); } 191101 COMPAT_43 { int sys_send(int s, caddr_t buf, int len, \ 192 int flags); } osend 193102 COMPAT_43 { int sys_recv(int s, caddr_t buf, int len, \ 194 int flags); } orecv 195103 STD { int sys_sigreturn(struct sigcontext *sigcntxp); } 196104 STD { int sys_bind(int s, const struct sockaddr *name, \ 197 int namelen); } 198105 STD { int sys_setsockopt(int s, int level, int name, \ 199 const void *val, int valsize); } 200106 STD { int sys_listen(int s, int backlog); } 201107 OBSOL vtimes 202108 COMPAT_43 { int sys_sigvec(int signum, struct sigvec *nsv, \ 203 struct sigvec *osv); } osigvec 204109 COMPAT_43 { int sys_sigblock(int mask); } osigblock 205110 COMPAT_43 { int sys_sigsetmask(int mask); } osigsetmask 206111 STD { int sys_sigsuspend(int mask); } 207112 COMPAT_43 { int sys_sigstack(struct sigstack *nss, \ 208 struct sigstack *oss); } osigstack 209113 COMPAT_43 { int sys_recvmsg(int s, struct omsghdr *msg, \ 210 int flags); } orecvmsg 211114 COMPAT_43 { int sys_sendmsg(int s, caddr_t msg, int flags); } \ 212 osendmsg 213#ifdef TRACE 214115 STD { int sys_vtrace(int request, int value); } 215#else 216115 OBSOL vtrace 217#endif 218116 STD { int sys_gettimeofday(struct timeval *tp, \ 219 struct timezone *tzp); } 220117 STD { int sys_getrusage(int who, struct rusage *rusage); } 221118 STD { int sys_getsockopt(int s, int level, int name, \ 222 void *val, int *avalsize); } 223119 OBSOL resuba 224120 STD { ssize_t sys_readv(int fd, const struct iovec *iovp, \ 225 u_int iovcnt); } 226121 STD { ssize_t sys_writev(int fd, \ 227 const struct iovec *iovp, u_int iovcnt); } 228122 STD { int sys_settimeofday(const struct timeval *tv, \ 229 const struct timezone *tzp); } 230123 STD { int sys_fchown(int fd, uid_t uid, gid_t gid); } 231124 STD { int sys_fchmod(int fd, int mode); } 232125 COMPAT_43 { int sys_recvfrom(int s, caddr_t buf, size_t len, \ 233 int flags, caddr_t from, int *fromlenaddr); } \ 234 orecvfrom 235126 STD { int sys_setreuid(uid_t ruid, uid_t euid); } 236127 STD { int sys_setregid(gid_t rgid, gid_t egid); } 237128 STD { int sys_rename(const char *from, const char *to); } 238129 COMPAT_43 { int sys_truncate(char *path, long length); } \ 239 otruncate 240130 COMPAT_43 { int sys_ftruncate(int fd, long length); } oftruncate 241131 STD { int sys_flock(int fd, int how); } 242132 STD { int sys_mkfifo(const char *path, int mode); } 243133 STD { ssize_t sys_sendto(int s, const void *buf, \ 244 size_t len, int flags, const struct sockaddr *to, \ 245 int tolen); } 246134 STD { int sys_shutdown(int s, int how); } 247135 STD { int sys_socketpair(int domain, int type, \ 248 int protocol, int *rsv); } 249136 STD { int sys_mkdir(const char *path, int mode); } 250137 STD { int sys_rmdir(const char *path); } 251138 STD { int sys_utimes(const char *path, \ 252 const struct timeval *tptr); } 253139 OBSOL 4.2 sigreturn 254140 STD { int sys_adjtime(const struct timeval *delta, \ 255 struct timeval *olddelta); } 256141 COMPAT_43 { int sys_getpeername(int fdes, caddr_t asa, \ 257 int *alen); } ogetpeername 258142 COMPAT_43 { int32_t sys_gethostid(void); } ogethostid 259143 COMPAT_43 { int sys_sethostid(int32_t hostid); } osethostid 260144 COMPAT_43 { int sys_getrlimit(u_int which, \ 261 struct ogetrlimit *rlp); } ogetrlimit 262145 COMPAT_43 { int sys_setrlimit(u_int which, \ 263 struct ogetrlimit *rlp); } osetrlimit 264146 COMPAT_43 { int sys_killpg(int pgid, int signum); } okillpg 265147 STD { int sys_setsid(void); } 266148 STD { int sys_quotactl(const char *path, int cmd, \ 267 int uid, caddr_t arg); } 268149 COMPAT_43 { int sys_quota(void); } oquota 269150 COMPAT_43 { int sys_getsockname(int fdec, caddr_t asa, \ 270 int *alen); } ogetsockname 271 272; Syscalls 151-180 inclusive are reserved for vendor-specific 273; system calls. (This includes various calls added for compatibity 274; with other Unix variants.) 275; Some of these calls are now supported by BSD... 276151 UNIMPL 277152 UNIMPL 278153 UNIMPL 279154 UNIMPL 280#if defined(NFSCLIENT) || defined(NFSSERVER) 281155 STD { int sys_nfssvc(int flag, void *argp); } 282#else 283155 UNIMPL 284#endif 285156 COMPAT_43 { int sys_getdirentries(int fd, char *buf, \ 286 u_int count, long *basep); } ogetdirentries 287157 STD { int sys_statfs(const char *path, \ 288 struct statfs *buf); } 289158 STD { int sys_fstatfs(int fd, struct statfs *buf); } 290159 UNIMPL 291160 UNIMPL 292#if defined(NFSCLIENT) || defined(NFSSERVER) 293161 STD { int sys_getfh(const char *fname, fhandle_t *fhp); } 294#else 295161 UNIMPL getfh 296#endif 297162 COMPAT_09 { int sys_getdomainname(char *domainname, int len); } \ 298 ogetdomainname 299163 COMPAT_09 { int sys_setdomainname(char *domainname, int len); } \ 300 osetdomainname 301164 COMPAT_09 { int sys_uname(struct outsname *name); } ouname 302165 STD { int sys_sysarch(int op, char *parms); } 303166 UNIMPL 304167 UNIMPL 305168 UNIMPL 306; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 307#if defined(SYSVSEM) && !defined(alpha) 308169 COMPAT_10 { int sys_semsys(int which, int a2, int a3, int a4, \ 309 int a5); } osemsys 310#else 311169 UNIMPL 1.0 semsys 312#endif 313; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 314#if defined(SYSVMSG) && !defined(alpha) 315170 COMPAT_10 { int sys_msgsys(int which, int a2, int a3, int a4, \ 316 int a5, int a6); } omsgsys 317#else 318170 UNIMPL 1.0 msgsys 319#endif 320; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 321#if defined(SYSVSHM) && !defined(alpha) 322171 COMPAT_10 { int sys_shmsys(int which, int a2, int a3, int a4); } \ 323 oshmsys 324#else 325171 UNIMPL 1.0 shmsys 326#endif 327172 UNIMPL 328173 UNIMPL 329174 UNIMPL 330175 STD { int sys_ntp_gettime(struct ntptimeval *ntvp); } 331176 STD { int sys_ntp_adjtime(struct timex *tp); } 332177 UNIMPL 333178 UNIMPL 334179 UNIMPL 335180 UNIMPL 336 337; Syscalls 180-199 are used by/reserved for BSD 338181 STD { int sys_setgid(gid_t gid); } 339182 STD { int sys_setegid(gid_t egid); } 340183 STD { int sys_seteuid(uid_t euid); } 341#ifdef LFS 342184 STD { int lfs_bmapv(fsid_t *fsidp, \ 343 struct block_info *blkiov, int blkcnt); } 344185 STD { int lfs_markv(fsid_t *fsidp, \ 345 struct block_info *blkiov, int blkcnt); } 346186 STD { int lfs_segclean(fsid_t *fsidp, u_long segment); } 347187 STD { int lfs_segwait(fsid_t *fsidp, struct timeval *tv); } 348#else 349184 UNIMPL 350185 UNIMPL 351186 UNIMPL 352187 UNIMPL 353#endif 354188 STD { int sys_stat(const char *path, struct stat *ub); } 355189 STD { int sys_fstat(int fd, struct stat *sb); } 356190 STD { int sys_lstat(const char *path, struct stat *ub); } 357191 STD { long sys_pathconf(const char *path, int name); } 358192 STD { long sys_fpathconf(int fd, int name); } 359193 UNIMPL 360194 STD { int sys_getrlimit(u_int which, struct rlimit *rlp); } 361195 STD { int sys_setrlimit(u_int which, \ 362 const struct rlimit *rlp); } 363196 STD { int sys_getdirentries(int fd, char *buf, \ 364 u_int count, long *basep); } 365197 STD { caddr_t sys_mmap(caddr_t addr, size_t len, int prot, \ 366 int flags, int fd, long pad, off_t pos); } 367198 INDIR { quad_t sys___syscall(quad_t num, ...); } 368199 STD { off_t sys_lseek(int fd, int pad, off_t offset, \ 369 int whence); } 370200 STD { int sys_truncate(const char *path, int pad, \ 371 off_t length); } 372201 STD { int sys_ftruncate(int fd, int pad, off_t length); } 373202 STD { int sys___sysctl(int *name, u_int namelen, \ 374 void *old, size_t *oldlenp, void *new, \ 375 size_t newlen); } 376203 STD { int sys_mlock(caddr_t addr, size_t len); } 377204 STD { int sys_munlock(caddr_t addr, size_t len); } 378205 STD { int sys_undelete(const char *path); } 379206 STD { int sys_futimes(int fd, \ 380 const struct timeval *tptr); } 381207 STD { int sys_getpgid(pid_t pid); } 382208 STD { int sys_reboot(int opt, char *bootstr); } 383209 STD { int sys_poll(struct pollfd *fds, u_int nfds, \ 384 int timeout); } 385; 386; Syscalls 210-219 are reserved for dynamically loaded syscalls 387; 388#ifdef LKM 389210 NODEF { int sys_lkmnosys(void); } 390211 NODEF { int sys_lkmnosys(void); } 391212 NODEF { int sys_lkmnosys(void); } 392213 NODEF { int sys_lkmnosys(void); } 393214 NODEF { int sys_lkmnosys(void); } 394215 NODEF { int sys_lkmnosys(void); } 395216 NODEF { int sys_lkmnosys(void); } 396217 NODEF { int sys_lkmnosys(void); } 397218 NODEF { int sys_lkmnosys(void); } 398219 NODEF { int sys_lkmnosys(void); } 399#else /* !LKM */ 400210 UNIMPL 401211 UNIMPL 402212 UNIMPL 403213 UNIMPL 404214 UNIMPL 405215 UNIMPL 406216 UNIMPL 407217 UNIMPL 408218 UNIMPL 409219 UNIMPL 410#endif /* !LKM */ 411; System calls 220-240 are reserved for use by NetBSD 412#ifdef SYSVSEM 413220 STD { int sys___semctl(int semid, int semnum, int cmd, \ 414 union semun *arg); } 415221 STD { int sys_semget(key_t key, int nsems, int semflg); } 416222 STD { int sys_semop(int semid, struct sembuf *sops, \ 417 u_int nsops); } 418223 STD { int sys_semconfig(int flag); } 419#else 420220 UNIMPL semctl 421221 UNIMPL semget 422222 UNIMPL semop 423223 UNIMPL semconfig 424#endif 425#ifdef SYSVMSG 426224 STD { int sys_msgctl(int msqid, int cmd, \ 427 struct msqid_ds *buf); } 428225 STD { int sys_msgget(key_t key, int msgflg); } 429226 STD { int sys_msgsnd(int msqid, void *msgp, size_t msgsz, \ 430 int msgflg); } 431227 STD { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \ 432 long msgtyp, int msgflg); } 433#else 434224 UNIMPL msgctl 435225 UNIMPL msgget 436226 UNIMPL msgsnd 437227 UNIMPL msgrcv 438#endif 439#ifdef SYSVSHM 440228 STD { void *sys_shmat(int shmid, void *shmaddr, \ 441 int shmflg); } 442229 STD { int sys_shmctl(int shmid, int cmd, \ 443 struct shmid_ds *buf); } 444230 STD { int sys_shmdt(void *shmaddr); } 445231 STD { int sys_shmget(key_t key, int size, int shmflg); } 446#else 447228 UNIMPL shmat 448229 UNIMPL shmctl 449230 UNIMPL shmdt 450231 UNIMPL shmget 451#endif 452232 STD { int sys_clock_gettime(clockid_t clock_id, \ 453 struct timespec *tp); } 454233 STD { int sys_clock_settime(clockid_t clock_id, \ 455 const struct timespec *tp); } 456234 STD { int sys_clock_getres(clockid_t clock_id, \ 457 struct timespec *tp); } 458235 UNIMPL timer_create 459236 UNIMPL timer_delete 460237 UNIMPL timer_settime 461238 UNIMPL timer_gettime 462239 UNIMPL timer_getoverrun 463240 UNIMPL nanosleep 464