1; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 2; $FreeBSD: src/sys/kern/syscalls.master,v 1.72.2.10 2002/07/12 08:22:46 alfred Exp $ 3; 4; System call name/number master file. 5; Processed to create kern/init_sysent.c, kern/syscalls.c, sys/syscall.h, 6; sys/syscall.mk, sys/syscall-hide.h, sys/sysproto.h and 7; sys/sysunion.h 8 9; Columns: number type nargs namespc name alt{name,tag,rtyp}/comments 10; number system call number, must be in order 11; type one of STD, OBSOL, UNIMPL, COMPAT, CPT_NOA, LIBCOMPAT, 12; NODEF, NOARGS, NOPROTO, NOIMPL 13; namespc one of POSIX, BSD, NOHIDE 14; name pseudo-prototype of syscall routine 15; If one of the following alts is different, then all appear: 16; altname name of system call if different 17; alttag name of args struct tag if different from [o]`name'"_args" 18; altrtyp return type if not int (bogus - syscalls always return int) 19; for UNIMPL/OBSOL, name continues with comments 20; 21; NOTE: All system calls are now called without the MP lock. Those 22; that need the MP lock will acquire it. 23 24; types: 25; STD always included 26; COMPAT included on COMPAT #ifdef 27; LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h 28; OBSOL obsolete, not included in system, only specifies name 29; UNIMPL not implemented, placeholder only 30 31; #ifdef's, etc. may be included, and are copied to the output files. 32 33#include <sys/param.h> 34#include <sys/sysent.h> 35#include <sys/sysproto.h> 36#include <sys/statvfs.h> 37 38#ifdef COMPAT_43 39#include <emulation/43bsd/stat.h> 40#endif 41 42#include <emulation/dragonfly12/stat.h> 43 44; Reserved/unimplemented system calls in the range 0-150 inclusive 45; are reserved for use in future Berkeley releases. 46; Additional system calls implemented in vendor and other 47; redistributions should be placed in the reserved range at the end 48; of the current calls. 49 500 STD NOHIDE { int nosys(void); } syscall nosys_args int 511 STD NOHIDE { void exit(int rval); } 522 STD POSIX { int fork(void); } 533 STD POSIX { ssize_t read(int fd, void *buf, size_t nbyte); } 544 STD POSIX { ssize_t write(int fd, const void *buf, size_t nbyte); } 555 STD POSIX { int open(char *path, int flags, int mode); } 56; XXX should be { int open(const char *path, int flags, ...); } 57; but we're not ready for `const' or varargs. 58; XXX man page says `mode_t mode'. 596 STD POSIX { int close(int fd); } 607 STD BSD { int wait4(int pid, int *status, int options, \ 61 struct rusage *rusage); } wait4 wait_args int 628 COMPAT BSD { int creat(char *path, int mode); } 639 STD POSIX { int link(char *path, char *link); } 6410 STD POSIX { int unlink(char *path); } 6511 OBSOL NOHIDE execv 6612 STD POSIX { int chdir(char *path); } 6713 STD BSD { int fchdir(int fd); } 6814 STD POSIX { int mknod(char *path, int mode, int dev); } 6915 STD POSIX { int chmod(char *path, int mode); } 7016 STD POSIX { int chown(char *path, int uid, int gid); } 7117 STD BSD { int obreak(char *nsize); } break obreak_args int 7218 STD BSD { int getfsstat(struct statfs *buf, long bufsize, \ 73 int flags); } 7419 COMPAT POSIX { long lseek(int fd, long offset, int whence); } 7520 STD POSIX { pid_t getpid(void); } 7621 STD BSD { int mount(char *type, char *path, int flags, \ 77 caddr_t data); } 78; XXX `path' should have type `const char *' but we're not ready for that. 7922 STD BSD { int unmount(char *path, int flags); } 8023 STD POSIX { int setuid(uid_t uid); } 8124 STD POSIX { uid_t getuid(void); } 8225 STD POSIX { uid_t geteuid(void); } 8326 STD BSD { int ptrace(int req, pid_t pid, caddr_t addr, \ 84 int data); } 8527 STD BSD { int recvmsg(int s, struct msghdr *msg, int flags); } 8628 STD BSD { int sendmsg(int s, caddr_t msg, int flags); } 8729 STD BSD { int recvfrom(int s, caddr_t buf, size_t len, \ 88 int flags, caddr_t from, int *fromlenaddr); } 8930 STD BSD { int accept(int s, caddr_t name, int *anamelen); } 9031 STD BSD { int getpeername(int fdes, caddr_t asa, int *alen); } 9132 STD BSD { int getsockname(int fdes, caddr_t asa, int *alen); } 9233 STD POSIX { int access(char *path, int flags); } 9334 STD BSD { int chflags(char *path, int flags); } 9435 STD BSD { int fchflags(int fd, int flags); } 9536 STD BSD { int sync(void); } 9637 STD POSIX { int kill(int pid, int signum); } 9738 COMPAT POSIX { int stat(char *path, struct ostat *ub); } 9839 STD POSIX { pid_t getppid(void); } 9940 COMPAT POSIX { int lstat(char *path, struct ostat *ub); } 10041 STD POSIX { int dup(u_int fd); } 10142 STD POSIX { int pipe(void); } 10243 STD POSIX { gid_t getegid(void); } 10344 STD BSD { int profil(caddr_t samples, size_t size, \ 104 size_t offset, u_int scale); } 10545 STD BSD { int ktrace(const char *fname, int ops, int facs, \ 106 int pid); } 10746 OBSOL NOHIDE freebsd3_sigaction 10847 STD POSIX { gid_t getgid(void); } 10948 OBSOL NOHIDE freebsd3_sigprocmask 110; XXX note nonstandard (bogus) calling convention - the libc stub passes 111; us the mask, not a pointer to it, and we return the old mask as the 112; (int) return value. 11349 STD BSD { int getlogin(char *namebuf, u_int namelen); } 11450 STD BSD { int setlogin(char *namebuf); } 11551 STD BSD { int acct(char *path); } 11652 OBSOL NOHIDE freebsd3_sigpending 11753 STD BSD { int sigaltstack(stack_t *ss, stack_t *oss); } 11854 STD POSIX { int ioctl(int fd, u_long com, caddr_t data); } 11955 STD BSD { int reboot(int opt); } 12056 STD POSIX { int revoke(char *path); } 12157 STD POSIX { int symlink(char *path, char *link); } 12258 STD POSIX { int readlink(char *path, char *buf, int count); } 12359 STD POSIX { int execve(char *fname, char **argv, char **envv); } 12460 STD POSIX { int umask(int newmask); } umask umask_args int 12561 STD BSD { int chroot(char *path); } 12662 COMPAT POSIX { int fstat(int fd, struct ostat *sb); } 12763 COMPAT BSD { int getkerninfo(int op, char *where, size_t *size, \ 128 int arg); } getkerninfo getkerninfo_args int 12964 COMPAT BSD { int getpagesize(void); } \ 130 getpagesize getpagesize_args int 13165 STD BSD { int msync(void *addr, size_t len, int flags); } 13266 STD BSD { int vfork(void); } 13367 OBSOL NOHIDE vread 13468 OBSOL NOHIDE vwrite 13569 STD BSD { int sbrk(int incr); } 13670 STD BSD { int sstk(int incr); } 13771 COMPAT BSD { int mmap(void *addr, int len, int prot, \ 138 int flags, int fd, long pos); } 13972 COMPAT BSD { int vadvise(int anom); } vadvise ovadvise_args int 14073 STD BSD { int munmap(void *addr, size_t len); } 14174 STD BSD { int mprotect(void *addr, size_t len, int prot); } 14275 STD BSD { int madvise(void *addr, size_t len, int behav); } 14376 OBSOL NOHIDE vhangup 14477 OBSOL NOHIDE vlimit 14578 STD BSD { int mincore(const void *addr, size_t len, \ 146 char *vec); } 14779 STD POSIX { int getgroups(u_int gidsetsize, gid_t *gidset); } 14880 STD POSIX { int setgroups(u_int gidsetsize, gid_t *gidset); } 14981 STD POSIX { int getpgrp(void); } 15082 STD POSIX { int setpgid(int pid, int pgid); } 15183 STD BSD { int setitimer(u_int which, struct itimerval *itv, \ 152 struct itimerval *oitv); } 15384 COMPAT BSD { int wait(void); } 15485 STD BSD { int swapon(char *name); } 15586 STD BSD { int getitimer(u_int which, struct itimerval *itv); } 15687 COMPAT BSD { int gethostname(char *hostname, u_int len); } \ 157 gethostname gethostname_args int 15888 COMPAT BSD { int sethostname(char *hostname, u_int len); } \ 159 sethostname sethostname_args int 16089 STD BSD { int getdtablesize(void); } 16190 STD POSIX { int dup2(u_int from, u_int to); } 16291 UNIMPL BSD getdopt 16392 STD POSIX { int fcntl(int fd, int cmd, long arg); } 164; XXX should be { int fcntl(int fd, int cmd, ...); } 165; but we're not ready for varargs. 166; XXX man page says `int arg' too. 16793 STD BSD { int select(int nd, fd_set *in, fd_set *ou, \ 168 fd_set *ex, struct timeval *tv); } 16994 UNIMPL BSD setdopt 17095 STD POSIX { int fsync(int fd); } 17196 STD BSD { int setpriority(int which, int who, int prio); } 17297 STD BSD { int socket(int domain, int type, int protocol); } 17398 STD BSD { int connect(int s, caddr_t name, int namelen); } 17499 CPT_NOA BSD { int accept(int s, caddr_t name, int *anamelen); } \ 175 accept accept_args int 176100 STD BSD { int getpriority(int which, int who); } 177101 COMPAT BSD { int send(int s, caddr_t buf, int len, int flags); } 178102 COMPAT BSD { int recv(int s, caddr_t buf, int len, int flags); } 179103 OBSOL NOHIDE freebsd3_sigreturn 180104 STD BSD { int bind(int s, caddr_t name, int namelen); } 181105 STD BSD { int setsockopt(int s, int level, int name, \ 182 caddr_t val, int valsize); } 183106 STD BSD { int listen(int s, int backlog); } 184107 OBSOL NOHIDE vtimes 185108 COMPAT BSD { int sigvec(int signum, struct sigvec *nsv, \ 186 struct sigvec *osv); } 187109 COMPAT BSD { int sigblock(int mask); } 188110 COMPAT BSD { int sigsetmask(int mask); } 189111 OBSOL NOHIDE freebsd3_sigsuspend 190; XXX note nonstandard (bogus) calling convention - the libc stub passes 191; us the mask, not a pointer to it. 192112 COMPAT BSD { int sigstack(struct sigstack *nss, \ 193 struct sigstack *oss); } 194113 COMPAT BSD { int recvmsg(int s, struct omsghdr *msg, int flags); } 195114 COMPAT BSD { int sendmsg(int s, caddr_t msg, int flags); } 196115 OBSOL NOHIDE vtrace 197116 STD BSD { int gettimeofday(struct timeval *tp, \ 198 struct timezone *tzp); } 199117 STD BSD { int getrusage(int who, struct rusage *rusage); } 200118 STD BSD { int getsockopt(int s, int level, int name, \ 201 caddr_t val, int *avalsize); } 202119 UNIMPL NOHIDE resuba (BSD/OS 2.x) 203120 STD BSD { int readv(int fd, struct iovec *iovp, u_int iovcnt); } 204121 STD BSD { int writev(int fd, struct iovec *iovp, \ 205 u_int iovcnt); } 206122 STD BSD { int settimeofday(struct timeval *tv, \ 207 struct timezone *tzp); } 208123 STD BSD { int fchown(int fd, int uid, int gid); } 209124 STD BSD { int fchmod(int fd, int mode); } 210125 CPT_NOA BSD { int recvfrom(int s, caddr_t buf, size_t len, \ 211 int flags, caddr_t from, int *fromlenaddr); } \ 212 recvfrom recvfrom_args int 213126 STD BSD { int setreuid(int ruid, int euid); } 214127 STD BSD { int setregid(int rgid, int egid); } 215128 STD POSIX { int rename(char *from, char *to); } 216129 COMPAT BSD { int truncate(char *path, long length); } 217130 COMPAT BSD { int ftruncate(int fd, long length); } 218131 STD BSD { int flock(int fd, int how); } 219132 STD POSIX { int mkfifo(char *path, int mode); } 220133 STD BSD { int sendto(int s, caddr_t buf, size_t len, \ 221 int flags, caddr_t to, int tolen); } 222134 STD BSD { int shutdown(int s, int how); } 223135 STD BSD { int socketpair(int domain, int type, int protocol, \ 224 int *rsv); } 225136 STD POSIX { int mkdir(char *path, int mode); } 226137 STD POSIX { int rmdir(char *path); } 227138 STD BSD { int utimes(char *path, struct timeval *tptr); } 228139 OBSOL NOHIDE 4.2 sigreturn 229140 STD BSD { int adjtime(struct timeval *delta, \ 230 struct timeval *olddelta); } 231141 COMPAT BSD { int getpeername(int fdes, caddr_t asa, int *alen); } 232142 COMPAT BSD { long gethostid(void); } 233143 COMPAT BSD { int sethostid(long hostid); } 234144 COMPAT BSD { int getrlimit(u_int which, struct orlimit *rlp); } 235145 COMPAT BSD { int setrlimit(u_int which, struct orlimit *rlp); } 236146 COMPAT BSD { int killpg(int pgid, int signum); } 237147 STD POSIX { int setsid(void); } 238148 STD BSD { int quotactl(char *path, int cmd, int uid, \ 239 caddr_t arg); } 240149 COMPAT BSD { int quota(void); } 241150 CPT_NOA BSD { int getsockname(int fdec, caddr_t asa, int *alen); }\ 242 getsockname getsockname_args int 243 244; Syscalls 151-180 inclusive are reserved for vendor-specific 245; system calls. (This includes various calls added for compatibity 246; with other Unix variants.) 247; Some of these calls are now supported by BSD... 248151 UNIMPL NOHIDE sem_lock (BSD/OS 2.x) 249152 UNIMPL NOHIDE sem_wakeup (BSD/OS 2.x) 250153 UNIMPL NOHIDE asyncdaemon (BSD/OS 2.x) 251154 UNIMPL NOHIDE nosys 252; 155 is initialized by the NFS code, if present. 253155 NOIMPL BSD { int nfssvc(int flag, caddr_t argp); } 254156 COMPAT BSD { int getdirentries(int fd, char *buf, u_int count, \ 255 long *basep); } 256157 STD BSD { int statfs(char *path, struct statfs *buf); } 257158 STD BSD { int fstatfs(int fd, struct statfs *buf); } 258159 UNIMPL NOHIDE nosys 259160 UNIMPL NOHIDE nosys 260; 161 is initialized by the NFS code, if present. 261161 STD BSD { int getfh(char *fname, struct fhandle *fhp); } 262162 STD BSD { int getdomainname(char *domainname, int len); } 263163 STD BSD { int setdomainname(char *domainname, int len); } 264164 STD BSD { int uname(struct utsname *name); } 265165 STD BSD { int sysarch(int op, char *parms); } 266166 STD BSD { int rtprio(int function, pid_t pid, \ 267 struct rtprio *rtp); } 268167 UNIMPL NOHIDE nosys 269168 UNIMPL NOHIDE nosys 270169 STD BSD { int semsys(int which, int a2, int a3, int a4, \ 271 int a5); } 272; XXX should be { int semsys(int which, ...); } 273170 STD BSD { int msgsys(int which, int a2, int a3, int a4, \ 274 int a5, int a6); } 275; XXX should be { int msgsys(int which, ...); } 276171 STD BSD { int shmsys(int which, int a2, int a3, int a4); } 277; XXX should be { int shmsys(int which, ...); } 278172 UNIMPL NOHIDE nosys 279173 STD POSIX { ssize_t extpread(int fd, void *buf, \ 280 size_t nbyte, int flags, off_t offset); } 281174 STD POSIX { ssize_t extpwrite(int fd, const void *buf, \ 282 size_t nbyte, int flags, off_t offset); } 283175 UNIMPL NOHIDE nosys 284176 STD BSD { int ntp_adjtime(struct timex *tp); } 285177 UNIMPL NOHIDE sfork (BSD/OS 2.x) 286178 UNIMPL NOHIDE getdescriptor (BSD/OS 2.x) 287179 UNIMPL NOHIDE setdescriptor (BSD/OS 2.x) 288180 UNIMPL NOHIDE nosys 289 290; Syscalls 181-199 are used by/reserved for BSD 291181 STD POSIX { int setgid(gid_t gid); } 292182 STD BSD { int setegid(gid_t egid); } 293183 STD BSD { int seteuid(uid_t euid); } 294184 UNIMPL BSD lfs_bmapv 295185 UNIMPL BSD lfs_markv 296186 UNIMPL BSD lfs_segclean 297187 UNIMPL BSD lfs_segwait 298188 COMPAT_DF12 POSIX { int stat(const char *path, struct dfbsd12_stat *ub); } 299189 COMPAT_DF12 POSIX { int fstat(int fd, struct dfbsd12_stat *sb); } 300190 COMPAT_DF12 POSIX { int lstat(const char *path, struct dfbsd12_stat *ub); } 301191 STD POSIX { int pathconf(char *path, int name); } 302192 STD POSIX { int fpathconf(int fd, int name); } 303193 UNIMPL NOHIDE nosys 304194 STD BSD { int getrlimit(u_int which, \ 305 struct rlimit *rlp); } \ 306 getrlimit __getrlimit_args int 307195 STD BSD { int setrlimit(u_int which, \ 308 struct rlimit *rlp); } \ 309 setrlimit __setrlimit_args int 310196 COMPAT_DF12 BSD { int getdirentries(int fd, char *buf, \ 311 u_int count, long *basep); } 312197 STD BSD { caddr_t mmap(caddr_t addr, size_t len, int prot, \ 313 int flags, int fd, int pad, off_t pos); } 314198 STD NOHIDE { int nosys(void); } __syscall __syscall_args int 315199 STD POSIX { off_t lseek(int fd, int pad, off_t offset, \ 316 int whence); } 317200 STD BSD { int truncate(char *path, int pad, off_t length); } 318201 STD BSD { int ftruncate(int fd, int pad, off_t length); } 319202 STD BSD { int __sysctl(int *name, u_int namelen, void *old, \ 320 size_t *oldlenp, void *new, size_t newlen); } \ 321 __sysctl sysctl_args int 322; properly, __sysctl should be a NOHIDE, but making an exception 323; here allows to avoid one in libc/sys/Makefile.inc. 324203 STD BSD { int mlock(const void *addr, size_t len); } 325204 STD BSD { int munlock(const void *addr, size_t len); } 326205 STD BSD { int undelete(char *path); } 327206 STD BSD { int futimes(int fd, struct timeval *tptr); } 328207 STD BSD { int getpgid(pid_t pid); } 329208 UNIMPL NOHIDE newreboot (NetBSD) 330209 STD BSD { int poll(struct pollfd *fds, u_int nfds, \ 331 int timeout); } 332 333; 334; The following are reserved for loadable syscalls 335; 336; 210 is used by the Checkpoint Module 337210 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 338211 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 339212 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 340213 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 341214 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 342215 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 343216 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 344217 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 345218 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 346219 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 347 348; 349; The following were introduced with NetBSD/4.4Lite-2 350; 351220 STD BSD { int __semctl(int semid, int semnum, int cmd, \ 352 union semun *arg); } 353221 STD BSD { int semget(key_t key, int nsems, int semflg); } 354222 STD BSD { int semop(int semid, struct sembuf *sops, \ 355 u_int nsops); } 356223 UNIMPL NOHIDE semconfig 357224 STD BSD { int msgctl(int msqid, int cmd, \ 358 struct msqid_ds *buf); } 359225 STD BSD { int msgget(key_t key, int msgflg); } 360226 STD BSD { int msgsnd(int msqid, void *msgp, size_t msgsz, \ 361 int msgflg); } 362227 STD BSD { int msgrcv(int msqid, void *msgp, size_t msgsz, \ 363 long msgtyp, int msgflg); } 364228 STD BSD { caddr_t shmat(int shmid, const void *shmaddr, \ 365 int shmflg); } 366229 STD BSD { int shmctl(int shmid, int cmd, \ 367 struct shmid_ds *buf); } 368230 STD BSD { int shmdt(const void *shmaddr); } 369231 STD BSD { int shmget(key_t key, size_t size, int shmflg); } 370; 371232 STD POSIX { int clock_gettime(clockid_t clock_id, \ 372 struct timespec *tp); } 373233 STD POSIX { int clock_settime(clockid_t clock_id, \ 374 const struct timespec *tp); } 375234 STD POSIX { int clock_getres(clockid_t clock_id, \ 376 struct timespec *tp); } 377235 UNIMPL NOHIDE timer_create 378236 UNIMPL NOHIDE timer_delete 379237 UNIMPL NOHIDE timer_settime 380238 UNIMPL NOHIDE timer_gettime 381239 UNIMPL NOHIDE timer_getoverrun 382240 STD POSIX { int nanosleep(const struct timespec *rqtp, \ 383 struct timespec *rmtp); } 384241 UNIMPL NOHIDE nosys 385242 UNIMPL NOHIDE nosys 386243 UNIMPL NOHIDE nosys 387244 UNIMPL NOHIDE nosys 388245 UNIMPL NOHIDE nosys 389246 UNIMPL NOHIDE nosys 390247 UNIMPL NOHIDE nosys 391248 UNIMPL NOHIDE nosys 392249 UNIMPL NOHIDE nosys 393; syscall numbers initially used in OpenBSD 394250 STD BSD { int minherit(void *addr, size_t len, int inherit); } 395251 STD BSD { int rfork(int flags); } 396252 STD BSD { int openbsd_poll(struct pollfd *fds, u_int nfds, \ 397 int timeout); } 398253 STD BSD { int issetugid(void); } 399254 STD BSD { int lchown(char *path, int uid, int gid); } 400255 UNIMPL NOHIDE nosys 401256 UNIMPL NOHIDE nosys 402257 UNIMPL NOHIDE nosys 403258 UNIMPL NOHIDE nosys 404259 UNIMPL NOHIDE nosys 405260 UNIMPL NOHIDE nosys 406261 UNIMPL NOHIDE nosys 407262 UNIMPL NOHIDE nosys 408263 UNIMPL NOHIDE nosys 409264 UNIMPL NOHIDE nosys 410265 UNIMPL NOHIDE nosys 411266 UNIMPL NOHIDE nosys 412267 UNIMPL NOHIDE nosys 413268 UNIMPL NOHIDE nosys 414269 UNIMPL NOHIDE nosys 415270 UNIMPL NOHIDE nosys 416271 UNIMPL NOHIDE nosys 417272 COMPAT_DF12 BSD { int getdents(int fd, char *buf, size_t count); } 418273 UNIMPL NOHIDE nosys 419274 STD BSD { int lchmod(char *path, mode_t mode); } 420275 NOPROTO BSD { int lchown(char *path, uid_t uid, gid_t gid); } netbsd_lchown lchown_args int 421276 STD BSD { int lutimes(char *path, struct timeval *tptr); } 422277 NOPROTO BSD { int msync(void *addr, size_t len, int flags); } netbsd_msync msync_args int 423278 OBSOL BSD { int nstat(char *path, struct nstat *ub); } 424279 OBSOL NOHIDE { int nfstat(int fd, struct nstat *sb); } 425280 OBSOL NOHIDE { int nlstat(char *path, struct nstat *ub); } 426281 UNIMPL NOHIDE nosys 427282 UNIMPL NOHIDE nosys 428283 UNIMPL NOHIDE nosys 429284 UNIMPL NOHIDE nosys 430285 UNIMPL NOHIDE nosys 431286 UNIMPL NOHIDE nosys 432287 UNIMPL NOHIDE nosys 433288 UNIMPL NOHIDE nosys 434; 289 and 290 from NetBSD (OpenBSD: 267 and 268) 435289 STD BSD { ssize_t extpreadv(int fd, struct iovec *iovp, \ 436 u_int iovcnt, int flags, off_t offset); } 437290 STD BSD { ssize_t extpwritev(int fd, struct iovec *iovp,\ 438 u_int iovcnt, int flags, off_t offset); } 439291 UNIMPL NOHIDE nosys 440292 UNIMPL NOHIDE nosys 441293 UNIMPL NOHIDE nosys 442294 UNIMPL NOHIDE nosys 443295 UNIMPL NOHIDE nosys 444296 UNIMPL NOHIDE nosys 445; XXX 297 is 300 in NetBSD 446297 STD BSD { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); } 447298 STD BSD { int fhopen(const struct fhandle *u_fhp, int flags); } 448299 COMPAT_DF12 POSIX { int fhstat(const struct fhandle *u_fhp, struct dfbsd12_stat *sb); } 449; syscall numbers for FreeBSD 450300 STD BSD { int modnext(int modid); } 451301 STD BSD { int modstat(int modid, struct module_stat* stat); } 452302 STD BSD { int modfnext(int modid); } 453303 STD BSD { int modfind(const char *name); } 454304 STD BSD { int kldload(const char *file); } 455305 STD BSD { int kldunload(int fileid); } 456306 STD BSD { int kldfind(const char *file); } 457307 STD BSD { int kldnext(int fileid); } 458308 STD BSD { int kldstat(int fileid, struct kld_file_stat* stat); } 459309 STD BSD { int kldfirstmod(int fileid); } 460310 STD BSD { int getsid(pid_t pid); } 461311 STD BSD { int setresuid(uid_t ruid, uid_t euid, uid_t suid); } 462312 STD BSD { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); } 463313 OBSOL NOHIDE signanosleep 464314 STD BSD { int aio_return(struct aiocb *aiocbp); } 465315 STD BSD { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); } 466316 STD BSD { int aio_cancel(int fd, struct aiocb *aiocbp); } 467317 STD BSD { int aio_error(struct aiocb *aiocbp); } 468318 STD BSD { int aio_read(struct aiocb *aiocbp); } 469319 STD BSD { int aio_write(struct aiocb *aiocbp); } 470320 STD BSD { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); } 471321 STD BSD { int yield(void); } 472322 UNIMPL BSD thr_sleep 473323 UNIMPL BSD thr_wakeup 474324 STD BSD { int mlockall(int how); } 475325 STD BSD { int munlockall(void); } 476326 STD BSD { int __getcwd(u_char *buf, u_int buflen); } 477 478327 STD POSIX { int sched_setparam (pid_t pid, const struct sched_param *param); } 479328 STD POSIX { int sched_getparam (pid_t pid, struct sched_param *param); } 480 481329 STD POSIX { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); } 482330 STD POSIX { int sched_getscheduler (pid_t pid); } 483 484331 STD POSIX { int sched_yield (void); } 485332 STD POSIX { int sched_get_priority_max (int policy); } 486333 STD POSIX { int sched_get_priority_min (int policy); } 487334 STD POSIX { int sched_rr_get_interval (pid_t pid, struct timespec *interval); } 488335 STD BSD { int utrace(const void *addr, size_t len); } 489336 OBSOL NOHIDE freebsd4_sendfile 490337 STD BSD { int kldsym(int fileid, int cmd, void *data); } 491338 STD BSD { int jail(struct jail *jail); } 492339 UNIMPL BSD pioctl 493340 STD POSIX { int sigprocmask(int how, const sigset_t *set, \ 494 sigset_t *oset); } 495341 STD POSIX { int sigsuspend(const sigset_t *sigmask); } 496342 STD POSIX { int sigaction(int sig, const struct sigaction *act, \ 497 struct sigaction *oact); } 498343 STD POSIX { int sigpending(sigset_t *set); } 499344 STD BSD { int sigreturn(ucontext_t *sigcntxp); } 500345 STD POSIX { int sigtimedwait(const sigset_t *set,\ 501 siginfo_t *info, const struct timespec *timeout); } 502346 STD POSIX { int sigwaitinfo(const sigset_t *set,\ 503 siginfo_t *info); } 504347 STD BSD { int __acl_get_file(const char *path, \ 505 acl_type_t type, struct acl *aclp); } 506348 STD BSD { int __acl_set_file(const char *path, \ 507 acl_type_t type, struct acl *aclp); } 508349 STD BSD { int __acl_get_fd(int filedes, acl_type_t type, \ 509 struct acl *aclp); } 510350 STD BSD { int __acl_set_fd(int filedes, acl_type_t type, \ 511 struct acl *aclp); } 512351 STD BSD { int __acl_delete_file(const char *path, \ 513 acl_type_t type); } 514352 STD BSD { int __acl_delete_fd(int filedes, acl_type_t type); } 515353 STD BSD { int __acl_aclcheck_file(const char *path, \ 516 acl_type_t type, struct acl *aclp); } 517354 STD BSD { int __acl_aclcheck_fd(int filedes, acl_type_t type, \ 518 struct acl *aclp); } 519355 STD BSD { int extattrctl(const char *path, int cmd, \ 520 const char *filename, int attrnamespace, \ 521 const char *attrname); } 522356 STD BSD { int extattr_set_file(const char *path, \ 523 int attrnamespace, const char *attrname, \ 524 void *data, size_t nbytes); } 525357 STD BSD { int extattr_get_file(const char *path, \ 526 int attrnamespace, const char *attrname, \ 527 void *data, size_t nbytes); } 528358 STD BSD { int extattr_delete_file(const char *path, \ 529 int attrnamespace, const char *attrname); } 530359 STD BSD { int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); } 531360 STD BSD { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); } 532361 STD BSD { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); } 533362 STD BSD { int kqueue(void); } 534363 STD BSD { int kevent(int fd, \ 535 const struct kevent *changelist, int nchanges, \ 536 struct kevent *eventlist, int nevents, \ 537 const struct timespec *timeout); } 538364 STD BSD { int sctp_peeloff(int sd, caddr_t name ); } 539; 365-392 used by FreeBSD-current 540365 UNIMPL NOHIDE nosys 541366 UNIMPL NOHIDE nosys 542367 UNIMPL NOHIDE nosys 543368 UNIMPL NOHIDE nosys 544369 UNIMPL NOHIDE nosys 545370 UNIMPL NOHIDE nosys 546371 UNIMPL NOHIDE nosys 547372 UNIMPL NOHIDE nosys 548373 UNIMPL NOHIDE nosys 549374 UNIMPL NOHIDE nosys 550375 UNIMPL NOHIDE nosys 551376 UNIMPL NOHIDE nosys 552377 UNIMPL NOHIDE nosys 553378 UNIMPL NOHIDE nosys 554379 UNIMPL NOHIDE nosys 555380 UNIMPL NOHIDE nosys 556381 UNIMPL NOHIDE nosys 557382 UNIMPL NOHIDE nosys 558383 UNIMPL NOHIDE nosys 559384 UNIMPL NOHIDE nosys 560385 UNIMPL NOHIDE nosys 561386 UNIMPL NOHIDE nosys 562387 UNIMPL NOHIDE nosys 563388 UNIMPL NOHIDE nosys 564389 UNIMPL NOHIDE nosys 565390 UNIMPL NOHIDE nosys 566391 STD BSD { int lchflags(char *path, int flags); } 567392 STD BSD { int uuidgen(struct uuid *store, int count); } 568393 STD BSD { int sendfile(int fd, int s, off_t offset, size_t nbytes, \ 569 struct sf_hdtr *hdtr, off_t *sbytes, int flags); } 570; 394-439 used by FreeBSD-current 571394 UNIMPL NOHIDE nosys 572395 UNIMPL NOHIDE nosys 573396 UNIMPL NOHIDE nosys 574397 UNIMPL NOHIDE nosys 575398 UNIMPL NOHIDE nosys 576399 UNIMPL NOHIDE nosys 577400 UNIMPL NOHIDE nosys 578401 UNIMPL NOHIDE nosys 579402 UNIMPL NOHIDE nosys 580403 UNIMPL NOHIDE nosys 581404 UNIMPL NOHIDE nosys 582405 UNIMPL NOHIDE nosys 583406 UNIMPL NOHIDE nosys 584407 UNIMPL NOHIDE nosys 585408 UNIMPL NOHIDE nosys 586409 UNIMPL NOHIDE nosys 587410 UNIMPL NOHIDE nosys 588411 UNIMPL NOHIDE nosys 589412 UNIMPL NOHIDE nosys 590413 UNIMPL NOHIDE nosys 591414 UNIMPL NOHIDE nosys 592415 UNIMPL NOHIDE nosys 593416 UNIMPL NOHIDE nosys 594417 UNIMPL NOHIDE nosys 595418 UNIMPL NOHIDE nosys 596419 UNIMPL NOHIDE nosys 597420 UNIMPL NOHIDE nosys 598421 UNIMPL NOHIDE nosys 599422 UNIMPL NOHIDE nosys 600423 UNIMPL NOHIDE nosys 601424 UNIMPL NOHIDE nosys 602425 UNIMPL NOHIDE nosys 603426 UNIMPL NOHIDE nosys 604427 UNIMPL NOHIDE nosys 605428 UNIMPL NOHIDE nosys 606429 UNIMPL NOHIDE nosys 607430 UNIMPL NOHIDE nosys 608431 UNIMPL NOHIDE nosys 609432 UNIMPL NOHIDE nosys 610433 UNIMPL NOHIDE nosys 611434 UNIMPL NOHIDE nosys 612435 UNIMPL NOHIDE nosys 613436 UNIMPL NOHIDE nosys 614437 UNIMPL NOHIDE nosys 615438 UNIMPL NOHIDE nosys 616439 UNIMPL NOHIDE nosys 617; 440-449 reserved for FreeBSD-5.x growth 618440 UNIMPL NOHIDE nosys 619441 UNIMPL NOHIDE nosys 620442 UNIMPL NOHIDE nosys 621443 UNIMPL NOHIDE nosys 622444 UNIMPL NOHIDE nosys 623445 UNIMPL NOHIDE nosys 624446 UNIMPL NOHIDE nosys 625447 UNIMPL NOHIDE nosys 626448 UNIMPL NOHIDE nosys 627449 UNIMPL NOHIDE nosys 628; 450 DragonFly system calls 629450 STD BSD { int varsym_set(int level, const char *name, const char *data); } 630451 STD BSD { int varsym_get(int mask, const char *wild, char *buf, int bufsize); } 631452 STD BSD { int varsym_list(int level, char *buf, int maxsize, int *marker); } 632453 STD BSD { int upc_register(struct upcall *upc, void *ctxfunc, void *func, void *data); } 633454 STD BSD { int upc_control(int cmd, int upcid, void *data); } 634455 STD BSD { int caps_sys_service(const char *name, uid_t uid, gid_t gid, int upcid, int flags); } 635456 STD BSD { int caps_sys_client(const char *name, uid_t uid, gid_t gid, int upcid, int flags); } 636457 STD BSD { int caps_sys_close(int portid); } 637458 STD BSD { off_t caps_sys_put(int portid, void *msg, int msgsize); } 638459 STD BSD { int caps_sys_reply(int portid, void *msg, int msgsize, off_t msgcid); } 639460 STD BSD { int caps_sys_get(int portid, void *msg, int maxsize, struct caps_msgid *msgid, struct caps_cred *ccr); } 640461 STD BSD { int caps_sys_wait(int portid, void *msg, int maxsize, struct caps_msgid *msgid, struct caps_cred *ccr); } 641462 STD BSD { int caps_sys_abort(int portid, off_t msgcid, int flags); } 642463 STD BSD { off_t caps_sys_getgen(int portid); } 643464 STD BSD { int caps_sys_setgen(int portid, off_t gen); } 644465 STD BSD { int exec_sys_register(void *entry); } 645466 STD BSD { int exec_sys_unregister(int id); } 646467 STD BSD { int sys_checkpoint(int type, int fd, pid_t pid, int retval); } 647468 STD BSD { int mountctl(const char *path, int op, int fd, const void *ctl, int ctllen, void *buf, int buflen); } 648469 STD BSD { int umtx_sleep(volatile const int *ptr, int value, int timeout); } 649470 STD BSD { int umtx_wakeup(volatile const int *ptr, int count); } 650471 STD BSD { int jail_attach(int jid); } 651472 STD BSD { int set_tls_area(int which, struct tls_info *info, size_t infosize); } 652473 STD BSD { int get_tls_area(int which, struct tls_info *info, size_t infosize); } 653474 STD BSD { int closefrom(int fd); } 654475 STD POSIX { int stat(const char *path, struct stat *ub); } 655476 STD POSIX { int fstat(int fd, struct stat *sb); } 656477 STD POSIX { int lstat(const char *path, struct stat *ub); } 657478 STD BSD { int fhstat(const struct fhandle *u_fhp, struct stat *sb); } 658479 STD BSD { int getdirentries(int fd, char *buf, u_int count, \ 659 long *basep); } 660480 STD BSD { int getdents(int fd, char *buf, size_t count); } 661481 STD BSD { int usched_set(pid_t pid, int cmd, void *data, \ 662 int bytes); } 663482 STD BSD { int extaccept(int s, int flags, caddr_t name, int *anamelen); } 664483 STD BSD { int extconnect(int s, int flags, caddr_t name, int namelen); } 665484 STD BSD { int syslink(int cmd, struct syslink_info *info, size_t bytes); } 666485 STD BSD { int mcontrol(void *addr, size_t len, int behav, off_t value); } 667486 STD BSD { int vmspace_create(void *id, int type, void *data); } 668487 STD BSD { int vmspace_destroy(void *id); } 669488 STD BSD { int vmspace_ctl(void *id, int cmd, \ 670 struct trapframe *tframe, \ 671 struct vextframe *vframe); } 672489 STD BSD { int vmspace_mmap(void *id, void *addr, size_t len, \ 673 int prot, int flags, int fd, \ 674 off_t offset); } 675490 STD BSD { int vmspace_munmap(void *id, void *addr, \ 676 size_t len); } 677491 STD BSD { int vmspace_mcontrol(void *id, void *addr, \ 678 size_t len, int behav, off_t value); } 679492 STD BSD { ssize_t vmspace_pread(void *id, void *buf, \ 680 size_t nbyte, int flags, off_t offset); } 681493 STD BSD { ssize_t vmspace_pwrite(void *id, const void *buf, \ 682 size_t nbyte, int flags, off_t offset); } 683494 STD BSD { void extexit(int how, int status, void *addr); } 684495 STD BSD { int lwp_create(struct lwp_params *params); } 685496 STD BSD { lwpid_t lwp_gettid(void); } 686497 STD BSD { int lwp_kill(pid_t pid, lwpid_t tid, int signum); } 687498 STD BSD { int lwp_rtprio(int function, pid_t pid, lwpid_t tid, struct rtprio *rtp); } 688499 STD BSD { int pselect(int nd, fd_set *in, fd_set *ou, \ 689 fd_set *ex, const struct timespec *ts, \ 690 const sigset_t *sigmask); } 691500 STD BSD { int statvfs(const char *path, struct statvfs *buf); } 692501 STD BSD { int fstatvfs(int fd, struct statvfs *buf); } 693502 STD BSD { int fhstatvfs(const struct fhandle *u_fhp, struct statvfs *buf); } 694503 STD BSD { int getvfsstat(struct statfs *buf, \ 695 struct statvfs *vbuf, long vbufsize, int flags); } 696504 STD POSIX { int openat(int fd, char *path, int flags, int mode); } 697; XXX should be { int openat(int fd, const char *path, int flags, ...);} 698; but we're not ready for `const' or varargs. 699; XXX man page says `mode_t mode'. 700505 STD POSIX { int fstatat(int fd, char *path, \ 701 struct stat *sb, int flags); } 702506 STD POSIX { int fchmodat(int fd, char *path, int mode, \ 703 int flags); } 704507 STD POSIX { int fchownat(int fd, char *path, int uid, int gid, \ 705 int flags); } 706508 STD POSIX { int unlinkat(int fd, char *path, int flags); } 707509 STD POSIX { int faccessat(int fd, char *path, int amode, \ 708 int flags); } 709 710; POSIX message queues system calls 711510 STD POSIX { mqd_t mq_open(const char * name, int oflag, \ 712 mode_t mode, struct mq_attr *attr); } 713511 STD POSIX { int mq_close(mqd_t mqdes); } 714512 STD POSIX { int mq_unlink(const char *name); } 715513 STD POSIX { int mq_getattr(mqd_t mqdes, \ 716 struct mq_attr *mqstat); } 717514 STD POSIX { int mq_setattr(mqd_t mqdes, \ 718 const struct mq_attr *mqstat, \ 719 struct mq_attr *omqstat); } 720515 STD POSIX { int mq_notify(mqd_t mqdes, \ 721 const struct sigevent *notification); } 722516 STD POSIX { int mq_send(mqd_t mqdes, const char *msg_ptr, \ 723 size_t msg_len, unsigned msg_prio); } 724517 STD POSIX { ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, \ 725 size_t msg_len, unsigned *msg_prio); } 726518 STD POSIX { int mq_timedsend(mqd_t mqdes, \ 727 const char *msg_ptr, size_t msg_len, \ 728 unsigned msg_prio, \ 729 const struct timespec *abs_timeout); } 730519 STD POSIX { ssize_t mq_timedreceive(mqd_t mqdes, \ 731 char *msg_ptr, size_t msg_len, unsigned *msg_prio, \ 732 const struct timespec *abs_timeout); } 733520 STD BSD { int ioprio_set(int which, int who, int prio); } 734521 STD BSD { int ioprio_get(int which, int who); } 735522 STD BSD { int chroot_kernel(char *path); } 736523 STD POSIX { int renameat(int oldfd, char *old, int newfd, \ 737 char *new); } 738524 STD POSIX { int mkdirat(int fd, char *path, mode_t mode); } 739525 STD POSIX { int mkfifoat(int fd, char *path, mode_t mode); } 740526 STD POSIX { int mknodat(int fd, char *path, mode_t mode, \ 741 dev_t dev); } 742527 STD POSIX { int readlinkat(int fd, char *path, char *buf, \ 743 size_t bufsize); } 744528 STD POSIX { int symlinkat(char *path1, int fd, char *path2); } 745529 STD BSD { int swapoff(char *name); } 746530 STD BSD { int vquotactl(const char *path, \ 747 struct plistref *pref); } 748