1 $DragonFly: src/sys/kern/syscalls.master,v 1.60 2008/11/10 22:11:45 pavalos Exp $ 2 3; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 4; $FreeBSD: src/sys/kern/syscalls.master,v 1.72.2.10 2002/07/12 08:22:46 alfred Exp $ 5; 6; System call name/number master file. 7; Processed to created init_sysent.c, syscalls.c and syscall.h. 8 9; Columns: number [MPSAFE] type nargs namespc name alt{name,tag,rtyp}/comments 10; number system call number, must be in order 11; MPSAFE optional field, specifies that syscall does not want the 12; BGL grabbed automatically (it is SMP safe). 13; type one of STD, OBSOL, UNIMPL, COMPAT, CPT_NOA, LIBCOMPAT, 14; NODEF, NOARGS, NOPROTO, NOIMPL 15; namespc one of POSIX, BSD, NOHIDE 16; name psuedo-prototype of syscall routine 17; If one of the following alts is different, then all appear: 18; altname name of system call if different 19; alttag name of args struct tag if different from [o]`name'"_args" 20; altrtyp return type if not int (bogus - syscalls always return int) 21; for UNIMPL/OBSOL, name continues with comments 22 23; types: 24; STD always included 25; COMPAT included on COMPAT #ifdef 26; LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h 27; OBSOL obsolete, not included in system, only specifies name 28; UNIMPL not implemented, placeholder only 29 30; #ifdef's, etc. may be included, and are copied to the output files. 31 32#include <sys/param.h> 33#include <sys/sysent.h> 34#include <sys/sysproto.h> 35#include <sys/statvfs.h> 36 37#ifdef COMPAT_43 38#include <emulation/43bsd/stat.h> 39#endif 40 41#include <emulation/dragonfly12/stat.h> 42 43; Reserved/unimplemented system calls in the range 0-150 inclusive 44; are reserved for use in future Berkeley releases. 45; Additional system calls implemented in vendor and other 46; redistributions should be placed in the reserved range at the end 47; of the current calls. 48 490 STD NOHIDE { int nosys(void); } syscall nosys_args int 501 STD NOHIDE { void exit(int rval); } 512 STD POSIX { int fork(void); } 523 MPSAFE STD POSIX { ssize_t read(int fd, void *buf, size_t nbyte); } 534 MPSAFE STD POSIX { ssize_t write(int fd, const void *buf, size_t nbyte); } 545 STD POSIX { int open(char *path, int flags, int mode); } 55; XXX should be { int open(const char *path, int flags, ...); } 56; but we're not ready for `const' or varargs. 57; XXX man page says `mode_t mode'. 586 MPSAFE STD POSIX { int close(int fd); } 597 STD BSD { int wait4(int pid, int *status, int options, \ 60 struct rusage *rusage); } wait4 wait_args int 618 COMPAT BSD { int creat(char *path, int mode); } 629 STD POSIX { int link(char *path, char *link); } 6310 STD POSIX { int unlink(char *path); } 6411 OBSOL NOHIDE execv 6512 STD POSIX { int chdir(char *path); } 6613 STD BSD { int fchdir(int fd); } 6714 STD POSIX { int mknod(char *path, int mode, int dev); } 6815 STD POSIX { int chmod(char *path, int mode); } 6916 STD POSIX { int chown(char *path, int uid, int gid); } 7017 STD BSD { int obreak(char *nsize); } break obreak_args int 7118 STD BSD { int getfsstat(struct statfs *buf, long bufsize, \ 72 int flags); } 7319 COMPAT POSIX { long lseek(int fd, long offset, int whence); } 7420 STD POSIX { pid_t getpid(void); } 7521 STD BSD { int mount(char *type, char *path, int flags, \ 76 caddr_t data); } 77; XXX `path' should have type `const char *' but we're not ready for that. 7822 STD BSD { int unmount(char *path, int flags); } 7923 STD POSIX { int setuid(uid_t uid); } 8024 MPSAFE STD POSIX { uid_t getuid(void); } 8125 MPSAFE STD POSIX { uid_t geteuid(void); } 8226 STD BSD { int ptrace(int req, pid_t pid, caddr_t addr, \ 83 int data); } 8427 STD BSD { int recvmsg(int s, struct msghdr *msg, int flags); } 8528 STD BSD { int sendmsg(int s, caddr_t msg, int flags); } 8629 STD BSD { int recvfrom(int s, caddr_t buf, size_t len, \ 87 int flags, caddr_t from, int *fromlenaddr); } 8830 STD BSD { int accept(int s, caddr_t name, int *anamelen); } 8931 STD BSD { int getpeername(int fdes, caddr_t asa, int *alen); } 9032 STD BSD { int getsockname(int fdes, caddr_t asa, int *alen); } 9133 STD POSIX { int access(char *path, int flags); } 9234 STD BSD { int chflags(char *path, int flags); } 9335 STD BSD { int fchflags(int fd, int flags); } 9436 STD BSD { int sync(void); } 9537 STD POSIX { int kill(int pid, int signum); } 9638 COMPAT POSIX { int stat(char *path, struct ostat *ub); } 9739 STD POSIX { pid_t getppid(void); } 9840 COMPAT POSIX { int lstat(char *path, struct ostat *ub); } 9941 MPSAFE STD POSIX { int dup(u_int fd); } 10042 STD POSIX { int pipe(void); } 10143 STD POSIX { gid_t getegid(void); } 10244 STD BSD { int profil(caddr_t samples, size_t size, \ 103 size_t offset, u_int scale); } 10445 STD BSD { int ktrace(const char *fname, int ops, int facs, \ 105 int pid); } 10646 OBSOL NOHIDE freebsd3_sigaction 10747 MPSAFE STD POSIX { gid_t getgid(void); } 10848 OBSOL NOHIDE freebsd3_sigprocmask 109; XXX note nonstandard (bogus) calling convention - the libc stub passes 110; us the mask, not a pointer to it, and we return the old mask as the 111; (int) return value. 11249 STD BSD { int getlogin(char *namebuf, u_int namelen); } 11350 STD BSD { int setlogin(char *namebuf); } 11451 STD BSD { int acct(char *path); } 11552 OBSOL NOHIDE freebsd3_sigpending 11653 STD BSD { int sigaltstack(stack_t *ss, stack_t *oss); } 11754 STD POSIX { int ioctl(int fd, u_long com, caddr_t data); } 11855 STD BSD { int reboot(int opt); } 11956 STD POSIX { int revoke(char *path); } 12057 STD POSIX { int symlink(char *path, char *link); } 12158 STD POSIX { int readlink(char *path, char *buf, int count); } 12259 STD POSIX { int execve(char *fname, char **argv, char **envv); } 12360 MPSAFE STD POSIX { int umask(int newmask); } umask umask_args int 12461 STD BSD { int chroot(char *path); } 12562 COMPAT POSIX { int fstat(int fd, struct ostat *sb); } 12663 COMPAT BSD { int getkerninfo(int op, char *where, size_t *size, \ 127 int arg); } getkerninfo getkerninfo_args int 12864 COMPAT BSD { int getpagesize(void); } \ 129 getpagesize getpagesize_args int 13065 STD BSD { int msync(void *addr, size_t len, int flags); } 13166 STD BSD { int vfork(void); } 13267 OBSOL NOHIDE vread 13368 OBSOL NOHIDE vwrite 13469 STD BSD { int sbrk(int incr); } 13570 STD BSD { int sstk(int incr); } 13671 COMPAT BSD { int mmap(void *addr, int len, int prot, \ 137 int flags, int fd, long pos); } 13872 STD BSD { int ovadvise(int anom); } vadvise ovadvise_args int 13973 STD BSD { int munmap(void *addr, size_t len); } 14074 STD BSD { int mprotect(const void *addr, size_t len, int prot); } 14175 STD BSD { int madvise(void *addr, size_t len, int behav); } 14276 OBSOL NOHIDE vhangup 14377 OBSOL NOHIDE vlimit 14478 STD BSD { int mincore(const void *addr, size_t len, \ 145 char *vec); } 14679 STD POSIX { int getgroups(u_int gidsetsize, gid_t *gidset); } 14780 STD POSIX { int setgroups(u_int gidsetsize, gid_t *gidset); } 14881 MPSAFE STD POSIX { int getpgrp(void); } 14982 STD POSIX { int setpgid(int pid, int pgid); } 15083 STD BSD { int setitimer(u_int which, struct itimerval *itv, \ 151 struct itimerval *oitv); } 15284 COMPAT BSD { int wait(void); } 15385 STD BSD { int swapon(char *name); } 15486 STD BSD { int getitimer(u_int which, struct itimerval *itv); } 15587 COMPAT BSD { int gethostname(char *hostname, u_int len); } \ 156 gethostname gethostname_args int 15788 COMPAT BSD { int sethostname(char *hostname, u_int len); } \ 158 sethostname sethostname_args int 15989 MPSAFE STD BSD { int getdtablesize(void); } 16090 MPSAFE STD POSIX { int dup2(u_int from, u_int to); } 16191 UNIMPL BSD getdopt 16292 MPSAFE STD POSIX { int fcntl(int fd, int cmd, long arg); } 163; XXX should be { int fcntl(int fd, int cmd, ...); } 164; but we're not ready for varargs. 165; XXX man page says `int arg' too. 16693 STD BSD { int select(int nd, fd_set *in, fd_set *ou, \ 167 fd_set *ex, struct timeval *tv); } 16894 UNIMPL BSD setdopt 16995 STD POSIX { int fsync(int fd); } 17096 STD BSD { int setpriority(int which, int who, int prio); } 17197 STD BSD { int socket(int domain, int type, int protocol); } 17298 STD BSD { int connect(int s, caddr_t name, int namelen); } 17399 CPT_NOA BSD { int accept(int s, caddr_t name, int *anamelen); } \ 174 accept accept_args int 175100 STD BSD { int getpriority(int which, int who); } 176101 COMPAT BSD { int send(int s, caddr_t buf, int len, int flags); } 177102 COMPAT BSD { int recv(int s, caddr_t buf, int len, int flags); } 178103 OBSOL NOHIDE freebsd3_sigreturn 179104 STD BSD { int bind(int s, caddr_t name, int namelen); } 180105 STD BSD { int setsockopt(int s, int level, int name, \ 181 caddr_t val, int valsize); } 182106 STD BSD { int listen(int s, int backlog); } 183107 OBSOL NOHIDE vtimes 184108 COMPAT BSD { int sigvec(int signum, struct sigvec *nsv, \ 185 struct sigvec *osv); } 186109 COMPAT BSD { int sigblock(int mask); } 187110 COMPAT BSD { int sigsetmask(int mask); } 188111 OBSOL NOHIDE freebsd3_sigsuspend 189; XXX note nonstandard (bogus) calling convention - the libc stub passes 190; us the mask, not a pointer to it. 191112 COMPAT BSD { int sigstack(struct sigstack *nss, \ 192 struct sigstack *oss); } 193113 COMPAT BSD { int recvmsg(int s, struct omsghdr *msg, int flags); } 194114 COMPAT BSD { int sendmsg(int s, caddr_t msg, int flags); } 195115 OBSOL NOHIDE vtrace 196116 MPSAFE STD BSD { int gettimeofday(struct timeval *tp, \ 197 struct timezone *tzp); } 198117 STD BSD { int getrusage(int who, struct rusage *rusage); } 199118 STD BSD { int getsockopt(int s, int level, int name, \ 200 caddr_t val, int *avalsize); } 201119 UNIMPL NOHIDE resuba (BSD/OS 2.x) 202120 MPSAFE STD BSD { int readv(int fd, struct iovec *iovp, u_int iovcnt); } 203121 MPSAFE STD BSD { int writev(int fd, struct iovec *iovp, \ 204 u_int iovcnt); } 205122 STD BSD { int settimeofday(struct timeval *tv, \ 206 struct timezone *tzp); } 207123 STD BSD { int fchown(int fd, int uid, int gid); } 208124 STD BSD { int fchmod(int fd, int mode); } 209125 CPT_NOA BSD { int recvfrom(int s, caddr_t buf, size_t len, \ 210 int flags, caddr_t from, int *fromlenaddr); } \ 211 recvfrom recvfrom_args int 212126 STD BSD { int setreuid(int ruid, int euid); } 213127 STD BSD { int setregid(int rgid, int egid); } 214128 STD POSIX { int rename(char *from, char *to); } 215129 COMPAT BSD { int truncate(char *path, long length); } 216130 COMPAT BSD { int ftruncate(int fd, long length); } 217131 STD BSD { int flock(int fd, int how); } 218132 STD POSIX { int mkfifo(char *path, int mode); } 219133 STD BSD { int sendto(int s, caddr_t buf, size_t len, \ 220 int flags, caddr_t to, int tolen); } 221134 STD BSD { int shutdown(int s, int how); } 222135 STD BSD { int socketpair(int domain, int type, int protocol, \ 223 int *rsv); } 224136 STD POSIX { int mkdir(char *path, int mode); } 225137 STD POSIX { int rmdir(char *path); } 226138 STD BSD { int utimes(char *path, struct timeval *tptr); } 227139 OBSOL NOHIDE 4.2 sigreturn 228140 STD BSD { int adjtime(struct timeval *delta, \ 229 struct timeval *olddelta); } 230141 COMPAT BSD { int getpeername(int fdes, caddr_t asa, int *alen); } 231142 COMPAT BSD { long gethostid(void); } 232143 COMPAT BSD { int sethostid(long hostid); } 233144 MPSAFE COMPAT BSD { int getrlimit(u_int which, struct orlimit *rlp); } 234145 MPSAFE COMPAT BSD { int setrlimit(u_int which, struct orlimit *rlp); } 235146 COMPAT BSD { int killpg(int pgid, int signum); } 236147 STD POSIX { int setsid(void); } 237148 STD BSD { int quotactl(char *path, int cmd, int uid, \ 238 caddr_t arg); } 239149 COMPAT BSD { int quota(void); } 240150 CPT_NOA BSD { int getsockname(int fdec, caddr_t asa, int *alen); }\ 241 getsockname getsockname_args int 242 243; Syscalls 151-180 inclusive are reserved for vendor-specific 244; system calls. (This includes various calls added for compatibity 245; with other Unix variants.) 246; Some of these calls are now supported by BSD... 247151 UNIMPL NOHIDE sem_lock (BSD/OS 2.x) 248152 UNIMPL NOHIDE sem_wakeup (BSD/OS 2.x) 249153 UNIMPL NOHIDE asyncdaemon (BSD/OS 2.x) 250154 UNIMPL NOHIDE nosys 251; 155 is initialized by the NFS code, if present. 252155 NOIMPL BSD { int nfssvc(int flag, caddr_t argp); } 253156 COMPAT BSD { int getdirentries(int fd, char *buf, u_int count, \ 254 long *basep); } 255157 STD BSD { int statfs(char *path, struct statfs *buf); } 256158 STD BSD { int fstatfs(int fd, struct statfs *buf); } 257159 UNIMPL NOHIDE nosys 258160 UNIMPL NOHIDE nosys 259; 161 is initialized by the NFS code, if present. 260161 STD BSD { int getfh(char *fname, struct fhandle *fhp); } 261162 STD BSD { int getdomainname(char *domainname, int len); } 262163 STD BSD { int setdomainname(char *domainname, int len); } 263164 STD BSD { int uname(struct utsname *name); } 264165 STD BSD { int sysarch(int op, char *parms); } 265166 STD BSD { int rtprio(int function, pid_t pid, \ 266 struct rtprio *rtp); } 267167 UNIMPL NOHIDE nosys 268168 UNIMPL NOHIDE nosys 269169 STD BSD { int semsys(int which, int a2, int a3, int a4, \ 270 int a5); } 271; XXX should be { int semsys(int which, ...); } 272170 STD BSD { int msgsys(int which, int a2, int a3, int a4, \ 273 int a5, int a6); } 274; XXX should be { int msgsys(int which, ...); } 275171 STD BSD { int shmsys(int which, int a2, int a3, int a4); } 276; XXX should be { int shmsys(int which, ...); } 277172 UNIMPL NOHIDE nosys 278173 MPSAFE STD POSIX { ssize_t extpread(int fd, void *buf, \ 279 size_t nbyte, int flags, off_t offset); } 280174 MPSAFE STD POSIX { ssize_t extpwrite(int fd, const void *buf, \ 281 size_t nbyte, int flags, off_t offset); } 282175 UNIMPL NOHIDE nosys 283176 STD BSD { int ntp_adjtime(struct timex *tp); } 284177 UNIMPL NOHIDE sfork (BSD/OS 2.x) 285178 UNIMPL NOHIDE getdescriptor (BSD/OS 2.x) 286179 UNIMPL NOHIDE setdescriptor (BSD/OS 2.x) 287180 UNIMPL NOHIDE nosys 288 289; Syscalls 181-199 are used by/reserved for BSD 290181 STD POSIX { int setgid(gid_t gid); } 291182 STD BSD { int setegid(gid_t egid); } 292183 STD BSD { int seteuid(uid_t euid); } 293184 UNIMPL BSD lfs_bmapv 294185 UNIMPL BSD lfs_markv 295186 UNIMPL BSD lfs_segclean 296187 UNIMPL BSD lfs_segwait 297188 COMPAT_DF12 POSIX { int stat(const char *path, struct dfbsd12_stat *ub); } 298189 COMPAT_DF12 POSIX { int fstat(int fd, struct dfbsd12_stat *sb); } 299190 COMPAT_DF12 POSIX { int lstat(const char *path, struct dfbsd12_stat *ub); } 300191 STD POSIX { int pathconf(char *path, int name); } 301192 STD POSIX { int fpathconf(int fd, int name); } 302193 UNIMPL NOHIDE nosys 303194 STD BSD { int getrlimit(u_int which, \ 304 struct rlimit *rlp); } \ 305 getrlimit __getrlimit_args int 306195 STD BSD { int setrlimit(u_int which, \ 307 struct rlimit *rlp); } \ 308 setrlimit __setrlimit_args int 309196 COMPAT_DF12 BSD { int getdirentries(int fd, char *buf, \ 310 u_int count, long *basep); } 311197 STD BSD { caddr_t mmap(caddr_t addr, size_t len, int prot, \ 312 int flags, int fd, int pad, off_t pos); } 313198 STD NOHIDE { int nosys(void); } __syscall __syscall_args int 314199 STD POSIX { off_t lseek(int fd, int pad, off_t offset, \ 315 int whence); } 316200 STD BSD { int truncate(char *path, int pad, off_t length); } 317201 STD BSD { int ftruncate(int fd, int pad, off_t length); } 318202 STD BSD { int __sysctl(int *name, u_int namelen, void *old, \ 319 size_t *oldlenp, void *new, size_t newlen); } \ 320 __sysctl sysctl_args int 321; properly, __sysctl should be a NOHIDE, but making an exception 322; here allows to avoid one in libc/sys/Makefile.inc. 323203 STD BSD { int mlock(const void *addr, size_t len); } 324204 STD BSD { int munlock(const void *addr, size_t len); } 325205 STD BSD { int undelete(char *path); } 326206 STD BSD { int futimes(int fd, struct timeval *tptr); } 327207 STD BSD { int getpgid(pid_t pid); } 328208 UNIMPL NOHIDE newreboot (NetBSD) 329209 STD BSD { int poll(struct pollfd *fds, u_int nfds, \ 330 int timeout); } 331 332; 333; The following are reserved for loadable syscalls 334; 335; 210 is used by the Checkpoint Module 336210 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 337211 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 338212 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 339213 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 340214 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 341215 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 342216 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 343217 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 344218 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 345219 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 346 347; 348; The following were introduced with NetBSD/4.4Lite-2 349; 350220 STD BSD { int __semctl(int semid, int semnum, int cmd, \ 351 union semun *arg); } 352221 STD BSD { int semget(key_t key, int nsems, int semflg); } 353222 STD BSD { int semop(int semid, struct sembuf *sops, \ 354 u_int nsops); } 355223 UNIMPL NOHIDE semconfig 356224 STD BSD { int msgctl(int msqid, int cmd, \ 357 struct msqid_ds *buf); } 358225 STD BSD { int msgget(key_t key, int msgflg); } 359226 STD BSD { int msgsnd(int msqid, void *msgp, size_t msgsz, \ 360 int msgflg); } 361227 STD BSD { int msgrcv(int msqid, void *msgp, size_t msgsz, \ 362 long msgtyp, int msgflg); } 363228 STD BSD { int shmat(int shmid, void *shmaddr, int shmflg); } 364229 STD BSD { int shmctl(int shmid, int cmd, \ 365 struct shmid_ds *buf); } 366230 STD BSD { int shmdt(void *shmaddr); } 367231 STD BSD { int shmget(key_t key, int size, int shmflg); } 368; 369232 STD POSIX { int clock_gettime(clockid_t clock_id, \ 370 struct timespec *tp); } 371233 STD POSIX { int clock_settime(clockid_t clock_id, \ 372 const struct timespec *tp); } 373234 STD POSIX { int clock_getres(clockid_t clock_id, \ 374 struct timespec *tp); } 375235 UNIMPL NOHIDE timer_create 376236 UNIMPL NOHIDE timer_delete 377237 UNIMPL NOHIDE timer_settime 378238 UNIMPL NOHIDE timer_gettime 379239 UNIMPL NOHIDE timer_getoverrun 380240 STD POSIX { int nanosleep(const struct timespec *rqtp, \ 381 struct timespec *rmtp); } 382241 UNIMPL NOHIDE nosys 383242 UNIMPL NOHIDE nosys 384243 UNIMPL NOHIDE nosys 385244 UNIMPL NOHIDE nosys 386245 UNIMPL NOHIDE nosys 387246 UNIMPL NOHIDE nosys 388247 UNIMPL NOHIDE nosys 389248 UNIMPL NOHIDE nosys 390249 UNIMPL NOHIDE nosys 391; syscall numbers initially used in OpenBSD 392250 STD BSD { int minherit(void *addr, size_t len, int inherit); } 393251 STD BSD { int rfork(int flags); } 394252 STD BSD { int openbsd_poll(struct pollfd *fds, u_int nfds, \ 395 int timeout); } 396253 STD BSD { int issetugid(void); } 397254 STD BSD { int lchown(char *path, int uid, int gid); } 398255 UNIMPL NOHIDE nosys 399256 UNIMPL NOHIDE nosys 400257 UNIMPL NOHIDE nosys 401258 UNIMPL NOHIDE nosys 402259 UNIMPL NOHIDE nosys 403260 UNIMPL NOHIDE nosys 404261 UNIMPL NOHIDE nosys 405262 UNIMPL NOHIDE nosys 406263 UNIMPL NOHIDE nosys 407264 UNIMPL NOHIDE nosys 408265 UNIMPL NOHIDE nosys 409266 UNIMPL NOHIDE nosys 410267 UNIMPL NOHIDE nosys 411268 UNIMPL NOHIDE nosys 412269 UNIMPL NOHIDE nosys 413270 UNIMPL NOHIDE nosys 414271 UNIMPL NOHIDE nosys 415272 COMPAT_DF12 BSD { int getdents(int fd, char *buf, size_t count); } 416273 UNIMPL NOHIDE nosys 417274 STD BSD { int lchmod(char *path, mode_t mode); } 418275 NOPROTO BSD { int lchown(char *path, uid_t uid, gid_t gid); } netbsd_lchown lchown_args int 419276 STD BSD { int lutimes(char *path, struct timeval *tptr); } 420277 NOPROTO BSD { int msync(void *addr, size_t len, int flags); } netbsd_msync msync_args int 421278 OBSOL BSD { int nstat(char *path, struct nstat *ub); } 422279 OBSOL NOHIDE { int nfstat(int fd, struct nstat *sb); } 423280 OBSOL NOHIDE { int nlstat(char *path, struct nstat *ub); } 424281 UNIMPL NOHIDE nosys 425282 UNIMPL NOHIDE nosys 426283 UNIMPL NOHIDE nosys 427284 UNIMPL NOHIDE nosys 428285 UNIMPL NOHIDE nosys 429286 UNIMPL NOHIDE nosys 430287 UNIMPL NOHIDE nosys 431288 UNIMPL NOHIDE nosys 432; 289 and 290 from NetBSD (OpenBSD: 267 and 268) 433289 MPSAFE STD BSD { ssize_t extpreadv(int fd, struct iovec *iovp, \ 434 u_int iovcnt, int flags, off_t offset); } 435290 MPSAFE STD BSD { ssize_t extpwritev(int fd, struct iovec *iovp,\ 436 u_int iovcnt, int flags, off_t offset); } 437291 UNIMPL NOHIDE nosys 438292 UNIMPL NOHIDE nosys 439293 UNIMPL NOHIDE nosys 440294 UNIMPL NOHIDE nosys 441295 UNIMPL NOHIDE nosys 442296 UNIMPL NOHIDE nosys 443; XXX 297 is 300 in NetBSD 444297 STD BSD { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); } 445298 STD BSD { int fhopen(const struct fhandle *u_fhp, int flags); } 446299 COMPAT_DF12 POSIX { int fhstat(const struct fhandle *u_fhp, struct dfbsd12_stat *sb); } 447; syscall numbers for FreeBSD 448300 STD BSD { int modnext(int modid); } 449301 STD BSD { int modstat(int modid, struct module_stat* stat); } 450302 STD BSD { int modfnext(int modid); } 451303 STD BSD { int modfind(const char *name); } 452304 STD BSD { int kldload(const char *file); } 453305 STD BSD { int kldunload(int fileid); } 454306 STD BSD { int kldfind(const char *file); } 455307 STD BSD { int kldnext(int fileid); } 456308 STD BSD { int kldstat(int fileid, struct kld_file_stat* stat); } 457309 STD BSD { int kldfirstmod(int fileid); } 458310 STD BSD { int getsid(pid_t pid); } 459311 STD BSD { int setresuid(uid_t ruid, uid_t euid, uid_t suid); } 460312 STD BSD { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); } 461313 OBSOL NOHIDE signanosleep 462314 STD BSD { int aio_return(struct aiocb *aiocbp); } 463315 STD BSD { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); } 464316 STD BSD { int aio_cancel(int fd, struct aiocb *aiocbp); } 465317 STD BSD { int aio_error(struct aiocb *aiocbp); } 466318 STD BSD { int aio_read(struct aiocb *aiocbp); } 467319 STD BSD { int aio_write(struct aiocb *aiocbp); } 468320 STD BSD { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); } 469321 STD BSD { int yield(void); } 470322 STD BSD { int thr_sleep(const struct timespec *timeout); } 471323 STD BSD { int thr_wakeup(pid_t pid); } 472324 STD BSD { int mlockall(int how); } 473325 STD BSD { int munlockall(void); } 474326 STD BSD { int __getcwd(u_char *buf, u_int buflen); } 475 476327 STD POSIX { int sched_setparam (pid_t pid, const struct sched_param *param); } 477328 STD POSIX { int sched_getparam (pid_t pid, struct sched_param *param); } 478 479329 STD POSIX { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); } 480330 STD POSIX { int sched_getscheduler (pid_t pid); } 481 482331 STD POSIX { int sched_yield (void); } 483332 STD POSIX { int sched_get_priority_max (int policy); } 484333 STD POSIX { int sched_get_priority_min (int policy); } 485334 STD POSIX { int sched_rr_get_interval (pid_t pid, struct timespec *interval); } 486335 STD BSD { int utrace(const void *addr, size_t len); } 487336 OBSOL NOHIDE freebsd4_sendfile 488337 STD BSD { int kldsym(int fileid, int cmd, void *data); } 489338 STD BSD { int jail(struct jail *jail); } 490339 UNIMPL BSD pioctl 491340 MPSAFE STD POSIX { int sigprocmask(int how, const sigset_t *set, \ 492 sigset_t *oset); } 493341 STD POSIX { int sigsuspend(const sigset_t *sigmask); } 494342 STD POSIX { int sigaction(int sig, const struct sigaction *act, \ 495 struct sigaction *oact); } 496343 STD POSIX { int sigpending(sigset_t *set); } 497344 STD BSD { int sigreturn(ucontext_t *sigcntxp); } 498345 STD POSIX { int sigtimedwait(const sigset_t *set,\ 499 siginfo_t *info, const struct timespec *timeout); } 500346 STD POSIX { int sigwaitinfo(const sigset_t *set,\ 501 siginfo_t *info); } 502347 STD BSD { int __acl_get_file(const char *path, \ 503 acl_type_t type, struct acl *aclp); } 504348 STD BSD { int __acl_set_file(const char *path, \ 505 acl_type_t type, struct acl *aclp); } 506349 STD BSD { int __acl_get_fd(int filedes, acl_type_t type, \ 507 struct acl *aclp); } 508350 STD BSD { int __acl_set_fd(int filedes, acl_type_t type, \ 509 struct acl *aclp); } 510351 STD BSD { int __acl_delete_file(const char *path, \ 511 acl_type_t type); } 512352 STD BSD { int __acl_delete_fd(int filedes, acl_type_t type); } 513353 STD BSD { int __acl_aclcheck_file(const char *path, \ 514 acl_type_t type, struct acl *aclp); } 515354 STD BSD { int __acl_aclcheck_fd(int filedes, acl_type_t type, \ 516 struct acl *aclp); } 517355 STD BSD { int extattrctl(const char *path, int cmd, \ 518 const char *attrname, char *arg); } 519356 STD BSD { int extattr_set_file(const char *path, \ 520 const char *attrname, struct iovec *iovp, \ 521 unsigned iovcnt); } 522357 STD BSD { int extattr_get_file(const char *path, \ 523 const char *attrname, struct iovec *iovp, \ 524 unsigned iovcnt); } 525358 STD BSD { int extattr_delete_file(const char *path, \ 526 const char *attrname); } 527359 STD BSD { int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); } 528360 STD BSD { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); } 529361 STD BSD { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); } 530362 STD BSD { int kqueue(void); } 531363 STD BSD { int kevent(int fd, \ 532 const struct kevent *changelist, int nchanges, \ 533 struct kevent *eventlist, int nevents, \ 534 const struct timespec *timeout); } 535364 STD BSD { int sctp_peeloff(int sd, caddr_t name ); } 536; 365-392 used by FreeBSD-current 537365 UNIMPL NOHIDE nosys 538366 UNIMPL NOHIDE nosys 539367 UNIMPL NOHIDE nosys 540368 UNIMPL NOHIDE nosys 541369 UNIMPL NOHIDE nosys 542370 UNIMPL NOHIDE nosys 543371 UNIMPL NOHIDE nosys 544372 UNIMPL NOHIDE nosys 545373 UNIMPL NOHIDE nosys 546374 UNIMPL NOHIDE nosys 547375 UNIMPL NOHIDE nosys 548376 UNIMPL NOHIDE nosys 549377 UNIMPL NOHIDE nosys 550378 UNIMPL NOHIDE nosys 551379 UNIMPL NOHIDE nosys 552380 UNIMPL NOHIDE nosys 553381 UNIMPL NOHIDE nosys 554382 UNIMPL NOHIDE nosys 555383 UNIMPL NOHIDE nosys 556384 UNIMPL NOHIDE nosys 557385 UNIMPL NOHIDE nosys 558386 UNIMPL NOHIDE nosys 559387 UNIMPL NOHIDE nosys 560388 UNIMPL NOHIDE nosys 561389 UNIMPL NOHIDE nosys 562390 UNIMPL NOHIDE nosys 563391 STD BSD { int lchflags(char *path, int flags); } 564392 STD BSD { int uuidgen(struct uuid *store, int count); } 565393 STD BSD { int sendfile(int fd, int s, off_t offset, size_t nbytes, \ 566 struct sf_hdtr *hdtr, off_t *sbytes, int flags); } 567; 394-439 used by FreeBSD-current 568394 UNIMPL NOHIDE nosys 569395 UNIMPL NOHIDE nosys 570396 UNIMPL NOHIDE nosys 571397 UNIMPL NOHIDE nosys 572398 UNIMPL NOHIDE nosys 573399 UNIMPL NOHIDE nosys 574400 UNIMPL NOHIDE nosys 575401 UNIMPL NOHIDE nosys 576402 UNIMPL NOHIDE nosys 577403 UNIMPL NOHIDE nosys 578404 UNIMPL NOHIDE nosys 579405 UNIMPL NOHIDE nosys 580406 UNIMPL NOHIDE nosys 581407 UNIMPL NOHIDE nosys 582408 UNIMPL NOHIDE nosys 583409 UNIMPL NOHIDE nosys 584410 UNIMPL NOHIDE nosys 585411 UNIMPL NOHIDE nosys 586412 UNIMPL NOHIDE nosys 587413 UNIMPL NOHIDE nosys 588414 UNIMPL NOHIDE nosys 589415 UNIMPL NOHIDE nosys 590416 UNIMPL NOHIDE nosys 591417 UNIMPL NOHIDE nosys 592418 UNIMPL NOHIDE nosys 593419 UNIMPL NOHIDE nosys 594420 UNIMPL NOHIDE nosys 595421 UNIMPL NOHIDE nosys 596422 UNIMPL NOHIDE nosys 597423 UNIMPL NOHIDE nosys 598424 UNIMPL NOHIDE nosys 599425 UNIMPL NOHIDE nosys 600426 UNIMPL NOHIDE nosys 601427 UNIMPL NOHIDE nosys 602428 UNIMPL NOHIDE nosys 603429 UNIMPL NOHIDE nosys 604430 UNIMPL NOHIDE nosys 605431 UNIMPL NOHIDE nosys 606432 UNIMPL NOHIDE nosys 607433 UNIMPL NOHIDE nosys 608434 UNIMPL NOHIDE nosys 609435 UNIMPL NOHIDE nosys 610436 UNIMPL NOHIDE nosys 611437 UNIMPL NOHIDE nosys 612438 UNIMPL NOHIDE nosys 613439 UNIMPL NOHIDE nosys 614; 440-449 reserved for FreeBSD-5.x growth 615440 UNIMPL NOHIDE nosys 616441 UNIMPL NOHIDE nosys 617442 UNIMPL NOHIDE nosys 618443 UNIMPL NOHIDE nosys 619444 UNIMPL NOHIDE nosys 620445 UNIMPL NOHIDE nosys 621446 UNIMPL NOHIDE nosys 622447 UNIMPL NOHIDE nosys 623448 UNIMPL NOHIDE nosys 624449 UNIMPL NOHIDE nosys 625; 450 DragonFly system calls 626450 STD BSD { int varsym_set(int level, const char *name, const char *data); } 627451 STD BSD { int varsym_get(int mask, const char *wild, char *buf, int bufsize); } 628452 STD BSD { int varsym_list(int level, char *buf, int maxsize, int *marker); } 629453 STD BSD { int upc_register(struct upcall *upc, void *ctxfunc, void *func, void *data); } 630454 STD BSD { int upc_control(int cmd, int upcid, void *data); } 631455 STD BSD { int caps_sys_service(const char *name, uid_t uid, gid_t gid, int upcid, int flags); } 632456 STD BSD { int caps_sys_client(const char *name, uid_t uid, gid_t gid, int upcid, int flags); } 633457 STD BSD { int caps_sys_close(int portid); } 634458 STD BSD { off_t caps_sys_put(int portid, void *msg, int msgsize); } 635459 STD BSD { int caps_sys_reply(int portid, void *msg, int msgsize, off_t msgcid); } 636460 STD BSD { int caps_sys_get(int portid, void *msg, int maxsize, struct caps_msgid *msgid, struct caps_cred *ccr); } 637461 STD BSD { int caps_sys_wait(int portid, void *msg, int maxsize, struct caps_msgid *msgid, struct caps_cred *ccr); } 638462 STD BSD { int caps_sys_abort(int portid, off_t msgcid, int flags); } 639463 STD BSD { off_t caps_sys_getgen(int portid); } 640464 STD BSD { int caps_sys_setgen(int portid, off_t gen); } 641465 STD BSD { int exec_sys_register(void *entry); } 642466 STD BSD { int exec_sys_unregister(int id); } 643467 STD BSD { int sys_checkpoint(int type, int fd, pid_t pid, int retval); } 644468 STD BSD { int mountctl(const char *path, int op, int fd, const void *ctl, int ctllen, void *buf, int buflen); } 645469 STD BSD { int umtx_sleep(volatile const int *ptr, int value, int timeout); } 646470 STD BSD { int umtx_wakeup(volatile const int *ptr, int count); } 647471 STD BSD { int jail_attach(int jid); } 648472 STD BSD { int set_tls_area(int which, struct tls_info *info, size_t infosize); } 649473 STD BSD { int get_tls_area(int which, struct tls_info *info, size_t infosize); } 650474 MPSAFE STD BSD { int closefrom(int fd); } 651475 STD POSIX { int stat(const char *path, struct stat *ub); } 652476 STD POSIX { int fstat(int fd, struct stat *sb); } 653477 STD POSIX { int lstat(const char *path, struct stat *ub); } 654478 STD BSD { int fhstat(const struct fhandle *u_fhp, struct stat *sb); } 655479 STD BSD { int getdirentries(int fd, char *buf, u_int count, \ 656 long *basep); } 657480 STD BSD { int getdents(int fd, char *buf, size_t count); } 658481 STD BSD { int usched_set(pid_t pid, int cmd, void *data, \ 659 int bytes); } 660482 STD BSD { int extaccept(int s, int flags, caddr_t name, int *anamelen); } 661483 STD BSD { int extconnect(int s, int flags, caddr_t name, int namelen); } 662484 STD BSD { int syslink(int cmd, struct syslink_info *info, size_t bytes); } 663485 STD BSD { int mcontrol(void *addr, size_t len, int behav, off_t value); } 664486 STD BSD { int vmspace_create(void *id, int type, void *data); } 665487 STD BSD { int vmspace_destroy(void *id); } 666488 STD BSD { int vmspace_ctl(void *id, int cmd, \ 667 struct trapframe *tframe, \ 668 struct vextframe *vframe); } 669489 STD BSD { int vmspace_mmap(void *id, void *addr, size_t len, \ 670 int prot, int flags, int fd, \ 671 off_t offset); } 672490 STD BSD { int vmspace_munmap(void *id, void *addr, \ 673 size_t len); } 674491 STD BSD { int vmspace_mcontrol(void *id, void *addr, \ 675 size_t len, int behav, off_t value); } 676492 STD BSD { ssize_t vmspace_pread(void *id, void *buf, \ 677 size_t nbyte, int flags, off_t offset); } 678493 STD BSD { ssize_t vmspace_pwrite(void *id, const void *buf, \ 679 size_t nbyte, int flags, off_t offset); } 680494 STD BSD { void extexit(int how, int status, void *addr); } 681495 STD BSD { int lwp_create(struct lwp_params *params); } 682496 STD BSD { lwpid_t lwp_gettid(void); } 683497 STD BSD { int lwp_kill(pid_t pid, lwpid_t tid, int signum); } 684498 STD BSD { int lwp_rtprio(int function, pid_t pid, lwpid_t tid, struct rtprio *rtp); } 685499 STD BSD { int pselect(int nd, fd_set *in, fd_set *ou, \ 686 fd_set *ex, const struct timespec *ts, \ 687 const sigset_t *sigmask); } 688500 STD BSD { int statvfs(const char *path, struct statvfs *buf); } 689501 STD BSD { int fstatvfs(int fd, struct statvfs *buf); } 690502 STD BSD { int fhstatvfs(const struct fhandle *u_fhp, struct statvfs *buf); } 691503 STD BSD { int getvfsstat(struct statfs *buf, \ 692 struct statvfs *vbuf, long vbufsize, int flags); } 693