syscalls.master revision 123408
150477Speter $FreeBSD: head/sys/kern/syscalls.master 123408 2003-12-10 22:08:37Z peter $ 21817Sdg; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94 31817Sdg; 41541Srgrimes; System call name/number master file. 51541Srgrimes; Processed to created init_sysent.c, syscalls.c and syscall.h. 61541Srgrimes 782585Sdillon; Columns: number [M]type nargs namespc name alt{name,tag,rtyp}/comments 81541Srgrimes; number system call number, must be in order 982585Sdillon; type one of [M]STD, [M]OBSOL, [M]UNIMPL, [M]COMPAT, [M]CPT_NOA, 1082585Sdillon; [M]LIBCOMPAT, [M]NODEF, [M]NOARGS, [M]NOPROTO, [M]NOIMPL, 1199855Salfred; [M]NOSTD, [M]COMPAT4 122696Swollman; namespc one of POSIX, BSD, NOHIDE 1311294Sswallace; name psuedo-prototype of syscall routine 1410905Sbde; If one of the following alts is different, then all appear: 151541Srgrimes; altname name of system call if different 1610905Sbde; alttag name of args struct tag if different from [o]`name'"_args" 1710905Sbde; altrtyp return type if not int (bogus - syscalls always return int) 181541Srgrimes; for UNIMPL/OBSOL, name continues with comments 191541Srgrimes 201541Srgrimes; types: 2182585Sdillon; [M] e.g. like MSTD -- means the system call is MP-safe. If no 2282585Sdillon; M prefix is used, the syscall wrapper will obtain the Giant 2382585Sdillon; lock for the syscall. 241541Srgrimes; STD always included 251541Srgrimes; COMPAT included on COMPAT #ifdef 2699855Salfred; COMPAT4 included on COMPAT4 #ifdef (FreeBSD 4 compat) 271541Srgrimes; LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h 281541Srgrimes; OBSOL obsolete, not included in system, only specifies name 291541Srgrimes; UNIMPL not implemented, placeholder only 3069449Salfred; NOSTD implemented but as a lkm that can be statically 3169449Salfred; compiled in sysent entry will be filled with lkmsys 3269449Salfred; so the SYSCALL_MODULE macro works 33104747Srwatson; 34104747Srwatson; Please copy any additions and changes to the following compatability tables: 35104747Srwatson; sys/ia64/ia32/syscalls.master (take a best guess) 36123408Speter; sys/compat/freebsd32/syscalls.master 37123408Speter 381541Srgrimes; #ifdef's, etc. may be included, and are copied to the output files. 391541Srgrimes 4011294Sswallace#include <sys/param.h> 4111294Sswallace#include <sys/sysent.h> 4211294Sswallace#include <sys/sysproto.h> 4311294Sswallace 441541Srgrimes; Reserved/unimplemented system calls in the range 0-150 inclusive 451541Srgrimes; are reserved for use in future Berkeley releases. 461541Srgrimes; Additional system calls implemented in vendor and other 471541Srgrimes; redistributions should be placed in the reserved range at the end 481541Srgrimes; of the current calls. 491541Srgrimes 5011294Sswallace0 STD NOHIDE { int nosys(void); } syscall nosys_args int 5182753Sdillon1 MSTD NOHIDE { void sys_exit(int rval); } exit sys_exit_args void 5282711Sdillon2 MSTD POSIX { int fork(void); } 5382753Sdillon3 MSTD POSIX { ssize_t read(int fd, void *buf, size_t nbyte); } 5482753Sdillon4 MSTD POSIX { ssize_t write(int fd, const void *buf, size_t nbyte); } 5511294Sswallace5 STD POSIX { int open(char *path, int flags, int mode); } 5612216Sbde; XXX should be { int open(const char *path, int flags, ...); } 5712216Sbde; but we're not ready for `const' or varargs. 5812216Sbde; XXX man page says `mode_t mode'. 5982753Sdillon6 MSTD POSIX { int close(int fd); } 6082753Sdillon7 MSTD BSD { int wait4(int pid, int *status, int options, \ 6111294Sswallace struct rusage *rusage); } wait4 wait_args int 6211294Sswallace8 COMPAT BSD { int creat(char *path, int mode); } 6311294Sswallace9 STD POSIX { int link(char *path, char *link); } 6411294Sswallace10 STD POSIX { int unlink(char *path); } 6511294Sswallace11 OBSOL NOHIDE execv 6611294Sswallace12 STD POSIX { int chdir(char *path); } 6711294Sswallace13 STD BSD { int fchdir(int fd); } 6811294Sswallace14 STD POSIX { int mknod(char *path, int mode, int dev); } 6911294Sswallace15 STD POSIX { int chmod(char *path, int mode); } 7011294Sswallace16 STD POSIX { int chown(char *path, int uid, int gid); } 7182585Sdillon17 MSTD BSD { int obreak(char *nsize); } break obreak_args int 72122537Smckusick18 COMPAT4 BSD { int getfsstat(struct ostatfs *buf, long bufsize, \ 7311294Sswallace int flags); } 7411294Sswallace19 COMPAT POSIX { long lseek(int fd, long offset, int whence); } 7582753Sdillon20 MSTD POSIX { pid_t getpid(void); } 7622521Sdyson21 STD BSD { int mount(char *type, char *path, int flags, \ 7711294Sswallace caddr_t data); } 7812216Sbde; XXX `path' should have type `const char *' but we're not ready for that. 7911294Sswallace22 STD BSD { int unmount(char *path, int flags); } 8082753Sdillon23 MSTD POSIX { int setuid(uid_t uid); } 8182585Sdillon24 MSTD POSIX { uid_t getuid(void); } 8282585Sdillon25 MSTD POSIX { uid_t geteuid(void); } 83122635Sjeff26 STD BSD { int ptrace(int req, pid_t pid, caddr_t addr, \ 8411294Sswallace int data); } 8582610Sdillon27 MSTD BSD { int recvmsg(int s, struct msghdr *msg, int flags); } 86123408Speter28 MSTD BSD { int sendmsg(int s, struct msghdr *msg, int flags); } 8782610Sdillon29 MSTD BSD { int recvfrom(int s, caddr_t buf, size_t len, \ 8811294Sswallace int flags, caddr_t from, int *fromlenaddr); } 8982610Sdillon30 MSTD BSD { int accept(int s, caddr_t name, int *anamelen); } 9082610Sdillon31 MSTD BSD { int getpeername(int fdes, caddr_t asa, int *alen); } 9182610Sdillon32 MSTD BSD { int getsockname(int fdes, caddr_t asa, int *alen); } 9211294Sswallace33 STD POSIX { int access(char *path, int flags); } 9311294Sswallace34 STD BSD { int chflags(char *path, int flags); } 9411294Sswallace35 STD BSD { int fchflags(int fd, int flags); } 9511294Sswallace36 STD BSD { int sync(void); } 9682753Sdillon37 MSTD POSIX { int kill(int pid, int signum); } 9711294Sswallace38 COMPAT POSIX { int stat(char *path, struct ostat *ub); } 9882753Sdillon39 MSTD POSIX { pid_t getppid(void); } 9911294Sswallace40 COMPAT POSIX { int lstat(char *path, struct ostat *ub); } 100121284Sdwmalone41 MSTD POSIX { int dup(u_int fd); } 101121298Sscottl42 MSTD POSIX { int pipe(void); } 10282753Sdillon43 MSTD POSIX { gid_t getegid(void); } 10382753Sdillon44 MSTD BSD { int profil(caddr_t samples, size_t size, \ 10438515Sdfr size_t offset, u_int scale); } 105122241Sjhb45 MSTD BSD { int ktrace(const char *fname, int ops, int facs, \ 10611294Sswallace int pid); } 10782753Sdillon46 MCOMPAT POSIX { int sigaction(int signum, struct osigaction *nsa, \ 10851790Smarcel struct osigaction *osa); } 10982585Sdillon47 MSTD POSIX { gid_t getgid(void); } 11082585Sdillon48 MCOMPAT POSIX { int sigprocmask(int how, osigset_t mask); } 11121776Sbde; XXX note nonstandard (bogus) calling convention - the libc stub passes 11221776Sbde; us the mask, not a pointer to it, and we return the old mask as the 11321776Sbde; (int) return value. 11482753Sdillon49 MSTD BSD { int getlogin(char *namebuf, u_int namelen); } 11582753Sdillon50 MSTD BSD { int setlogin(char *namebuf); } 11682711Sdillon51 MSTD BSD { int acct(char *path); } 11782753Sdillon52 MCOMPAT POSIX { int sigpending(void); } 11882753Sdillon53 MSTD BSD { int sigaltstack(stack_t *ss, stack_t *oss); } 11982753Sdillon54 MSTD POSIX { int ioctl(int fd, u_long com, caddr_t data); } 12082753Sdillon55 MSTD BSD { int reboot(int opt); } 12111294Sswallace56 STD POSIX { int revoke(char *path); } 12211294Sswallace57 STD POSIX { int symlink(char *path, char *link); } 12311294Sswallace58 STD POSIX { int readlink(char *path, char *buf, int count); } 12482711Sdillon59 MSTD POSIX { int execve(char *fname, char **argv, char **envv); } 12582585Sdillon60 MSTD POSIX { int umask(int newmask); } umask umask_args int 12611294Sswallace61 STD BSD { int chroot(char *path); } 12782753Sdillon62 MCOMPAT POSIX { int fstat(int fd, struct ostat *sb); } 12882753Sdillon63 MCOMPAT BSD { int getkerninfo(int op, char *where, size_t *size, \ 12911294Sswallace int arg); } getkerninfo getkerninfo_args int 13082585Sdillon64 MCOMPAT BSD { int getpagesize(void); } \ 13111294Sswallace getpagesize getpagesize_args int 132119827Salc65 MSTD BSD { int msync(void *addr, size_t len, int flags); } 13382711Sdillon66 MSTD BSD { int vfork(void); } 13411294Sswallace67 OBSOL NOHIDE vread 13511294Sswallace68 OBSOL NOHIDE vwrite 13682585Sdillon69 MSTD BSD { int sbrk(int incr); } 13782585Sdillon70 MSTD BSD { int sstk(int incr); } 13882585Sdillon71 MCOMPAT BSD { int mmap(void *addr, int len, int prot, \ 13911294Sswallace int flags, int fd, long pos); } 14082585Sdillon72 MSTD BSD { int ovadvise(int anom); } vadvise ovadvise_args int 14182585Sdillon73 MSTD BSD { int munmap(void *addr, size_t len); } 14282585Sdillon74 MSTD BSD { int mprotect(const void *addr, size_t len, int prot); } 14382585Sdillon75 MSTD BSD { int madvise(void *addr, size_t len, int behav); } 14411294Sswallace76 OBSOL NOHIDE vhangup 14511294Sswallace77 OBSOL NOHIDE vlimit 14682585Sdillon78 MSTD BSD { int mincore(const void *addr, size_t len, \ 14733040Sbde char *vec); } 14882753Sdillon79 MSTD POSIX { int getgroups(u_int gidsetsize, gid_t *gidset); } 14982753Sdillon80 MSTD POSIX { int setgroups(u_int gidsetsize, gid_t *gidset); } 15082585Sdillon81 MSTD POSIX { int getpgrp(void); } 15182753Sdillon82 MSTD POSIX { int setpgid(int pid, int pgid); } 15282753Sdillon83 MSTD BSD { int setitimer(u_int which, struct itimerval *itv, \ 15311294Sswallace struct itimerval *oitv); } 15482753Sdillon84 MCOMPAT BSD { int wait(void); } 15582711Sdillon85 MSTD BSD { int swapon(char *name); } 15682753Sdillon86 MSTD BSD { int getitimer(u_int which, struct itimerval *itv); } 15782753Sdillon87 MCOMPAT BSD { int gethostname(char *hostname, u_int len); } \ 15811294Sswallace gethostname gethostname_args int 15982753Sdillon88 MCOMPAT BSD { int sethostname(char *hostname, u_int len); } \ 16011294Sswallace sethostname sethostname_args int 16182753Sdillon89 MSTD BSD { int getdtablesize(void); } 16282753Sdillon90 MSTD POSIX { int dup2(u_int from, u_int to); } 16311294Sswallace91 UNIMPL BSD getdopt 16482753Sdillon92 MSTD POSIX { int fcntl(int fd, int cmd, long arg); } 16512216Sbde; XXX should be { int fcntl(int fd, int cmd, ...); } 16612216Sbde; but we're not ready for varargs. 16782753Sdillon93 MSTD BSD { int select(int nd, fd_set *in, fd_set *ou, \ 16811294Sswallace fd_set *ex, struct timeval *tv); } 16911294Sswallace94 UNIMPL BSD setdopt 17011294Sswallace95 STD POSIX { int fsync(int fd); } 17182753Sdillon96 MSTD BSD { int setpriority(int which, int who, int prio); } 17282610Sdillon97 MSTD BSD { int socket(int domain, int type, int protocol); } 17382610Sdillon98 MSTD BSD { int connect(int s, caddr_t name, int namelen); } 17482610Sdillon99 MCPT_NOA BSD { int accept(int s, caddr_t name, int *anamelen); } \ 17511294Sswallace accept accept_args int 17682753Sdillon100 MSTD BSD { int getpriority(int which, int who); } 17782610Sdillon101 MCOMPAT BSD { int send(int s, caddr_t buf, int len, int flags); } 17882610Sdillon102 MCOMPAT BSD { int recv(int s, caddr_t buf, int len, int flags); } 179105950Speter103 MCOMPAT BSD { int sigreturn(struct osigcontext *sigcntxp); } 18082610Sdillon104 MSTD BSD { int bind(int s, caddr_t name, int namelen); } 18182610Sdillon105 MSTD BSD { int setsockopt(int s, int level, int name, \ 18211294Sswallace caddr_t val, int valsize); } 18382610Sdillon106 MSTD BSD { int listen(int s, int backlog); } 18411294Sswallace107 OBSOL NOHIDE vtimes 18582753Sdillon108 MCOMPAT BSD { int sigvec(int signum, struct sigvec *nsv, \ 18611294Sswallace struct sigvec *osv); } 18782753Sdillon109 MCOMPAT BSD { int sigblock(int mask); } 18882753Sdillon110 MCOMPAT BSD { int sigsetmask(int mask); } 18982753Sdillon111 MCOMPAT POSIX { int sigsuspend(osigset_t mask); } 19021776Sbde; XXX note nonstandard (bogus) calling convention - the libc stub passes 19121776Sbde; us the mask, not a pointer to it. 19282753Sdillon112 MCOMPAT BSD { int sigstack(struct sigstack *nss, \ 19311294Sswallace struct sigstack *oss); } 19482610Sdillon113 MCOMPAT BSD { int recvmsg(int s, struct omsghdr *msg, int flags); } 19582610Sdillon114 MCOMPAT BSD { int sendmsg(int s, caddr_t msg, int flags); } 19611294Sswallace115 OBSOL NOHIDE vtrace 19782585Sdillon116 MSTD BSD { int gettimeofday(struct timeval *tp, \ 19811294Sswallace struct timezone *tzp); } 19982753Sdillon117 MSTD BSD { int getrusage(int who, struct rusage *rusage); } 20082610Sdillon118 MSTD BSD { int getsockopt(int s, int level, int name, \ 20111294Sswallace caddr_t val, int *avalsize); } 20214215Speter119 UNIMPL NOHIDE resuba (BSD/OS 2.x) 20382753Sdillon120 MSTD BSD { int readv(int fd, struct iovec *iovp, u_int iovcnt); } 20482753Sdillon121 MSTD BSD { int writev(int fd, struct iovec *iovp, \ 20511294Sswallace u_int iovcnt); } 20682753Sdillon122 MSTD BSD { int settimeofday(struct timeval *tv, \ 20711294Sswallace struct timezone *tzp); } 20811294Sswallace123 STD BSD { int fchown(int fd, int uid, int gid); } 20911294Sswallace124 STD BSD { int fchmod(int fd, int mode); } 21082610Sdillon125 MCPT_NOA BSD { int recvfrom(int s, caddr_t buf, size_t len, \ 21111294Sswallace int flags, caddr_t from, int *fromlenaddr); } \ 21211294Sswallace recvfrom recvfrom_args int 21382753Sdillon126 MSTD BSD { int setreuid(int ruid, int euid); } 21482753Sdillon127 MSTD BSD { int setregid(int rgid, int egid); } 21511294Sswallace128 STD POSIX { int rename(char *from, char *to); } 21611294Sswallace129 COMPAT BSD { int truncate(char *path, long length); } 21711294Sswallace130 COMPAT BSD { int ftruncate(int fd, long length); } 21882753Sdillon131 MSTD BSD { int flock(int fd, int how); } 21911294Sswallace132 STD POSIX { int mkfifo(char *path, int mode); } 22082610Sdillon133 MSTD BSD { int sendto(int s, caddr_t buf, size_t len, \ 22111294Sswallace int flags, caddr_t to, int tolen); } 22282610Sdillon134 MSTD BSD { int shutdown(int s, int how); } 22382610Sdillon135 MSTD BSD { int socketpair(int domain, int type, int protocol, \ 22411294Sswallace int *rsv); } 22511294Sswallace136 STD POSIX { int mkdir(char *path, int mode); } 22611294Sswallace137 STD POSIX { int rmdir(char *path); } 22711294Sswallace138 STD BSD { int utimes(char *path, struct timeval *tptr); } 22811294Sswallace139 OBSOL NOHIDE 4.2 sigreturn 22982753Sdillon140 MSTD BSD { int adjtime(struct timeval *delta, \ 23011294Sswallace struct timeval *olddelta); } 23182610Sdillon141 MCOMPAT BSD { int getpeername(int fdes, caddr_t asa, int *alen); } 23282753Sdillon142 MCOMPAT BSD { long gethostid(void); } 23382753Sdillon143 MCOMPAT BSD { int sethostid(long hostid); } 23482753Sdillon144 MCOMPAT BSD { int getrlimit(u_int which, struct orlimit *rlp); } 23582753Sdillon145 MCOMPAT BSD { int setrlimit(u_int which, struct orlimit *rlp); } 23682753Sdillon146 MCOMPAT BSD { int killpg(int pgid, int signum); } 23782753Sdillon147 MSTD POSIX { int setsid(void); } 23811294Sswallace148 STD BSD { int quotactl(char *path, int cmd, int uid, \ 23911294Sswallace caddr_t arg); } 24082753Sdillon149 MCOMPAT BSD { int quota(void); } 24182610Sdillon150 MCPT_NOA BSD { int getsockname(int fdec, caddr_t asa, int *alen); }\ 24211330Sswallace getsockname getsockname_args int 2431541Srgrimes 2441541Srgrimes; Syscalls 151-180 inclusive are reserved for vendor-specific 2451541Srgrimes; system calls. (This includes various calls added for compatibity 2461541Srgrimes; with other Unix variants.) 2471541Srgrimes; Some of these calls are now supported by BSD... 24814215Speter151 UNIMPL NOHIDE sem_lock (BSD/OS 2.x) 24914215Speter152 UNIMPL NOHIDE sem_wakeup (BSD/OS 2.x) 25014215Speter153 UNIMPL NOHIDE asyncdaemon (BSD/OS 2.x) 25111294Sswallace154 UNIMPL NOHIDE nosys 25230740Sphk; 155 is initialized by the NFS code, if present. 25382711Sdillon155 MNOIMPL BSD { int nfssvc(int flag, caddr_t argp); } 25411294Sswallace156 COMPAT BSD { int getdirentries(int fd, char *buf, u_int count, \ 25511294Sswallace long *basep); } 256122537Smckusick157 COMPAT4 BSD { int statfs(char *path, struct ostatfs *buf); } 257122537Smckusick158 COMPAT4 BSD { int fstatfs(int fd, struct ostatfs *buf); } 25811294Sswallace159 UNIMPL NOHIDE nosys 25911294Sswallace160 UNIMPL NOHIDE nosys 26054970Salfred161 STD BSD { int getfh(char *fname, struct fhandle *fhp); } 26182753Sdillon162 MSTD BSD { int getdomainname(char *domainname, int len); } 26282753Sdillon163 MSTD BSD { int setdomainname(char *domainname, int len); } 26382753Sdillon164 MSTD BSD { int uname(struct utsname *name); } 264122241Sjhb165 MSTD BSD { int sysarch(int op, char *parms); } 26582753Sdillon166 MSTD BSD { int rtprio(int function, pid_t pid, \ 26611294Sswallace struct rtprio *rtp); } 26711294Sswallace167 UNIMPL NOHIDE nosys 26811294Sswallace168 UNIMPL NOHIDE nosys 26969449Salfred; 169 is initialized by the SYSVSEM code if present or loaded 27082607Sdillon169 MNOSTD BSD { int semsys(int which, int a2, int a3, int a4, \ 27111294Sswallace int a5); } 27269449Salfred; 169 is initialized by the SYSVMSG code if present or loaded 27312216Sbde; XXX should be { int semsys(int which, ...); } 27482607Sdillon170 MNOSTD BSD { int msgsys(int which, int a2, int a3, int a4, \ 27511294Sswallace int a5, int a6); } 27669449Salfred; 169 is initialized by the SYSVSHM code if present or loaded 27712216Sbde; XXX should be { int msgsys(int which, ...); } 27882607Sdillon171 MNOSTD BSD { int shmsys(int which, int a2, int a3, int a4); } 27912216Sbde; XXX should be { int shmsys(int which, ...); } 28011294Sswallace172 UNIMPL NOHIDE nosys 28182753Sdillon173 MSTD POSIX { ssize_t pread(int fd, void *buf, size_t nbyte, \ 28245311Sdt int pad, off_t offset); } 28382753Sdillon174 MSTD POSIX { ssize_t pwrite(int fd, const void *buf, \ 28445311Sdt size_t nbyte, int pad, off_t offset); } 28511294Sswallace175 UNIMPL NOHIDE nosys 28682753Sdillon176 MSTD BSD { int ntp_adjtime(struct timex *tp); } 28714215Speter177 UNIMPL NOHIDE sfork (BSD/OS 2.x) 28814215Speter178 UNIMPL NOHIDE getdescriptor (BSD/OS 2.x) 28914215Speter179 UNIMPL NOHIDE setdescriptor (BSD/OS 2.x) 29049428Sjkh180 UNIMPL NOHIDE nosys 2911541Srgrimes 29249428Sjkh; Syscalls 181-199 are used by/reserved for BSD 29382753Sdillon181 MSTD POSIX { int setgid(gid_t gid); } 29482753Sdillon182 MSTD BSD { int setegid(gid_t egid); } 29582753Sdillon183 MSTD BSD { int seteuid(uid_t euid); } 29632889Sphk184 UNIMPL BSD lfs_bmapv 29732889Sphk185 UNIMPL BSD lfs_markv 29832889Sphk186 UNIMPL BSD lfs_segclean 29932889Sphk187 UNIMPL BSD lfs_segwait 30011294Sswallace188 STD POSIX { int stat(char *path, struct stat *ub); } 30182753Sdillon189 MSTD POSIX { int fstat(int fd, struct stat *sb); } 30211294Sswallace190 STD POSIX { int lstat(char *path, struct stat *ub); } 30311294Sswallace191 STD POSIX { int pathconf(char *path, int name); } 30482753Sdillon192 MSTD POSIX { int fpathconf(int fd, int name); } 30511294Sswallace193 UNIMPL NOHIDE nosys 30682753Sdillon194 MSTD BSD { int getrlimit(u_int which, \ 30765150Smarcel struct rlimit *rlp); } \ 30811294Sswallace getrlimit __getrlimit_args int 30982753Sdillon195 MSTD BSD { int setrlimit(u_int which, \ 31065150Smarcel struct rlimit *rlp); } \ 31111294Sswallace setrlimit __setrlimit_args int 31211294Sswallace196 STD BSD { int getdirentries(int fd, char *buf, u_int count, \ 31311294Sswallace long *basep); } 31482585Sdillon197 MSTD BSD { caddr_t mmap(caddr_t addr, size_t len, int prot, \ 31560247Sbde int flags, int fd, int pad, off_t pos); } 31611294Sswallace198 STD NOHIDE { int nosys(void); } __syscall __syscall_args int 31711294Sswallace199 STD POSIX { off_t lseek(int fd, int pad, off_t offset, \ 31811294Sswallace int whence); } 31911294Sswallace200 STD BSD { int truncate(char *path, int pad, off_t length); } 32011294Sswallace201 STD BSD { int ftruncate(int fd, int pad, off_t length); } 32182753Sdillon202 MSTD BSD { int __sysctl(int *name, u_int namelen, void *old, \ 32211294Sswallace size_t *oldlenp, void *new, size_t newlen); } \ 32311294Sswallace __sysctl sysctl_args int 3242696Swollman; properly, __sysctl should be a NOHIDE, but making an exception 3252696Swollman; here allows to avoid one in libc/sys/Makefile.inc. 32682585Sdillon203 MSTD BSD { int mlock(const void *addr, size_t len); } 32782585Sdillon204 MSTD BSD { int munlock(const void *addr, size_t len); } 32835938Sdyson205 STD BSD { int undelete(char *path); } 32935938Sdyson206 STD BSD { int futimes(int fd, struct timeval *tptr); } 33082753Sdillon207 MSTD BSD { int getpgid(pid_t pid); } 33125581Speter208 UNIMPL NOHIDE newreboot (NetBSD) 33282753Sdillon209 MSTD BSD { int poll(struct pollfd *fds, u_int nfds, \ 33329348Speter int timeout); } 3342124Sdg 3352124Sdg; 3362124Sdg; The following are reserved for loadable syscalls 3372124Sdg; 33811294Sswallace210 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 33911294Sswallace211 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 34011294Sswallace212 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 34111294Sswallace213 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 34211294Sswallace214 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 34311294Sswallace215 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 34411294Sswallace216 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 34511294Sswallace217 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 34611294Sswallace218 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 34711294Sswallace219 NODEF NOHIDE lkmnosys lkmnosys nosys_args int 34812864Speter 34912864Speter; 35014215Speter; The following were introduced with NetBSD/4.4Lite-2 35169449Salfred; They are initialized by thier respective modules/sysinits 35282607Sdillon220 MNOSTD BSD { int __semctl(int semid, int semnum, int cmd, \ 35312864Speter union semun *arg); } 35482607Sdillon221 MNOSTD BSD { int semget(key_t key, int nsems, int semflg); } 35582607Sdillon222 MNOSTD BSD { int semop(int semid, struct sembuf *sops, \ 356109829Salfred size_t nsops); } 35759827Speter223 UNIMPL NOHIDE semconfig 35882607Sdillon224 MNOSTD BSD { int msgctl(int msqid, int cmd, \ 35912864Speter struct msqid_ds *buf); } 36082607Sdillon225 MNOSTD BSD { int msgget(key_t key, int msgflg); } 361109895Salfred226 MNOSTD BSD { int msgsnd(int msqid, const void *msgp, size_t msgsz, \ 36212864Speter int msgflg); } 36382607Sdillon227 MNOSTD BSD { int msgrcv(int msqid, void *msgp, size_t msgsz, \ 36412864Speter long msgtyp, int msgflg); } 365109831Salfred228 MNOSTD BSD { int shmat(int shmid, const void *shmaddr, int shmflg); } 36682607Sdillon229 MNOSTD BSD { int shmctl(int shmid, int cmd, \ 36712864Speter struct shmid_ds *buf); } 368109831Salfred230 MNOSTD BSD { int shmdt(const void *shmaddr); } 369109831Salfred231 MNOSTD BSD { int shmget(key_t key, size_t size, int shmflg); } 37014219Speter; 37182753Sdillon232 MSTD POSIX { int clock_gettime(clockid_t clock_id, \ 37225580Speter struct timespec *tp); } 37382753Sdillon233 MSTD POSIX { int clock_settime(clockid_t clock_id, \ 37425580Speter const struct timespec *tp); } 37582753Sdillon234 MSTD POSIX { int clock_getres(clockid_t clock_id, \ 37625580Speter struct timespec *tp); } 37725580Speter235 UNIMPL NOHIDE timer_create 37825580Speter236 UNIMPL NOHIDE timer_delete 37925580Speter237 UNIMPL NOHIDE timer_settime 38025580Speter238 UNIMPL NOHIDE timer_gettime 38125580Speter239 UNIMPL NOHIDE timer_getoverrun 38282753Sdillon240 MSTD POSIX { int nanosleep(const struct timespec *rqtp, \ 38325580Speter struct timespec *rmtp); } 38414219Speter241 UNIMPL NOHIDE nosys 38514219Speter242 UNIMPL NOHIDE nosys 38614219Speter243 UNIMPL NOHIDE nosys 38714219Speter244 UNIMPL NOHIDE nosys 38814219Speter245 UNIMPL NOHIDE nosys 38914219Speter246 UNIMPL NOHIDE nosys 39014219Speter247 UNIMPL NOHIDE nosys 39114219Speter248 UNIMPL NOHIDE nosys 39214219Speter249 UNIMPL NOHIDE nosys 39314219Speter; syscall numbers initially used in OpenBSD 39482585Sdillon250 MSTD BSD { int minherit(void *addr, size_t len, int inherit); } 39582711Sdillon251 MSTD BSD { int rfork(int flags); } 39682753Sdillon252 MSTD BSD { int openbsd_poll(struct pollfd *fds, u_int nfds, \ 39729348Speter int timeout); } 398122241Sjhb253 MSTD BSD { int issetugid(void); } 39924439Speter254 STD BSD { int lchown(char *path, int uid, int gid); } 40025537Sdfr255 UNIMPL NOHIDE nosys 40125537Sdfr256 UNIMPL NOHIDE nosys 40225537Sdfr257 UNIMPL NOHIDE nosys 40325537Sdfr258 UNIMPL NOHIDE nosys 40425537Sdfr259 UNIMPL NOHIDE nosys 40525537Sdfr260 UNIMPL NOHIDE nosys 40625537Sdfr261 UNIMPL NOHIDE nosys 40725537Sdfr262 UNIMPL NOHIDE nosys 40825537Sdfr263 UNIMPL NOHIDE nosys 40925537Sdfr264 UNIMPL NOHIDE nosys 41025537Sdfr265 UNIMPL NOHIDE nosys 41125537Sdfr266 UNIMPL NOHIDE nosys 41225537Sdfr267 UNIMPL NOHIDE nosys 41325537Sdfr268 UNIMPL NOHIDE nosys 41425537Sdfr269 UNIMPL NOHIDE nosys 41525537Sdfr270 UNIMPL NOHIDE nosys 41625537Sdfr271 UNIMPL NOHIDE nosys 41735938Sdyson272 STD BSD { int getdents(int fd, char *buf, size_t count); } 41825537Sdfr273 UNIMPL NOHIDE nosys 41935938Sdyson274 STD BSD { int lchmod(char *path, mode_t mode); } 42060247Sbde275 NOPROTO BSD { int lchown(char *path, uid_t uid, gid_t gid); } netbsd_lchown lchown_args int 42135938Sdyson276 STD BSD { int lutimes(char *path, struct timeval *tptr); } 42282585Sdillon277 MNOPROTO BSD { int msync(void *addr, size_t len, int flags); } netbsd_msync msync_args int 42335938Sdyson278 STD BSD { int nstat(char *path, struct nstat *ub); } 42482753Sdillon279 MSTD BSD { int nfstat(int fd, struct nstat *sb); } 42535938Sdyson280 STD BSD { int nlstat(char *path, struct nstat *ub); } 42625537Sdfr281 UNIMPL NOHIDE nosys 42725537Sdfr282 UNIMPL NOHIDE nosys 42825537Sdfr283 UNIMPL NOHIDE nosys 42925537Sdfr284 UNIMPL NOHIDE nosys 43025537Sdfr285 UNIMPL NOHIDE nosys 43125537Sdfr286 UNIMPL NOHIDE nosys 43225537Sdfr287 UNIMPL NOHIDE nosys 43325537Sdfr288 UNIMPL NOHIDE nosys 43425537Sdfr289 UNIMPL NOHIDE nosys 43525537Sdfr290 UNIMPL NOHIDE nosys 43625537Sdfr291 UNIMPL NOHIDE nosys 43725537Sdfr292 UNIMPL NOHIDE nosys 43825537Sdfr293 UNIMPL NOHIDE nosys 43925537Sdfr294 UNIMPL NOHIDE nosys 44025537Sdfr295 UNIMPL NOHIDE nosys 44125537Sdfr296 UNIMPL NOHIDE nosys 44251138Salfred; XXX 297 is 300 in NetBSD 443122537Smckusick297 COMPAT4 BSD { int fhstatfs(const struct fhandle *u_fhp, struct ostatfs *buf); } 44451138Salfred298 STD BSD { int fhopen(const struct fhandle *u_fhp, int flags); } 44551138Salfred299 STD BSD { int fhstat(const struct fhandle *u_fhp, struct stat *sb); } 44625537Sdfr; syscall numbers for FreeBSD 44782753Sdillon300 MSTD BSD { int modnext(int modid); } 44882753Sdillon301 MSTD BSD { int modstat(int modid, struct module_stat* stat); } 44982753Sdillon302 MSTD BSD { int modfnext(int modid); } 45082753Sdillon303 MSTD BSD { int modfind(const char *name); } 45182753Sdillon304 MSTD BSD { int kldload(const char *file); } 45282753Sdillon305 MSTD BSD { int kldunload(int fileid); } 45382753Sdillon306 MSTD BSD { int kldfind(const char *file); } 45482753Sdillon307 MSTD BSD { int kldnext(int fileid); } 45582753Sdillon308 MSTD BSD { int kldstat(int fileid, struct kld_file_stat* stat); } 45682753Sdillon309 MSTD BSD { int kldfirstmod(int fileid); } 45782753Sdillon310 MSTD BSD { int getsid(pid_t pid); } 45882753Sdillon311 MSTD BSD { int setresuid(uid_t ruid, uid_t euid, uid_t suid); } 45982753Sdillon312 MSTD BSD { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); } 46036033Speter313 OBSOL NOHIDE signanosleep 46188633Salfred314 NOSTD BSD { int aio_return(struct aiocb *aiocbp); } 46288633Salfred315 NOSTD BSD { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); } 46388633Salfred316 NOSTD BSD { int aio_cancel(int fd, struct aiocb *aiocbp); } 46488633Salfred317 NOSTD BSD { int aio_error(struct aiocb *aiocbp); } 46588633Salfred318 NOSTD BSD { int aio_read(struct aiocb *aiocbp); } 46688633Salfred319 NOSTD BSD { int aio_write(struct aiocb *aiocbp); } 46788633Salfred320 NOSTD BSD { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); } 46882711Sdillon321 MSTD BSD { int yield(void); } 46969512Sjake322 OBSOL NOHIDE thr_sleep 47069512Sjake323 OBSOL NOHIDE thr_wakeup 47182585Sdillon324 MSTD BSD { int mlockall(int how); } 47282585Sdillon325 MSTD BSD { int munlockall(void); } 47329391Sphk326 STD BSD { int __getcwd(u_char *buf, u_int buflen); } 47434925Sdufault 47582711Sdillon327 MSTD POSIX { int sched_setparam (pid_t pid, const struct sched_param *param); } 47682711Sdillon328 MSTD POSIX { int sched_getparam (pid_t pid, struct sched_param *param); } 47734925Sdufault 47882711Sdillon329 MSTD POSIX { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); } 47982711Sdillon330 MSTD POSIX { int sched_getscheduler (pid_t pid); } 48034925Sdufault 48182711Sdillon331 MSTD POSIX { int sched_yield (void); } 48282711Sdillon332 MSTD POSIX { int sched_get_priority_max (int policy); } 48382711Sdillon333 MSTD POSIX { int sched_get_priority_min (int policy); } 48482711Sdillon334 MSTD POSIX { int sched_rr_get_interval (pid_t pid, struct timespec *interval); } 485122241Sjhb335 MSTD BSD { int utrace(const void *addr, size_t len); } 48699855Salfred336 MCOMPAT4 BSD { int sendfile(int fd, int s, off_t offset, size_t nbytes, \ 48740931Sdg struct sf_hdtr *hdtr, off_t *sbytes, int flags); } 48841088Speter337 STD BSD { int kldsym(int fileid, int cmd, void *data); } 48982711Sdillon338 MSTD BSD { int jail(struct jail *jail); } 49049420Sjkh339 UNIMPL BSD pioctl 49182585Sdillon340 MSTD POSIX { int sigprocmask(int how, const sigset_t *set, \ 49251790Smarcel sigset_t *oset); } 49382753Sdillon341 MSTD POSIX { int sigsuspend(const sigset_t *sigmask); } 494105950Speter342 MCOMPAT4 POSIX { int sigaction(int sig, const struct sigaction *act, \ 49551790Smarcel struct sigaction *oact); } 49682753Sdillon343 MSTD POSIX { int sigpending(sigset_t *set); } 497105950Speter344 MCOMPAT4 BSD { int sigreturn(const struct ucontext4 *sigcntxp); } 498112893Sjeff345 MSTD NOHIDE { int sigtimedwait(const sigset_t *set, \ 499112893Sjeff siginfo_t *info, const struct timespec *timeout); } 500112893Sjeff346 MSTD NOHIDE { int sigwaitinfo(const sigset_t *set, \ 501112893Sjeff siginfo_t *info); } 50282753Sdillon347 MSTD BSD { int __acl_get_file(const char *path, \ 50356270Srwatson acl_type_t type, struct acl *aclp); } 50482753Sdillon348 MSTD BSD { int __acl_set_file(const char *path, \ 50556270Srwatson acl_type_t type, struct acl *aclp); } 50682753Sdillon349 MSTD BSD { int __acl_get_fd(int filedes, acl_type_t type, \ 50756270Srwatson struct acl *aclp); } 50882753Sdillon350 MSTD BSD { int __acl_set_fd(int filedes, acl_type_t type, \ 50956270Srwatson struct acl *aclp); } 51082753Sdillon351 MSTD BSD { int __acl_delete_file(const char *path, \ 51156270Srwatson acl_type_t type); } 51282753Sdillon352 MSTD BSD { int __acl_delete_fd(int filedes, acl_type_t type); } 51382753Sdillon353 MSTD BSD { int __acl_aclcheck_file(const char *path, \ 51456270Srwatson acl_type_t type, struct acl *aclp); } 51582753Sdillon354 MSTD BSD { int __acl_aclcheck_fd(int filedes, acl_type_t type, \ 51656270Srwatson struct acl *aclp); } 51756270Srwatson355 STD BSD { int extattrctl(const char *path, int cmd, \ 51874437Srwatson const char *filename, int attrnamespace, \ 51974273Srwatson const char *attrname); } 52056270Srwatson356 STD BSD { int extattr_set_file(const char *path, \ 52174437Srwatson int attrnamespace, const char *attrname, \ 52290448Srwatson void *data, size_t nbytes); } 52390448Srwatson357 STD BSD { ssize_t extattr_get_file(const char *path, \ 52474437Srwatson int attrnamespace, const char *attrname, \ 52590448Srwatson void *data, size_t nbytes); } 52656270Srwatson358 STD BSD { int extattr_delete_file(const char *path, \ 52774437Srwatson int attrnamespace, const char *attrname); } 52888633Salfred359 NOSTD BSD { int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); } 52982753Sdillon360 MSTD BSD { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); } 53082753Sdillon361 MSTD BSD { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); } 53182711Sdillon362 MSTD BSD { int kqueue(void); } 53282711Sdillon363 MSTD BSD { int kevent(int fd, \ 53363452Sjlemon const struct kevent *changelist, int nchanges, \ 53463452Sjlemon struct kevent *eventlist, int nevents, \ 53563452Sjlemon const struct timespec *timeout); } 53698197Srwatson364 UNIMPL BSD __cap_get_proc 53798197Srwatson365 UNIMPL BSD __cap_set_proc 53898197Srwatson366 UNIMPL BSD __cap_get_fd 53998197Srwatson367 UNIMPL BSD __cap_get_file 54098197Srwatson368 UNIMPL BSD __cap_set_fd 54198197Srwatson369 UNIMPL BSD __cap_set_file 54269449Salfred370 NODEF NOHIDE lkmressys lkmressys nosys_args int 54375038Srwatson371 STD BSD { int extattr_set_fd(int fd, int attrnamespace, \ 54490448Srwatson const char *attrname, void *data, \ 54590448Srwatson size_t nbytes); } 54690448Srwatson372 STD BSD { ssize_t extattr_get_fd(int fd, int attrnamespace, \ 54790448Srwatson const char *attrname, void *data, size_t nbytes); } 54875038Srwatson373 STD BSD { int extattr_delete_fd(int fd, int attrnamespace, \ 54975038Srwatson const char *attrname); } 55082753Sdillon374 MSTD BSD { int __setugid(int flag); } 55183651Speter375 NOIMPL BSD { int nfsclnt(int flag, caddr_t argp); } 55283795Srwatson376 STD BSD { int eaccess(char *path, int flags); } 55384883Srwatson377 UNIMPL BSD afs_syscall 55485890Sphk378 STD BSD { int nmount(struct iovec *iovp, unsigned int iovcnt, \ 55585890Sphk int flags); } 556108659Sdavidxu379 MSTD BSD { int kse_exit(void); } 557108659Sdavidxu380 MSTD BSD { int kse_wakeup(struct kse_mailbox *mbx); } 558103972Sarchie381 STD BSD { int kse_create(struct kse_mailbox *mbx, \ 559103972Sarchie int newgroup); } 560117704Sdavidxu382 MSTD BSD { int kse_thr_interrupt(struct kse_thr_mailbox *tmbx, int cmd, long data); } 561111169Sdavidxu383 MSTD BSD { int kse_release(struct timespec *timeout); } 562100990Srwatson384 MSTD BSD { int __mac_get_proc(struct mac *mac_p); } 563100990Srwatson385 MSTD BSD { int __mac_set_proc(struct mac *mac_p); } 564100990Srwatson386 MSTD BSD { int __mac_get_fd(int fd, struct mac *mac_p); } 565100990Srwatson387 MSTD BSD { int __mac_get_file(const char *path_p, \ 566100990Srwatson struct mac *mac_p); } 567100990Srwatson388 MSTD BSD { int __mac_set_fd(int fd, struct mac *mac_p); } 568100990Srwatson389 MSTD BSD { int __mac_set_file(const char *path_p, \ 569100990Srwatson struct mac *mac_p); } 57094935Smux390 STD BSD { int kenv(int what, const char *name, char *value, \ 57194935Smux int len); } 57296083Smux391 STD BSD { int lchflags(const char *path, int flags); } 57397369Smarcel392 STD BSD { int uuidgen(struct uuid *store, int count); } 57499855Salfred393 MSTD BSD { int sendfile(int fd, int s, off_t offset, size_t nbytes, \ 57599855Salfred struct sf_hdtr *hdtr, off_t *sbytes, int flags); } 576102132Srwatson394 MSTD BSD { int mac_syscall(const char *policy, int call, \ 577100954Srwatson void *arg); } 578122537Smckusick395 STD BSD { int getfsstat(struct statfs *buf, long bufsize, \ 579122537Smckusick int flags); } 580122537Smckusick396 STD BSD { int statfs(char *path, struct statfs *buf); } 581122537Smckusick397 STD BSD { int fstatfs(int fd, struct statfs *buf); } 582122537Smckusick398 STD BSD { int fhstatfs(const struct fhandle *u_fhp, \ 583122537Smckusick struct statfs *buf); } 584103574Salfred399 UNIMPL NOHIDE nosys 585103574Salfred400 MNOSTD BSD { int ksem_close(semid_t id); } 586103574Salfred401 MNOSTD BSD { int ksem_post(semid_t id); } 587103574Salfred402 MNOSTD BSD { int ksem_wait(semid_t id); } 588103574Salfred403 MNOSTD BSD { int ksem_trywait(semid_t id); } 589103574Salfred404 MNOSTD BSD { int ksem_init(semid_t *idp, unsigned int value); } 590103574Salfred405 MNOSTD BSD { int ksem_open(semid_t *idp, const char *name, \ 591103574Salfred int oflag, mode_t mode, unsigned int value); } 592103574Salfred406 MNOSTD BSD { int ksem_unlink(const char *name); } 593103574Salfred407 MNOSTD BSD { int ksem_getvalue(semid_t id, int *val); } 594103574Salfred408 MNOSTD BSD { int ksem_destroy(semid_t id); } 595105691Srwatson409 MSTD BSD { int __mac_get_pid(pid_t pid, struct mac *mac_p); } 596105691Srwatson410 MSTD BSD { int __mac_get_link(const char *path_p, \ 597105691Srwatson struct mac *mac_p); } 598105691Srwatson411 MSTD BSD { int __mac_set_link(const char *path_p, \ 599105691Srwatson struct mac *mac_p); } 600104730Srwatson412 STD BSD { int extattr_set_link(const char *path, \ 601104730Srwatson int attrnamespace, const char *attrname, \ 602104730Srwatson void *data, size_t nbytes); } 603104730Srwatson413 STD BSD { ssize_t extattr_get_link(const char *path, \ 604104730Srwatson int attrnamespace, const char *attrname, \ 605104730Srwatson void *data, size_t nbytes); } 606104730Srwatson414 STD BSD { int extattr_delete_link(const char *path, \ 607104730Srwatson int attrnamespace, const char *attrname); } 608106466Srwatson415 MSTD BSD { int __mac_execve(char *fname, char **argv, \ 609106466Srwatson char **envv, struct mac *mac_p); } 610105950Speter416 MSTD POSIX { int sigaction(int sig, const struct sigaction *act, \ 611105950Speter struct sigaction *oact); } 612105950Speter417 MSTD BSD { int sigreturn(const struct __ucontext *sigcntxp); } 613105490Speter418 UNIMPL BSD __xstat 614105490Speter419 UNIMPL BSD __xfstat 615105490Speter420 UNIMPL BSD __xlstat 616106977Sdeischen421 MSTD BSD { int getcontext(struct __ucontext *ucp); } 617106977Sdeischen422 MSTD BSD { int setcontext(const struct __ucontext *ucp); } 618106977Sdeischen423 MSTD BSD { int swapcontext(struct __ucontext *oucp, \ 619106977Sdeischen const struct __ucontext *ucp); } 620107913Sdillon424 MSTD BSD { int swapoff(const char *name); } 621108405Srwatson425 MSTD BSD { int __acl_get_link(const char *path, \ 622108405Srwatson acl_type_t type, struct acl *aclp); } 623108405Srwatson426 MSTD BSD { int __acl_set_link(const char *path, \ 624108405Srwatson acl_type_t type, struct acl *aclp); } 625108405Srwatson427 MSTD BSD { int __acl_delete_link(const char *path, \ 626108405Srwatson acl_type_t type); } 627108405Srwatson428 MSTD BSD { int __acl_aclcheck_link(const char *path, \ 628108405Srwatson acl_type_t type, struct acl *aclp); } 629112893Sjeff429 MSTD NOHIDE { int sigwait(const sigset_t *set, int *sig); } 630112911Sjeff430 MSTD BSD { int thr_create(ucontext_t *ctx, thr_id_t *id, int flags); } 631112911Sjeff431 MSTD BSD { void thr_exit(void); } 632112911Sjeff432 MSTD BSD { int thr_self(thr_id_t *id); } 633112911Sjeff433 MSTD BSD { int thr_kill(thr_id_t id, int sig); } 634112906Sjeff434 MSTD BSD { int _umtx_lock(struct umtx *umtx); } 635112906Sjeff435 MSTD BSD { int _umtx_unlock(struct umtx *umtx); } 636113275Smike436 MSTD BSD { int jail_attach(int jid); } 637115799Srwatson437 STD BSD { ssize_t extattr_list_fd(int fd, int attrnamespace, \ 638115799Srwatson void *data, size_t nbytes); } 639115799Srwatson438 STD BSD { ssize_t extattr_list_file(const char *path, \ 640115799Srwatson int attrnamespace, void *data, size_t nbytes); } 641115799Srwatson439 STD BSD { ssize_t extattr_list_link(const char *path, \ 642115799Srwatson int attrnamespace, void *data, size_t nbytes); } 643123252Smarcel440 MSTD BSD { int kse_switchin(const struct __mcontext *mcp, \ 644123252Smarcel long val, long *loc); } 645105144Speter 646105144Speter; Please copy any additions and changes to the following compatability tables: 647105144Speter; sys/ia64/ia32/syscalls.master (take a best guess) 648123408Speter; sys/compat/freebsd32/syscalls.master 649