syscalls.master revision 1.35
1 $NetBSD: syscalls.master,v 1.35 1996/09/07 12:41:01 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); } ocreat 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); } \ 68 olseek 6920 STD { pid_t sys_getpid(void); } 7021 STD { int sys_mount(char *type, char *path, int flags, \ 71 caddr_t data); } 7222 STD { int sys_unmount(char *path, int flags); } 7323 STD { int sys_setuid(uid_t uid); } 7424 STD { uid_t sys_getuid(void); } 7525 STD { uid_t sys_geteuid(void); } 7626 STD { int sys_ptrace(int req, pid_t pid, caddr_t addr, \ 77 int data); } 7827 STD { int sys_recvmsg(int s, struct msghdr *msg, \ 79 int flags); } 8028 STD { int sys_sendmsg(int s, caddr_t msg, int flags); } 8129 STD { int sys_recvfrom(int s, caddr_t buf, size_t len, \ 82 int flags, caddr_t from, int *fromlenaddr); } 8330 STD { int sys_accept(int s, caddr_t name, int *anamelen); } 8431 STD { int sys_getpeername(int fdes, caddr_t asa, \ 85 int *alen); } 8632 STD { int sys_getsockname(int fdes, caddr_t asa, \ 87 int *alen); } 8833 STD { int sys_access(char *path, int flags); } 8934 STD { int sys_chflags(char *path, int flags); } 9035 STD { int sys_fchflags(int fd, int flags); } 9136 STD { int sys_sync(void); } 9237 STD { int sys_kill(int pid, int signum); } 9338 COMPAT_43 { int sys_stat(char *path, struct ostat *ub); } ostat 9439 STD { pid_t sys_getppid(void); } 9540 COMPAT_43 { int sys_lstat(char *path, struct ostat *ub); } olstat 9641 STD { int sys_dup(u_int fd); } 9742 STD { int sys_pipe(void); } 9843 STD { gid_t sys_getegid(void); } 9944 STD { int sys_profil(caddr_t samples, size_t size, \ 100 u_long offset, u_int scale); } 101#ifdef KTRACE 10245 STD { int sys_ktrace(char *fname, int ops, int facs, \ 103 int pid); } 104#else 10545 UNIMPL ktrace 106#endif 10746 STD { int sys_sigaction(int signum, struct sigaction *nsa, \ 108 struct sigaction *osa); } 10947 STD { gid_t sys_getgid(void); } 11048 STD { int sys_sigprocmask(int how, sigset_t mask); } 11149 STD { int sys_getlogin(char *namebuf, u_int namelen); } 11250 STD { int sys_setlogin(char *namebuf); } 11351 STD { int sys_acct(char *path); } 11452 STD { int sys_sigpending(void); } 11553 STD { int sys_sigaltstack(struct sigaltstack *nss, \ 116 struct sigaltstack *oss); } 11754 STD { int sys_ioctl(int fd, u_long com, caddr_t data); } 11855 COMPAT_12 { int sys_reboot(int opt); } oreboot 11956 STD { int sys_revoke(char *path); } 12057 STD { int sys_symlink(char *path, char *link); } 12158 STD { int sys_readlink(char *path, char *buf, int count); } 12259 STD { int sys_execve(char *path, char **argp, \ 123 char **envp); } 12460 STD { int sys_umask(int newmask); } 12561 STD { int sys_chroot(char *path); } 12662 COMPAT_43 { int sys_fstat(int fd, struct ostat *sb); } ofstat 12763 COMPAT_43 { int sys_getkerninfo(int op, char *where, int *size, \ 128 int arg); } ogetkerninfo 12964 COMPAT_43 { int sys_getpagesize(void); } ogetpagesize 13065 STD { int sys_msync(caddr_t addr, size_t len); } 13166 STD { int sys_vfork(void); } 13267 OBSOL vread 13368 OBSOL vwrite 13469 STD { int sys_sbrk(int incr); } 13570 STD { int sys_sstk(int incr); } 13671 COMPAT_43 { int sys_mmap(caddr_t addr, size_t len, int prot, \ 137 int flags, int fd, long pos); } ommap 13872 STD { int sys_ovadvise(int anom); } vadvise 13973 STD { int sys_munmap(caddr_t addr, size_t len); } 14074 STD { int sys_mprotect(caddr_t addr, size_t len, \ 141 int prot); } 14275 STD { int sys_madvise(caddr_t addr, size_t len, \ 143 int behav); } 14476 OBSOL vhangup 14577 OBSOL vlimit 14678 STD { int sys_mincore(caddr_t addr, size_t len, \ 147 char *vec); } 14879 STD { int sys_getgroups(u_int gidsetsize, gid_t *gidset); } 14980 STD { int sys_setgroups(u_int gidsetsize, gid_t *gidset); } 15081 STD { int sys_getpgrp(void); } 15182 STD { int sys_setpgid(int pid, int pgid); } 15283 STD { int sys_setitimer(u_int which, \ 153 struct itimerval *itv, struct itimerval *oitv); } 15484 COMPAT_43 { int sys_wait(void); } owait 15585 STD { int sys_swapon(char *name); } 15686 STD { int sys_getitimer(u_int which, \ 157 struct itimerval *itv); } 15887 COMPAT_43 { int sys_gethostname(char *hostname, u_int len); } \ 159 ogethostname 16088 COMPAT_43 { int sys_sethostname(char *hostname, u_int len); } \ 161 osethostname 16289 COMPAT_43 { int sys_getdtablesize(void); } ogetdtablesize 16390 STD { int sys_dup2(u_int from, u_int to); } 16491 UNIMPL getdopt 16592 STD { int sys_fcntl(int fd, int cmd, void *arg); } 16693 STD { int sys_select(u_int nd, fd_set *in, fd_set *ou, \ 167 fd_set *ex, struct timeval *tv); } 16894 UNIMPL setdopt 16995 STD { int sys_fsync(int fd); } 17096 STD { int sys_setpriority(int which, int who, int prio); } 17197 STD { int sys_socket(int domain, int type, int protocol); } 17298 STD { int sys_connect(int s, caddr_t name, int namelen); } 17399 COMPAT_43 { int sys_accept(int s, caddr_t name, int *anamelen); } \ 174 oaccept 175100 STD { int sys_getpriority(int which, int who); } 176101 COMPAT_43 { int sys_send(int s, caddr_t buf, int len, \ 177 int flags); } osend 178102 COMPAT_43 { int sys_recv(int s, caddr_t buf, int len, \ 179 int flags); } orecv 180103 STD { int sys_sigreturn(struct sigcontext *sigcntxp); } 181104 STD { int sys_bind(int s, caddr_t name, int namelen); } 182105 STD { int sys_setsockopt(int s, int level, int name, \ 183 caddr_t val, int valsize); } 184106 STD { int sys_listen(int s, int backlog); } 185107 OBSOL vtimes 186108 COMPAT_43 { int sys_sigvec(int signum, struct sigvec *nsv, \ 187 struct sigvec *osv); } osigvec 188109 COMPAT_43 { int sys_sigblock(int mask); } osigblock 189110 COMPAT_43 { int sys_sigsetmask(int mask); } osigsetmask 190111 STD { int sys_sigsuspend(int mask); } 191112 COMPAT_43 { int sys_sigstack(struct sigstack *nss, \ 192 struct sigstack *oss); } osigstack 193113 COMPAT_43 { int sys_recvmsg(int s, struct omsghdr *msg, \ 194 int flags); } orecvmsg 195114 COMPAT_43 { int sys_sendmsg(int s, caddr_t msg, int flags); } \ 196 osendmsg 197#ifdef TRACE 198115 STD { int sys_vtrace(int request, int value); } 199#else 200115 OBSOL vtrace 201#endif 202116 STD { int sys_gettimeofday(struct timeval *tp, \ 203 struct timezone *tzp); } 204117 STD { int sys_getrusage(int who, struct rusage *rusage); } 205118 STD { int sys_getsockopt(int s, int level, int name, \ 206 caddr_t val, int *avalsize); } 207119 OBSOL resuba 208120 STD { int sys_readv(int fd, struct iovec *iovp, \ 209 u_int iovcnt); } 210121 STD { int sys_writev(int fd, struct iovec *iovp, \ 211 u_int iovcnt); } 212122 STD { int sys_settimeofday(struct timeval *tv, \ 213 struct timezone *tzp); } 214123 STD { int sys_fchown(int fd, int uid, int gid); } 215124 STD { int sys_fchmod(int fd, int mode); } 216125 COMPAT_43 { int sys_recvfrom(int s, caddr_t buf, size_t len, \ 217 int flags, caddr_t from, int *fromlenaddr); } \ 218 orecvfrom 219126 STD { int sys_setreuid(int ruid, int euid); } 220127 STD { int sys_setregid(int rgid, int egid); } 221128 STD { int sys_rename(char *from, char *to); } 222129 COMPAT_43 { int sys_truncate(char *path, long length); } \ 223 otruncate 224130 COMPAT_43 { int sys_ftruncate(int fd, long length); } oftruncate 225131 STD { int sys_flock(int fd, int how); } 226132 STD { int sys_mkfifo(char *path, int mode); } 227133 STD { int sys_sendto(int s, caddr_t buf, size_t len, \ 228 int flags, caddr_t to, int tolen); } 229134 STD { int sys_shutdown(int s, int how); } 230135 STD { int sys_socketpair(int domain, int type, \ 231 int protocol, int *rsv); } 232136 STD { int sys_mkdir(char *path, int mode); } 233137 STD { int sys_rmdir(char *path); } 234138 STD { int sys_utimes(char *path, struct timeval *tptr); } 235139 OBSOL 4.2 sigreturn 236140 STD { int sys_adjtime(struct timeval *delta, \ 237 struct timeval *olddelta); } 238141 COMPAT_43 { int sys_getpeername(int fdes, caddr_t asa, \ 239 int *alen); } ogetpeername 240142 COMPAT_43 { int32_t sys_gethostid(void); } ogethostid 241143 COMPAT_43 { int sys_sethostid(int32_t hostid); } osethostid 242144 COMPAT_43 { int sys_getrlimit(u_int which, \ 243 struct ogetrlimit *rlp); } ogetrlimit 244145 COMPAT_43 { int sys_setrlimit(u_int which, \ 245 struct ogetrlimit *rlp); } osetrlimit 246146 COMPAT_43 { int sys_killpg(int pgid, int signum); } okillpg 247147 STD { int sys_setsid(void); } 248148 STD { int sys_quotactl(char *path, int cmd, int uid, \ 249 caddr_t arg); } 250149 COMPAT_43 { int sys_quota(void); } oquota 251150 COMPAT_43 { int sys_getsockname(int fdec, caddr_t asa, \ 252 int *alen); } ogetsockname 253 254; Syscalls 151-180 inclusive are reserved for vendor-specific 255; system calls. (This includes various calls added for compatibity 256; with other Unix variants.) 257; Some of these calls are now supported by BSD... 258151 UNIMPL 259152 UNIMPL 260153 UNIMPL 261154 UNIMPL 262#if defined(NFSCLIENT) || defined(NFSSERVER) 263155 STD { int sys_nfssvc(int flag, caddr_t argp); } 264#else 265155 UNIMPL 266#endif 267156 COMPAT_43 { int sys_getdirentries(int fd, char *buf, \ 268 u_int count, long *basep); } ogetdirentries 269157 STD { int sys_statfs(char *path, struct statfs *buf); } 270158 STD { int sys_fstatfs(int fd, struct statfs *buf); } 271159 UNIMPL 272160 UNIMPL 273#ifdef NFSCLIENT 274161 STD { int sys_getfh(char *fname, fhandle_t *fhp); } 275#else 276161 UNIMPL getfh 277#endif 278162 COMPAT_09 { int sys_getdomainname(char *domainname, int len); } \ 279 ogetdomainname 280163 COMPAT_09 { int sys_setdomainname(char *domainname, int len); } \ 281 osetdomainname 282164 COMPAT_09 { int sys_uname(struct outsname *name); } ouname 283165 STD { int sys_sysarch(int op, char *parms); } 284166 UNIMPL 285167 UNIMPL 286168 UNIMPL 287; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 288#if defined(SYSVSEM) && !defined(alpha) 289169 COMPAT_10 { int sys_semsys(int which, int a2, int a3, int a4, \ 290 int a5); } osemsys 291#else 292169 UNIMPL 1.0 semsys 293#endif 294; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 295#if defined(SYSVMSG) && !defined(alpha) 296170 COMPAT_10 { int sys_msgsys(int which, int a2, int a3, int a4, \ 297 int a5, int a6); } omsgsys 298#else 299170 UNIMPL 1.0 msgsys 300#endif 301; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 302#if defined(SYSVSHM) && !defined(alpha) 303171 COMPAT_10 { int sys_shmsys(int which, int a2, int a3, int a4); } \ 304 oshmsys 305#else 306171 UNIMPL 1.0 shmsys 307#endif 308172 UNIMPL 309173 UNIMPL 310174 UNIMPL 311175 STD { int ntp_gettime(struct timex *tp); } 312176 STD { int ntp_adjtime(struct timex *tp); } 313177 UNIMPL 314178 UNIMPL 315179 UNIMPL 316180 UNIMPL 317 318; Syscalls 180-199 are used by/reserved for BSD 319181 STD { int sys_setgid(gid_t gid); } 320182 STD { int sys_setegid(gid_t egid); } 321183 STD { int sys_seteuid(uid_t euid); } 322#ifdef LFS 323184 STD { int lfs_bmapv(fsid_t *fsidp, \ 324 struct block_info *blkiov, int blkcnt); } 325185 STD { int lfs_markv(fsid_t *fsidp, \ 326 struct block_info *blkiov, int blkcnt); } 327186 STD { int lfs_segclean(fsid_t *fsidp, u_long segment); } 328187 STD { int lfs_segwait(fsid_t *fsidp, struct timeval *tv); } 329#else 330184 UNIMPL 331185 UNIMPL 332186 UNIMPL 333187 UNIMPL 334#endif 335188 STD { int sys_stat(char *path, struct stat *ub); } 336189 STD { int sys_fstat(int fd, struct stat *sb); } 337190 STD { int sys_lstat(char *path, struct stat *ub); } 338191 STD { int sys_pathconf(char *path, int name); } 339192 STD { int sys_fpathconf(int fd, int name); } 340193 UNIMPL 341194 STD { int sys_getrlimit(u_int which, struct rlimit *rlp); } 342195 STD { int sys_setrlimit(u_int which, struct rlimit *rlp); } 343196 STD { int sys_getdirentries(int fd, char *buf, \ 344 u_int count, long *basep); } 345197 STD { caddr_t sys_mmap(caddr_t addr, size_t len, int prot, \ 346 int flags, int fd, long pad, off_t pos); } 347198 STD { int sys_nosys(void); } __syscall 348199 STD { off_t sys_lseek(int fd, int pad, off_t offset, \ 349 int whence); } 350200 STD { int sys_truncate(char *path, int pad, off_t length); } 351201 STD { int sys_ftruncate(int fd, int pad, off_t length); } 352202 STD { int sys___sysctl(int *name, u_int namelen, \ 353 void *old, size_t *oldlenp, void *new, \ 354 size_t newlen); } 355203 STD { int sys_mlock(caddr_t addr, size_t len); } 356204 STD { int sys_munlock(caddr_t addr, size_t len); } 357205 STD { int sys_undelete(char *path); } 358206 STD { int sys_futimes(int fd, struct timeval *tptr); } 359207 STD { int sys_getpgid(pid_t pid); } 360208 STD { int sys_reboot(int opt, char *bootstr); } 361209 STD { int sys_poll(struct pollfd *fds, size_t nfds, \ 362 int timeout); } 363; 364; Syscalls 210-219 are reserved for dynamically loaded syscalls 365; 366#ifdef LKM 367210 NODEF { int sys_lkmnosys(void); } 368211 NODEF { int sys_lkmnosys(void); } 369212 NODEF { int sys_lkmnosys(void); } 370213 NODEF { int sys_lkmnosys(void); } 371214 NODEF { int sys_lkmnosys(void); } 372215 NODEF { int sys_lkmnosys(void); } 373216 NODEF { int sys_lkmnosys(void); } 374217 NODEF { int sys_lkmnosys(void); } 375218 NODEF { int sys_lkmnosys(void); } 376219 NODEF { int sys_lkmnosys(void); } 377#else /* !LKM */ 378210 UNIMPL 379211 UNIMPL 380212 UNIMPL 381213 UNIMPL 382214 UNIMPL 383215 UNIMPL 384216 UNIMPL 385217 UNIMPL 386218 UNIMPL 387219 UNIMPL 388#endif /* !LKM */ 389; System calls 220-240 are reserved for use by NetBSD 390#ifdef SYSVSEM 391220 STD { int sys___semctl(int semid, int semnum, int cmd, \ 392 union semun *arg); } 393221 STD { int sys_semget(key_t key, int nsems, int semflg); } 394222 STD { int sys_semop(int semid, struct sembuf *sops, \ 395 u_int nsops); } 396223 STD { int sys_semconfig(int flag); } 397#else 398220 UNIMPL semctl 399221 UNIMPL semget 400222 UNIMPL semop 401223 UNIMPL semconfig 402#endif 403#ifdef SYSVMSG 404224 STD { int sys_msgctl(int msqid, int cmd, \ 405 struct msqid_ds *buf); } 406225 STD { int sys_msgget(key_t key, int msgflg); } 407226 STD { int sys_msgsnd(int msqid, void *msgp, size_t msgsz, \ 408 int msgflg); } 409227 STD { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \ 410 long msgtyp, int msgflg); } 411#else 412224 UNIMPL msgctl 413225 UNIMPL msgget 414226 UNIMPL msgsnd 415227 UNIMPL msgrcv 416#endif 417#ifdef SYSVSHM 418228 STD { int sys_shmat(int shmid, void *shmaddr, int shmflg); } 419229 STD { int sys_shmctl(int shmid, int cmd, \ 420 struct shmid_ds *buf); } 421230 STD { int sys_shmdt(void *shmaddr); } 422231 STD { int sys_shmget(key_t key, int size, int shmflg); } 423#else 424228 UNIMPL shmat 425229 UNIMPL shmctl 426230 UNIMPL shmdt 427231 UNIMPL shmget 428#endif 429