; $FabBSD$ ; $OpenBSD: syscalls.master,v 1.90 2008/03/16 19:42:57 otto Exp $ ; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 ; FabBSD system call name/number "master" file. ; (See syscalls.conf to see what it is processed into.) ; ; Fields: number type [type-dependent ...] ; number system call number, must be in order ; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of ; the compatibility options defined in syscalls.conf. ; ; types: ; STD always included ; OBSOL obsolete, not included in system ; UNIMPL unimplemented, not included in system ; NODEF included, but don't define the syscall number ; NOARGS included, but don't define the syscall args structure ; INDIR included, but don't define the syscall args structure, ; and allow it to be "really" varargs. ; ; The compat options are defined in the syscalls.conf file, and the ; compat option name is prefixed to the syscall name. Other than ; that, they're like NODEF (for 'compat' options), or STD (for ; 'libcompat' options). ; ; The type-dependent arguments are as follows: ; For STD, NODEF, NOARGS, and compat syscalls: ; { pseudo-proto } [alias] ; For other syscalls: ; [comment] ; ; #ifdef's, etc. may be included, and are copied to the output files. ; #include's are copied to the syscall switch definition file only. #include #include #include #include #include #include #include ; Reserved/unimplemented system calls in the range 0-150 inclusive ; are reserved for use in future Berkeley releases. ; Additional system calls implemented in vendor and other ; redistributions should be placed in the reserved range at the end ; of the current calls. 0 INDIR { int sys_syscall(int number, ...); } 1 STD { void sys_exit(int rval); } 2 STD { int sys_fork(void); } 3 STD { ssize_t sys_read(int fd, void *buf, size_t nbyte); } 4 STD { ssize_t sys_write(int fd, const void *buf, size_t nbyte); } 5 STD { int sys_open(const char *path, int flags, ... mode_t mode); } 6 STD { int sys_close(int fd); } 7 STD { pid_t sys_wait4(pid_t pid, int *status, int options, struct rusage *rusage); } 8 OBSOL creat 9 STD { int sys_link(const char *path, const char *link); } 10 STD { int sys_unlink(const char *path); } 11 OBSOL execv 12 STD { int sys_chdir(const char *path); } 13 STD { int sys_fchdir(int fd); } 14 STD { int sys_mknod(const char *path, mode_t mode, dev_t dev); } 15 STD { int sys_chmod(const char *path, mode_t mode); } 16 STD { int sys_chown(const char *path, uid_t uid, gid_t gid); } 17 STD { int sys_obreak(char *nsize); } break 18 OBSOL getfsstat 19 OBSOL lseek 20 STD NOLOCK { pid_t sys_getpid(void); } 21 STD { int sys_mount(const char *type, const char *path, int flags, void *data); } 22 STD { int sys_unmount(const char *path, int flags); } 23 STD { int sys_setuid(uid_t uid); } 24 STD { uid_t sys_getuid(void); } 25 STD { uid_t sys_geteuid(void); } #ifdef PTRACE 26 STD { int sys_ptrace(int req, pid_t pid, caddr_t addr, int data); } #else 26 UNIMPL ptrace #endif 27 STD { ssize_t sys_recvmsg(int s, struct msghdr *msg, int flags); } 28 STD { ssize_t sys_sendmsg(int s, const struct msghdr *msg, int flags); } 29 STD { ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); } 30 STD { int sys_accept(int s, struct sockaddr *name, socklen_t *anamelen); } 31 STD { int sys_getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); } 32 STD { int sys_getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); } 33 STD { int sys_access(const char *path, int flags); } 34 STD { int sys_chflags(const char *path, u_int flags); } 35 STD { int sys_fchflags(int fd, u_int flags); } 36 STD { void sys_sync(void); } 37 STD { int sys_kill(int pid, int signum); } 38 OBSOL stat 39 STD { pid_t sys_getppid(void); } 40 OBSOL lstat 41 STD { int sys_dup(int fd); } 42 STD { int sys_opipe(void); } 43 STD { gid_t sys_getegid(void); } 44 STD { int sys_profil(caddr_t samples, size_t size, u_long offset, u_int scale); } #ifdef KTRACE 45 STD { int sys_ktrace(const char *fname, int ops, int facs, pid_t pid); } #else 45 UNIMPL ktrace #endif 46 STD { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); } 47 STD { gid_t sys_getgid(void); } 48 STD { int sys_sigprocmask(int how, sigset_t mask); } 49 STD { int sys_getlogin(char *namebuf, u_int namelen); } 50 STD { int sys_setlogin(const char *namebuf); } 51 UNIMPL acct 52 STD { int sys_sigpending(void); } 53 STD { int sys_osigaltstack(const struct osigaltstack *nss, struct osigaltstack *oss); } 54 STD { int sys_ioctl(int fd, u_long com, ... void *data); } 55 STD { int sys_reboot(int opt); } 56 STD { int sys_revoke(const char *path); } 57 STD { int sys_symlink(const char *path, const char *link); } 58 STD { int sys_readlink(const char *path, char *buf, size_t count); } 59 STD { int sys_execve(const char *path, char * const *argp, char * const *envp); } 60 STD { mode_t sys_umask(mode_t newmask); } 61 STD { int sys_chroot(const char *path); } 62 OBSOL fstat 63 OBSOL getkerninfo 64 OBSOL getpagesize 65 OBSOL msync 66 STD { int sys_vfork(void); } 67 OBSOL vread 68 OBSOL vwrite 69 STD { int sys_sbrk(int incr); } 70 STD { int sys_sstk(int incr); } 71 OBSOL mmap 72 OBSOL vadvise 73 STD { int sys_munmap(void *addr, size_t len); } 74 STD { int sys_mprotect(void *addr, size_t len, int prot); } 75 STD { int sys_madvise(void *addr, size_t len, int behav); } 76 OBSOL vhangup 77 OBSOL vlimit 78 STD { int sys_mincore(void *addr, size_t len, char *vec); } 79 STD { int sys_getgroups(int gidsetsize, gid_t *gidset); } 80 STD { int sys_setgroups(int gidsetsize, const gid_t *gidset); } 81 STD { int sys_getpgrp(void); } 82 STD { int sys_setpgid(pid_t pid, int pgid); } 83 STD { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); } 84 OBSOL wait 85 OBSOL swapon 86 STD { int sys_getitimer(int which, struct itimerval *itv); } 87 OBSOL gethostname 88 OBSOL sethostname 89 OBSOL getdtablesize 90 STD { int sys_dup2(int from, int to); } 91 UNIMPL getdopt 92 STD { int sys_fcntl(int fd, int cmd, ... void *arg); } 93 STD { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); } 94 UNIMPL setdopt 95 STD { int sys_fsync(int fd); } 96 STD { int sys_setpriority(int which, id_t who, int prio); } 97 STD { int sys_socket(int domain, int type, int protocol); } 98 STD { int sys_connect(int s, const struct sockaddr *name, socklen_t namelen); } 99 OBSOL accept 100 STD { int sys_getpriority(int which, id_t who); } 101 OBSOL send 102 OBSOL recv 103 STD { int sys_sigreturn(struct sigcontext *sigcntxp); } 104 STD { int sys_bind(int s, const struct sockaddr *name, socklen_t namelen); } 105 STD { int sys_setsockopt(int s, int level, int name, const void *val, socklen_t valsize); } 106 STD { int sys_listen(int s, int backlog); } 107 OBSOL vtimes 108 OBSOL sigvec 109 OBSOL sigblock 110 OBSOL sigsetmask 111 STD { int sys_sigsuspend(int mask); } 112 OBSOL sigstack 113 OBSOL recvmsg 114 OBSOL sendmsg 115 OBSOL vtrace 116 STD { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); } 117 STD { int sys_getrusage(int who, struct rusage *rusage); } 118 STD { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); } 119 OBSOL resuba 120 STD { ssize_t sys_readv(int fd, const struct iovec *iovp, int iovcnt); } 121 STD { ssize_t sys_writev(int fd, const struct iovec *iovp, int iovcnt); } 122 STD { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); } 123 STD { int sys_fchown(int fd, uid_t uid, gid_t gid); } 124 STD { int sys_fchmod(int fd, mode_t mode); } 125 OBSOL recvfrom 126 STD { int sys_setreuid(uid_t ruid, uid_t euid); } 127 STD { int sys_setregid(gid_t rgid, gid_t egid); } 128 STD { int sys_rename(const char *from, const char *to); } 129 OBSOL truncate 130 OBSOL ftruncate 131 STD { int sys_flock(int fd, int how); } 132 STD { int sys_mkfifo(const char *path, mode_t mode); } 133 STD { ssize_t sys_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); } 134 STD { int sys_shutdown(int s, int how); } 135 STD { int sys_socketpair(int domain, int type, int protocol, int *rsv); } 136 STD { int sys_mkdir(const char *path, mode_t mode); } 137 STD { int sys_rmdir(const char *path); } 138 STD { int sys_utimes(const char *path, const struct timeval *tptr); } 139 OBSOL 4.2 sigreturn 140 STD { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); } 141 OBSOL getpeername 142 OBSOL gethostid 143 OBSOL sethostid 144 OBSOL getrlimit 145 OBSOL setrlimit 146 OBSOL killpg 147 STD { int sys_setsid(void); } 148 STD { int sys_quotactl(const char *path, int cmd, int uid, char *arg); } 149 OBSOL quota 150 OBSOL getsockname ; Syscalls 151-180 inclusive are reserved for vendor-specific ; system calls. (This includes various calls added for compatibity ; with other Unix variants.) ; Some of these calls are now supported by BSD... 151 UNIMPL 152 UNIMPL 153 UNIMPL 154 UNIMPL #if defined(NFSCLIENT) || defined(NFSSERVER) 155 STD { int sys_nfssvc(int flag, void *argp); } #else 155 UNIMPL #endif 156 OBSOL getdirentries 157 OBSOL statfs 158 OBSOL fstatfs 159 UNIMPL 160 UNIMPL 161 STD { int sys_getfh(const char *fname, fhandle_t *fhp); } 162 OBSOL getdomainname 163 OBSOL setdomainname 164 UNIMPL ouname 165 STD { int sys_sysarch(int op, void *parms); } 166 UNIMPL 167 UNIMPL 168 UNIMPL 169 OBSOL semsys 170 OBSOL msgsys 171 OBSOL shmsys 172 UNIMPL 173 STD { ssize_t sys_pread(int fd, void *buf, size_t nbyte, int pad, off_t offset); } 174 STD { ssize_t sys_pwrite(int fd, const void *buf, size_t nbyte, int pad, off_t offset); } 175 UNIMPL ntp_gettime 176 UNIMPL ntp_adjtime 177 UNIMPL 178 UNIMPL 179 UNIMPL 180 UNIMPL ; Syscalls 181-199 are used by/reserved for BSD 181 STD { int sys_setgid(gid_t gid); } 182 STD { int sys_setegid(gid_t egid); } 183 STD { int sys_seteuid(uid_t euid); } 184 UNIMPL 185 UNIMPL 186 UNIMPL 187 UNIMPL 188 OBSOL stat 189 OBSOL fstat 190 OBSOL lstat 191 STD { long sys_pathconf(const char *path, int name); } 192 STD { long sys_fpathconf(int fd, int name); } 193 STD { int sys_swapctl(int cmd, const void *arg, int misc); } 194 STD { int sys_getrlimit(int which, struct rlimit *rlp); } 195 STD { int sys_setrlimit(int which, const struct rlimit *rlp); } 196 STD { int sys_getdirentries(int fd, char *buf, int count, long *basep); } 197 STD { void *sys_mmap(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); } 198 INDIR { quad_t sys___syscall(quad_t num, ...); } 199 STD { off_t sys_lseek(int fd, int pad, off_t offset, int whence); } 200 STD { int sys_truncate(const char *path, int pad, off_t length); } 201 STD { int sys_ftruncate(int fd, int pad, off_t length); } 202 STD { int sys___sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } 203 STD { int sys_mlock(const void *addr, size_t len); } 204 STD { int sys_munlock(const void *addr, size_t len); } 205 UNIMPL sys_undelete 206 STD { int sys_futimes(int fd, const struct timeval *tptr); } 207 STD { pid_t sys_getpgid(pid_t pid); } 208 UNIMPL 209 UNIMPL ; ; Syscalls 210-219 are reserved for dynamically loaded syscalls ; #ifdef LKM 210 NODEF { int sys_lkmnosys(void); } 211 NODEF { int sys_lkmnosys(void); } 212 NODEF { int sys_lkmnosys(void); } 213 NODEF { int sys_lkmnosys(void); } 214 NODEF { int sys_lkmnosys(void); } 215 NODEF { int sys_lkmnosys(void); } 216 NODEF { int sys_lkmnosys(void); } 217 NODEF { int sys_lkmnosys(void); } 218 NODEF { int sys_lkmnosys(void); } 219 NODEF { int sys_lkmnosys(void); } #else /* !LKM */ 210 UNIMPL 211 UNIMPL 212 UNIMPL 213 UNIMPL 214 UNIMPL 215 UNIMPL 216 UNIMPL 217 UNIMPL 218 UNIMPL 219 UNIMPL #endif /* !LKM */ ; ; System calls 220-240 are reserved for use by OpenBSD ; #ifdef SYSVSEM 220 OBSOL semctl 221 STD { int sys_semget(key_t key, int nsems, int semflg); } 222 OBSOL semop 223 OBSOL sys_semconfig #else 220 UNIMPL semctl 221 UNIMPL semget 222 UNIMPL semop 223 UNIMPL semconfig #endif #ifdef SYSVMSG 224 OBSOL msgctl 225 STD { int sys_msgget(key_t key, int msgflg); } 226 STD { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); } 227 STD { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); } #else 224 UNIMPL msgctl 225 UNIMPL msgget 226 UNIMPL msgsnd 227 UNIMPL msgrcv #endif #ifdef SYSVSHM 228 STD { void *sys_shmat(int shmid, const void *shmaddr, int shmflg); } 229 OBSOL shmctl 230 STD { int sys_shmdt(const void *shmaddr); } 231 OBSOL shmget #else 228 UNIMPL shmat 229 UNIMPL shmctl 230 UNIMPL shmdt 231 UNIMPL shmget #endif 232 STD { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); } 233 STD { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); } 234 STD { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); } 235 UNIMPL timer_create 236 UNIMPL timer_delete 237 UNIMPL timer_settime 238 UNIMPL timer_gettime 239 UNIMPL timer_getoverrun ; ; System calls 240-249 are reserved for other IEEE Std1003.1b syscalls ; 240 STD { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); } 241 UNIMPL 242 UNIMPL 243 UNIMPL 244 UNIMPL 245 UNIMPL 246 UNIMPL 247 UNIMPL 248 UNIMPL 249 UNIMPL ; ; ... ; 250 STD { int sys_minherit(void *addr, size_t len, int inherit); } 251 STD { int sys_rfork(int flags); } 252 STD { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); } 253 STD { int sys_issetugid(void); } 254 STD { int sys_lchown(const char *path, uid_t uid, gid_t gid); } 255 STD { pid_t sys_getsid(pid_t pid); } 256 STD { int sys_msync(void *addr, size_t len, int flags); } #ifdef SYSVSEM 257 OBSOL semctl #else 257 UNIMPL #endif #ifdef SYSVSHM 258 OBSOL shmctl #else 258 UNIMPL #endif #ifdef SYSVMSG 259 OBSOL msgctl #else 259 UNIMPL #endif 260 OBSOL getfsstat 261 OBSOL statfs 262 OBSOL fstatfs 263 STD { int sys_pipe(int *fdp); } 264 STD { int sys_fhopen(const fhandle_t *fhp, int flags); } 265 OBSOL fhstat 266 OBSOL fhstatfs 267 STD { ssize_t sys_preadv(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); } 268 STD { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); } 269 STD { int sys_kqueue(void); } 270 STD { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); } 271 STD { int sys_mlockall(int flags); } 272 STD { int sys_munlockall(void); } 273 STD { int sys_getpeereid(int fdes, uid_t *euid, gid_t *egid); } 274 UNIMPL sys_extattrctl 275 UNIMPL sys_extattr_set_file 276 UNIMPL sys_extattr_get_file 277 UNIMPL sys_extattr_delete_file 278 UNIMPL sys_extattr_set_fd 279 UNIMPL sys_extattr_get_fd 280 UNIMPL sys_extattr_delete_fd 281 STD { int sys_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); } 282 STD { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); } 283 STD { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); } 284 STD { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); } 285 OBSOL sys_omquery 286 STD { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); } 287 STD { int sys_closefrom(int fd); } 288 STD { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); } #ifdef SYSVSHM 289 STD { int sys_shmget(key_t key, size_t size, int shmflg); } #else 289 UNIMPL shmget #endif #ifdef SYSVSEM 290 STD { int sys_semop(int semid, struct sembuf *sops, size_t nsops); } #else 290 UNIMPL semop #endif 291 STD { int sys_stat(const char *path, struct stat *ub); } 292 STD { int sys_fstat(int fd, struct stat *sb); } 293 STD { int sys_lstat(const char *path, struct stat *ub); } 294 STD { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); } #ifdef SYSVSEM 295 STD { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); } #else 295 UNIMPL #endif #ifdef SYSVSHM 296 STD { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); } #else 296 UNIMPL #endif #ifdef SYSVMSG 297 STD { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); } #else 297 UNIMPL #endif 298 STD { int sys_sched_yield(void); } #ifdef RTHREADS 299 STD { pid_t sys_getthrid(void); } 300 STD { int sys_thrsleep(void *ident, int timeout, void *lock); } 301 STD { int sys_thrwakeup(void *ident, int n); } 302 STD { int sys_threxit(int rval); } 303 STD { int sys_thrsigdivert(sigset_t sigmask); } #else 299 UNIMPL 300 UNIMPL 301 UNIMPL 302 UNIMPL 303 UNIMPL #endif 304 STD { int sys___getcwd(char *buf, size_t len); } 305 STD { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); } 306 STD { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); } 307 STD { int sys_statfs(const char *path, struct statfs *buf); } 308 STD { int sys_fstatfs(int fd, struct statfs *buf); } 309 STD { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); } ; ; FabBSD-specific ; 310 STD { int sys_cncmove(const struct cnc_velocity *vel, const struct cnc_vector *tgt); } 311 OBSOL cncjog 312 OBSOL cncjogstep 313 STD { int sys_spinctl(int spindle, int op, const struct cnc_spindle_args *args); } 314 STD { int sys_atcctl(int atc, int op, const struct cnc_atc_args *args); } 315 STD { int sys_laserctl(int laser, int op, const struct cnc_laser_args *args); } 316 STD { int sys_pickplacectl(int pp, int op, const struct cnc_pickplace_args *args); } 317 STD { int sys_coolantctl(int coolant, int op, int val); } 318 STD { int sys_estop(void); } 319 STD { int sys_cncpos(struct cnc_vector *vec); } 320 STD { int sys_cncspotweld(int welder, int cycles); } 321 STD { int sys_cncspotweldtrig(int welder); } 322 STD { int sys_cncspotweldselect(int welder); } 323 STD { int sys_valvectl(int valve, int enable); }