syscalls.master revision 102132
1228753Smm $FreeBSD: head/sys/kern/syscalls.master 102132 2002-08-19 20:01:31Z rwatson $
2228753Smm;	from: @(#)syscalls.master	8.2 (Berkeley) 1/13/94
3228753Smm;
4228753Smm; System call name/number master file.
5228753Smm; Processed to created init_sysent.c, syscalls.c and syscall.h.
6228753Smm
7228753Smm; Columns: number [M]type nargs namespc name alt{name,tag,rtyp}/comments
8228753Smm;	number	system call number, must be in order
9228753Smm;	type	one of [M]STD, [M]OBSOL, [M]UNIMPL, [M]COMPAT, [M]CPT_NOA,
10228753Smm;		[M]LIBCOMPAT, [M]NODEF,  [M]NOARGS,  [M]NOPROTO,  [M]NOIMPL,
11228753Smm;		[M]NOSTD, [M]COMPAT4
12228753Smm;	namespc one of POSIX, BSD, NOHIDE
13228753Smm;	name	psuedo-prototype of syscall routine
14228753Smm;		If one of the following alts is different, then all appear:
15228753Smm;	altname	name of system call if different
16228753Smm;	alttag	name of args struct tag if different from [o]`name'"_args"
17228753Smm;	altrtyp	return type if not int (bogus - syscalls always return int)
18228753Smm;		for UNIMPL/OBSOL, name continues with comments
19228753Smm
20228753Smm; types:
21228753Smm;	[M]	e.g. like MSTD -- means the system call is MP-safe.  If no
22228753Smm;		M prefix is used, the syscall wrapper will obtain the Giant
23228753Smm;		lock for the syscall.
24228753Smm;	STD	always included
25228753Smm;	COMPAT	included on COMPAT #ifdef
26228753Smm;	COMPAT4	included on COMPAT4 #ifdef (FreeBSD 4 compat)
27228753Smm;	LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h
28228753Smm;	OBSOL	obsolete, not included in system, only specifies name
29228753Smm;	UNIMPL	not implemented, placeholder only
30228753Smm;	NOSTD	implemented but as a lkm that can be statically
31228753Smm;			compiled in sysent entry will be filled with lkmsys
32228753Smm;			so the SYSCALL_MODULE macro works
33228753Smm
34228753Smm; #ifdef's, etc. may be included, and are copied to the output files.
35228753Smm
36228753Smm#include <sys/param.h>
37228753Smm#include <sys/sysent.h>
38228753Smm#include <sys/sysproto.h>
39228753Smm
40228753Smm; Reserved/unimplemented system calls in the range 0-150 inclusive
41228753Smm; are reserved for use in future Berkeley releases.
42228753Smm; Additional system calls implemented in vendor and other
43228753Smm; redistributions should be placed in the reserved range at the end
44228753Smm; of the current calls.
45228753Smm
46228753Smm0	STD	NOHIDE	{ int nosys(void); } syscall nosys_args int
47228753Smm1	MSTD	NOHIDE	{ void sys_exit(int rval); } exit sys_exit_args void
48228753Smm2	MSTD	POSIX	{ int fork(void); }
49228753Smm3	MSTD	POSIX	{ ssize_t read(int fd, void *buf, size_t nbyte); }
50248616Smm4	MSTD	POSIX	{ ssize_t write(int fd, const void *buf, size_t nbyte); }
51228753Smm5	STD	POSIX	{ int open(char *path, int flags, int mode); }
52228753Smm; XXX should be		{ int open(const char *path, int flags, ...); }
53228753Smm; but we're not ready for `const' or varargs.
54228753Smm; XXX man page says `mode_t mode'.
55228753Smm6	MSTD	POSIX	{ int close(int fd); }
56228753Smm7	MSTD	BSD	{ int wait4(int pid, int *status, int options, \
57228753Smm			    struct rusage *rusage); } wait4 wait_args int
58228753Smm8	COMPAT	BSD	{ int creat(char *path, int mode); }
59228753Smm9	STD	POSIX	{ int link(char *path, char *link); }
60228753Smm10	STD	POSIX	{ int unlink(char *path); }
61232153Smm11	OBSOL	NOHIDE	execv
62228753Smm12	STD	POSIX	{ int chdir(char *path); }
63228753Smm13	STD	BSD	{ int fchdir(int fd); }
64228753Smm14	STD	POSIX	{ int mknod(char *path, int mode, int dev); }
65228753Smm15	STD	POSIX	{ int chmod(char *path, int mode); }
66228753Smm16	STD	POSIX	{ int chown(char *path, int uid, int gid); }
67228753Smm17	MSTD	BSD	{ int obreak(char *nsize); } break obreak_args int
68248616Smm18	STD	BSD	{ int getfsstat(struct statfs *buf, long bufsize, \
69248616Smm			    int flags); }
70228753Smm19	COMPAT	POSIX	{ long lseek(int fd, long offset, int whence); }
71228753Smm20	MSTD	POSIX	{ pid_t getpid(void); }
72228753Smm21	STD	BSD	{ int mount(char *type, char *path, int flags, \
73228753Smm			    caddr_t data); }
74228753Smm; XXX `path' should have type `const char *' but we're not ready for that.
75228753Smm22	STD	BSD	{ int unmount(char *path, int flags); }
76228753Smm23	MSTD	POSIX	{ int setuid(uid_t uid); }
77228753Smm24	MSTD	POSIX	{ uid_t getuid(void); }
78228753Smm25	MSTD	POSIX	{ uid_t geteuid(void); }
79228753Smm26	STD	BSD	{ int ptrace(int req, pid_t pid, caddr_t addr, \
80228753Smm			    int data); }
81228753Smm27	MSTD	BSD	{ int recvmsg(int s, struct msghdr *msg, int flags); }
82232153Smm28	MSTD	BSD	{ int sendmsg(int s, caddr_t msg, int flags); }
83228753Smm29	MSTD	BSD	{ int recvfrom(int s, caddr_t buf, size_t len, \
84228753Smm			    int flags, caddr_t from, int *fromlenaddr); }
85228753Smm30	MSTD	BSD	{ int accept(int s, caddr_t name, int *anamelen); }
86228753Smm31	MSTD	BSD	{ int getpeername(int fdes, caddr_t asa, int *alen); }
87228753Smm32	MSTD	BSD	{ int getsockname(int fdes, caddr_t asa, int *alen); }
88228753Smm33	STD	POSIX	{ int access(char *path, int flags); }
89228753Smm34	STD	BSD	{ int chflags(char *path, int flags); }
90228753Smm35	STD	BSD	{ int fchflags(int fd, int flags); }
91228753Smm36	STD	BSD	{ int sync(void); }
92248616Smm37	MSTD	POSIX	{ int kill(int pid, int signum); }
93228753Smm38	COMPAT	POSIX	{ int stat(char *path, struct ostat *ub); }
94228753Smm39	MSTD	POSIX	{ pid_t getppid(void); }
95228753Smm40	COMPAT	POSIX	{ int lstat(char *path, struct ostat *ub); }
96248616Smm41	STD	POSIX	{ int dup(u_int fd); }
97228753Smm42	STD	POSIX	{ int pipe(void); }
98232153Smm43	MSTD	POSIX	{ gid_t getegid(void); }
99228753Smm44	MSTD	BSD	{ int profil(caddr_t samples, size_t size, \
100228753Smm			    size_t offset, u_int scale); }
101228753Smm45	STD	BSD	{ int ktrace(const char *fname, int ops, int facs, \
102228753Smm			    int pid); }
103248616Smm46	MCOMPAT	POSIX	{ int sigaction(int signum, struct osigaction *nsa, \
104232153Smm			    struct osigaction *osa); }
105228753Smm47	MSTD	POSIX	{ gid_t getgid(void); }
106248616Smm48	MCOMPAT	POSIX	{ int sigprocmask(int how, osigset_t mask); }
107228753Smm; XXX note nonstandard (bogus) calling convention - the libc stub passes
108228753Smm; us the mask, not a pointer to it, and we return the old mask as the
109228753Smm; (int) return value.
110228753Smm49	MSTD	BSD	{ int getlogin(char *namebuf, u_int namelen); }
111228753Smm50	MSTD	BSD	{ int setlogin(char *namebuf); }
112228753Smm51	MSTD	BSD	{ int acct(char *path); }
113228753Smm52	MCOMPAT	POSIX	{ int sigpending(void); }
114228753Smm53	MSTD	BSD	{ int sigaltstack(stack_t *ss, stack_t *oss); }
115228753Smm54	MSTD	POSIX	{ int ioctl(int fd, u_long com, caddr_t data); }
116228753Smm55	MSTD	BSD	{ int reboot(int opt); }
117232153Smm56	STD	POSIX	{ int revoke(char *path); }
118248616Smm57	STD	POSIX	{ int symlink(char *path, char *link); }
119232153Smm58	STD	POSIX	{ int readlink(char *path, char *buf, int count); }
120228753Smm59	MSTD	POSIX	{ int execve(char *fname, char **argv, char **envv); }
121228753Smm60	MSTD	POSIX	{ int umask(int newmask); } umask umask_args int
122248616Smm61	STD	BSD	{ int chroot(char *path); }
123248616Smm62	MCOMPAT	POSIX	{ int fstat(int fd, struct ostat *sb); }
124248616Smm63	MCOMPAT	BSD	{ int getkerninfo(int op, char *where, size_t *size, \
125248616Smm			    int arg); } getkerninfo getkerninfo_args int
126248616Smm64	MCOMPAT	BSD	{ int getpagesize(void); } \
127248616Smm			    getpagesize getpagesize_args int
128228753Smm65	STD	BSD	{ int msync(void *addr, size_t len, int flags); }
129228753Smm66	MSTD	BSD	{ int vfork(void); }
130228753Smm67	OBSOL	NOHIDE	vread
131228753Smm68	OBSOL	NOHIDE	vwrite
132228753Smm69	MSTD	BSD	{ int sbrk(int incr); }
133228753Smm70	MSTD	BSD	{ int sstk(int incr); }
134228753Smm71	MCOMPAT	BSD	{ int mmap(void *addr, int len, int prot, \
135228753Smm			    int flags, int fd, long pos); }
136228753Smm72	MSTD	BSD	{ int ovadvise(int anom); } vadvise ovadvise_args int
137228753Smm73	MSTD	BSD	{ int munmap(void *addr, size_t len); }
138228753Smm74	MSTD	BSD	{ int mprotect(const void *addr, size_t len, int prot); }
139228753Smm75	MSTD	BSD	{ int madvise(void *addr, size_t len, int behav); }
140228753Smm76	OBSOL	NOHIDE	vhangup
141228753Smm77	OBSOL	NOHIDE	vlimit
142228753Smm78	MSTD	BSD	{ int mincore(const void *addr, size_t len, \
143228753Smm			    char *vec); }
144228753Smm79	MSTD	POSIX	{ int getgroups(u_int gidsetsize, gid_t *gidset); }
145248616Smm80	MSTD	POSIX	{ int setgroups(u_int gidsetsize, gid_t *gidset); }
146228753Smm81	MSTD	POSIX	{ int getpgrp(void); }
147228753Smm82	MSTD	POSIX	{ int setpgid(int pid, int pgid); }
148228753Smm83	MSTD	BSD	{ int setitimer(u_int which, struct itimerval *itv, \
149228753Smm			    struct itimerval *oitv); }
150228753Smm84	MCOMPAT	BSD	{ int wait(void); }
151228753Smm85	MSTD	BSD	{ int swapon(char *name); }
152228753Smm86	MSTD	BSD	{ int getitimer(u_int which, struct itimerval *itv); }
153228753Smm87	MCOMPAT	BSD	{ int gethostname(char *hostname, u_int len); } \
154228753Smm			    gethostname gethostname_args int
155228753Smm88	MCOMPAT	BSD	{ int sethostname(char *hostname, u_int len); } \
156228753Smm			    sethostname sethostname_args int
157228753Smm89	MSTD	BSD	{ int getdtablesize(void); }
158228753Smm90	MSTD	POSIX	{ int dup2(u_int from, u_int to); }
159228753Smm91	UNIMPL	BSD	getdopt
160228753Smm92	MSTD	POSIX	{ int fcntl(int fd, int cmd, long arg); }
161228753Smm; XXX should be		{ int fcntl(int fd, int cmd, ...); }
162228753Smm; but we're not ready for varargs.
163228753Smm93	MSTD	BSD	{ int select(int nd, fd_set *in, fd_set *ou, \
164228753Smm			    fd_set *ex, struct timeval *tv); }
165228753Smm94	UNIMPL	BSD	setdopt
166228753Smm95	STD	POSIX	{ int fsync(int fd); }
167228753Smm96	MSTD	BSD	{ int setpriority(int which, int who, int prio); }
168228753Smm97	MSTD	BSD	{ int socket(int domain, int type, int protocol); }
169228753Smm98	MSTD	BSD	{ int connect(int s, caddr_t name, int namelen); }
170228753Smm99	MCPT_NOA BSD	{ int accept(int s, caddr_t name, int *anamelen); } \
171228753Smm			    accept accept_args int
172228753Smm100	MSTD	BSD	{ int getpriority(int which, int who); }
173228753Smm101	MCOMPAT	BSD	{ int send(int s, caddr_t buf, int len, int flags); }
174228753Smm102	MCOMPAT	BSD	{ int recv(int s, caddr_t buf, int len, int flags); }
175228753Smm103	MSTD	BSD	{ int osigreturn(struct osigcontext *sigcntxp); }
176228753Smm104	MSTD	BSD	{ int bind(int s, caddr_t name, int namelen); }
177228753Smm105	MSTD	BSD	{ int setsockopt(int s, int level, int name, \
178228753Smm			    caddr_t val, int valsize); }
179228753Smm106	MSTD	BSD	{ int listen(int s, int backlog); }
180228753Smm107	OBSOL	NOHIDE	vtimes
181228753Smm108	MCOMPAT	BSD	{ int sigvec(int signum, struct sigvec *nsv, \
182228753Smm			    struct sigvec *osv); }
183228753Smm109	MCOMPAT	BSD	{ int sigblock(int mask); }
184228753Smm110	MCOMPAT	BSD	{ int sigsetmask(int mask); }
185228753Smm111	MCOMPAT	POSIX	{ int sigsuspend(osigset_t mask); }
186228753Smm; XXX note nonstandard (bogus) calling convention - the libc stub passes
187228753Smm; us the mask, not a pointer to it.
188228753Smm112	MCOMPAT	BSD	{ int sigstack(struct sigstack *nss, \
189228753Smm			    struct sigstack *oss); }
190232153Smm113	MCOMPAT	BSD	{ int recvmsg(int s, struct omsghdr *msg, int flags); }
191228753Smm114	MCOMPAT	BSD	{ int sendmsg(int s, caddr_t msg, int flags); }
192228753Smm115	OBSOL	NOHIDE	vtrace
193228753Smm116	MSTD	BSD	{ int gettimeofday(struct timeval *tp, \
194228753Smm			    struct timezone *tzp); }
195228753Smm117	MSTD	BSD	{ int getrusage(int who, struct rusage *rusage); }
196228753Smm118	MSTD	BSD	{ int getsockopt(int s, int level, int name, \
197228753Smm			    caddr_t val, int *avalsize); }
198228753Smm119	UNIMPL	NOHIDE	resuba (BSD/OS 2.x)
199228753Smm120	MSTD	BSD	{ int readv(int fd, struct iovec *iovp, u_int iovcnt); }
200232153Smm121	MSTD	BSD	{ int writev(int fd, struct iovec *iovp, \
201228753Smm			    u_int iovcnt); }
202228753Smm122	MSTD	BSD	{ int settimeofday(struct timeval *tv, \
203228753Smm			    struct timezone *tzp); }
204228753Smm123	STD	BSD	{ int fchown(int fd, int uid, int gid); }
205228753Smm124	STD	BSD	{ int fchmod(int fd, int mode); }
206232153Smm125	MCPT_NOA BSD	{ int recvfrom(int s, caddr_t buf, size_t len, \
207228753Smm			    int flags, caddr_t from, int *fromlenaddr); } \
208228753Smm			    recvfrom recvfrom_args int
209232153Smm126	MSTD	BSD	{ int setreuid(int ruid, int euid); }
210228753Smm127	MSTD	BSD	{ int setregid(int rgid, int egid); }
211228753Smm128	STD	POSIX	{ int rename(char *from, char *to); }
212228753Smm129	COMPAT	BSD	{ int truncate(char *path, long length); }
213228753Smm130	COMPAT	BSD	{ int ftruncate(int fd, long length); }
214228753Smm131	MSTD	BSD	{ int flock(int fd, int how); }
215228753Smm132	STD	POSIX	{ int mkfifo(char *path, int mode); }
216228753Smm133	MSTD	BSD	{ int sendto(int s, caddr_t buf, size_t len, \
217232153Smm			    int flags, caddr_t to, int tolen); }
218228753Smm134	MSTD	BSD	{ int shutdown(int s, int how); }
219232153Smm135	MSTD	BSD	{ int socketpair(int domain, int type, int protocol, \
220232153Smm			    int *rsv); }
221228753Smm136	STD	POSIX	{ int mkdir(char *path, int mode); }
222228753Smm137	STD	POSIX	{ int rmdir(char *path); }
223228753Smm138	STD	BSD	{ int utimes(char *path, struct timeval *tptr); }
224228753Smm139	OBSOL	NOHIDE	4.2 sigreturn
225228753Smm140	MSTD	BSD	{ int adjtime(struct timeval *delta, \
226228753Smm			    struct timeval *olddelta); }
227228753Smm141	MCOMPAT	BSD	{ int getpeername(int fdes, caddr_t asa, int *alen); }
228232153Smm142	MCOMPAT	BSD	{ long gethostid(void); }
229228753Smm143	MCOMPAT	BSD	{ int sethostid(long hostid); }
230232153Smm144	MCOMPAT	BSD	{ int getrlimit(u_int which, struct orlimit *rlp); }
231228753Smm145	MCOMPAT	BSD	{ int setrlimit(u_int which, struct orlimit *rlp); }
232228753Smm146	MCOMPAT	BSD	{ int killpg(int pgid, int signum); }
233232153Smm147	MSTD	POSIX	{ int setsid(void); }
234228753Smm148	STD	BSD	{ int quotactl(char *path, int cmd, int uid, \
235228753Smm			    caddr_t arg); }
236228753Smm149	MCOMPAT	BSD	{ int quota(void); }
237228753Smm150	MCPT_NOA BSD	{ int getsockname(int fdec, caddr_t asa, int *alen); }\
238228753Smm			    getsockname getsockname_args int
239228753Smm
240232153Smm; Syscalls 151-180 inclusive are reserved for vendor-specific
241232153Smm; system calls.  (This includes various calls added for compatibity
242228753Smm; with other Unix variants.)
243228753Smm; Some of these calls are now supported by BSD...
244228753Smm151	UNIMPL	NOHIDE	sem_lock (BSD/OS 2.x)
245228753Smm152	UNIMPL	NOHIDE	sem_wakeup (BSD/OS 2.x)
246228753Smm153	UNIMPL	NOHIDE	asyncdaemon (BSD/OS 2.x)
247228753Smm154	UNIMPL	NOHIDE	nosys
248228753Smm; 155 is initialized by the NFS code, if present.
249228753Smm155	MNOIMPL	BSD	{ int nfssvc(int flag, caddr_t argp); }
250228753Smm156	COMPAT	BSD	{ int getdirentries(int fd, char *buf, u_int count, \
251228753Smm			    long *basep); }
252228753Smm157	STD	BSD	{ int statfs(char *path, struct statfs *buf); }
253228753Smm158	STD	BSD	{ int fstatfs(int fd, struct statfs *buf); }
254228753Smm159	UNIMPL	NOHIDE	nosys
255228753Smm160	UNIMPL	NOHIDE	nosys
256232153Smm161	STD	BSD	{ int getfh(char *fname, struct fhandle *fhp); }
257228753Smm162	MSTD	BSD	{ int getdomainname(char *domainname, int len); }
258228753Smm163	MSTD	BSD	{ int setdomainname(char *domainname, int len); }
259228753Smm164	MSTD	BSD	{ int uname(struct utsname *name); }
260228753Smm165	STD	BSD	{ int sysarch(int op, char *parms); }
261228753Smm166	MSTD	BSD	{ int rtprio(int function, pid_t pid, \
262228753Smm			    struct rtprio *rtp); }
263228753Smm167	UNIMPL	NOHIDE	nosys
264228753Smm168	UNIMPL	NOHIDE	nosys
265228753Smm; 169 is initialized by the SYSVSEM code if present or loaded
266228753Smm169	MNOSTD	BSD	{ int semsys(int which, int a2, int a3, int a4, \
267228753Smm			    int a5); }
268228753Smm; 169 is initialized by the SYSVMSG code if present or loaded
269228753Smm; XXX should be		{ int semsys(int which, ...); }
270232153Smm170	MNOSTD	BSD	{ int msgsys(int which, int a2, int a3, int a4, \
271228753Smm			    int a5, int a6); }
272232153Smm; 169 is initialized by the SYSVSHM code if present or loaded
273228753Smm; XXX should be		{ int msgsys(int which, ...); }
274232153Smm171	MNOSTD	BSD	{ int shmsys(int which, int a2, int a3, int a4); }
275232153Smm; XXX should be		{ int shmsys(int which, ...); }
276228753Smm172	UNIMPL	NOHIDE	nosys
277228753Smm173	MSTD	POSIX	{ ssize_t pread(int fd, void *buf, size_t nbyte, \
278232153Smm			    int pad, off_t offset); }
279232153Smm174	MSTD	POSIX	{ ssize_t pwrite(int fd, const void *buf, \
280228753Smm			    size_t nbyte, int pad, off_t offset); }
281228753Smm175	UNIMPL	NOHIDE	nosys
282228753Smm176	MSTD	BSD	{ int ntp_adjtime(struct timex *tp); }
283228753Smm177	UNIMPL	NOHIDE	sfork (BSD/OS 2.x)
284228753Smm178	UNIMPL	NOHIDE	getdescriptor (BSD/OS 2.x)
285228753Smm179	UNIMPL	NOHIDE	setdescriptor (BSD/OS 2.x)
286232153Smm180	UNIMPL	NOHIDE	nosys
287228753Smm
288232153Smm; Syscalls 181-199 are used by/reserved for BSD
289228753Smm181	MSTD	POSIX	{ int setgid(gid_t gid); }
290228753Smm182	MSTD	BSD	{ int setegid(gid_t egid); }
291232153Smm183	MSTD	BSD	{ int seteuid(uid_t euid); }
292228753Smm184	UNIMPL	BSD	lfs_bmapv
293228753Smm185	UNIMPL	BSD	lfs_markv
294228753Smm186	UNIMPL	BSD	lfs_segclean
295228753Smm187	UNIMPL	BSD	lfs_segwait
296228753Smm188	STD	POSIX	{ int stat(char *path, struct stat *ub); }
297228753Smm189	MSTD	POSIX	{ int fstat(int fd, struct stat *sb); }
298228753Smm190	STD	POSIX	{ int lstat(char *path, struct stat *ub); }
299228753Smm191	STD	POSIX	{ int pathconf(char *path, int name); }
300228753Smm192	MSTD	POSIX	{ int fpathconf(int fd, int name); }
301228753Smm193	UNIMPL	NOHIDE	nosys
302228753Smm194	MSTD	BSD	{ int getrlimit(u_int which, \
303228753Smm			    struct rlimit *rlp); } \
304232153Smm			    getrlimit __getrlimit_args int
305232153Smm195	MSTD	BSD	{ int setrlimit(u_int which, \
306228753Smm			    struct rlimit *rlp); } \
307232153Smm			    setrlimit __setrlimit_args int
308232153Smm196	STD	BSD	{ int getdirentries(int fd, char *buf, u_int count, \
309228753Smm			    long *basep); }
310228753Smm197	MSTD	BSD	{ caddr_t mmap(caddr_t addr, size_t len, int prot, \
311228753Smm			    int flags, int fd, int pad, off_t pos); }
312228753Smm198	STD	NOHIDE	{ int nosys(void); } __syscall __syscall_args int
313228753Smm199	STD	POSIX	{ off_t lseek(int fd, int pad, off_t offset, \
314228753Smm			    int whence); }
315228753Smm200	STD	BSD	{ int truncate(char *path, int pad, off_t length); }
316228753Smm201	STD	BSD	{ int ftruncate(int fd, int pad, off_t length); }
317228753Smm202	MSTD	BSD	{ int __sysctl(int *name, u_int namelen, void *old, \
318232153Smm			    size_t *oldlenp, void *new, size_t newlen); } \
319228753Smm			    __sysctl sysctl_args int
320228753Smm; properly, __sysctl should be a NOHIDE, but making an exception
321232153Smm; here allows to avoid one in libc/sys/Makefile.inc.
322232153Smm203	MSTD	BSD	{ int mlock(const void *addr, size_t len); }
323228753Smm204	MSTD	BSD	{ int munlock(const void *addr, size_t len); }
324228753Smm205	STD	BSD	{ int undelete(char *path); }
325228753Smm206	STD	BSD	{ int futimes(int fd, struct timeval *tptr); }
326228753Smm207	MSTD	BSD	{ int getpgid(pid_t pid); }
327228753Smm208	UNIMPL	NOHIDE	newreboot (NetBSD)
328232153Smm209	MSTD	BSD	{ int poll(struct pollfd *fds, u_int nfds, \
329228753Smm			    int timeout); }
330232153Smm
331228753Smm;
332228753Smm; The following are reserved for loadable syscalls
333232153Smm;
334228753Smm210	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
335232153Smm211	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
336232153Smm212	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
337228753Smm213	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
338232153Smm214	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
339228753Smm215	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
340228753Smm216	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
341228753Smm217	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
342228753Smm218	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
343228753Smm219	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
344232153Smm
345228753Smm;
346228753Smm; The following were introduced with NetBSD/4.4Lite-2
347232153Smm; They are initialized by thier respective modules/sysinits
348228753Smm220	MNOSTD	BSD	{ int __semctl(int semid, int semnum, int cmd, \
349228753Smm			    union semun *arg); }
350228753Smm221	MNOSTD	BSD	{ int semget(key_t key, int nsems, int semflg); }
351228753Smm222	MNOSTD	BSD	{ int semop(int semid, struct sembuf *sops, \
352228753Smm			    u_int nsops); }
353228753Smm223	UNIMPL	NOHIDE	semconfig
354228753Smm224	MNOSTD	BSD	{ int msgctl(int msqid, int cmd, \
355228753Smm			    struct msqid_ds *buf); }
356228753Smm225	MNOSTD	BSD	{ int msgget(key_t key, int msgflg); }
357228753Smm226	MNOSTD	BSD	{ int msgsnd(int msqid, void *msgp, size_t msgsz, \
358228753Smm			    int msgflg); }
359228753Smm227	MNOSTD	BSD	{ int msgrcv(int msqid, void *msgp, size_t msgsz, \
360228753Smm			    long msgtyp, int msgflg); }
361228753Smm228	MNOSTD	BSD	{ int shmat(int shmid, void *shmaddr, int shmflg); }
362232153Smm229	MNOSTD	BSD	{ int shmctl(int shmid, int cmd, \
363228753Smm			    struct shmid_ds *buf); }
364228753Smm230	MNOSTD	BSD	{ int shmdt(void *shmaddr); }
365228753Smm231	MNOSTD	BSD	{ int shmget(key_t key, int size, int shmflg); }
366228753Smm;
367228753Smm232	MSTD	POSIX	{ int clock_gettime(clockid_t clock_id, \
368232153Smm			    struct timespec *tp); }
369228753Smm233	MSTD	POSIX	{ int clock_settime(clockid_t clock_id, \
370228753Smm			    const struct timespec *tp); }
371228753Smm234	MSTD	POSIX	{ int clock_getres(clockid_t clock_id, \
372228753Smm			    struct timespec *tp); }
373228753Smm235	UNIMPL	NOHIDE	timer_create
374228753Smm236	UNIMPL	NOHIDE	timer_delete
375232153Smm237	UNIMPL	NOHIDE	timer_settime
376232153Smm238	UNIMPL	NOHIDE	timer_gettime
377232153Smm239	UNIMPL	NOHIDE	timer_getoverrun
378228753Smm240	MSTD	POSIX	{ int nanosleep(const struct timespec *rqtp, \
379228753Smm			    struct timespec *rmtp); }
380228753Smm241	UNIMPL	NOHIDE	nosys
381228753Smm242	UNIMPL	NOHIDE	nosys
382228753Smm243	UNIMPL	NOHIDE	nosys
383228753Smm244	UNIMPL	NOHIDE	nosys
384228753Smm245	UNIMPL	NOHIDE	nosys
385228753Smm246	UNIMPL	NOHIDE	nosys
386228753Smm247	UNIMPL	NOHIDE	nosys
387228753Smm248	UNIMPL	NOHIDE	nosys
388232153Smm249	UNIMPL	NOHIDE	nosys
389228753Smm; syscall numbers initially used in OpenBSD
390228753Smm250	MSTD	BSD	{ int minherit(void *addr, size_t len, int inherit); }
391228753Smm251	MSTD	BSD	{ int rfork(int flags); }
392228753Smm252	MSTD	BSD	{ int openbsd_poll(struct pollfd *fds, u_int nfds, \
393228753Smm			    int timeout); }
394228753Smm253	STD	BSD	{ int issetugid(void); }
395228753Smm254	STD	BSD	{ int lchown(char *path, int uid, int gid); }
396228753Smm255	UNIMPL	NOHIDE	nosys
397228753Smm256	UNIMPL	NOHIDE	nosys
398228753Smm257	UNIMPL	NOHIDE	nosys
399228753Smm258	UNIMPL	NOHIDE	nosys
400259	UNIMPL	NOHIDE	nosys
401260	UNIMPL	NOHIDE	nosys
402261	UNIMPL	NOHIDE	nosys
403262	UNIMPL	NOHIDE	nosys
404263	UNIMPL	NOHIDE	nosys
405264	UNIMPL	NOHIDE	nosys
406265	UNIMPL	NOHIDE	nosys
407266	UNIMPL	NOHIDE	nosys
408267	UNIMPL	NOHIDE	nosys
409268	UNIMPL	NOHIDE	nosys
410269	UNIMPL	NOHIDE	nosys
411270	UNIMPL	NOHIDE	nosys
412271	UNIMPL	NOHIDE	nosys
413272	STD	BSD	{ int getdents(int fd, char *buf, size_t count); }
414273	UNIMPL	NOHIDE	nosys
415274	STD	BSD	{ int lchmod(char *path, mode_t mode); }
416275	NOPROTO BSD	{ int lchown(char *path, uid_t uid, gid_t gid); } netbsd_lchown lchown_args int
417276	STD	BSD	{ int lutimes(char *path, struct timeval *tptr); }
418277	MNOPROTO BSD	{ int msync(void *addr, size_t len, int flags); } netbsd_msync msync_args int
419278	STD	BSD	{ int nstat(char *path, struct nstat *ub); }
420279	MSTD	BSD	{ int nfstat(int fd, struct nstat *sb); }
421280	STD	BSD	{ int nlstat(char *path, struct nstat *ub); }
422281	UNIMPL	NOHIDE	nosys
423282	UNIMPL	NOHIDE	nosys
424283	UNIMPL	NOHIDE	nosys
425284	UNIMPL	NOHIDE	nosys
426285	UNIMPL	NOHIDE	nosys
427286	UNIMPL	NOHIDE	nosys
428287	UNIMPL	NOHIDE	nosys
429288	UNIMPL	NOHIDE	nosys
430289	UNIMPL	NOHIDE	nosys
431290	UNIMPL	NOHIDE	nosys
432291	UNIMPL	NOHIDE	nosys
433292	UNIMPL	NOHIDE	nosys
434293	UNIMPL	NOHIDE	nosys
435294	UNIMPL	NOHIDE	nosys
436295	UNIMPL	NOHIDE	nosys
437296	UNIMPL	NOHIDE	nosys
438; XXX 297 is 300 in NetBSD 
439297	STD	BSD	{ int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
440298	STD	BSD	{ int fhopen(const struct fhandle *u_fhp, int flags); }
441299	STD	BSD 	{ int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
442; syscall numbers for FreeBSD
443300	MSTD	BSD	{ int modnext(int modid); }
444301	MSTD	BSD	{ int modstat(int modid, struct module_stat* stat); }
445302	MSTD	BSD	{ int modfnext(int modid); }
446303	MSTD	BSD	{ int modfind(const char *name); }
447304	MSTD	BSD	{ int kldload(const char *file); }
448305	MSTD	BSD	{ int kldunload(int fileid); }
449306	MSTD	BSD	{ int kldfind(const char *file); }
450307	MSTD	BSD	{ int kldnext(int fileid); }
451308	MSTD	BSD	{ int kldstat(int fileid, struct kld_file_stat* stat); }
452309	MSTD	BSD	{ int kldfirstmod(int fileid); }
453310	MSTD	BSD	{ int getsid(pid_t pid); }
454311	MSTD	BSD	{ int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
455312	MSTD	BSD	{ int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
456313	OBSOL	NOHIDE	signanosleep
457314     NOSTD   BSD     { int aio_return(struct aiocb *aiocbp); }
458315     NOSTD   BSD     { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
459316     NOSTD   BSD     { int aio_cancel(int fd, struct aiocb *aiocbp); }
460317     NOSTD   BSD     { int aio_error(struct aiocb *aiocbp); }
461318     NOSTD   BSD     { int aio_read(struct aiocb *aiocbp); }
462319     NOSTD   BSD     { int aio_write(struct aiocb *aiocbp); }
463320     NOSTD   BSD     { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
464321     MSTD	BSD     { int yield(void); }
465322	OBSOL	NOHIDE	thr_sleep
466323	OBSOL	NOHIDE	thr_wakeup
467324     MSTD	BSD     { int mlockall(int how); }
468325     MSTD	BSD     { int munlockall(void); }
469326     STD     BSD     { int __getcwd(u_char *buf, u_int buflen); }
470
471327     MSTD     POSIX   { int sched_setparam (pid_t pid, const struct sched_param *param); }
472328     MSTD     POSIX   { int sched_getparam (pid_t pid, struct sched_param *param); }
473
474329     MSTD     POSIX   { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
475330     MSTD     POSIX   { int sched_getscheduler (pid_t pid); }
476
477331     MSTD     POSIX   { int sched_yield (void); }
478332     MSTD     POSIX   { int sched_get_priority_max (int policy); }
479333     MSTD     POSIX   { int sched_get_priority_min (int policy); }
480334     MSTD     POSIX   { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
481335	STD	BSD	{ int utrace(const void *addr, size_t len); }
482336	MCOMPAT4	BSD	{ int sendfile(int fd, int s, off_t offset, size_t nbytes, \
483				struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
484337	STD	BSD	{ int kldsym(int fileid, int cmd, void *data); }
485338	MSTD	BSD	{ int jail(struct jail *jail); }
486339	UNIMPL	BSD	pioctl
487340	MSTD	POSIX	{ int sigprocmask(int how, const sigset_t *set, \
488			    sigset_t *oset); }
489341	MSTD	POSIX	{ int sigsuspend(const sigset_t *sigmask); }
490342	MSTD	POSIX	{ int sigaction(int sig, const struct sigaction *act, \
491			    struct sigaction *oact); }
492343	MSTD	POSIX	{ int sigpending(sigset_t *set); }
493344	MSTD	BSD	{ int sigreturn(const struct __ucontext *sigcntxp); }
494345	UNIMPL	NOHIDE	sigtimedwait
495346	UNIMPL	NOHIDE	sigwaitinfo
496347	MSTD	BSD	{ int __acl_get_file(const char *path, \
497			    acl_type_t type, struct acl *aclp); }
498348	MSTD	BSD	{ int __acl_set_file(const char *path, \
499			    acl_type_t type, struct acl *aclp); }
500349	MSTD	BSD	{ int __acl_get_fd(int filedes, acl_type_t type, \
501			    struct acl *aclp); }
502350	MSTD	BSD	{ int __acl_set_fd(int filedes, acl_type_t type, \
503			    struct acl *aclp); }
504351	MSTD	BSD	{ int __acl_delete_file(const char *path, \
505			    acl_type_t type); }
506352	MSTD	BSD	{ int __acl_delete_fd(int filedes, acl_type_t type); }
507353	MSTD	BSD	{ int __acl_aclcheck_file(const char *path, \
508			    acl_type_t type, struct acl *aclp); }
509354	MSTD	BSD	{ int __acl_aclcheck_fd(int filedes, acl_type_t type, \
510			    struct acl *aclp); }
511355	STD	BSD	{ int extattrctl(const char *path, int cmd, \
512			    const char *filename, int attrnamespace, \
513			    const char *attrname); }
514356	STD	BSD	{ int extattr_set_file(const char *path, \
515			    int attrnamespace, const char *attrname, \
516			    void *data, size_t nbytes); }
517357	STD	BSD	{ ssize_t extattr_get_file(const char *path, \
518			    int attrnamespace, const char *attrname, \
519			    void *data, size_t nbytes); }
520358	STD	BSD	{ int extattr_delete_file(const char *path, \
521			    int attrnamespace, const char *attrname); }
522359	NOSTD	BSD	{ int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
523360	MSTD	BSD	{ int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
524361	MSTD	BSD	{ int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
525362	MSTD	BSD	{ int kqueue(void); }
526363	MSTD	BSD	{ int kevent(int fd, \
527			    const struct kevent *changelist, int nchanges, \
528			    struct kevent *eventlist, int nevents, \
529			    const struct timespec *timeout); }
530364	UNIMPL	BSD	__cap_get_proc
531365	UNIMPL	BSD	__cap_set_proc
532366	UNIMPL	BSD	__cap_get_fd
533367	UNIMPL	BSD	__cap_get_file
534368	UNIMPL	BSD	__cap_set_fd
535369	UNIMPL	BSD	__cap_set_file
536370	NODEF	NOHIDE	lkmressys lkmressys nosys_args int
537371	STD	BSD	{ int extattr_set_fd(int fd, int attrnamespace, \
538			    const char *attrname, void *data, \
539			    size_t nbytes); }
540372	STD	BSD	{ ssize_t extattr_get_fd(int fd, int attrnamespace, \
541			    const char *attrname, void *data, size_t nbytes); }
542373	STD	BSD	{ int extattr_delete_fd(int fd, int attrnamespace, \
543			    const char *attrname); }
544374	MSTD	BSD	{ int __setugid(int flag); }
545375	NOIMPL	BSD	{ int nfsclnt(int flag, caddr_t argp); }
546376	STD	BSD	{ int eaccess(char *path, int flags); }
547377	UNIMPL	BSD	afs_syscall
548378	STD	BSD	{ int nmount(struct iovec *iovp, unsigned int iovcnt, \
549			    int flags); }
550379	STD	BSD	{ int kse_exit(void); }
551380	STD	BSD	{ int kse_wakeup(void); }
552381	STD	BSD	{ int kse_new(struct kse_mailbox * mbx, \
553			int new_grp_flag); }
554382	STD	BSD	{ int thread_wakeup(struct thread_mailbox *tmbx); }
555383	MSTD	BSD	{ int kse_yield(void); }
556384	MSTD	BSD	{ int __mac_get_proc(struct mac *mac_p); }
557385	MSTD	BSD	{ int __mac_set_proc(struct mac *mac_p); }
558386	MSTD	BSD	{ int __mac_get_fd(int fd, struct mac *mac_p); }
559387	MSTD	BSD	{ int __mac_get_file(const char *path_p, \
560			    struct mac *mac_p); }
561388	MSTD	BSD	{ int __mac_set_fd(int fd, struct mac *mac_p); }
562389	MSTD	BSD	{ int __mac_set_file(const char *path_p, \
563			    struct mac *mac_p); }
564390	STD	BSD	{ int kenv(int what, const char *name, char *value, \
565			    int len); }
566391	STD	BSD	{ int lchflags(const char *path, int flags); }
567392	STD	BSD	{ int uuidgen(struct uuid *store, int count); }
568393	MSTD	BSD	{ int sendfile(int fd, int s, off_t offset, size_t nbytes, \
569				struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
570394	MSTD	BSD	{ int mac_syscall(const char *policy, int call, \
571				void *arg); }
572