syscalls.master revision 90889
159243Sobrien $FreeBSD: head/sys/kern/syscalls.master 90889 2002-02-19 02:40:31Z julian $
2145479Smp;	from: @(#)syscalls.master	8.2 (Berkeley) 1/13/94
359243Sobrien;
459243Sobrien; System call name/number master file.
5131962Smp; Processed to created init_sysent.c, syscalls.c and syscall.h.
6131962Smp
7131962Smp; Columns: number [M]type nargs namespc name alt{name,tag,rtyp}/comments
8145479Smp;	number	system call number, must be in order
9131962Smp;	type	one of [M]STD, [M]OBSOL, [M]UNIMPL, [M]COMPAT, [M]CPT_NOA,
10131962Smp;		[M]LIBCOMPAT, [M]NODEF,  [M]NOARGS,  [M]NOPROTO,  [M]NOIMPL,
11131962Smp;		[M]NOSTD
12131962Smp;	namespc one of POSIX, BSD, NOHIDE
13131962Smp;	name	psuedo-prototype of syscall routine
14131962Smp;		If one of the following alts is different, then all appear:
15131962Smp;	altname	name of system call if different
16131962Smp;	alttag	name of args struct tag if different from [o]`name'"_args"
17131962Smp;	altrtyp	return type if not int (bogus - syscalls always return int)
18131962Smp;		for UNIMPL/OBSOL, name continues with comments
19131962Smp
20131962Smp; types:
2159243Sobrien;	[M]	e.g. like MSTD -- means the system call is MP-safe.  If no
2259243Sobrien;		M prefix is used, the syscall wrapper will obtain the Giant
2359243Sobrien;		lock for the syscall.
2459243Sobrien;	STD	always included
2559243Sobrien;	COMPAT	included on COMPAT #ifdef
2659243Sobrien;	LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h
2759243Sobrien;	OBSOL	obsolete, not included in system, only specifies name
2859243Sobrien;	UNIMPL	not implemented, placeholder only
2959243Sobrien;	NOSTD	implemented but as a lkm that can be statically
3059243Sobrien;			compiled in sysent entry will be filled with lkmsys
3159243Sobrien;			so the SYSCALL_MODULE macro works
3259243Sobrien
3383098Smp; #ifdef's, etc. may be included, and are copied to the output files.
3459243Sobrien
3559243Sobrien#include <sys/param.h>
3659243Sobrien#include <sys/sysent.h>
3759243Sobrien#include <sys/sysproto.h>
3883098Smp
3959243Sobrien; Reserved/unimplemented system calls in the range 0-150 inclusive
40100616Smp; are reserved for use in future Berkeley releases.
4159243Sobrien; Additional system calls implemented in vendor and other
4259243Sobrien; redistributions should be placed in the reserved range at the end
43100616Smp; of the current calls.
4459243Sobrien
4559243Sobrien0	STD	NOHIDE	{ int nosys(void); } syscall nosys_args int
4659243Sobrien1	MSTD	NOHIDE	{ void sys_exit(int rval); } exit sys_exit_args void
4759243Sobrien2	MSTD	POSIX	{ int fork(void); }
4859243Sobrien3	MSTD	POSIX	{ ssize_t read(int fd, void *buf, size_t nbyte); }
4959243Sobrien4	MSTD	POSIX	{ ssize_t write(int fd, const void *buf, size_t nbyte); }
50100616Smp5	STD	POSIX	{ int open(char *path, int flags, int mode); }
51100616Smp; XXX should be		{ int open(const char *path, int flags, ...); }
52145479Smp; but we're not ready for `const' or varargs.
53100616Smp; XXX man page says `mode_t mode'.
54100616Smp6	MSTD	POSIX	{ int close(int fd); }
5559243Sobrien7	MSTD	BSD	{ int wait4(int pid, int *status, int options, \
5659243Sobrien			    struct rusage *rusage); } wait4 wait_args int
5759243Sobrien8	COMPAT	BSD	{ int creat(char *path, int mode); }
5859243Sobrien9	STD	POSIX	{ int link(char *path, char *link); }
5959243Sobrien10	STD	POSIX	{ int unlink(char *path); }
6059243Sobrien11	OBSOL	NOHIDE	execv
6159243Sobrien12	STD	POSIX	{ int chdir(char *path); }
6259243Sobrien13	STD	BSD	{ int fchdir(int fd); }
6359243Sobrien14	STD	POSIX	{ int mknod(char *path, int mode, int dev); }
6459243Sobrien15	STD	POSIX	{ int chmod(char *path, int mode); }
6559243Sobrien16	STD	POSIX	{ int chown(char *path, int uid, int gid); }
6659243Sobrien17	MSTD	BSD	{ int obreak(char *nsize); } break obreak_args int
6759243Sobrien18	STD	BSD	{ int getfsstat(struct statfs *buf, long bufsize, \
6859243Sobrien			    int flags); }
6959243Sobrien19	COMPAT	POSIX	{ long lseek(int fd, long offset, int whence); }
7059243Sobrien20	MSTD	POSIX	{ pid_t getpid(void); }
7159243Sobrien21	STD	BSD	{ int mount(char *type, char *path, int flags, \
7259243Sobrien			    caddr_t data); }
7359243Sobrien; XXX `path' should have type `const char *' but we're not ready for that.
7459243Sobrien22	STD	BSD	{ int unmount(char *path, int flags); }
7559243Sobrien23	MSTD	POSIX	{ int setuid(uid_t uid); }
7659243Sobrien24	MSTD	POSIX	{ uid_t getuid(void); }
7759243Sobrien25	MSTD	POSIX	{ uid_t geteuid(void); }
7859243Sobrien26	STD	BSD	{ int ptrace(int req, pid_t pid, caddr_t addr, \
7959243Sobrien			    int data); }
8059243Sobrien27	MSTD	BSD	{ int recvmsg(int s, struct msghdr *msg, int flags); }
8159243Sobrien28	MSTD	BSD	{ int sendmsg(int s, caddr_t msg, int flags); }
8259243Sobrien29	MSTD	BSD	{ int recvfrom(int s, caddr_t buf, size_t len, \
8359243Sobrien			    int flags, caddr_t from, int *fromlenaddr); }
8459243Sobrien30	MSTD	BSD	{ int accept(int s, caddr_t name, int *anamelen); }
8559243Sobrien31	MSTD	BSD	{ int getpeername(int fdes, caddr_t asa, int *alen); }
8659243Sobrien32	MSTD	BSD	{ int getsockname(int fdes, caddr_t asa, int *alen); }
8759243Sobrien33	STD	POSIX	{ int access(char *path, int flags); }
8859243Sobrien34	STD	BSD	{ int chflags(char *path, int flags); }
8959243Sobrien35	STD	BSD	{ int fchflags(int fd, int flags); }
9059243Sobrien36	STD	BSD	{ int sync(void); }
9159243Sobrien37	MSTD	POSIX	{ int kill(int pid, int signum); }
9259243Sobrien38	COMPAT	POSIX	{ int stat(char *path, struct ostat *ub); }
9359243Sobrien39	MSTD	POSIX	{ pid_t getppid(void); }
9459243Sobrien40	COMPAT	POSIX	{ int lstat(char *path, struct ostat *ub); }
9559243Sobrien41	STD	POSIX	{ int dup(u_int fd); }
9659243Sobrien42	STD	POSIX	{ int pipe(void); }
9759243Sobrien43	MSTD	POSIX	{ gid_t getegid(void); }
98145479Smp44	MSTD	BSD	{ int profil(caddr_t samples, size_t size, \
99145479Smp			    size_t offset, u_int scale); }
100145479Smp45	STD	BSD	{ int ktrace(const char *fname, int ops, int facs, \
101145479Smp			    int pid); }
102145479Smp46	MCOMPAT	POSIX	{ int sigaction(int signum, struct osigaction *nsa, \
10359243Sobrien			    struct osigaction *osa); }
10459243Sobrien47	MSTD	POSIX	{ gid_t getgid(void); }
10559243Sobrien48	MCOMPAT	POSIX	{ int sigprocmask(int how, osigset_t mask); }
10659243Sobrien; XXX note nonstandard (bogus) calling convention - the libc stub passes
10759243Sobrien; us the mask, not a pointer to it, and we return the old mask as the
10859243Sobrien; (int) return value.
10959243Sobrien49	MSTD	BSD	{ int getlogin(char *namebuf, u_int namelen); }
11059243Sobrien50	MSTD	BSD	{ int setlogin(char *namebuf); }
11159243Sobrien51	MSTD	BSD	{ int acct(char *path); }
11259243Sobrien52	MCOMPAT	POSIX	{ int sigpending(void); }
11359243Sobrien53	MSTD	BSD	{ int sigaltstack(stack_t *ss, stack_t *oss); }
11459243Sobrien54	MSTD	POSIX	{ int ioctl(int fd, u_long com, caddr_t data); }
11559243Sobrien55	MSTD	BSD	{ int reboot(int opt); }
11659243Sobrien56	STD	POSIX	{ int revoke(char *path); }
11759243Sobrien57	STD	POSIX	{ int symlink(char *path, char *link); }
11859243Sobrien58	STD	POSIX	{ int readlink(char *path, char *buf, int count); }
11959243Sobrien59	MSTD	POSIX	{ int execve(char *fname, char **argv, char **envv); }
12059243Sobrien60	MSTD	POSIX	{ int umask(int newmask); } umask umask_args int
12159243Sobrien61	STD	BSD	{ int chroot(char *path); }
12259243Sobrien62	MCOMPAT	POSIX	{ int fstat(int fd, struct ostat *sb); }
12359243Sobrien63	MCOMPAT	BSD	{ int getkerninfo(int op, char *where, size_t *size, \
12459243Sobrien			    int arg); } getkerninfo getkerninfo_args int
12559243Sobrien64	MCOMPAT	BSD	{ int getpagesize(void); } \
12659243Sobrien			    getpagesize getpagesize_args int
12759243Sobrien65	STD	BSD	{ int msync(void *addr, size_t len, int flags); }
12859243Sobrien66	MSTD	BSD	{ int vfork(void); }
12959243Sobrien67	OBSOL	NOHIDE	vread
13059243Sobrien68	OBSOL	NOHIDE	vwrite
13159243Sobrien69	MSTD	BSD	{ int sbrk(int incr); }
13259243Sobrien70	MSTD	BSD	{ int sstk(int incr); }
13359243Sobrien71	MCOMPAT	BSD	{ int mmap(void *addr, int len, int prot, \
13459243Sobrien			    int flags, int fd, long pos); }
13559243Sobrien72	MSTD	BSD	{ int ovadvise(int anom); } vadvise ovadvise_args int
13659243Sobrien73	MSTD	BSD	{ int munmap(void *addr, size_t len); }
13759243Sobrien74	MSTD	BSD	{ int mprotect(const void *addr, size_t len, int prot); }
13859243Sobrien75	MSTD	BSD	{ int madvise(void *addr, size_t len, int behav); }
13959243Sobrien76	OBSOL	NOHIDE	vhangup
14059243Sobrien77	OBSOL	NOHIDE	vlimit
14159243Sobrien78	MSTD	BSD	{ int mincore(const void *addr, size_t len, \
14259243Sobrien			    char *vec); }
14359243Sobrien79	MSTD	POSIX	{ int getgroups(u_int gidsetsize, gid_t *gidset); }
14459243Sobrien80	MSTD	POSIX	{ int setgroups(u_int gidsetsize, gid_t *gidset); }
14559243Sobrien81	MSTD	POSIX	{ int getpgrp(void); }
14659243Sobrien82	MSTD	POSIX	{ int setpgid(int pid, int pgid); }
14759243Sobrien83	MSTD	BSD	{ int setitimer(u_int which, struct itimerval *itv, \
14859243Sobrien			    struct itimerval *oitv); }
14959243Sobrien84	MCOMPAT	BSD	{ int wait(void); }
15059243Sobrien85	MSTD	BSD	{ int swapon(char *name); }
15169408Sache86	MSTD	BSD	{ int getitimer(u_int which, struct itimerval *itv); }
15259243Sobrien87	MCOMPAT	BSD	{ int gethostname(char *hostname, u_int len); } \
15359243Sobrien			    gethostname gethostname_args int
15459243Sobrien88	MCOMPAT	BSD	{ int sethostname(char *hostname, u_int len); } \
15559243Sobrien			    sethostname sethostname_args int
15659243Sobrien89	MSTD	BSD	{ int getdtablesize(void); }
15759243Sobrien90	MSTD	POSIX	{ int dup2(u_int from, u_int to); }
15859243Sobrien91	UNIMPL	BSD	getdopt
15959243Sobrien92	MSTD	POSIX	{ int fcntl(int fd, int cmd, long arg); }
16059243Sobrien; XXX should be		{ int fcntl(int fd, int cmd, ...); }
16159243Sobrien; but we're not ready for varargs.
16259243Sobrien; XXX man page says `int arg' too.
16359243Sobrien93	MSTD	BSD	{ int select(int nd, fd_set *in, fd_set *ou, \
16459243Sobrien			    fd_set *ex, struct timeval *tv); }
16559243Sobrien94	UNIMPL	BSD	setdopt
16659243Sobrien95	STD	POSIX	{ int fsync(int fd); }
16759243Sobrien96	MSTD	BSD	{ int setpriority(int which, int who, int prio); }
16859243Sobrien97	MSTD	BSD	{ int socket(int domain, int type, int protocol); }
16959243Sobrien98	MSTD	BSD	{ int connect(int s, caddr_t name, int namelen); }
17059243Sobrien99	MCPT_NOA BSD	{ int accept(int s, caddr_t name, int *anamelen); } \
17159243Sobrien			    accept accept_args int
17259243Sobrien100	MSTD	BSD	{ int getpriority(int which, int who); }
17359243Sobrien101	MCOMPAT	BSD	{ int send(int s, caddr_t buf, int len, int flags); }
17459243Sobrien102	MCOMPAT	BSD	{ int recv(int s, caddr_t buf, int len, int flags); }
17559243Sobrien103	STD	BSD	{ int osigreturn(struct osigcontext *sigcntxp); }
17659243Sobrien104	MSTD	BSD	{ int bind(int s, caddr_t name, int namelen); }
17759243Sobrien105	MSTD	BSD	{ int setsockopt(int s, int level, int name, \
17859243Sobrien			    caddr_t val, int valsize); }
17959243Sobrien106	MSTD	BSD	{ int listen(int s, int backlog); }
18059243Sobrien107	OBSOL	NOHIDE	vtimes
18159243Sobrien108	MCOMPAT	BSD	{ int sigvec(int signum, struct sigvec *nsv, \
182145479Smp			    struct sigvec *osv); }
183145479Smp109	MCOMPAT	BSD	{ int sigblock(int mask); }
184145479Smp110	MCOMPAT	BSD	{ int sigsetmask(int mask); }
185145479Smp111	MCOMPAT	POSIX	{ int sigsuspend(osigset_t mask); }
186145479Smp; XXX note nonstandard (bogus) calling convention - the libc stub passes
187145479Smp; us the mask, not a pointer to it.
188145479Smp112	MCOMPAT	BSD	{ int sigstack(struct sigstack *nss, \
189145479Smp			    struct sigstack *oss); }
190145479Smp113	MCOMPAT	BSD	{ int recvmsg(int s, struct omsghdr *msg, int flags); }
191145479Smp114	MCOMPAT	BSD	{ int sendmsg(int s, caddr_t msg, int flags); }
192131962Smp115	OBSOL	NOHIDE	vtrace
193145479Smp116	MSTD	BSD	{ int gettimeofday(struct timeval *tp, \
194145479Smp			    struct timezone *tzp); }
195131962Smp117	MSTD	BSD	{ int getrusage(int who, struct rusage *rusage); }
19659243Sobrien118	MSTD	BSD	{ int getsockopt(int s, int level, int name, \
19759243Sobrien			    caddr_t val, int *avalsize); }
19859243Sobrien119	UNIMPL	NOHIDE	resuba (BSD/OS 2.x)
19959243Sobrien120	MSTD	BSD	{ int readv(int fd, struct iovec *iovp, u_int iovcnt); }
20059243Sobrien121	MSTD	BSD	{ int writev(int fd, struct iovec *iovp, \
20159243Sobrien			    u_int iovcnt); }
20259243Sobrien122	MSTD	BSD	{ int settimeofday(struct timeval *tv, \
20359243Sobrien			    struct timezone *tzp); }
20459243Sobrien123	STD	BSD	{ int fchown(int fd, int uid, int gid); }
20559243Sobrien124	STD	BSD	{ int fchmod(int fd, int mode); }
20659243Sobrien125	MCPT_NOA BSD	{ int recvfrom(int s, caddr_t buf, size_t len, \
20759243Sobrien			    int flags, caddr_t from, int *fromlenaddr); } \
20859243Sobrien			    recvfrom recvfrom_args int
20959243Sobrien126	MSTD	BSD	{ int setreuid(int ruid, int euid); }
21059243Sobrien127	MSTD	BSD	{ int setregid(int rgid, int egid); }
21159243Sobrien128	STD	POSIX	{ int rename(char *from, char *to); }
21259243Sobrien129	COMPAT	BSD	{ int truncate(char *path, long length); }
21359243Sobrien130	COMPAT	BSD	{ int ftruncate(int fd, long length); }
21459243Sobrien131	MSTD	BSD	{ int flock(int fd, int how); }
21559243Sobrien132	STD	POSIX	{ int mkfifo(char *path, int mode); }
21659243Sobrien133	MSTD	BSD	{ int sendto(int s, caddr_t buf, size_t len, \
21759243Sobrien			    int flags, caddr_t to, int tolen); }
21859243Sobrien134	MSTD	BSD	{ int shutdown(int s, int how); }
21959243Sobrien135	MSTD	BSD	{ int socketpair(int domain, int type, int protocol, \
22059243Sobrien			    int *rsv); }
22159243Sobrien136	STD	POSIX	{ int mkdir(char *path, int mode); }
22259243Sobrien137	STD	POSIX	{ int rmdir(char *path); }
22359243Sobrien138	STD	BSD	{ int utimes(char *path, struct timeval *tptr); }
22459243Sobrien139	OBSOL	NOHIDE	4.2 sigreturn
22559243Sobrien140	MSTD	BSD	{ int adjtime(struct timeval *delta, \
226131962Smp			    struct timeval *olddelta); }
22759243Sobrien141	MCOMPAT	BSD	{ int getpeername(int fdes, caddr_t asa, int *alen); }
22859243Sobrien142	MCOMPAT	BSD	{ long gethostid(void); }
22959243Sobrien143	MCOMPAT	BSD	{ int sethostid(long hostid); }
23059243Sobrien144	MCOMPAT	BSD	{ int getrlimit(u_int which, struct orlimit *rlp); }
23159243Sobrien145	MCOMPAT	BSD	{ int setrlimit(u_int which, struct orlimit *rlp); }
23259243Sobrien146	MCOMPAT	BSD	{ int killpg(int pgid, int signum); }
23359243Sobrien147	MSTD	POSIX	{ int setsid(void); }
23459243Sobrien148	STD	BSD	{ int quotactl(char *path, int cmd, int uid, \
23559243Sobrien			    caddr_t arg); }
23659243Sobrien149	MCOMPAT	BSD	{ int quota(void); }
23759243Sobrien150	MCPT_NOA BSD	{ int getsockname(int fdec, caddr_t asa, int *alen); }\
23859243Sobrien			    getsockname getsockname_args int
23959243Sobrien
24059243Sobrien; Syscalls 151-180 inclusive are reserved for vendor-specific
24159243Sobrien; system calls.  (This includes various calls added for compatibity
24259243Sobrien; with other Unix variants.)
24359243Sobrien; Some of these calls are now supported by BSD...
24459243Sobrien151	UNIMPL	NOHIDE	sem_lock (BSD/OS 2.x)
24559243Sobrien152	UNIMPL	NOHIDE	sem_wakeup (BSD/OS 2.x)
24659243Sobrien153	UNIMPL	NOHIDE	asyncdaemon (BSD/OS 2.x)
24759243Sobrien154	UNIMPL	NOHIDE	nosys
24859243Sobrien; 155 is initialized by the NFS code, if present.
24959243Sobrien155	MNOIMPL	BSD	{ int nfssvc(int flag, caddr_t argp); }
250145479Smp156	COMPAT	BSD	{ int getdirentries(int fd, char *buf, u_int count, \
251145479Smp			    long *basep); }
252145479Smp157	STD	BSD	{ int statfs(char *path, struct statfs *buf); }
25359243Sobrien158	STD	BSD	{ int fstatfs(int fd, struct statfs *buf); }
25459243Sobrien159	UNIMPL	NOHIDE	nosys
25559243Sobrien160	UNIMPL	NOHIDE	nosys
25659243Sobrien161	STD	BSD	{ int getfh(char *fname, struct fhandle *fhp); }
25759243Sobrien162	MSTD	BSD	{ int getdomainname(char *domainname, int len); }
25859243Sobrien163	MSTD	BSD	{ int setdomainname(char *domainname, int len); }
25959243Sobrien164	MSTD	BSD	{ int uname(struct utsname *name); }
26059243Sobrien165	STD	BSD	{ int sysarch(int op, char *parms); }
26159243Sobrien166	MSTD	BSD	{ int rtprio(int function, pid_t pid, \
262145479Smp			    struct rtprio *rtp); }
263131962Smp167	UNIMPL	NOHIDE	nosys
264131962Smp168	UNIMPL	NOHIDE	nosys
265131962Smp; 169 is initialized by the SYSVSEM code if present or loaded
266131962Smp169	MNOSTD	BSD	{ int semsys(int which, int a2, int a3, int a4, \
267131962Smp			    int a5); }
268131962Smp; 169 is initialized by the SYSVMSG code if present or loaded
269131962Smp; XXX should be		{ int semsys(int which, ...); }
270131962Smp170	MNOSTD	BSD	{ int msgsys(int which, int a2, int a3, int a4, \
271131962Smp			    int a5, int a6); }
272131962Smp; 169 is initialized by the SYSVSHM code if present or loaded
273131962Smp; XXX should be		{ int msgsys(int which, ...); }
274145479Smp171	MNOSTD	BSD	{ int shmsys(int which, int a2, int a3, int a4); }
27559243Sobrien; XXX should be		{ int shmsys(int which, ...); }
27659243Sobrien172	UNIMPL	NOHIDE	nosys
27759243Sobrien173	MSTD	POSIX	{ ssize_t pread(int fd, void *buf, size_t nbyte, \
27859243Sobrien			    int pad, off_t offset); }
27959243Sobrien174	MSTD	POSIX	{ ssize_t pwrite(int fd, const void *buf, \
28059243Sobrien			    size_t nbyte, int pad, off_t offset); }
28159243Sobrien175	UNIMPL	NOHIDE	nosys
28259243Sobrien176	MSTD	BSD	{ int ntp_adjtime(struct timex *tp); }
28359243Sobrien177	UNIMPL	NOHIDE	sfork (BSD/OS 2.x)
28459243Sobrien178	UNIMPL	NOHIDE	getdescriptor (BSD/OS 2.x)
28559243Sobrien179	UNIMPL	NOHIDE	setdescriptor (BSD/OS 2.x)
28659243Sobrien180	UNIMPL	NOHIDE	nosys
28759243Sobrien
28859243Sobrien; Syscalls 181-199 are used by/reserved for BSD
28959243Sobrien181	MSTD	POSIX	{ int setgid(gid_t gid); }
29059243Sobrien182	MSTD	BSD	{ int setegid(gid_t egid); }
29159243Sobrien183	MSTD	BSD	{ int seteuid(uid_t euid); }
29259243Sobrien184	UNIMPL	BSD	lfs_bmapv
29359243Sobrien185	UNIMPL	BSD	lfs_markv
29459243Sobrien186	UNIMPL	BSD	lfs_segclean
29559243Sobrien187	UNIMPL	BSD	lfs_segwait
29659243Sobrien188	STD	POSIX	{ int stat(char *path, struct stat *ub); }
29759243Sobrien189	MSTD	POSIX	{ int fstat(int fd, struct stat *sb); }
29859243Sobrien190	STD	POSIX	{ int lstat(char *path, struct stat *ub); }
29959243Sobrien191	STD	POSIX	{ int pathconf(char *path, int name); }
30059243Sobrien192	MSTD	POSIX	{ int fpathconf(int fd, int name); }
30159243Sobrien193	UNIMPL	NOHIDE	nosys
30259243Sobrien194	MSTD	BSD	{ int getrlimit(u_int which, \
30359243Sobrien			    struct rlimit *rlp); } \
30459243Sobrien			    getrlimit __getrlimit_args int
30559243Sobrien195	MSTD	BSD	{ int setrlimit(u_int which, \
30659243Sobrien			    struct rlimit *rlp); } \
30759243Sobrien			    setrlimit __setrlimit_args int
30859243Sobrien196	STD	BSD	{ int getdirentries(int fd, char *buf, u_int count, \
30959243Sobrien			    long *basep); }
31059243Sobrien197	MSTD	BSD	{ caddr_t mmap(caddr_t addr, size_t len, int prot, \
31159243Sobrien			    int flags, int fd, int pad, off_t pos); }
31259243Sobrien198	STD	NOHIDE	{ int nosys(void); } __syscall __syscall_args int
31359243Sobrien199	STD	POSIX	{ off_t lseek(int fd, int pad, off_t offset, \
31459243Sobrien			    int whence); }
31559243Sobrien200	STD	BSD	{ int truncate(char *path, int pad, off_t length); }
31659243Sobrien201	STD	BSD	{ int ftruncate(int fd, int pad, off_t length); }
31759243Sobrien202	MSTD	BSD	{ int __sysctl(int *name, u_int namelen, void *old, \
31859243Sobrien			    size_t *oldlenp, void *new, size_t newlen); } \
31959243Sobrien			    __sysctl sysctl_args int
32059243Sobrien; properly, __sysctl should be a NOHIDE, but making an exception
32159243Sobrien; here allows to avoid one in libc/sys/Makefile.inc.
32259243Sobrien203	MSTD	BSD	{ int mlock(const void *addr, size_t len); }
32359243Sobrien204	MSTD	BSD	{ int munlock(const void *addr, size_t len); }
32459243Sobrien205	STD	BSD	{ int undelete(char *path); }
32559243Sobrien206	STD	BSD	{ int futimes(int fd, struct timeval *tptr); }
32659243Sobrien207	MSTD	BSD	{ int getpgid(pid_t pid); }
32759243Sobrien208	UNIMPL	NOHIDE	newreboot (NetBSD)
32859243Sobrien209	MSTD	BSD	{ int poll(struct pollfd *fds, u_int nfds, \
32959243Sobrien			    int timeout); }
33059243Sobrien
33159243Sobrien;
33259243Sobrien; The following are reserved for loadable syscalls
33359243Sobrien;
33459243Sobrien210	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
33559243Sobrien211	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
33659243Sobrien212	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
33759243Sobrien213	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
33859243Sobrien214	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
33959243Sobrien215	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
34059243Sobrien216	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
34159243Sobrien217	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
34259243Sobrien218	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
34359243Sobrien219	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
34459243Sobrien
34559243Sobrien;
34659243Sobrien; The following were introduced with NetBSD/4.4Lite-2
34759243Sobrien; They are initialized by thier respective modules/sysinits
34859243Sobrien220	MNOSTD	BSD	{ int __semctl(int semid, int semnum, int cmd, \
34959243Sobrien			    union semun *arg); }
35059243Sobrien221	MNOSTD	BSD	{ int semget(key_t key, int nsems, int semflg); }
35159243Sobrien222	MNOSTD	BSD	{ int semop(int semid, struct sembuf *sops, \
35259243Sobrien			    u_int nsops); }
35359243Sobrien223	UNIMPL	NOHIDE	semconfig
35459243Sobrien224	MNOSTD	BSD	{ int msgctl(int msqid, int cmd, \
35559243Sobrien			    struct msqid_ds *buf); }
35659243Sobrien225	MNOSTD	BSD	{ int msgget(key_t key, int msgflg); }
35759243Sobrien226	MNOSTD	BSD	{ int msgsnd(int msqid, void *msgp, size_t msgsz, \
35859243Sobrien			    int msgflg); }
35959243Sobrien227	MNOSTD	BSD	{ int msgrcv(int msqid, void *msgp, size_t msgsz, \
36059243Sobrien			    long msgtyp, int msgflg); }
36159243Sobrien228	MNOSTD	BSD	{ int shmat(int shmid, void *shmaddr, int shmflg); }
36259243Sobrien229	MNOSTD	BSD	{ int shmctl(int shmid, int cmd, \
36359243Sobrien			    struct shmid_ds *buf); }
36459243Sobrien230	MNOSTD	BSD	{ int shmdt(void *shmaddr); }
36559243Sobrien231	MNOSTD	BSD	{ int shmget(key_t key, int size, int shmflg); }
36659243Sobrien;
36759243Sobrien232	MSTD	POSIX	{ int clock_gettime(clockid_t clock_id, \
36859243Sobrien			    struct timespec *tp); }
36959243Sobrien233	MSTD	POSIX	{ int clock_settime(clockid_t clock_id, \
37059243Sobrien			    const struct timespec *tp); }
37159243Sobrien234	MSTD	POSIX	{ int clock_getres(clockid_t clock_id, \
37259243Sobrien			    struct timespec *tp); }
37359243Sobrien235	UNIMPL	NOHIDE	timer_create
37459243Sobrien236	UNIMPL	NOHIDE	timer_delete
37559243Sobrien237	UNIMPL	NOHIDE	timer_settime
37659243Sobrien238	UNIMPL	NOHIDE	timer_gettime
37759243Sobrien239	UNIMPL	NOHIDE	timer_getoverrun
37859243Sobrien240	MSTD	POSIX	{ int nanosleep(const struct timespec *rqtp, \
37959243Sobrien			    struct timespec *rmtp); }
38059243Sobrien241	UNIMPL	NOHIDE	nosys
38159243Sobrien242	UNIMPL	NOHIDE	nosys
38259243Sobrien243	UNIMPL	NOHIDE	nosys
38359243Sobrien244	UNIMPL	NOHIDE	nosys
38459243Sobrien245	UNIMPL	NOHIDE	nosys
38559243Sobrien246	UNIMPL	NOHIDE	nosys
38659243Sobrien247	UNIMPL	NOHIDE	nosys
38759243Sobrien248	UNIMPL	NOHIDE	nosys
38859243Sobrien249	UNIMPL	NOHIDE	nosys
38959243Sobrien; syscall numbers initially used in OpenBSD
39059243Sobrien250	MSTD	BSD	{ int minherit(void *addr, size_t len, int inherit); }
39159243Sobrien251	MSTD	BSD	{ int rfork(int flags); }
39259243Sobrien252	MSTD	BSD	{ int openbsd_poll(struct pollfd *fds, u_int nfds, \
39359243Sobrien			    int timeout); }
39459243Sobrien253	STD	BSD	{ int issetugid(void); }
39559243Sobrien254	STD	BSD	{ int lchown(char *path, int uid, int gid); }
39659243Sobrien255	UNIMPL	NOHIDE	nosys
39759243Sobrien256	UNIMPL	NOHIDE	nosys
39859243Sobrien257	UNIMPL	NOHIDE	nosys
39959243Sobrien258	UNIMPL	NOHIDE	nosys
40059243Sobrien259	UNIMPL	NOHIDE	nosys
40159243Sobrien260	UNIMPL	NOHIDE	nosys
40259243Sobrien261	UNIMPL	NOHIDE	nosys
40359243Sobrien262	UNIMPL	NOHIDE	nosys
40459243Sobrien263	UNIMPL	NOHIDE	nosys
40559243Sobrien264	UNIMPL	NOHIDE	nosys
40659243Sobrien265	UNIMPL	NOHIDE	nosys
40759243Sobrien266	UNIMPL	NOHIDE	nosys
40859243Sobrien267	UNIMPL	NOHIDE	nosys
40959243Sobrien268	UNIMPL	NOHIDE	nosys
41059243Sobrien269	UNIMPL	NOHIDE	nosys
41159243Sobrien270	UNIMPL	NOHIDE	nosys
41259243Sobrien271	UNIMPL	NOHIDE	nosys
41359243Sobrien272	STD	BSD	{ int getdents(int fd, char *buf, size_t count); }
41459243Sobrien273	UNIMPL	NOHIDE	nosys
41559243Sobrien274	STD	BSD	{ int lchmod(char *path, mode_t mode); }
41659243Sobrien275	NOPROTO BSD	{ int lchown(char *path, uid_t uid, gid_t gid); } netbsd_lchown lchown_args int
41759243Sobrien276	STD	BSD	{ int lutimes(char *path, struct timeval *tptr); }
41859243Sobrien277	MNOPROTO BSD	{ int msync(void *addr, size_t len, int flags); } netbsd_msync msync_args int
41959243Sobrien278	STD	BSD	{ int nstat(char *path, struct nstat *ub); }
42059243Sobrien279	MSTD	BSD	{ int nfstat(int fd, struct nstat *sb); }
42159243Sobrien280	STD	BSD	{ int nlstat(char *path, struct nstat *ub); }
42259243Sobrien281	UNIMPL	NOHIDE	nosys
42359243Sobrien282	UNIMPL	NOHIDE	nosys
42459243Sobrien283	UNIMPL	NOHIDE	nosys
42559243Sobrien284	UNIMPL	NOHIDE	nosys
42659243Sobrien285	UNIMPL	NOHIDE	nosys
42759243Sobrien286	UNIMPL	NOHIDE	nosys
42859243Sobrien287	UNIMPL	NOHIDE	nosys
42959243Sobrien288	UNIMPL	NOHIDE	nosys
43059243Sobrien289	UNIMPL	NOHIDE	nosys
43159243Sobrien290	UNIMPL	NOHIDE	nosys
43259243Sobrien291	UNIMPL	NOHIDE	nosys
43359243Sobrien292	UNIMPL	NOHIDE	nosys
43459243Sobrien293	UNIMPL	NOHIDE	nosys
43559243Sobrien294	UNIMPL	NOHIDE	nosys
43659243Sobrien295	UNIMPL	NOHIDE	nosys
43759243Sobrien296	UNIMPL	NOHIDE	nosys
43859243Sobrien; XXX 297 is 300 in NetBSD 
43959243Sobrien297	STD	BSD	{ int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
44059243Sobrien298	STD	BSD	{ int fhopen(const struct fhandle *u_fhp, int flags); }
44159243Sobrien299	STD	BSD 	{ int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
44259243Sobrien; syscall numbers for FreeBSD
44359243Sobrien300	MSTD	BSD	{ int modnext(int modid); }
44459243Sobrien301	MSTD	BSD	{ int modstat(int modid, struct module_stat* stat); }
44559243Sobrien302	MSTD	BSD	{ int modfnext(int modid); }
44659243Sobrien303	MSTD	BSD	{ int modfind(const char *name); }
44759243Sobrien304	MSTD	BSD	{ int kldload(const char *file); }
44859243Sobrien305	MSTD	BSD	{ int kldunload(int fileid); }
44959243Sobrien306	MSTD	BSD	{ int kldfind(const char *file); }
45059243Sobrien307	MSTD	BSD	{ int kldnext(int fileid); }
45159243Sobrien308	MSTD	BSD	{ int kldstat(int fileid, struct kld_file_stat* stat); }
45259243Sobrien309	MSTD	BSD	{ int kldfirstmod(int fileid); }
45359243Sobrien310	MSTD	BSD	{ int getsid(pid_t pid); }
45459243Sobrien311	MSTD	BSD	{ int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
45559243Sobrien312	MSTD	BSD	{ int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
45659243Sobrien313	OBSOL	NOHIDE	signanosleep
45759243Sobrien314     NOSTD   BSD     { int aio_return(struct aiocb *aiocbp); }
45859243Sobrien315     NOSTD   BSD     { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
45959243Sobrien316     NOSTD   BSD     { int aio_cancel(int fd, struct aiocb *aiocbp); }
46059243Sobrien317     NOSTD   BSD     { int aio_error(struct aiocb *aiocbp); }
46159243Sobrien318     NOSTD   BSD     { int aio_read(struct aiocb *aiocbp); }
46259243Sobrien319     NOSTD   BSD     { int aio_write(struct aiocb *aiocbp); }
46361515Sobrien320     NOSTD   BSD     { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
46459243Sobrien321     MSTD	BSD     { int yield(void); }
46561515Sobrien322	OBSOL	NOHIDE	thr_sleep
46661515Sobrien323	OBSOL	NOHIDE	thr_wakeup
46761515Sobrien324     MSTD	BSD     { int mlockall(int how); }
46861515Sobrien325     MSTD	BSD     { int munlockall(void); }
46959243Sobrien326     STD     BSD     { int __getcwd(u_char *buf, u_int buflen); }
47059243Sobrien
47169408Sache327     MSTD     POSIX   { int sched_setparam (pid_t pid, const struct sched_param *param); }
472100616Smp328     MSTD     POSIX   { int sched_getparam (pid_t pid, struct sched_param *param); }
47369408Sache
47469408Sache329     MSTD     POSIX   { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
47569408Sache330     MSTD     POSIX   { int sched_getscheduler (pid_t pid); }
47669408Sache
47769408Sache331     MSTD     POSIX   { int sched_yield (void); }
47869408Sache332     MSTD     POSIX   { int sched_get_priority_max (int policy); }
47969408Sache333     MSTD     POSIX   { int sched_get_priority_min (int policy); }
48069408Sache334     MSTD     POSIX   { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
481145479Smp335	STD	BSD	{ int utrace(const void *addr, size_t len); }
482145479Smp336	MSTD	BSD	{ int sendfile(int fd, int s, off_t offset, size_t nbytes, \
483145479Smp				struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
484145479Smp337	STD	BSD	{ int kldsym(int fileid, int cmd, void *data); }
485145479Smp338	MSTD	BSD	{ int jail(struct jail *jail); }
486145479Smp339	UNIMPL	BSD	pioctl
487145479Smp340	MSTD	POSIX	{ int sigprocmask(int how, const sigset_t *set, \
488145479Smp			    sigset_t *oset); }
489145479Smp341	MSTD	POSIX	{ int sigsuspend(const sigset_t *sigmask); }
490145479Smp342	MSTD	POSIX	{ int sigaction(int sig, const struct sigaction *act, \
49169408Sache			    struct sigaction *oact); }
49269408Sache343	MSTD	POSIX	{ int sigpending(sigset_t *set); }
49369408Sache344	STD	BSD	{ int sigreturn(const struct __ucontext *sigcntxp); }
49469408Sache345	UNIMPL	NOHIDE	sigtimedwait
49569408Sache346	UNIMPL	NOHIDE	sigwaitinfo
49669408Sache347	MSTD	BSD	{ int __acl_get_file(const char *path, \
49769408Sache			    acl_type_t type, struct acl *aclp); }
49869408Sache348	MSTD	BSD	{ int __acl_set_file(const char *path, \
49969408Sache			    acl_type_t type, struct acl *aclp); }
50069408Sache349	MSTD	BSD	{ int __acl_get_fd(int filedes, acl_type_t type, \
50169408Sache			    struct acl *aclp); }
50269408Sache350	MSTD	BSD	{ int __acl_set_fd(int filedes, acl_type_t type, \
50369408Sache			    struct acl *aclp); }
50469408Sache351	MSTD	BSD	{ int __acl_delete_file(const char *path, \
50569408Sache			    acl_type_t type); }
50669408Sache352	MSTD	BSD	{ int __acl_delete_fd(int filedes, acl_type_t type); }
50769408Sache353	MSTD	BSD	{ int __acl_aclcheck_file(const char *path, \
50869408Sache			    acl_type_t type, struct acl *aclp); }
50969408Sache354	MSTD	BSD	{ int __acl_aclcheck_fd(int filedes, acl_type_t type, \
51069408Sache			    struct acl *aclp); }
51169408Sache355	STD	BSD	{ int extattrctl(const char *path, int cmd, \
51269408Sache			    const char *filename, int attrnamespace, \
51369408Sache			    const char *attrname); }
51469408Sache356	STD	BSD	{ int extattr_set_file(const char *path, \
51569408Sache			    int attrnamespace, const char *attrname, \
51669408Sache			    void *data, size_t nbytes); }
51769408Sache357	STD	BSD	{ ssize_t extattr_get_file(const char *path, \
51869408Sache			    int attrnamespace, const char *attrname, \
51969408Sache			    void *data, size_t nbytes); }
52069408Sache358	STD	BSD	{ int extattr_delete_file(const char *path, \
52169408Sache			    int attrnamespace, const char *attrname); }
52269408Sache359	NOSTD	BSD	{ int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
52369408Sache360	MSTD	BSD	{ int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
52469408Sache361	MSTD	BSD	{ int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
52569408Sache362	MSTD	BSD	{ int kqueue(void); }
52669408Sache363	MSTD	BSD	{ int kevent(int fd, \
52769408Sache			    const struct kevent *changelist, int nchanges, \
52869408Sache			    struct kevent *eventlist, int nevents, \
52969408Sache			    const struct timespec *timeout); }
53069408Sache364	STD	BSD	{ int __cap_get_proc(struct cap *cap_p); }
53169408Sache365	STD	BSD	{ int __cap_set_proc(struct cap *cap_p); }
53269408Sache366	STD	BSD	{ int __cap_get_fd(int fd, struct cap *cap_p); }
53369408Sache367	STD	BSD	{ int __cap_get_file(const char *path_p, struct cap *cap_p); }
53469408Sache368	STD	BSD	{ int __cap_set_fd(int fd, struct cap *cap_p); }
53569408Sache369	STD	BSD	{ int __cap_set_file(const char *path_p, struct cap *cap_p); }
53669408Sache370	NODEF	NOHIDE	lkmressys lkmressys nosys_args int
53769408Sache371	STD	BSD	{ int extattr_set_fd(int fd, int attrnamespace, \
53869408Sache			    const char *attrname, void *data, \
53969408Sache			    size_t nbytes); }
54069408Sache372	STD	BSD	{ ssize_t extattr_get_fd(int fd, int attrnamespace, \
54169408Sache			    const char *attrname, void *data, size_t nbytes); }
54269408Sache373	STD	BSD	{ int extattr_delete_fd(int fd, int attrnamespace, \
54369408Sache			    const char *attrname); }
54469408Sache374	MSTD	BSD	{ int __setugid(int flag); }
54569408Sache375	NOIMPL	BSD	{ int nfsclnt(int flag, caddr_t argp); }
54669408Sache376	STD	BSD	{ int eaccess(char *path, int flags); }
54769408Sache377	UNIMPL	BSD	afs_syscall
54869408Sache378	STD	BSD	{ int nmount(struct iovec *iovp, unsigned int iovcnt, \
54969408Sache			    int flags); }
55069408Sache379	STD	BSD	{ int kse_exit(void); }
55169408Sache380	STD	BSD	{ int kse_wakeup(void); }
55269408Sache381	STD	BSD	{ int kse_new(struct kse_mailbox * mbx, \
55369408Sache			int new_grp_flag); }
55469408Sache382	STD	BSD	{ int thread_wakeup(struct thread_mailbox *tmbx); }
55569408Sache383	STD	BSD	{ int kse_yield(void); }
55669408Sache
55769408Sache