syscalls.master revision 136207
157429Smarkm $FreeBSD: head/sys/kern/syscalls.master 136207 2004-10-07 01:09:46Z davidxu $ 257429Smarkm; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94 357429Smarkm; 457429Smarkm; System call name/number master file. 557429Smarkm; Processed to created init_sysent.c, syscalls.c and syscall.h. 657429Smarkm 757429Smarkm; Columns: number [M]type nargs name alt{name,tag,rtyp}/comments 857429Smarkm; number system call number, must be in order 957429Smarkm; type one of [M]STD, [M]OBSOL, [M]UNIMPL, [M]COMPAT, [M]CPT_NOA, 1057429Smarkm; [M]LIBCOMPAT, [M]NODEF, [M]NOARGS, [M]NOPROTO, [M]NOIMPL, 1157429Smarkm; [M]NOSTD, [M]COMPAT4 1257429Smarkm; name psuedo-prototype of syscall routine 1357429Smarkm; If one of the following alts is different, then all appear: 1457429Smarkm; altname name of system call if different 1557429Smarkm; alttag name of args struct tag if different from [o]`name'"_args" 1657429Smarkm; altrtyp return type if not int (bogus - syscalls always return int) 1757429Smarkm; for UNIMPL/OBSOL, name continues with comments 1857429Smarkm 1957429Smarkm; types: 2057429Smarkm; [M] e.g. like MSTD -- means the system call is MP-safe. If no 2157429Smarkm; M prefix is used, the syscall wrapper will obtain the Giant 2257429Smarkm; lock for the syscall. 2357429Smarkm; STD always included 2457429Smarkm; COMPAT included on COMPAT #ifdef 2557429Smarkm; COMPAT4 included on COMPAT4 #ifdef (FreeBSD 4 compat) 2657429Smarkm; LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h 2757429Smarkm; OBSOL obsolete, not included in system, only specifies name 2857429Smarkm; UNIMPL not implemented, placeholder only 2957429Smarkm; NOSTD implemented but as a lkm that can be statically 3057429Smarkm; compiled in sysent entry will be filled with lkmsys 3157429Smarkm; so the SYSCALL_MODULE macro works 3257429Smarkm; 3357429Smarkm; Please copy any additions and changes to the following compatability tables: 3457429Smarkm; sys/compat/freebsd32/syscalls.master 3557429Smarkm 3657429Smarkm; #ifdef's, etc. may be included, and are copied to the output files. 3757429Smarkm 3857429Smarkm#include <sys/param.h> 3957429Smarkm#include <sys/sysent.h> 4057429Smarkm#include <sys/sysproto.h> 4157429Smarkm 4257429Smarkm; Reserved/unimplemented system calls in the range 0-150 inclusive 4357429Smarkm; are reserved for use in future Berkeley releases. 4457429Smarkm; Additional system calls implemented in vendor and other 4557429Smarkm; redistributions should be placed in the reserved range at the end 4657429Smarkm; of the current calls. 4757429Smarkm 4857429Smarkm0 MSTD { int nosys(void); } syscall nosys_args int 4957429Smarkm1 MSTD { void sys_exit(int rval); } exit sys_exit_args void 5057429Smarkm2 MSTD { int fork(void); } 5157429Smarkm3 MSTD { ssize_t read(int fd, void *buf, size_t nbyte); } 5257429Smarkm4 MSTD { ssize_t write(int fd, const void *buf, size_t nbyte); } 5357429Smarkm5 MSTD { int open(char *path, int flags, int mode); } 5457429Smarkm; XXX should be { int open(const char *path, int flags, ...); } 5557429Smarkm; but we're not ready for `const' or varargs. 5657429Smarkm; XXX man page says `mode_t mode'. 5757429Smarkm6 MSTD { int close(int fd); } 5857429Smarkm7 MSTD { int wait4(int pid, int *status, int options, \ 5957429Smarkm struct rusage *rusage); } wait4 wait_args int 6057429Smarkm8 MCOMPAT { int creat(char *path, int mode); } 6157429Smarkm9 MSTD { int link(char *path, char *link); } 6257429Smarkm10 MSTD { int unlink(char *path); } 6357429Smarkm11 OBSOL execv 6457429Smarkm12 STD { int chdir(char *path); } 6557429Smarkm13 STD { int fchdir(int fd); } 6657429Smarkm14 STD { int mknod(char *path, int mode, int dev); } 6757429Smarkm15 STD { int chmod(char *path, int mode); } 6857429Smarkm16 STD { int chown(char *path, int uid, int gid); } 6957429Smarkm17 MSTD { int obreak(char *nsize); } break obreak_args int 7057429Smarkm18 COMPAT4 { int getfsstat(struct ostatfs *buf, long bufsize, int flags); } 7157429Smarkm19 COMPAT { long lseek(int fd, long offset, int whence); } 7257429Smarkm20 MSTD { pid_t getpid(void); } 7357429Smarkm21 STD { int mount(char *type, char *path, int flags, caddr_t data); } 7457429Smarkm; XXX `path' should have type `const char *' but we're not ready for that. 7557429Smarkm22 STD { int unmount(char *path, int flags); } 7657429Smarkm23 MSTD { int setuid(uid_t uid); } 7757429Smarkm24 MSTD { uid_t getuid(void); } 7857429Smarkm25 MSTD { uid_t geteuid(void); } 7957429Smarkm26 MSTD { int ptrace(int req, pid_t pid, caddr_t addr, int data); } 8057429Smarkm27 MSTD { int recvmsg(int s, struct msghdr *msg, int flags); } 8157429Smarkm28 MSTD { int sendmsg(int s, struct msghdr *msg, int flags); } 8257429Smarkm29 MSTD { int recvfrom(int s, caddr_t buf, size_t len, int flags, \ 8357429Smarkm struct sockaddr * __restrict from, \ 8457429Smarkm __socklen_t * __restrict fromlenaddr); } 8557429Smarkm30 MSTD { int accept(int s, struct sockaddr * __restrict name, \ 8657429Smarkm __socklen_t * __restrict anamelen); } 8757429Smarkm31 MSTD { int getpeername(int fdes, struct sockaddr * __restrict asa, \ 8857429Smarkm __socklen_t * __restrict alen); } 8957429Smarkm32 MSTD { int getsockname(int fdes, struct sockaddr * __restrict asa, \ 9057429Smarkm __socklen_t * __restrict alen); } 9157429Smarkm33 STD { int access(char *path, int flags); } 9257429Smarkm34 STD { int chflags(char *path, int flags); } 9357429Smarkm35 STD { int fchflags(int fd, int flags); } 9457429Smarkm36 STD { int sync(void); } 9557429Smarkm37 MSTD { int kill(int pid, int signum); } 9657429Smarkm38 COMPAT { int stat(char *path, struct ostat *ub); } 9757429Smarkm39 MSTD { pid_t getppid(void); } 9857429Smarkm40 COMPAT { int lstat(char *path, struct ostat *ub); } 9957429Smarkm41 MSTD { int dup(u_int fd); } 10057429Smarkm42 MSTD { int pipe(void); } 10157429Smarkm43 MSTD { gid_t getegid(void); } 10257429Smarkm44 MSTD { int profil(caddr_t samples, size_t size, size_t offset, \ 10357429Smarkm u_int scale); } 10457429Smarkm45 MSTD { int ktrace(const char *fname, int ops, int facs, int pid); } 10557429Smarkm46 MCOMPAT { int sigaction(int signum, struct osigaction *nsa, \ 10657429Smarkm struct osigaction *osa); } 10757429Smarkm47 MSTD { gid_t getgid(void); } 10857429Smarkm48 MCOMPAT { int sigprocmask(int how, osigset_t mask); } 10957429Smarkm; XXX note nonstandard (bogus) calling convention - the libc stub passes 11057429Smarkm; us the mask, not a pointer to it, and we return the old mask as the 11157429Smarkm; (int) return value. 11257429Smarkm49 MSTD { int getlogin(char *namebuf, u_int namelen); } 11357429Smarkm50 MSTD { int setlogin(char *namebuf); } 11457429Smarkm51 MSTD { int acct(char *path); } 11557429Smarkm52 MCOMPAT { int sigpending(void); } 11657429Smarkm53 MSTD { int sigaltstack(stack_t *ss, stack_t *oss); } 11757429Smarkm54 MSTD { int ioctl(int fd, u_long com, caddr_t data); } 11857429Smarkm55 MSTD { int reboot(int opt); } 11957429Smarkm56 STD { int revoke(char *path); } 12057429Smarkm57 STD { int symlink(char *path, char *link); } 12157429Smarkm58 STD { int readlink(char *path, char *buf, int count); } 12257429Smarkm59 MSTD { int execve(char *fname, char **argv, char **envv); } 12357429Smarkm60 MSTD { int umask(int newmask); } umask umask_args int 12457429Smarkm61 STD { int chroot(char *path); } 12557429Smarkm62 MCOMPAT { int fstat(int fd, struct ostat *sb); } 12657429Smarkm63 MCOMPAT { int getkerninfo(int op, char *where, size_t *size, \ 12757429Smarkm int arg); } getkerninfo getkerninfo_args int 12857429Smarkm64 MCOMPAT { int getpagesize(void); } getpagesize getpagesize_args int 12957429Smarkm65 MSTD { int msync(void *addr, size_t len, int flags); } 13057429Smarkm66 MSTD { int vfork(void); } 13157429Smarkm67 OBSOL vread 13257429Smarkm68 OBSOL vwrite 13357429Smarkm69 MSTD { int sbrk(int incr); } 13457429Smarkm70 MSTD { int sstk(int incr); } 13557429Smarkm71 MCOMPAT { int mmap(void *addr, int len, int prot, int flags, int fd, \ 13657429Smarkm long pos); } 13757429Smarkm72 MSTD { int ovadvise(int anom); } vadvise ovadvise_args int 13857429Smarkm73 MSTD { int munmap(void *addr, size_t len); } 13957429Smarkm74 MSTD { int mprotect(const void *addr, size_t len, int prot); } 14057429Smarkm75 MSTD { int madvise(void *addr, size_t len, int behav); } 14157429Smarkm76 OBSOL vhangup 14257429Smarkm77 OBSOL vlimit 14357429Smarkm78 MSTD { int mincore(const void *addr, size_t len, char *vec); } 14457429Smarkm79 MSTD { int getgroups(u_int gidsetsize, gid_t *gidset); } 14557429Smarkm80 MSTD { int setgroups(u_int gidsetsize, gid_t *gidset); } 14657429Smarkm81 MSTD { int getpgrp(void); } 14757429Smarkm82 MSTD { int setpgid(int pid, int pgid); } 14857429Smarkm83 MSTD { int setitimer(u_int which, struct itimerval *itv, \ 14957429Smarkm struct itimerval *oitv); } 15057429Smarkm84 MCOMPAT { int wait(void); } 15157429Smarkm85 MSTD { int swapon(char *name); } 15257429Smarkm86 MSTD { int getitimer(u_int which, struct itimerval *itv); } 15357429Smarkm87 MCOMPAT { int gethostname(char *hostname, u_int len); } \ 15457429Smarkm gethostname gethostname_args int 15557429Smarkm88 MCOMPAT { int sethostname(char *hostname, u_int len); } \ 15657429Smarkm sethostname sethostname_args int 15757429Smarkm89 MSTD { int getdtablesize(void); } 15857429Smarkm90 MSTD { int dup2(u_int from, u_int to); } 15957429Smarkm91 UNIMPL getdopt 16057429Smarkm92 MSTD { int fcntl(int fd, int cmd, long arg); } 16157429Smarkm; XXX should be { int fcntl(int fd, int cmd, ...); } 16257429Smarkm; but we're not ready for varargs. 16357429Smarkm93 MSTD { int select(int nd, fd_set *in, fd_set *ou, \ 16457429Smarkm fd_set *ex, struct timeval *tv); } 16557429Smarkm94 UNIMPL setdopt 16657429Smarkm95 STD { int fsync(int fd); } 16757429Smarkm96 MSTD { int setpriority(int which, int who, int prio); } 16857429Smarkm97 MSTD { int socket(int domain, int type, int protocol); } 16957429Smarkm98 MSTD { int connect(int s, caddr_t name, int namelen); } 17057429Smarkm99 MCPT_NOA { int accept(int s, caddr_t name, int *anamelen); } \ 17157429Smarkm accept accept_args int 17257429Smarkm100 MSTD { int getpriority(int which, int who); } 17357429Smarkm101 MCOMPAT { int send(int s, caddr_t buf, int len, int flags); } 17457429Smarkm102 MCOMPAT { int recv(int s, caddr_t buf, int len, int flags); } 17557429Smarkm103 MCOMPAT { int sigreturn(struct osigcontext *sigcntxp); } 17657429Smarkm104 MSTD { int bind(int s, caddr_t name, int namelen); } 17757429Smarkm105 MSTD { int setsockopt(int s, int level, int name, caddr_t val, \ 17857429Smarkm int valsize); } 17957429Smarkm106 MSTD { int listen(int s, int backlog); } 18057429Smarkm107 OBSOL vtimes 18157429Smarkm108 MCOMPAT { int sigvec(int signum, struct sigvec *nsv, \ 18257429Smarkm struct sigvec *osv); } 18357429Smarkm109 MCOMPAT { int sigblock(int mask); } 18457429Smarkm110 MCOMPAT { int sigsetmask(int mask); } 18557429Smarkm111 MCOMPAT { int sigsuspend(osigset_t mask); } 18657429Smarkm; XXX note nonstandard (bogus) calling convention - the libc stub passes 18757429Smarkm; us the mask, not a pointer to it. 18857429Smarkm112 MCOMPAT { int sigstack(struct sigstack *nss, struct sigstack *oss); } 18957429Smarkm113 MCOMPAT { int recvmsg(int s, struct omsghdr *msg, int flags); } 19057429Smarkm114 MCOMPAT { int sendmsg(int s, caddr_t msg, int flags); } 19157429Smarkm115 OBSOL vtrace 19257429Smarkm116 MSTD { int gettimeofday(struct timeval *tp, struct timezone *tzp); } 19357429Smarkm117 MSTD { int getrusage(int who, struct rusage *rusage); } 19457429Smarkm118 MSTD { int getsockopt(int s, int level, int name, caddr_t val, \ 19557429Smarkm int *avalsize); } 19657429Smarkm119 UNIMPL resuba (BSD/OS 2.x) 19757429Smarkm120 MSTD { int readv(int fd, struct iovec *iovp, u_int iovcnt); } 19857429Smarkm121 MSTD { int writev(int fd, struct iovec *iovp, u_int iovcnt); } 19957429Smarkm122 MSTD { int settimeofday(struct timeval *tv, struct timezone *tzp); } 20057429Smarkm123 STD { int fchown(int fd, int uid, int gid); } 20157429Smarkm124 STD { int fchmod(int fd, int mode); } 20257429Smarkm125 MCPT_NOA { int recvfrom(int s, caddr_t buf, size_t len, int flags, \ 20357429Smarkm caddr_t from, int *fromlenaddr); } \ 20457429Smarkm recvfrom recvfrom_args int 20557429Smarkm126 MSTD { int setreuid(int ruid, int euid); } 20657429Smarkm127 MSTD { int setregid(int rgid, int egid); } 20757429Smarkm128 STD { int rename(char *from, char *to); } 20857429Smarkm129 COMPAT { int truncate(char *path, long length); } 20957429Smarkm130 COMPAT { int ftruncate(int fd, long length); } 21057429Smarkm131 MSTD { int flock(int fd, int how); } 21157429Smarkm132 STD { int mkfifo(char *path, int mode); } 21257429Smarkm133 MSTD { int sendto(int s, caddr_t buf, size_t len, int flags, \ 21357429Smarkm caddr_t to, int tolen); } 21457429Smarkm134 MSTD { int shutdown(int s, int how); } 21557429Smarkm135 MSTD { int socketpair(int domain, int type, int protocol, \ 21657429Smarkm int *rsv); } 21757429Smarkm136 STD { int mkdir(char *path, int mode); } 21857429Smarkm137 STD { int rmdir(char *path); } 21957429Smarkm138 STD { int utimes(char *path, struct timeval *tptr); } 22057429Smarkm139 OBSOL 4.2 sigreturn 22157429Smarkm140 MSTD { int adjtime(struct timeval *delta, \ 22257429Smarkm struct timeval *olddelta); } 22357429Smarkm141 MCOMPAT { int getpeername(int fdes, caddr_t asa, int *alen); } 22457429Smarkm142 MCOMPAT { long gethostid(void); } 22557429Smarkm143 MCOMPAT { int sethostid(long hostid); } 22657429Smarkm144 MCOMPAT { int getrlimit(u_int which, struct orlimit *rlp); } 22757429Smarkm145 MCOMPAT { int setrlimit(u_int which, struct orlimit *rlp); } 22857429Smarkm146 MCOMPAT { int killpg(int pgid, int signum); } 22957429Smarkm147 MSTD { int setsid(void); } 23057429Smarkm148 STD { int quotactl(char *path, int cmd, int uid, caddr_t arg); } 23157429Smarkm149 MCOMPAT { int quota(void); } 23257429Smarkm150 MCPT_NOA { int getsockname(int fdec, caddr_t asa, int *alen); }\ 23357429Smarkm getsockname getsockname_args int 23457429Smarkm 23557429Smarkm; Syscalls 151-180 inclusive are reserved for vendor-specific 23657429Smarkm; system calls. (This includes various calls added for compatibity 23757429Smarkm; with other Unix variants.) 23857429Smarkm; Some of these calls are now supported by BSD... 23957429Smarkm151 UNIMPL sem_lock (BSD/OS 2.x) 24057429Smarkm152 UNIMPL sem_wakeup (BSD/OS 2.x) 24157429Smarkm153 UNIMPL asyncdaemon (BSD/OS 2.x) 24257429Smarkm154 UNIMPL nosys 24357429Smarkm; 155 is initialized by the NFS code, if present. 24457429Smarkm155 MNOIMPL { int nfssvc(int flag, caddr_t argp); } 24557429Smarkm156 COMPAT { int getdirentries(int fd, char *buf, u_int count, \ 24657429Smarkm long *basep); } 24757429Smarkm157 COMPAT4 { int statfs(char *path, struct ostatfs *buf); } 24857429Smarkm158 COMPAT4 { int fstatfs(int fd, struct ostatfs *buf); } 24957429Smarkm159 UNIMPL nosys 25057429Smarkm160 STD { int lgetfh(char *fname, struct fhandle *fhp); } 25157429Smarkm161 STD { int getfh(char *fname, struct fhandle *fhp); } 25257429Smarkm162 MSTD { int getdomainname(char *domainname, int len); } 25357429Smarkm163 MSTD { int setdomainname(char *domainname, int len); } 25457429Smarkm164 MSTD { int uname(struct utsname *name); } 25557429Smarkm165 MSTD { int sysarch(int op, char *parms); } 25657429Smarkm166 MSTD { int rtprio(int function, pid_t pid, struct rtprio *rtp); } 25757429Smarkm167 UNIMPL nosys 25857429Smarkm168 UNIMPL nosys 25957429Smarkm; 169 is initialized by the SYSVSEM code if present or loaded 26057429Smarkm169 MNOSTD { int semsys(int which, int a2, int a3, int a4, int a5); } 26157429Smarkm; 169 is initialized by the SYSVMSG code if present or loaded 26257429Smarkm; XXX should be { int semsys(int which, ...); } 26357429Smarkm170 MNOSTD { int msgsys(int which, int a2, int a3, int a4, int a5, \ 26457429Smarkm int a6); } 26557429Smarkm; 169 is initialized by the SYSVSHM code if present or loaded 26657429Smarkm; XXX should be { int msgsys(int which, ...); } 26757429Smarkm171 MNOSTD { int shmsys(int which, int a2, int a3, int a4); } 26857429Smarkm; XXX should be { int shmsys(int which, ...); } 26957429Smarkm172 UNIMPL nosys 27057429Smarkm173 MSTD { ssize_t pread(int fd, void *buf, size_t nbyte, \ 27157429Smarkm int pad, off_t offset); } 27257429Smarkm174 MSTD { ssize_t pwrite(int fd, const void *buf, \ 27357429Smarkm size_t nbyte, int pad, off_t offset); } 27457429Smarkm175 UNIMPL nosys 27557429Smarkm176 MSTD { int ntp_adjtime(struct timex *tp); } 27657429Smarkm177 UNIMPL sfork (BSD/OS 2.x) 27757429Smarkm178 UNIMPL getdescriptor (BSD/OS 2.x) 27857429Smarkm179 UNIMPL setdescriptor (BSD/OS 2.x) 27957429Smarkm180 UNIMPL nosys 28057429Smarkm 28157429Smarkm; Syscalls 181-199 are used by/reserved for BSD 28257429Smarkm181 MSTD { int setgid(gid_t gid); } 28357429Smarkm182 MSTD { int setegid(gid_t egid); } 28457429Smarkm183 MSTD { int seteuid(uid_t euid); } 28557429Smarkm184 UNIMPL lfs_bmapv 28657429Smarkm185 UNIMPL lfs_markv 28757429Smarkm186 UNIMPL lfs_segclean 28857429Smarkm187 UNIMPL lfs_segwait 28957429Smarkm188 STD { int stat(char *path, struct stat *ub); } 29057429Smarkm189 MSTD { int fstat(int fd, struct stat *sb); } 29157429Smarkm190 STD { int lstat(char *path, struct stat *ub); } 29257429Smarkm191 STD { int pathconf(char *path, int name); } 29357429Smarkm192 MSTD { int fpathconf(int fd, int name); } 29457429Smarkm193 UNIMPL nosys 29557429Smarkm194 MSTD { int getrlimit(u_int which, struct rlimit *rlp); } \ 29657429Smarkm getrlimit __getrlimit_args int 29757429Smarkm195 MSTD { int setrlimit(u_int which, struct rlimit *rlp); } \ 29857429Smarkm setrlimit __setrlimit_args int 29957429Smarkm196 STD { int getdirentries(int fd, char *buf, u_int count, \ 30057429Smarkm long *basep); } 30157429Smarkm197 MSTD { caddr_t mmap(caddr_t addr, size_t len, int prot, \ 30257429Smarkm int flags, int fd, int pad, off_t pos); } 30357429Smarkm198 STD { int nosys(void); } __syscall __syscall_args int 30457429Smarkm199 STD { off_t lseek(int fd, int pad, off_t offset, int whence); } 30557429Smarkm200 STD { int truncate(char *path, int pad, off_t length); } 30657429Smarkm201 STD { int ftruncate(int fd, int pad, off_t length); } 30757429Smarkm202 MSTD { int __sysctl(int *name, u_int namelen, void *old, \ 30857429Smarkm size_t *oldlenp, void *new, size_t newlen); } \ 30957429Smarkm __sysctl sysctl_args int 31057429Smarkm203 MSTD { int mlock(const void *addr, size_t len); } 31157429Smarkm204 MSTD { int munlock(const void *addr, size_t len); } 31257429Smarkm205 STD { int undelete(char *path); } 31357429Smarkm206 STD { int futimes(int fd, struct timeval *tptr); } 31457429Smarkm207 MSTD { int getpgid(pid_t pid); } 31557429Smarkm208 UNIMPL newreboot (NetBSD) 31657429Smarkm209 MSTD { int poll(struct pollfd *fds, u_int nfds, int timeout); } 31757429Smarkm 31857429Smarkm; 31957429Smarkm; The following are reserved for loadable syscalls 32057429Smarkm; 321210 NODEF lkmnosys lkmnosys nosys_args int 322211 NODEF lkmnosys lkmnosys nosys_args int 323212 NODEF lkmnosys lkmnosys nosys_args int 324213 NODEF lkmnosys lkmnosys nosys_args int 325214 NODEF lkmnosys lkmnosys nosys_args int 326215 NODEF lkmnosys lkmnosys nosys_args int 327216 NODEF lkmnosys lkmnosys nosys_args int 328217 NODEF lkmnosys lkmnosys nosys_args int 329218 NODEF lkmnosys lkmnosys nosys_args int 330219 NODEF lkmnosys lkmnosys nosys_args int 331 332; 333; The following were introduced with NetBSD/4.4Lite-2 334; They are initialized by thier respective modules/sysinits 335220 MNOSTD { int __semctl(int semid, int semnum, int cmd, \ 336 union semun *arg); } 337221 MNOSTD { int semget(key_t key, int nsems, int semflg); } 338222 MNOSTD { int semop(int semid, struct sembuf *sops, size_t nsops); } 339223 UNIMPL semconfig 340224 MNOSTD { int msgctl(int msqid, int cmd, struct msqid_ds *buf); } 341225 MNOSTD { int msgget(key_t key, int msgflg); } 342226 MNOSTD { int msgsnd(int msqid, const void *msgp, size_t msgsz, \ 343 int msgflg); } 344227 MNOSTD { int msgrcv(int msqid, void *msgp, size_t msgsz, \ 345 long msgtyp, int msgflg); } 346228 MNOSTD { int shmat(int shmid, const void *shmaddr, int shmflg); } 347229 MNOSTD { int shmctl(int shmid, int cmd, struct shmid_ds *buf); } 348230 MNOSTD { int shmdt(const void *shmaddr); } 349231 MNOSTD { int shmget(key_t key, size_t size, int shmflg); } 350; 351232 MSTD { int clock_gettime(clockid_t clock_id, struct timespec *tp); } 352233 MSTD { int clock_settime(clockid_t clock_id, \ 353 const struct timespec *tp); } 354234 MSTD { int clock_getres(clockid_t clock_id, struct timespec *tp); } 355235 UNIMPL timer_create 356236 UNIMPL timer_delete 357237 UNIMPL timer_settime 358238 UNIMPL timer_gettime 359239 UNIMPL timer_getoverrun 360240 MSTD { int nanosleep(const struct timespec *rqtp, \ 361 struct timespec *rmtp); } 362241 UNIMPL nosys 363242 UNIMPL nosys 364243 UNIMPL nosys 365244 UNIMPL nosys 366245 UNIMPL nosys 367246 UNIMPL nosys 368247 UNIMPL nosys 369248 UNIMPL nosys 370249 UNIMPL nosys 371; syscall numbers initially used in OpenBSD 372250 MSTD { int minherit(void *addr, size_t len, int inherit); } 373251 MSTD { int rfork(int flags); } 374252 MSTD { int openbsd_poll(struct pollfd *fds, u_int nfds, \ 375 int timeout); } 376253 MSTD { int issetugid(void); } 377254 STD { int lchown(char *path, int uid, int gid); } 378255 UNIMPL nosys 379256 UNIMPL nosys 380257 UNIMPL nosys 381258 UNIMPL nosys 382259 UNIMPL nosys 383260 UNIMPL nosys 384261 UNIMPL nosys 385262 UNIMPL nosys 386263 UNIMPL nosys 387264 UNIMPL nosys 388265 UNIMPL nosys 389266 UNIMPL nosys 390267 UNIMPL nosys 391268 UNIMPL nosys 392269 UNIMPL nosys 393270 UNIMPL nosys 394271 UNIMPL nosys 395272 STD { int getdents(int fd, char *buf, size_t count); } 396273 UNIMPL nosys 397274 STD { int lchmod(char *path, mode_t mode); } 398275 NOPROTO { int lchown(char *path, uid_t uid, gid_t gid); } \ 399 netbsd_lchown lchown_args int 400276 STD { int lutimes(char *path, struct timeval *tptr); } 401277 MNOPROTO { int msync(void *addr, size_t len, int flags); } \ 402 netbsd_msync msync_args int 403278 STD { int nstat(char *path, struct nstat *ub); } 404279 MSTD { int nfstat(int fd, struct nstat *sb); } 405280 STD { int nlstat(char *path, struct nstat *ub); } 406281 UNIMPL nosys 407282 UNIMPL nosys 408283 UNIMPL nosys 409284 UNIMPL nosys 410285 UNIMPL nosys 411286 UNIMPL nosys 412287 UNIMPL nosys 413288 UNIMPL nosys 414289 UNIMPL nosys 415290 UNIMPL nosys 416291 UNIMPL nosys 417292 UNIMPL nosys 418293 UNIMPL nosys 419294 UNIMPL nosys 420295 UNIMPL nosys 421296 UNIMPL nosys 422; XXX 297 is 300 in NetBSD 423297 COMPAT4 { int fhstatfs(const struct fhandle *u_fhp, \ 424 struct ostatfs *buf); } 425298 STD { int fhopen(const struct fhandle *u_fhp, int flags); } 426299 STD { int fhstat(const struct fhandle *u_fhp, struct stat *sb); } 427; syscall numbers for FreeBSD 428300 MSTD { int modnext(int modid); } 429301 MSTD { int modstat(int modid, struct module_stat* stat); } 430302 MSTD { int modfnext(int modid); } 431303 MSTD { int modfind(const char *name); } 432304 MSTD { int kldload(const char *file); } 433305 MSTD { int kldunload(int fileid); } 434306 MSTD { int kldfind(const char *file); } 435307 MSTD { int kldnext(int fileid); } 436308 MSTD { int kldstat(int fileid, struct kld_file_stat* stat); } 437309 MSTD { int kldfirstmod(int fileid); } 438310 MSTD { int getsid(pid_t pid); } 439311 MSTD { int setresuid(uid_t ruid, uid_t euid, uid_t suid); } 440312 MSTD { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); } 441313 OBSOL signanosleep 442314 NOSTD { int aio_return(struct aiocb *aiocbp); } 443315 NOSTD { int aio_suspend(struct aiocb * const * aiocbp, int nent, \ 444 const struct timespec *timeout); } 445316 NOSTD { int aio_cancel(int fd, struct aiocb *aiocbp); } 446317 NOSTD { int aio_error(struct aiocb *aiocbp); } 447318 NOSTD { int aio_read(struct aiocb *aiocbp); } 448319 NOSTD { int aio_write(struct aiocb *aiocbp); } 449320 NOSTD { int lio_listio(int mode, struct aiocb * const *acb_list, \ 450 int nent, struct sigevent *sig); } 451321 MSTD { int yield(void); } 452322 OBSOL thr_sleep 453323 OBSOL thr_wakeup 454324 MSTD { int mlockall(int how); } 455325 MSTD { int munlockall(void); } 456326 STD { int __getcwd(u_char *buf, u_int buflen); } 457 458327 MSTD { int sched_setparam (pid_t pid, \ 459 const struct sched_param *param); } 460328 MSTD { int sched_getparam (pid_t pid, struct sched_param *param); } 461 462329 MSTD { int sched_setscheduler (pid_t pid, int policy, \ 463 const struct sched_param *param); } 464330 MSTD { int sched_getscheduler (pid_t pid); } 465 466331 MSTD { int sched_yield (void); } 467332 MSTD { int sched_get_priority_max (int policy); } 468333 MSTD { int sched_get_priority_min (int policy); } 469334 MSTD { int sched_rr_get_interval (pid_t pid, \ 470 struct timespec *interval); } 471335 MSTD { int utrace(const void *addr, size_t len); } 472336 MCOMPAT4 { int sendfile(int fd, int s, off_t offset, size_t nbytes, \ 473 struct sf_hdtr *hdtr, off_t *sbytes, int flags); } 474337 STD { int kldsym(int fileid, int cmd, void *data); } 475338 MSTD { int jail(struct jail *jail); } 476339 UNIMPL pioctl 477340 MSTD { int sigprocmask(int how, const sigset_t *set, \ 478 sigset_t *oset); } 479341 MSTD { int sigsuspend(const sigset_t *sigmask); } 480342 MCOMPAT4 { int sigaction(int sig, const struct sigaction *act, \ 481 struct sigaction *oact); } 482343 MSTD { int sigpending(sigset_t *set); } 483344 MCOMPAT4 { int sigreturn(const struct ucontext4 *sigcntxp); } 484345 MSTD { int sigtimedwait(const sigset_t *set, \ 485 siginfo_t *info, const struct timespec *timeout); } 486346 MSTD { int sigwaitinfo(const sigset_t *set, siginfo_t *info); } 487347 MSTD { int __acl_get_file(const char *path, \ 488 acl_type_t type, struct acl *aclp); } 489348 MSTD { int __acl_set_file(const char *path, \ 490 acl_type_t type, struct acl *aclp); } 491349 MSTD { int __acl_get_fd(int filedes, acl_type_t type, \ 492 struct acl *aclp); } 493350 MSTD { int __acl_set_fd(int filedes, acl_type_t type, \ 494 struct acl *aclp); } 495351 MSTD { int __acl_delete_file(const char *path, acl_type_t type); } 496352 MSTD { int __acl_delete_fd(int filedes, acl_type_t type); } 497353 MSTD { int __acl_aclcheck_file(const char *path, \ 498 acl_type_t type, struct acl *aclp); } 499354 MSTD { int __acl_aclcheck_fd(int filedes, acl_type_t type, \ 500 struct acl *aclp); } 501355 STD { int extattrctl(const char *path, int cmd, \ 502 const char *filename, int attrnamespace, \ 503 const char *attrname); } 504356 STD { int extattr_set_file(const char *path, \ 505 int attrnamespace, const char *attrname, \ 506 void *data, size_t nbytes); } 507357 STD { ssize_t extattr_get_file(const char *path, \ 508 int attrnamespace, const char *attrname, \ 509 void *data, size_t nbytes); } 510358 STD { int extattr_delete_file(const char *path, \ 511 int attrnamespace, const char *attrname); } 512359 NOSTD { int aio_waitcomplete(struct aiocb **aiocbp, \ 513 struct timespec *timeout); } 514360 MSTD { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); } 515361 MSTD { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); } 516362 MSTD { int kqueue(void); } 517363 MSTD { int kevent(int fd, \ 518 const struct kevent *changelist, int nchanges, \ 519 struct kevent *eventlist, int nevents, \ 520 const struct timespec *timeout); } 521364 UNIMPL __cap_get_proc 522365 UNIMPL __cap_set_proc 523366 UNIMPL __cap_get_fd 524367 UNIMPL __cap_get_file 525368 UNIMPL __cap_set_fd 526369 UNIMPL __cap_set_file 527370 NODEF lkmressys lkmressys nosys_args int 528371 STD { int extattr_set_fd(int fd, int attrnamespace, \ 529 const char *attrname, void *data, \ 530 size_t nbytes); } 531372 STD { ssize_t extattr_get_fd(int fd, int attrnamespace, \ 532 const char *attrname, void *data, size_t nbytes); } 533373 STD { int extattr_delete_fd(int fd, int attrnamespace, \ 534 const char *attrname); } 535374 MSTD { int __setugid(int flag); } 536375 NOIMPL { int nfsclnt(int flag, caddr_t argp); } 537376 STD { int eaccess(char *path, int flags); } 538377 UNIMPL afs_syscall 539378 STD { int nmount(struct iovec *iovp, unsigned int iovcnt, \ 540 int flags); } 541379 MSTD { int kse_exit(void); } 542380 MSTD { int kse_wakeup(struct kse_mailbox *mbx); } 543381 MSTD { int kse_create(struct kse_mailbox *mbx, \ 544 int newgroup); } 545382 MSTD { int kse_thr_interrupt(struct kse_thr_mailbox *tmbx, int cmd, \ 546 long data); } 547383 MSTD { int kse_release(struct timespec *timeout); } 548384 MSTD { int __mac_get_proc(struct mac *mac_p); } 549385 MSTD { int __mac_set_proc(struct mac *mac_p); } 550386 MSTD { int __mac_get_fd(int fd, struct mac *mac_p); } 551387 MSTD { int __mac_get_file(const char *path_p, \ 552 struct mac *mac_p); } 553388 MSTD { int __mac_set_fd(int fd, struct mac *mac_p); } 554389 MSTD { int __mac_set_file(const char *path_p, \ 555 struct mac *mac_p); } 556390 STD { int kenv(int what, const char *name, char *value, \ 557 int len); } 558391 STD { int lchflags(const char *path, int flags); } 559392 STD { int uuidgen(struct uuid *store, int count); } 560393 MSTD { int sendfile(int fd, int s, off_t offset, size_t nbytes, \ 561 struct sf_hdtr *hdtr, off_t *sbytes, int flags); } 562394 MSTD { int mac_syscall(const char *policy, int call, \ 563 void *arg); } 564395 STD { int getfsstat(struct statfs *buf, long bufsize, \ 565 int flags); } 566396 STD { int statfs(char *path, struct statfs *buf); } 567397 STD { int fstatfs(int fd, struct statfs *buf); } 568398 STD { int fhstatfs(const struct fhandle *u_fhp, \ 569 struct statfs *buf); } 570399 UNIMPL nosys 571400 MNOSTD { int ksem_close(semid_t id); } 572401 MNOSTD { int ksem_post(semid_t id); } 573402 MNOSTD { int ksem_wait(semid_t id); } 574403 MNOSTD { int ksem_trywait(semid_t id); } 575404 MNOSTD { int ksem_init(semid_t *idp, unsigned int value); } 576405 MNOSTD { int ksem_open(semid_t *idp, const char *name, \ 577 int oflag, mode_t mode, unsigned int value); } 578406 MNOSTD { int ksem_unlink(const char *name); } 579407 MNOSTD { int ksem_getvalue(semid_t id, int *val); } 580408 MNOSTD { int ksem_destroy(semid_t id); } 581409 MSTD { int __mac_get_pid(pid_t pid, struct mac *mac_p); } 582410 MSTD { int __mac_get_link(const char *path_p, \ 583 struct mac *mac_p); } 584411 MSTD { int __mac_set_link(const char *path_p, \ 585 struct mac *mac_p); } 586412 STD { int extattr_set_link(const char *path, \ 587 int attrnamespace, const char *attrname, \ 588 void *data, size_t nbytes); } 589413 STD { ssize_t extattr_get_link(const char *path, \ 590 int attrnamespace, const char *attrname, \ 591 void *data, size_t nbytes); } 592414 STD { int extattr_delete_link(const char *path, \ 593 int attrnamespace, const char *attrname); } 594415 MSTD { int __mac_execve(char *fname, char **argv, \ 595 char **envv, struct mac *mac_p); } 596416 MSTD { int sigaction(int sig, const struct sigaction *act, \ 597 struct sigaction *oact); } 598417 MSTD { int sigreturn(const struct __ucontext *sigcntxp); } 599418 UNIMPL __xstat 600419 UNIMPL __xfstat 601420 UNIMPL __xlstat 602421 MSTD { int getcontext(struct __ucontext *ucp); } 603422 MSTD { int setcontext(const struct __ucontext *ucp); } 604423 MSTD { int swapcontext(struct __ucontext *oucp, \ 605 const struct __ucontext *ucp); } 606424 MSTD { int swapoff(const char *name); } 607425 MSTD { int __acl_get_link(const char *path, \ 608 acl_type_t type, struct acl *aclp); } 609426 MSTD { int __acl_set_link(const char *path, \ 610 acl_type_t type, struct acl *aclp); } 611427 MSTD { int __acl_delete_link(const char *path, \ 612 acl_type_t type); } 613428 MSTD { int __acl_aclcheck_link(const char *path, \ 614 acl_type_t type, struct acl *aclp); } 615429 MSTD { int sigwait(const sigset_t *set, int *sig); } 616430 MSTD { int thr_create(ucontext_t *ctx, long *id, int flags); } 617431 MSTD { void thr_exit(long *state); } 618432 MSTD { int thr_self(long *id); } 619433 MSTD { int thr_kill(long id, int sig); } 620434 MSTD { int _umtx_lock(struct umtx *umtx); } 621435 MSTD { int _umtx_unlock(struct umtx *umtx); } 622436 MSTD { int jail_attach(int jid); } 623437 STD { ssize_t extattr_list_fd(int fd, int attrnamespace, \ 624 void *data, size_t nbytes); } 625438 STD { ssize_t extattr_list_file(const char *path, \ 626 int attrnamespace, void *data, size_t nbytes); } 627439 STD { ssize_t extattr_list_link(const char *path, \ 628 int attrnamespace, void *data, size_t nbytes); } 629440 MSTD { int kse_switchin(struct kse_thr_mailbox *tmbx, \ 630 int flags); } 631441 MNOSTD { int ksem_timedwait(semid_t id, struct timespec *abstime); } 632442 MSTD { int thr_suspend(const struct timespec *timeout); } 633443 MSTD { int thr_wake(long id); } 634444 MSTD { int kldunloadf(int fileid, int flags); } 635; Please copy any additions and changes to the following compatability tables: 636; sys/compat/freebsd32/syscalls.master 637