syscalls.master revision 1.61
1	$NetBSD: syscalls.master,v 1.61 2007/08/15 12:07:31 ad Exp $
2
3;	from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp
4;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94
5
6; NetBSD system call name/number "master" file.
7; (See syscalls.conf to see what it is processed into.)
8;
9; Fields: number type [type-dependent ...]
10;	number	system call number, must be in order
11;	type	one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
12;		the compatibility options defined in syscalls.conf.
13;
14; types:
15;	STD	always included
16;	OBSOL	obsolete, not included in system
17;	UNIMPL	unimplemented, not included in system
18;	EXCL	implemented, but not included in system
19;	NODEF	included, but don't define the syscall number
20;	NOARGS	included, but don't define the syscall args structure
21;	INDIR	included, but don't define the syscall args structure,
22;		and allow it to be "really" varargs.
23;
24; The compat options are defined in the syscalls.conf file, and the
25; compat option name is prefixed to the syscall name.  Other than
26; that, they're like NODEF (for 'compat' options), or STD (for
27; 'libcompat' options).
28;
29; The type-dependent arguments are as follows:
30; For STD, NODEF, NOARGS, and compat syscalls:
31;	{ pseudo-proto } [alias]
32; For other syscalls:
33;	[comment]
34;
35; #ifdef's, etc. may be included, and are copied to the output files.
36; #include's are copied to the syscall names and switch definition files only.
37
38#if defined(_KERNEL_OPT)
39#include "opt_nfsserver.h"
40#include "opt_compat_netbsd.h"
41#include "opt_ntp.h"
42#include "opt_sysv.h"
43#include "opt_compat_43.h"
44#include "opt_posix.h"
45
46#include "fs_lfs.h"
47#include "fs_nfs.h"
48#endif
49
50#include <sys/param.h>
51#include <sys/systm.h>
52#include <sys/signal.h>
53#include <sys/mount.h>
54#include <sys/syscallargs.h>
55
56#include <compat/netbsd32/netbsd32.h>
57#include <compat/netbsd32/netbsd32_syscallargs.h>
58
59%%
60
61; Reserved/unimplemented system calls in the range 0-150 inclusive
62; are reserved for use in future Berkeley releases.
63; Additional system calls implemented in vendor and other
64; redistributions should be placed in the reserved range at the end
65; of the current calls.
66
670	INDIR		{ int sys_syscall(int number, ...); }
681	STD		{ void netbsd32_exit(int rval); }
692	NOARGS		{ int sys_fork(void); }
703	STD		{ netbsd32_ssize_t netbsd32_read(int fd, netbsd32_voidp buf, netbsd32_size_t nbyte); }
714	STD		{ netbsd32_ssize_t netbsd32_write(int fd, const netbsd32_voidp buf, netbsd32_size_t nbyte); }
725	STD		{ int netbsd32_open(const netbsd32_charp path, int flags, ... mode_t mode); }
736	STD		{ int netbsd32_close(int fd); }
747	STD		{ int netbsd32_wait4(int pid, netbsd32_intp status, int options, netbsd32_rusagep_t rusage); }
758	COMPAT_43	{ int netbsd32_ocreat(const netbsd32_charp path, mode_t mode); }
769	STD		{ int netbsd32_link(const netbsd32_charp path, const netbsd32_charp link); }
7710	STD		{ int netbsd32_unlink(const netbsd32_charp path); }
7811	OBSOL		execv
7912	STD		{ int netbsd32_chdir(const netbsd32_charp path); }
8013	STD		{ int netbsd32_fchdir(int fd); }
8114	STD		{ int netbsd32_mknod(const netbsd32_charp path, mode_t mode, dev_t dev); }
8215	STD		{ int netbsd32_chmod(const netbsd32_charp path, mode_t mode); }
8316	STD		{ int netbsd32_chown(const netbsd32_charp path, uid_t uid, gid_t gid); }
8417	STD		{ int netbsd32_break(netbsd32_charp nsize); }
8518	COMPAT_20	{ int netbsd32_getfsstat(netbsd32_statfsp_t buf, netbsd32_long bufsize, int flags); }
8619	COMPAT_43	{ netbsd32_long netbsd32_olseek(int fd, netbsd32_long offset, int whence); }
8720	NOARGS MPSAFE	{ pid_t sys_getpid(void); }
8821	STD		{ int netbsd32_mount(const netbsd32_charp type, const netbsd32_charp path, int flags, netbsd32_voidp data); }
8922	STD		{ int netbsd32_unmount(const netbsd32_charp path, int flags); }
9023	STD		{ int netbsd32_setuid(uid_t uid); }
9124	NOARGS MPSAFE	{ uid_t sys_getuid(void); }
9225	NOARGS MPSAFE	{ uid_t sys_geteuid(void); }
9326	STD		{ int netbsd32_ptrace(int req, pid_t pid, netbsd32_caddr_t addr, int data); }
9427	STD		{ netbsd32_ssize_t netbsd32_recvmsg(int s, netbsd32_msghdrp_t msg, int flags); }
9528	STD		{ netbsd32_ssize_t netbsd32_sendmsg(int s, const netbsd32_msghdrp_t msg, int flags); }
9629	STD		{ netbsd32_ssize_t netbsd32_recvfrom(int s, netbsd32_voidp buf, netbsd32_size_t len, int flags, netbsd32_sockaddrp_t from, netbsd32_intp fromlenaddr); }
9730	STD		{ int netbsd32_accept(int s, netbsd32_sockaddrp_t name, netbsd32_intp anamelen); }
9831	STD		{ int netbsd32_getpeername(int fdes, netbsd32_sockaddrp_t asa, netbsd32_intp alen); }
9932	STD		{ int netbsd32_getsockname(int fdes, netbsd32_sockaddrp_t asa, netbsd32_intp alen); }
10033	STD		{ int netbsd32_access(const netbsd32_charp path, int flags); }
10134	STD		{ int netbsd32_chflags(const netbsd32_charp path, netbsd32_u_long flags); }
10235	STD		{ int netbsd32_fchflags(int fd, netbsd32_u_long flags); }
10336	NOARGS		{ void sys_sync(void); }
10437	STD		{ int netbsd32_kill(int pid, int signum); }
10538	COMPAT_43	{ int netbsd32_stat43(const netbsd32_charp path, netbsd32_stat43p_t ub); }
10639	NOARGS MPSAFE	{ pid_t sys_getppid(void); }
10740	COMPAT_43	{ int netbsd32_lstat43(const netbsd32_charp path, netbsd32_stat43p_t ub); }
10841	STD		{ int netbsd32_dup(int fd); }
10942	NOARGS		{ int sys_pipe(void); }
11043	NOARGS MPSAFE	{ gid_t sys_getegid(void); }
11144	STD		{ int netbsd32_profil(netbsd32_caddr_t samples, netbsd32_size_t size, netbsd32_u_long offset, u_int scale); }
11245	STD		{ int netbsd32_ktrace(const netbsd32_charp fname, int ops, int facs, int pid); }
11346	STD		{ int netbsd32_sigaction(int signum, const netbsd32_sigactionp_t nsa, netbsd32_sigactionp_t osa); }
11447	NOARGS MPSAFE	{ gid_t sys_getgid(void); }
11548	COMPAT_13	{ int netbsd32_sigprocmask(int how, \
116			    int mask); } sigprocmask13
11749	STD		{ int netbsd32___getlogin(netbsd32_charp namebuf, u_int namelen); }
11850	STD		{ int netbsd32_setlogin(const netbsd32_charp namebuf); }
11951	STD		{ int netbsd32_acct(const netbsd32_charp path); }
12052	COMPAT_13 MPSAFE	{ int sys_sigpending(void); } sigpending13
12153	COMPAT_13	{ int netbsd32_sigaltstack13(const netbsd32_sigaltstack13p_t nss, netbsd32_sigaltstack13p_t oss); }
12254	STD		{ int netbsd32_ioctl(int fd, netbsd32_u_long com, ... netbsd32_voidp data); }
12355	COMPAT_12	{ int netbsd32_reboot(int opt); }
12456	STD		{ int netbsd32_revoke(const netbsd32_charp path); }
12557	STD		{ int netbsd32_symlink(const netbsd32_charp path, const netbsd32_charp link); }
12658	STD		{ int netbsd32_readlink(const netbsd32_charp path, netbsd32_charp buf, netbsd32_size_t count); }
12759	STD		{ int netbsd32_execve(const netbsd32_charp path, netbsd32_charpp argp, netbsd32_charpp envp); }
12860	STD		{ mode_t netbsd32_umask(mode_t newmask); }
12961	STD		{ int netbsd32_chroot(const netbsd32_charp path); }
13062	COMPAT_43	{ int netbsd32_fstat43(int fd, netbsd32_stat43p_t sb); }
13163	COMPAT_43	{ int netbsd32_ogetkerninfo(int op, netbsd32_charp where, netbsd32_intp size, int arg); }
13264	COMPAT_43	{ int sys_getpagesize(void); } ogetpagesize
13365	COMPAT_12	{ int netbsd32_msync(netbsd32_caddr_t addr, netbsd32_size_t len); }
134; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)?
13566	NOARGS		{ int sys_vfork(void); }
13667	OBSOL		vread
13768	OBSOL		vwrite
13869	STD		{ int netbsd32_sbrk(netbsd32_intptr_t incr); }
13970	STD		{ int netbsd32_sstk(int incr); }
14071	COMPAT_43	{ int netbsd32_ommap(netbsd32_caddr_t addr, netbsd32_size_t len, int prot, int flags, int fd, netbsd32_long pos); }
14172	STD		{ int netbsd32_ovadvise(int anom); } vadvise
14273	STD		{ int netbsd32_munmap(netbsd32_voidp addr, netbsd32_size_t len); }
14374	STD		{ int netbsd32_mprotect(netbsd32_voidp addr, netbsd32_size_t len, int prot); }
14475	STD		{ int netbsd32_madvise(netbsd32_voidp addr, netbsd32_size_t len, int behav); }
14576	OBSOL		vhangup
14677	OBSOL		vlimit
14778	STD		{ int netbsd32_mincore(netbsd32_caddr_t addr, netbsd32_size_t len, netbsd32_charp vec); }
14879	STD		{ int netbsd32_getgroups(int gidsetsize, netbsd32_gid_tp gidset); }
14980	STD		{ int netbsd32_setgroups(int gidsetsize, const netbsd32_gid_tp gidset); }
15081	NOARGS MPSAFE	{ int sys_getpgrp(void); }
15182	STD		{ int netbsd32_setpgid(int pid, int pgid); }
15283	STD		{ int netbsd32_setitimer(int which, const netbsd32_itimervalp_t itv, netbsd32_itimervalp_t oitv); }
15384	COMPAT_43	{ int sys_wait(void); } owait
15485	COMPAT_12	{ int netbsd32_oswapon(const netbsd32_charp name); }
15586	STD		{ int netbsd32_getitimer(int which, netbsd32_itimervalp_t itv); }
15687	COMPAT_43	{ int netbsd32_ogethostname(netbsd32_charp hostname, u_int len); }
15788	COMPAT_43	{ int netbsd32_osethostname(netbsd32_charp hostname, u_int len); }
15889	COMPAT_43	{ int sys_getdtablesize(void); } ogetdtablesize
15990	STD		{ int netbsd32_dup2(int from, int to); }
16091	UNIMPL		getdopt
16192	STD		{ int netbsd32_fcntl(int fd, int cmd, ... netbsd32_voidp arg); }
16293	STD		{ int netbsd32_select(int nd, netbsd32_fd_setp_t in, netbsd32_fd_setp_t ou, netbsd32_fd_setp_t ex, netbsd32_timevalp_t tv); }
16394	UNIMPL		setdopt
16495	STD		{ int netbsd32_fsync(int fd); }
16596	STD		{ int netbsd32_setpriority(int which, int who, int prio); }
16697	COMPAT_30	{ int netbsd32_socket(int domain, int type, int protocol); }
16798	STD		{ int netbsd32_connect(int s, const netbsd32_sockaddrp_t name, int namelen); }
16899	COMPAT_43	{ int netbsd32_oaccept(int s, netbsd32_caddr_t name, netbsd32_intp anamelen); }
169100	STD		{ int netbsd32_getpriority(int which, int who); }
170101	COMPAT_43	{ int netbsd32_osend(int s, netbsd32_caddr_t buf, int len, int flags); }
171102	COMPAT_43	{ int netbsd32_orecv(int s, netbsd32_caddr_t buf, int len, int flags); }
172103	COMPAT_13	{ int netbsd32_sigreturn(netbsd32_sigcontextp_t sigcntxp); } sigreturn13
173104	STD		{ int netbsd32_bind(int s, const netbsd32_sockaddrp_t name, int namelen); }
174105	STD		{ int netbsd32_setsockopt(int s, int level, int name, const netbsd32_voidp val, int valsize); }
175106	STD		{ int netbsd32_listen(int s, int backlog); }
176107	OBSOL		vtimes
177108	COMPAT_43	{ int netbsd32_osigvec(int signum, netbsd32_sigvecp_t nsv, netbsd32_sigvecp_t osv); }
178109	COMPAT_43	{ int netbsd32_sigblock(int mask); }
179110	COMPAT_43	{ int netbsd32_sigsetmask(int mask); }
180111	COMPAT_13	{ int netbsd32_sigsuspend(int mask); } sigsuspend13
181112	COMPAT_43	{ int netbsd32_osigstack(netbsd32_sigstackp_t nss, netbsd32_sigstackp_t oss); }
182113	COMPAT_43	{ int netbsd32_orecvmsg(int s, netbsd32_omsghdrp_t msg, int flags); }
183114	COMPAT_43	{ int netbsd32_osendmsg(int s, netbsd32_caddr_t msg, int flags); }
184115	OBSOL		vtrace
185116	STD		{ int netbsd32_gettimeofday(netbsd32_timevalp_t tp, netbsd32_timezonep_t tzp); }
186117	STD		{ int netbsd32_getrusage(int who, netbsd32_rusagep_t rusage); }
187118	STD		{ int netbsd32_getsockopt(int s, int level, int name, netbsd32_voidp val, netbsd32_intp avalsize); }
188119	OBSOL		resuba
189120	STD		{ netbsd32_ssize_t netbsd32_readv(int fd, const netbsd32_iovecp_t iovp, int iovcnt); }
190121	STD		{ netbsd32_ssize_t netbsd32_writev(int fd, const netbsd32_iovecp_t iovp, int iovcnt); }
191122	STD		{ int netbsd32_settimeofday(const netbsd32_timevalp_t tv, const netbsd32_timezonep_t tzp); }
192123	STD		{ int netbsd32_fchown(int fd, uid_t uid, gid_t gid); }
193124	STD		{ int netbsd32_fchmod(int fd, mode_t mode); }
194125	COMPAT_43	{ int netbsd32_orecvfrom(int s, netbsd32_caddr_t buf, netbsd32_size_t len, int flags, netbsd32_caddr_t from, netbsd32_intp fromlenaddr); }
195126	STD		{ int netbsd32_setreuid(uid_t ruid, uid_t euid); }
196127	STD		{ int netbsd32_setregid(gid_t rgid, gid_t egid); }
197128	STD		{ int netbsd32_rename(const netbsd32_charp from, const netbsd32_charp to); }
198129	COMPAT_43	{ int netbsd32_otruncate(const netbsd32_charp path, netbsd32_long length); }
199130	COMPAT_43	{ int netbsd32_oftruncate(int fd, netbsd32_long length); }
200131	STD		{ int netbsd32_flock(int fd, int how); }
201132	STD		{ int netbsd32_mkfifo(const netbsd32_charp path, mode_t mode); }
202133	STD		{ netbsd32_ssize_t netbsd32_sendto(int s, const netbsd32_voidp buf, netbsd32_size_t len, int flags, const netbsd32_sockaddrp_t to, int tolen); }
203134	STD		{ int netbsd32_shutdown(int s, int how); }
204135	STD		{ int netbsd32_socketpair(int domain, int type, int protocol, netbsd32_intp rsv); }
205136	STD		{ int netbsd32_mkdir(const netbsd32_charp path, mode_t mode); }
206137	STD		{ int netbsd32_rmdir(const netbsd32_charp path); }
207138	STD		{ int netbsd32_utimes(const netbsd32_charp path, const netbsd32_timevalp_t tptr); }
208139	OBSOL		4.2 sigreturn
209140	STD		{ int netbsd32_adjtime(const netbsd32_timevalp_t delta, netbsd32_timevalp_t olddelta); }
210141	COMPAT_43	{ int netbsd32_ogetpeername(int fdes, netbsd32_caddr_t asa, netbsd32_intp alen); }
211142	COMPAT_43	{ int32_t sys_gethostid(void); } ogethostid
212143	COMPAT_43	{ int netbsd32_sethostid(int32_t hostid); }
213144	COMPAT_43	{ int netbsd32_ogetrlimit(int which, netbsd32_orlimitp_t rlp); }
214145	COMPAT_43	{ int netbsd32_osetrlimit(int which, const netbsd32_orlimitp_t rlp); }
215146	COMPAT_43	{ int netbsd32_killpg(int pgid, int signum); }
216147	NOARGS		{ int sys_setsid(void); }
217148	STD		{ int netbsd32_quotactl(const netbsd32_charp path, int cmd, int uid, netbsd32_caddr_t arg); }
218149	COMPAT_43	{ int sys_quota(void); } oquota
219150	COMPAT_43	{ int netbsd32_ogetsockname(int fdec, netbsd32_caddr_t asa, netbsd32_intp alen); }
220
221; Syscalls 151-180 inclusive are reserved for vendor-specific
222; system calls.  (This includes various calls added for compatibity
223; with other Unix variants.)
224; Some of these calls are now supported by BSD...
225151	UNIMPL
226152	UNIMPL
227153	UNIMPL
228154	UNIMPL
229#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL)
230155	STD		{ int netbsd32_nfssvc(int flag, netbsd32_voidp argp); }
231#else
232155	EXCL		netbsd32_nfssvc
233#endif
234156	COMPAT_43	{ int netbsd32_ogetdirentries(int fd, netbsd32_charp buf, u_int count, netbsd32_longp basep); }
235157	COMPAT_20	{ int netbsd32_statfs(const netbsd32_charp path, netbsd32_statfsp_t buf); }
236158	COMPAT_20	{ int netbsd32_fstatfs(int fd, netbsd32_statfsp_t buf); }
237159	UNIMPL
238160	UNIMPL
239161	COMPAT_30		{ int netbsd32_getfh(const netbsd32_charp fname, netbsd32_compat_30_fhandlep_t fhp); }
240162	COMPAT_09	{ int netbsd32_ogetdomainname(netbsd32_charp domainname, int len); }
241163	COMPAT_09	{ int netbsd32_osetdomainname(netbsd32_charp domainname, int len); }
242164	COMPAT_09	{ int netbsd32_uname(netbsd32_outsnamep_t name); }
243165	STD		{ int netbsd32_sysarch(int op, netbsd32_voidp parms); }
244166	UNIMPL
245167	UNIMPL
246168	UNIMPL
247#if defined(SYSVSEM) || !defined(_KERNEL)
248169	COMPAT_10	{ int netbsd32_sys_semsys(int which, int a2, int a3, int a4, int a5); } osemsys
249#else
250169	EXCL		netbsd32_sys_semsys
251#endif
252#if defined(SYSVMSG) || !defined(_KERNEL)
253170	COMPAT_10	{ int netbsd32_sys_msgsys(int which, int a2, int a3, int a4, int a5, int a6); } omsgsys
254#else
255170	EXCL		netbsd32_sys_msgsys
256#endif
257#if defined(SYSVSHM) || !defined(_KERNEL)
258171	COMPAT_10	{ int netbsd32_sys_shmsys(int which, int a2, int a3, int a4); } oshmsys
259#else
260171	EXCL		netbsd32_sys_shmsys
261#endif
262172	UNIMPL
263173	STD		{ netbsd32_ssize_t netbsd32_pread(int fd, netbsd32_voidp buf, netbsd32_size_t nbyte, int pad, off_t offset); }
264174	STD		{ netbsd32_ssize_t netbsd32_pwrite(int fd, const netbsd32_voidp buf, netbsd32_size_t nbyte, int pad, off_t offset); }
265175	COMPAT_30	{ int netbsd32_ntp_gettime(netbsd32_ntptimevalp_t ntvp); }
266176	STD		{ int netbsd32_ntp_adjtime(netbsd32_timexp_t tp); }
267177	UNIMPL
268178	UNIMPL
269179	UNIMPL
270180	UNIMPL
271
272; Syscalls 180-199 are used by/reserved for BSD
273181	STD		{ int netbsd32_setgid(gid_t gid); }
274182	STD		{ int netbsd32_setegid(gid_t egid); }
275183	STD		{ int netbsd32_seteuid(uid_t euid); }
276#if defined(LFS) || !defined(_KERNEL)
277184	STD		{ int netbsd32_sys_lfs_bmapv(netbsd32_fsid_tp_t fsidp, netbsd32_block_infop_t blkiov, int blkcnt); }
278185	STD		{ int netbsd32_sys_lfs_markv(netbsd32_fsid_tp_t fsidp, netbsd32_block_infop_t blkiov, int blkcnt); }
279186	STD		{ int netbsd32_sys_lfs_segclean(netbsd32_fsid_tp_t fsidp, netbsd32_u_long segment); }
280187	STD		{ int netbsd32_sys_lfs_segwait(netbsd32_fsid_tp_t fsidp, netbsd32_timevalp_t tv); }
281#else
282184	EXCL		netbsd32_sys_lfs_bmapv
283185	EXCL		netbsd32_sys_lfs_markv
284186	EXCL		netbsd32_sys_lfs_segclean
285187	EXCL		netbsd32_sys_lfs_segwait
286#endif
287188	COMPAT_12	{ int netbsd32_stat12(const netbsd32_charp path, netbsd32_stat12p_t ub); }
288189	COMPAT_12	{ int netbsd32_fstat12(int fd, netbsd32_stat12p_t sb); }
289190	COMPAT_12	{ int netbsd32_lstat12(const netbsd32_charp path, netbsd32_stat12p_t ub); }
290191	STD		{ netbsd32_long netbsd32_pathconf(const netbsd32_charp path, int name); }
291192	STD		{ netbsd32_long netbsd32_fpathconf(int fd, int name); }
292193	UNIMPL
293194	STD		{ int netbsd32_getrlimit(int which, netbsd32_rlimitp_t rlp); }
294195	STD		{ int netbsd32_setrlimit(int which, const netbsd32_rlimitp_t rlp); }
295196	COMPAT_12	{ int netbsd32_getdirentries(int fd, netbsd32_charp buf, u_int count, netbsd32_longp basep); }
296197	STD		{ netbsd32_voidp netbsd32_mmap(netbsd32_voidp addr, netbsd32_size_t len, int prot, int flags, int fd, netbsd32_long pad, off_t pos); }
297198	INDIR		{ quad_t sys___syscall(quad_t num, ...); }
298199	STD		{ off_t netbsd32_lseek(int fd, int pad, off_t offset, int whence); }
299200	STD		{ int netbsd32_truncate(const netbsd32_charp path, int pad, off_t length); }
300201	STD		{ int netbsd32_ftruncate(int fd, int pad, off_t length); }
301202	STD		{ int netbsd32___sysctl(netbsd32_intp name, u_int namelen, netbsd32_voidp old, netbsd32_size_tp oldlenp, netbsd32_voidp new, netbsd32_size_t newlen); }
302203	STD		{ int netbsd32_mlock(const netbsd32_voidp addr, netbsd32_size_t len); }
303204	STD		{ int netbsd32_munlock(const netbsd32_voidp addr, netbsd32_size_t len); }
304205	STD		{ int netbsd32_undelete(const netbsd32_charp path); }
305206	STD		{ int netbsd32_futimes(int fd, const netbsd32_timevalp_t tptr); }
306207	STD		{ int netbsd32_getpgid(pid_t pid); }
307208	STD		{ int netbsd32_reboot(int opt, netbsd32_charp bootstr); }
308209	STD		{ int netbsd32_poll(netbsd32_pollfdp_t fds, u_int nfds, int timeout); }
309;
310; Syscalls 210-219 are reserved for dynamically loaded syscalls
311;
312#if defined(LKM) || !defined(_KERNEL)
313210	NODEF		{ int sys_lkmnosys(void); }
314211	NODEF		{ int sys_lkmnosys(void); }
315212	NODEF		{ int sys_lkmnosys(void); }
316213	NODEF		{ int sys_lkmnosys(void); }
317214	NODEF		{ int sys_lkmnosys(void); }
318215	NODEF		{ int sys_lkmnosys(void); }
319216	NODEF		{ int sys_lkmnosys(void); }
320217	NODEF		{ int sys_lkmnosys(void); }
321218	NODEF		{ int sys_lkmnosys(void); }
322219	NODEF		{ int sys_lkmnosys(void); }
323#else	/* !LKM || !_KERNEL */
324210	EXCL		lkmnosys
325211	EXCL		lkmnosys
326212	EXCL		lkmnosys
327213	EXCL		lkmnosys
328214	EXCL		lkmnosys
329215	EXCL		lkmnosys
330216	EXCL		lkmnosys
331217	EXCL		lkmnosys
332218	EXCL		lkmnosys
333219	EXCL		lkmnosys
334#endif	/* !LKM || !_KERNEL */
335; System calls 220-300 are reserved for use by NetBSD
336#if defined(SYSVSEM) || !defined(_KERNEL)
337220	COMPAT_14	{ int netbsd32___semctl(int semid, int semnum, int cmd, netbsd32_semunu_t arg); }
338221	STD		{ int netbsd32_semget(netbsd32_key_t key, int nsems, int semflg); }
339222	STD		{ int netbsd32_semop(int semid, netbsd32_sembufp_t sops, netbsd32_size_t nsops); }
340223	STD		{ int netbsd32_semconfig(int flag); }
341#else
342220	EXCL		compat_14_netbsd32_semctl
343221	EXCL		netbsd32_semget
344222	EXCL		netbsd32_semop
345223	EXCL		netbsd32_semconfig
346#endif
347#if defined(SYSVMSG) || !defined(_KERNEL)
348224	COMPAT_14	{ int netbsd32_msgctl(int msqid, int cmd, netbsd32_msqid_dsp_t buf); }
349225	STD		{ int netbsd32_msgget(netbsd32_key_t key, int msgflg); }
350226	STD		{ int netbsd32_msgsnd(int msqid, const netbsd32_voidp msgp, netbsd32_size_t msgsz, int msgflg); }
351227	STD		{ netbsd32_ssize_t netbsd32_msgrcv(int msqid, netbsd32_voidp msgp, netbsd32_size_t msgsz, netbsd32_long msgtyp, int msgflg); }
352#else
353224	EXCL		compat_14_netbsd32_msgctl
354225	EXCL		netbsd32_msgget
355226	EXCL		netbsd32_msgsnd
356227	EXCL		netbsd32_msgrcv
357#endif
358#if defined(SYSVSHM) || !defined(_KERNEL)
359228	STD		{ netbsd32_voidp netbsd32_shmat(int shmid, const netbsd32_voidp shmaddr, int shmflg); }
360229	COMPAT_14		{ int netbsd32_shmctl(int shmid, int cmd, netbsd32_shmid_dsp_t buf); }
361230	STD		{ int netbsd32_shmdt(const netbsd32_voidp shmaddr); }
362231	STD		{ int netbsd32_shmget(netbsd32_key_t key, netbsd32_size_t size, int shmflg); }
363#else
364228	EXCL		netbsd32_shmat
365229	EXCL		compat_14_netbsd32_shmctl
366230	EXCL		netbsd32_shmdt
367231	EXCL		netbsd32_shmget
368#endif
369232	STD		{ int netbsd32_clock_gettime(netbsd32_clockid_t clock_id, netbsd32_timespecp_t tp); }
370233	STD		{ int netbsd32_clock_settime(netbsd32_clockid_t clock_id, const netbsd32_timespecp_t tp); }
371234	STD		{ int netbsd32_clock_getres(netbsd32_clockid_t clock_id, netbsd32_timespecp_t tp); }
372235	STD		{ int netbsd32_timer_create(netbsd32_clockid_t clock_id, netbsd32_sigeventp_t evp, \
373			    netbsd32_timerp_t timerid); }
374236	STD		{ int netbsd32_timer_delete(netbsd32_timer_t timerid); }
375237	STD		{ int netbsd32_timer_settime(netbsd32_timer_t timerid, int flags, \
376			    const netbsd32_itimerspecp_t value, \
377			    netbsd32_itimerspecp_t ovalue); }
378238	STD		{ int netbsd32_timer_gettime(netbsd32_timer_t timerid, netbsd32_itimerspecp_t value); }
379239	STD		{ int netbsd32_timer_getoverrun(netbsd32_timer_t timerid); }
380;
381; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls
382;
383240	STD		{ int netbsd32_nanosleep(const netbsd32_timespecp_t rqtp, netbsd32_timespecp_t rmtp); }
384241	STD		{ int netbsd32_fdatasync(int fd); }
385242	STD		{ int netbsd32_mlockall(int flags); }
386243	NOARGS		{ int sys_munlockall(void); }
387244	STD		{ int netbsd32___sigtimedwait(const netbsd32_sigsetp_t set, \
388			    netbsd32_siginfop_t info, \
389			    netbsd32_timespecp_t timeout); }
390245	UNIMPL
391246	UNIMPL
392#if defined(P1003_1B_SEMAPHORE) || (!defined(_KERNEL) && defined(_LIBC))
393247	STD		{ int netbsd32__ksem_init(unsigned int value, netbsd32_semidp_t idp); }
394248	STD		{ int netbsd32__ksem_open(const netbsd32_charp name, int oflag, \
395			    mode_t mode, unsigned int value, netbsd32_semidp_t idp); }
396249	STD		{ int netbsd32__ksem_unlink(const netbsd32_charp name); }
397250	STD		{ int netbsd32__ksem_close(netbsd32_semid_t id); }
398251	STD		{ int netbsd32__ksem_post(netbsd32_semid_t id); }
399252	STD		{ int netbsd32__ksem_wait(netbsd32_semid_t id); }
400253	STD		{ int netbsd32__ksem_trywait(netbsd32_semid_t id); }
401254	STD		{ int netbsd32__ksem_getvalue(netbsd32_semid_t id, \
402			    netbsd32_intp value); }
403255	STD		{ int netbsd32__ksem_destroy(netbsd32_semid_t id); }
404256	UNIMPL		sys__ksem_timedwait
405#else
406247	EXCL		sys__ksem_init
407248	EXCL		sys__ksem_open
408249	EXCL 		sys__ksem_unlink
409250	EXCL		sys__ksem_close
410251	EXCL		sys__ksem_post
411252	EXCL		sys__ksem_wait
412253	EXCL		sys__ksem_trywait
413254	EXCL		sys__ksem_getvalue
414255	EXCL		sys__ksem_destroy
415256	UNIMPL		sys__ksem_timedwait
416#endif
417257	UNIMPL
418258	UNIMPL
419259	UNIMPL
420260	UNIMPL
421261	UNIMPL
422262	UNIMPL
423263	UNIMPL
424264	UNIMPL
425265	UNIMPL
426266	UNIMPL
427267	UNIMPL
428268	UNIMPL
429269	UNIMPL
430270	STD		{ int netbsd32___posix_rename(const netbsd32_charp from, const netbsd32_charp to); }
431271	STD		{ int netbsd32_swapctl(int cmd, netbsd32_voidp arg, int misc); }
432272	COMPAT_30	{ int netbsd32_getdents(int fd, netbsd32_charp buf, netbsd32_size_t count); }
433273	STD		{ int netbsd32_minherit(netbsd32_voidp addr, netbsd32_size_t len, int inherit); }
434274	STD		{ int netbsd32_lchmod(const netbsd32_charp path, mode_t mode); }
435275	STD		{ int netbsd32_lchown(const netbsd32_charp path, uid_t uid, gid_t gid); }
436276	STD		{ int netbsd32_lutimes(const netbsd32_charp path, const netbsd32_timevalp_t tptr); }
437277	STD		{ int netbsd32___msync13(netbsd32_voidp addr, netbsd32_size_t len, int flags); }
438278	COMPAT_30	{ int netbsd32___stat13(const netbsd32_charp path, netbsd32_stat13p_t ub); }
439279	COMPAT_30	{ int netbsd32___fstat13(int fd, netbsd32_stat13p_t sb); }
440280	COMPAT_30	{ int netbsd32___lstat13(const netbsd32_charp path, netbsd32_stat13p_t ub); }
441281	STD		{ int netbsd32___sigaltstack14(const netbsd32_sigaltstackp_t nss, netbsd32_sigaltstackp_t oss); }
442282	NOARGS		{ int sys___vfork14(void); }
443283	STD		{ int netbsd32___posix_chown(const netbsd32_charp path, uid_t uid, gid_t gid); }
444284	STD		{ int netbsd32___posix_fchown(int fd, uid_t uid, gid_t gid); }
445285	STD		{ int netbsd32___posix_lchown(const netbsd32_charp path, uid_t uid, gid_t gid); }
446286	STD		{ pid_t netbsd32_getsid(pid_t pid); }
447287	STD		{ int netbsd32___clone(int flags, netbsd32_voidp stack); }
448288	STD		{ int netbsd32_fktrace(const int fd, int ops, int facs, int pid); }
449289	STD		{ netbsd32_ssize_t netbsd32_preadv(int fd, const netbsd32_iovecp_t iovp, int iovcnt, int pad, off_t offset); }
450290	STD		{ netbsd32_ssize_t netbsd32_pwritev(int fd, const netbsd32_iovecp_t iovp, int iovcnt, int pad, off_t offset); }
451291	STD		{ int netbsd32___sigaction14(int signum, \
452			    const netbsd32_sigactionp_t nsa, \
453			    netbsd32_sigactionp_t osa); }
454292	STD		{ int netbsd32___sigpending14(netbsd32_sigsetp_t set); }
455293	STD		{ int netbsd32___sigprocmask14(int how, \
456			    const netbsd32_sigsetp_t set, \
457			    netbsd32_sigsetp_t oset); }
458294	STD		{ int netbsd32___sigsuspend14(const netbsd32_sigsetp_t set); }
459295	COMPAT_16	{ int netbsd32___sigreturn14(netbsd32_sigcontextp_t sigcntxp); }
460296	STD		{ int netbsd32___getcwd(netbsd32_charp bufp, netbsd32_size_t length); }
461297	STD		{ int netbsd32_fchroot(int fd); }
462298	COMPAT_30	{ int netbsd32_fhopen(const netbsd32_fhandlep_t fhp, \
463			   int flags); }
464299	COMPAT_30	{ int netbsd32_fhstat(const netbsd32_fhandlep_t fhp, \
465			    netbsd32_stat13p_t sb); }
466300	COMPAT_20	{ int netbsd32_fhstatfs(netbsd32_fhandlep_t fhp, \
467			    netbsd32_statp_t buf); }
468#if defined(SYSVSEM) || !defined(_KERNEL)
469301	STD		{ int netbsd32___semctl14(int semid, int semnum, int cmd, \
470			    ... netbsd32_semunp_t arg); }
471#else
472301	EXCL		__semctl14
473#endif
474#if defined(SYSVMSG) || !defined(_KERNEL)
475302	STD		{ int netbsd32___msgctl13(int msqid, int cmd, \
476			    netbsd32_msqid_dsp_t buf); }
477#else
478302	EXCL		__msgctl13
479#endif
480#if defined(SYSVSHM) || !defined(_KERNEL)
481303	STD		{ int netbsd32___shmctl13(int shmid, int cmd, \
482			    netbsd32_shmid_dsp_t buf); }
483#else
484303	EXCL		__shmctl13
485#endif
486304	STD		{ int netbsd32_lchflags(const netbsd32_charp path, netbsd32_u_long flags); }
487305	NOARGS MPSAFE	{ int sys_issetugid(void); }
488306	STD		{ int netbsd32_utrace(const netbsd32_charp label, netbsd32_voidp addr, \
489			    netbsd32_size_t len); }
490307	STD		{ int netbsd32_getcontext(netbsd32_ucontextp ucp); }
491308	STD		{ int netbsd32_setcontext(netbsd32_ucontextp ucp, \
492			    uint32_t flags, netbsd32_lwpidp new_lwp); }
493309	STD		{ int netbsd32__lwp_create(const netbsd32_ucontextp ucp, \
494			    netbsd32_u_long flags, netbsd32_lwpidp new_lwp); }
495310	NOARGS		{ int sys__lwp_exit(void); }
496311	NOARGS MPSAFE	{ lwpid_t sys__lwp_self(void); }
497312	STD MPSAFE	{ int netbsd32__lwp_wait(lwpid_t wait_for, \
498			    netbsd32_lwpidp departed); }
499313	STD MPSAFE	{ int netbsd32__lwp_suspend(lwpid_t target); }
500314	STD MPSAFE	{ int netbsd32__lwp_continue(lwpid_t target); }
501315	STD MPSAFE	{ int netbsd32__lwp_wakeup(lwpid_t target); }
502316	NOARGS MPSAFE	{ void *sys__lwp_getprivate(void); }
503317	STD MPSAFE	{ void netbsd32__lwp_setprivate(netbsd32_voidp ptr); }
504318	STD		{ int netbsd32__lwp_kill(lwpid_t target, int signo); }
505319	STD MPSAFE	{ int netbsd32__lwp_detach(lwpid_t target); }
506320	STD MPSAFE	{ int netbsd32__lwp_park(const netbsd32_timespecp_t ts, \
507				lwpid_t unpark, const netbsd32_voidp hint, \
508				const netbsd32_voidp unparkhint); }
509321	STD MPSAFE	{ int netbsd32__lwp_unpark(lwpid_t target, const netbsd32_voidp hint); }
510322	STD MPSAFE	{ netbsd32_size_t netbsd32__lwp_unpark_all(const netbsd32_lwpidp targets, \
511				netbsd32_size_t ntargets, const netbsd32_voidp hint); }
512323	UNIMPL
513324	UNIMPL
514325	UNIMPL
515326	UNIMPL
516327	UNIMPL
517328	UNIMPL
518329	UNIMPL
519330	OBSOL		netbsd32_sa_register
520331	OBSOL		netbsd32_sa_stacks
521332	OBSOL		sys_sa_enable
522333	OBSOL		netbsd32_sa_setconcurrency
523334	OBSOL		sys_sa_yield
524335	OBSOL		netbsd32_sa_preempt
525336	OBSOL		sys_sa_unblockyield
526337	UNIMPL
527338	UNIMPL
528339	UNIMPL
529340	STD		{ int netbsd32___sigaction_sigtramp(int signum, \
530			    const netbsd32_sigactionp_t nsa, \
531			    netbsd32_sigactionp_t osa, \
532			    netbsd32_voidp tramp, int vers); }
533341	UNIMPL
534342	UNIMPL
535343	STD		{ int netbsd32_rasctl(netbsd32_caddr_t addr, netbsd32_size_t len, \
536			    int op); }
537344	NOARGS		{ int sys_kqueue(void); }
538345	STD		{ int netbsd32_kevent(int fd, \
539			    netbsd32_keventp_t changelist, netbsd32_size_t nchanges, \
540			    netbsd32_keventp_t eventlist, netbsd32_size_t nevents, \
541			    netbsd32_timespecp_t timeout); }
542346	UNIMPL
543347	UNIMPL
544348	UNIMPL
545349	UNIMPL
546350	NOARGS MPSAFE	{ int sys_sched_yield(void); }
547351	UNIMPL
548352	UNIMPL
549353	UNIMPL
550354	STD		{ int netbsd32_fsync_range(int fd, int flags, off_t start, \
551			    off_t length); }
552355	STD		{ int netbsd32_uuidgen(netbsd32_uuidp_t store, int count); }
553356	STD		{ int netbsd32_getvfsstat(netbsd32_statvfsp_t buf, \
554			    netbsd32_size_t bufsize, int flags); }
555357	STD		{ int netbsd32_statvfs1(const netbsd32_charp path, \
556			    netbsd32_statvfsp_t buf, int flags); }
557358	STD		{ int netbsd32_fstatvfs1(int fd, netbsd32_statvfsp_t buf, \
558			    int flags); }
559359	COMPAT_30	{ int netbsd32_fhstatvfs1(const netbsd32_fhandlep_t fhp, \
560			    netbsd32_statvfsp_t buf, int flags); }
561360	STD		{ int netbsd32_extattrctl(const netbsd32_charp path, \
562			    int cmd, const netbsd32_charp filename, int attrnamespace, \
563			    const netbsd32_charp attrname); }
564361	STD		{ int netbsd32_extattr_set_file(const netbsd32_charp path, \
565			    int attrnamespace, const netbsd32_charp attrname, \
566			    const netbsd32_voidp data, netbsd32_size_t nbytes); }
567362	STD		{ int netbsd32_extattr_get_file(const netbsd32_charp path, \
568			    int attrnamespace, const netbsd32_charp attrname, \
569			    netbsd32_voidp data, netbsd32_size_t nbytes); }
570363	STD		{ int netbsd32_extattr_delete_file(const netbsd32_charp path, \
571			    int attrnamespace, const netbsd32_charp attrname); }
572364	STD		{ int netbsd32_extattr_set_fd(int fd, \
573			    int attrnamespace, const netbsd32_charp attrname, \
574			    const netbsd32_voidp data, netbsd32_size_t nbytes); }
575365	STD		{ int netbsd32_extattr_get_fd(int fd, \
576			    int attrnamespace, const netbsd32_charp attrname, \
577			    netbsd32_voidp data, netbsd32_size_t nbytes); }
578366	STD		{ int netbsd32_extattr_delete_fd(int fd, \
579			    int attrnamespace, const netbsd32_charp attrname); }
580367	STD		{ int netbsd32_extattr_set_link(const netbsd32_charp path, \
581			    int attrnamespace, const netbsd32_charp attrname, \
582			    const netbsd32_voidp data, netbsd32_size_t nbytes); }
583368	STD		{ int netbsd32_extattr_get_link(const netbsd32_charp path, \
584			    int attrnamespace, const netbsd32_charp attrname, \
585			    netbsd32_voidp data, netbsd32_size_t nbytes); }
586369	STD		{ int netbsd32_extattr_delete_link(const netbsd32_charp path, \
587			    int attrnamespace, const netbsd32_charp attrname); }
588370	STD		{ int netbsd32_extattr_list_fd(int fd, \
589			    int attrnamespace, netbsd32_voidp data, \
590			    netbsd32_size_t nbytes); }
591371	STD		{ int netbsd32_extattr_list_file(const netbsd32_charp path, \
592			    int attrnamespace, netbsd32_voidp data, \
593			    netbsd32_size_t nbytes); }
594372	STD		{ int netbsd32_extattr_list_link(const netbsd32_charp path, \
595			    int attrnamespace, netbsd32_voidp data, \
596			    netbsd32_size_t nbytes); }
597373	STD		{ int netbsd32_pselect(int nd, netbsd32_fd_setp_t in, \
598			    netbsd32_fd_setp_t ou, netbsd32_fd_setp_t ex, \
599			    const netbsd32_timespecp_t ts, const netbsd32_sigsetp_t mask); }
600374	STD		{ int netbsd32_pollts(netbsd32_pollfdp_t fds, u_int nfds, \
601			    const netbsd32_timespecp_t ts, const netbsd32_sigsetp_t mask); }
602375	STD		{ int netbsd32_setxattr(const netbsd32_charp path, \
603			    const netbsd32_charp name, netbsd32_voidp value, \
604			    netbsd32_size_t size, int flags); }
605376	STD		{ int netbsd32_lsetxattr(const netbsd32_charp path, \
606			    const netbsd32_charp name, netbsd32_voidp value, \
607			    netbsd32_size_t size, int flags); }
608377	STD		{ int netbsd32_fsetxattr(int fd, \
609			    const netbsd32_charp name, netbsd32_voidp value, \
610			    netbsd32_size_t size, int flags); }
611378	STD		{ int netbsd32_getxattr(const netbsd32_charp path, \
612			    const netbsd32_charp name, netbsd32_voidp value, \
613			    netbsd32_size_t size); }
614379	STD		{ int netbsd32_lgetxattr(const netbsd32_charp path, \
615			    const netbsd32_charp name, netbsd32_voidp value, \
616			    netbsd32_size_t size); }
617380	STD		{ int netbsd32_fgetxattr(int fd, \
618			    const netbsd32_charp name, netbsd32_voidp value, \
619			    netbsd32_size_t size); }
620381	STD		{ int netbsd32_listxattr(const netbsd32_charp path, \
621			    netbsd32_charp list, netbsd32_size_t size); }
622382	STD		{ int netbsd32_llistxattr(const netbsd32_charp path, \
623			    netbsd32_charp list, netbsd32_size_t size); }
624383	STD		{ int netbsd32_flistxattr(int fd, \
625			    netbsd32_charp list, netbsd32_size_t size); }
626384	STD		{ int netbsd32_removexattr(const netbsd32_charp path, \
627			    const netbsd32_charp name); }
628385	STD		{ int netbsd32_lremovexattr(const netbsd32_charp path, \
629			    const netbsd32_charp name); }
630386	STD		{ int netbsd32_fremovexattr(int fd, \
631			    const netbsd32_charp name); }
632387     STD             { int netbsd32_sys___stat30(const netbsd32_charp path, \
633			    netbsd32_statp_t ub); }
634388     STD             { int netbsd32_sys___fstat30(int fd, \
635			    netbsd32_statp_t sb); }
636389     STD             { int netbsd32_sys___lstat30( \
637			    const netbsd32_charp path, netbsd32_statp_t ub); }
638390     STD             { int netbsd32_sys___getdents30(int fd, \
639			    netbsd32_charp buf, netbsd32_size_t count); }
640391	NOARGS		{ int sys_posix_fadvise(int fd, off_t offset, \
641			    off_t len, int advice); }
642392	COMPAT_30	{ int netbsd32_sys___fhstat30( \
643			    const netbsd32_fhandlep_t fhp, \
644			    netbsd32_statp_t sb); }
645393	STD		{ int netbsd32_ntp_gettime(netbsd32_ntptimevalp_t ntvp); }
646394	STD		{ int netbsd32_sys___socket30(int domain, int type, int protocol); }
647395	STD		{ int netbsd32___getfh30(const netbsd32_charp fname, netbsd32_pointer_t fhp, netbsd32_size_tp fh_size); }
648396	STD		{ int netbsd32___fhopen40(const netbsd32_pointer_t fhp, \
649			    netbsd32_size_t fh_size, int flags); }
650397	STD		{ int netbsd32___fhstatvfs140(	\
651			    netbsd32_pointer_t fhp, netbsd32_size_t fh_size,\
652			    netbsd32_statvfsp_t buf, int flags); }
653398	STD		{ int netbsd32___fhstat40(	\
654			    netbsd32_pointer_t fhp, netbsd32_size_t fh_size,\
655			    netbsd32_statp_t sb); }
656