syscalls.master revision 1.73
1	$NetBSD: syscalls.master,v 1.73 2008/11/19 18:36:05 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, IGNORED, 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;	IGNORED	syscall is a null op, but always succeeds
18;	UNIMPL	unimplemented, not included in system
19;	EXCL	implemented, but not included in system
20;	NODEF	included, but don't define the syscall number
21;	NOARGS	included, but don't define the syscall args structure
22;	INDIR	included, but don't define the syscall args structure,
23;		and allow it to be "really" varargs.
24;
25; The compat options are defined in the syscalls.conf file, and the
26; compat option name is prefixed to the syscall name.  Other than
27; that, they're like NODEF (for 'compat' options), or STD (for
28; 'libcompat' options).
29;
30; The type-dependent arguments are as follows:
31; For STD, NODEF, NOARGS, and compat syscalls:
32;	{ pseudo-proto } [alias]
33; For other syscalls:
34;	[comment]
35;
36; #ifdef's, etc. may be included, and are copied to the output files.
37; #include's are copied to the syscall names and switch definition files only.
38
39#if defined(_KERNEL_OPT)
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 netbsd32_sys_syscall(int code, \
68			    ... register32_t args[NETBSD32_SYS_MAXSYSARGS]); }
691	STD		{ void netbsd32_exit(int rval); }
702	NOARGS		{ int sys_fork(void); }
713	STD		{ netbsd32_ssize_t netbsd32_read(int fd, netbsd32_voidp buf, netbsd32_size_t nbyte); }
724	STD		{ netbsd32_ssize_t netbsd32_write(int fd, netbsd32_voidp buf, netbsd32_size_t nbyte); }
735	STD		{ int netbsd32_open(netbsd32_charp path, int flags, ... mode_t mode); }
746	STD		{ int netbsd32_close(int fd); }
757	STD		{ int netbsd32_wait4(int pid, netbsd32_intp status, int options, netbsd32_rusagep_t rusage); }
768	COMPAT_43	{ int netbsd32_ocreat(netbsd32_charp path, mode_t mode); }
779	STD		{ int netbsd32_link(netbsd32_charp path, netbsd32_charp link); }
7810	STD		{ int netbsd32_unlink(netbsd32_charp path); }
7911	OBSOL		execv
8012	STD		{ int netbsd32_chdir(netbsd32_charp path); }
8113	STD		{ int netbsd32_fchdir(int fd); }
8214	STD		{ int netbsd32_mknod(netbsd32_charp path, mode_t mode, dev_t dev); }
8315	STD		{ int netbsd32_chmod(netbsd32_charp path, mode_t mode); }
8416	STD		{ int netbsd32_chown(netbsd32_charp path, uid_t uid, gid_t gid); }
8517	STD		{ int netbsd32_break(netbsd32_charp nsize); }
8618	COMPAT_20	{ int netbsd32_getfsstat(netbsd32_statfsp_t buf, netbsd32_long bufsize, int flags); }
8719	COMPAT_43	{ netbsd32_long netbsd32_olseek(int fd, netbsd32_long offset, int whence); }
8820	NOARGS 		{ pid_t sys_getpid(void); }
8921	STD		{ int netbsd32_mount(netbsd32_charp type, netbsd32_charp path, int flags, netbsd32_voidp data); }
9022	STD		{ int netbsd32_unmount(netbsd32_charp path, int flags); }
9123	STD		{ int netbsd32_setuid(uid_t uid); }
9224	NOARGS 		{ uid_t sys_getuid(void); }
9325	NOARGS		{ uid_t sys_geteuid(void); }
9426	STD		{ int netbsd32_ptrace(int req, pid_t pid, netbsd32_caddr_t addr, int data); }
9527	STD		{ netbsd32_ssize_t netbsd32_recvmsg(int s, netbsd32_msghdrp_t msg, int flags); }
9628	STD		{ netbsd32_ssize_t netbsd32_sendmsg(int s, netbsd32_msghdrp_t msg, int flags); }
9729	STD		{ netbsd32_ssize_t netbsd32_recvfrom(int s, netbsd32_voidp buf, netbsd32_size_t len, int flags, netbsd32_sockaddrp_t from, netbsd32_intp fromlenaddr); }
9830	STD		{ int netbsd32_accept(int s, netbsd32_sockaddrp_t name, netbsd32_intp anamelen); }
9931	STD		{ int netbsd32_getpeername(int fdes, netbsd32_sockaddrp_t asa, netbsd32_intp alen); }
10032	STD		{ int netbsd32_getsockname(int fdes, netbsd32_sockaddrp_t asa, netbsd32_intp alen); }
10133	STD		{ int netbsd32_access(netbsd32_charp path, int flags); }
10234	STD		{ int netbsd32_chflags(netbsd32_charp path, netbsd32_u_long flags); }
10335	STD		{ int netbsd32_fchflags(int fd, netbsd32_u_long flags); }
10436	NOARGS		{ void sys_sync(void); }
10537	STD		{ int netbsd32_kill(int pid, int signum); }
10638	COMPAT_43	{ int netbsd32_stat43(netbsd32_charp path, netbsd32_stat43p_t ub); }
10739	NOARGS 		{ pid_t sys_getppid(void); }
10840	COMPAT_43	{ int netbsd32_lstat43(netbsd32_charp path, netbsd32_stat43p_t ub); }
10941	STD		{ int netbsd32_dup(int fd); }
11042	NOARGS		{ int sys_pipe(void); }
11143	NOARGS 		{ gid_t sys_getegid(void); }
11244	STD		{ int netbsd32_profil(netbsd32_caddr_t samples, netbsd32_size_t size, netbsd32_u_long offset, u_int scale); }
11345	STD		{ int netbsd32_ktrace(netbsd32_charp fname, int ops, int facs, int pid); }
11446	STD		{ int netbsd32_sigaction(int signum, netbsd32_sigactionp_t nsa, netbsd32_sigactionp_t osa); }
11547	NOARGS 		{ gid_t sys_getgid(void); }
11648	COMPAT_13	{ int netbsd32_sigprocmask(int how, \
117			    int mask); } sigprocmask13
11849	STD		{ int netbsd32___getlogin(netbsd32_charp namebuf, u_int namelen); }
11950	STD		{ int netbsd32_setlogin(netbsd32_charp namebuf); }
12051	STD		{ int netbsd32_acct(netbsd32_charp path); }
12152	COMPAT_13 	{ int sys_sigpending(void); } sigpending13
12253	COMPAT_13	{ int netbsd32_sigaltstack13(netbsd32_sigaltstack13p_t nss, netbsd32_sigaltstack13p_t oss); }
12354	STD		{ int netbsd32_ioctl(int fd, netbsd32_u_long com, ... netbsd32_voidp data); }
12455	COMPAT_12	{ int netbsd32_reboot(int opt); }
12556	STD		{ int netbsd32_revoke(netbsd32_charp path); }
12657	STD		{ int netbsd32_symlink(netbsd32_charp path, netbsd32_charp link); }
12758	STD		{ int netbsd32_readlink(netbsd32_charp path, netbsd32_charp buf, netbsd32_size_t count); }
12859	STD		{ int netbsd32_execve(netbsd32_charp path, netbsd32_charpp argp, netbsd32_charpp envp); }
12960	STD		{ mode_t netbsd32_umask(mode_t newmask); }
13061	STD		{ int netbsd32_chroot(netbsd32_charp path); }
13162	COMPAT_43	{ int netbsd32_fstat43(int fd, netbsd32_stat43p_t sb); }
13263	COMPAT_43	{ int netbsd32_ogetkerninfo(int op, netbsd32_charp where, netbsd32_intp size, int arg); }
13364	COMPAT_43	{ int sys_getpagesize(void); } ogetpagesize
13465	COMPAT_12	{ int netbsd32_msync(netbsd32_caddr_t addr, netbsd32_size_t len); }
135; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)?
13666	NOARGS		{ int sys_vfork(void); }
13767	OBSOL		vread
13868	OBSOL		vwrite
13969	STD		{ int netbsd32_sbrk(netbsd32_intptr_t incr); }
14070	STD		{ int netbsd32_sstk(int incr); }
14171	COMPAT_43	{ int netbsd32_ommap(netbsd32_caddr_t addr, netbsd32_size_t len, int prot, int flags, int fd, netbsd32_long pos); }
14272	STD		{ int netbsd32_ovadvise(int anom); } vadvise
14373	STD		{ int netbsd32_munmap(netbsd32_voidp addr, netbsd32_size_t len); }
14474	STD		{ int netbsd32_mprotect(netbsd32_voidp addr, netbsd32_size_t len, int prot); }
14575	STD		{ int netbsd32_madvise(netbsd32_voidp addr, netbsd32_size_t len, int behav); }
14676	OBSOL		vhangup
14777	OBSOL		vlimit
14878	STD		{ int netbsd32_mincore(netbsd32_caddr_t addr, netbsd32_size_t len, netbsd32_charp vec); }
14979	STD		{ int netbsd32_getgroups(int gidsetsize, netbsd32_gid_tp gidset); }
15080	STD		{ int netbsd32_setgroups(int gidsetsize, netbsd32_gid_tp gidset); }
15181	NOARGS 		{ int sys_getpgrp(void); }
15282	STD		{ int netbsd32_setpgid(int pid, int pgid); }
15383	STD		{ int netbsd32_setitimer(int which, netbsd32_itimervalp_t itv, netbsd32_itimervalp_t oitv); }
15484	COMPAT_43	{ int sys_wait(void); } owait
15585	COMPAT_12	{ int netbsd32_oswapon(netbsd32_charp name); }
15686	STD		{ int netbsd32_getitimer(int which, netbsd32_itimervalp_t itv); }
15787	COMPAT_43	{ int netbsd32_ogethostname(netbsd32_charp hostname, u_int len); }
15888	COMPAT_43	{ int netbsd32_osethostname(netbsd32_charp hostname, u_int len); }
15989	COMPAT_43	{ int sys_getdtablesize(void); } ogetdtablesize
16090	STD		{ int netbsd32_dup2(int from, int to); }
16191	UNIMPL		getdopt
16292	STD		{ int netbsd32_fcntl(int fd, int cmd, ... netbsd32_voidp arg); }
16393	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); }
16494	UNIMPL		setdopt
16595	STD		{ int netbsd32_fsync(int fd); }
16696	STD		{ int netbsd32_setpriority(int which, int who, int prio); }
16797	COMPAT_30	{ int netbsd32_socket(int domain, int type, int protocol); }
16898	STD		{ int netbsd32_connect(int s, netbsd32_sockaddrp_t name, int namelen); }
16999	COMPAT_43	{ int netbsd32_oaccept(int s, netbsd32_caddr_t name, netbsd32_intp anamelen); }
170100	STD		{ int netbsd32_getpriority(int which, int who); }
171101	COMPAT_43	{ int netbsd32_osend(int s, netbsd32_caddr_t buf, int len, int flags); }
172102	COMPAT_43	{ int netbsd32_orecv(int s, netbsd32_caddr_t buf, int len, int flags); }
173103	COMPAT_13	{ int netbsd32_sigreturn(netbsd32_sigcontextp_t sigcntxp); } sigreturn13
174104	STD		{ int netbsd32_bind(int s, netbsd32_sockaddrp_t name, int namelen); }
175105	STD		{ int netbsd32_setsockopt(int s, int level, int name, netbsd32_voidp val, int valsize); }
176106	STD		{ int netbsd32_listen(int s, int backlog); }
177107	OBSOL		vtimes
178108	COMPAT_43	{ int netbsd32_osigvec(int signum, netbsd32_sigvecp_t nsv, netbsd32_sigvecp_t osv); }
179109	COMPAT_43	{ int netbsd32_sigblock(int mask); }
180110	COMPAT_43	{ int netbsd32_sigsetmask(int mask); }
181111	COMPAT_13	{ int netbsd32_sigsuspend(int mask); } sigsuspend13
182112	COMPAT_43	{ int netbsd32_osigstack(netbsd32_sigstackp_t nss, netbsd32_sigstackp_t oss); }
183113	COMPAT_43	{ int netbsd32_orecvmsg(int s, netbsd32_omsghdrp_t msg, int flags); }
184114	COMPAT_43	{ int netbsd32_osendmsg(int s, netbsd32_caddr_t msg, int flags); }
185115	OBSOL		vtrace
186116	STD		{ int netbsd32_gettimeofday(netbsd32_timevalp_t tp, netbsd32_timezonep_t tzp); }
187117	STD		{ int netbsd32_getrusage(int who, netbsd32_rusagep_t rusage); }
188118	STD		{ int netbsd32_getsockopt(int s, int level, int name, netbsd32_voidp val, netbsd32_intp avalsize); }
189119	OBSOL		resuba
190120	STD		{ netbsd32_ssize_t netbsd32_readv(int fd, netbsd32_iovecp_t iovp, int iovcnt); }
191121	STD		{ netbsd32_ssize_t netbsd32_writev(int fd, netbsd32_iovecp_t iovp, int iovcnt); }
192122	STD		{ int netbsd32_settimeofday(netbsd32_timevalp_t tv, netbsd32_timezonep_t tzp); }
193123	STD		{ int netbsd32_fchown(int fd, uid_t uid, gid_t gid); }
194124	STD		{ int netbsd32_fchmod(int fd, mode_t mode); }
195125	COMPAT_43	{ int netbsd32_orecvfrom(int s, netbsd32_caddr_t buf, netbsd32_size_t len, int flags, netbsd32_caddr_t from, netbsd32_intp fromlenaddr); }
196126	STD		{ int netbsd32_setreuid(uid_t ruid, uid_t euid); }
197127	STD		{ int netbsd32_setregid(gid_t rgid, gid_t egid); }
198128	STD		{ int netbsd32_rename(netbsd32_charp from, netbsd32_charp to); }
199129	COMPAT_43	{ int netbsd32_otruncate(netbsd32_charp path, netbsd32_long length); }
200130	COMPAT_43	{ int netbsd32_oftruncate(int fd, netbsd32_long length); }
201131	STD		{ int netbsd32_flock(int fd, int how); }
202132	STD		{ int netbsd32_mkfifo(netbsd32_charp path, mode_t mode); }
203133	STD		{ netbsd32_ssize_t netbsd32_sendto(int s, netbsd32_voidp buf, netbsd32_size_t len, int flags, netbsd32_sockaddrp_t to, int tolen); }
204134	STD		{ int netbsd32_shutdown(int s, int how); }
205135	STD		{ int netbsd32_socketpair(int domain, int type, int protocol, netbsd32_intp rsv); }
206136	STD		{ int netbsd32_mkdir(netbsd32_charp path, mode_t mode); }
207137	STD		{ int netbsd32_rmdir(netbsd32_charp path); }
208138	STD		{ int netbsd32_utimes(netbsd32_charp path, netbsd32_timevalp_t tptr); }
209139	OBSOL		4.2 sigreturn
210140	STD		{ int netbsd32_adjtime(netbsd32_timevalp_t delta, netbsd32_timevalp_t olddelta); }
211141	COMPAT_43	{ int netbsd32_ogetpeername(int fdes, netbsd32_caddr_t asa, netbsd32_intp alen); }
212142	COMPAT_43	{ int32_t sys_gethostid(void); } ogethostid
213143	COMPAT_43	{ int netbsd32_sethostid(int32_t hostid); }
214144	COMPAT_43	{ int netbsd32_ogetrlimit(int which, netbsd32_orlimitp_t rlp); }
215145	COMPAT_43	{ int netbsd32_osetrlimit(int which, netbsd32_orlimitp_t rlp); }
216146	COMPAT_43	{ int netbsd32_killpg(int pgid, int signum); }
217147	NOARGS		{ int sys_setsid(void); }
218148	STD		{ int netbsd32_quotactl(netbsd32_charp path, int cmd, int uid, netbsd32_caddr_t arg); }
219149	COMPAT_43	{ int sys_quota(void); } oquota
220150	COMPAT_43	{ int netbsd32_ogetsockname(int fdec, netbsd32_caddr_t asa, netbsd32_intp alen); }
221
222; Syscalls 151-180 inclusive are reserved for vendor-specific
223; system calls.  (This includes various calls added for compatibity
224; with other Unix variants.)
225; Some of these calls are now supported by BSD...
226151	UNIMPL
227152	UNIMPL
228153	UNIMPL
229154	UNIMPL
230155	STD		{ int netbsd32_nfssvc(int flag, netbsd32_voidp argp); }
231156	COMPAT_43	{ int netbsd32_ogetdirentries(int fd, netbsd32_charp buf, u_int count, netbsd32_longp basep); }
232157	COMPAT_20	{ int netbsd32_statfs(netbsd32_charp path, netbsd32_statfsp_t buf); }
233158	COMPAT_20	{ int netbsd32_fstatfs(int fd, netbsd32_statfsp_t buf); }
234159	UNIMPL
235160	UNIMPL
236161	COMPAT_30		{ int netbsd32_getfh(netbsd32_charp fname, netbsd32_compat_30_fhandlep_t fhp); }
237162	COMPAT_09	{ int netbsd32_ogetdomainname(netbsd32_charp domainname, int len); }
238163	COMPAT_09	{ int netbsd32_osetdomainname(netbsd32_charp domainname, int len); }
239164	COMPAT_09	{ int netbsd32_uname(netbsd32_outsnamep_t name); }
240165	STD		{ int netbsd32_sysarch(int op, netbsd32_voidp parms); }
241166	UNIMPL
242167	UNIMPL
243168	UNIMPL
244#if defined(SYSVSEM) || !defined(_KERNEL)
245169	COMPAT_10	{ int netbsd32_sys_semsys(int which, int a2, int a3, int a4, int a5); } osemsys
246#else
247169	EXCL		netbsd32_sys_semsys
248#endif
249#if defined(SYSVMSG) || !defined(_KERNEL)
250170	COMPAT_10	{ int netbsd32_sys_msgsys(int which, int a2, int a3, int a4, int a5, int a6); } omsgsys
251#else
252170	EXCL		netbsd32_sys_msgsys
253#endif
254#if defined(SYSVSHM) || !defined(_KERNEL)
255171	COMPAT_10	{ int netbsd32_sys_shmsys(int which, int a2, int a3, int a4); } oshmsys
256#else
257171	EXCL		netbsd32_sys_shmsys
258#endif
259172	UNIMPL
260173	STD		{ netbsd32_ssize_t netbsd32_pread(int fd, netbsd32_voidp buf, netbsd32_size_t nbyte, int pad, off_t offset); }
261174	STD		{ netbsd32_ssize_t netbsd32_pwrite(int fd, netbsd32_voidp buf, netbsd32_size_t nbyte, int pad, off_t offset); }
262175	COMPAT_30	{ int netbsd32_ntp_gettime(netbsd32_ntptimevalp_t ntvp); }
263176	STD		{ int netbsd32_ntp_adjtime(netbsd32_timexp_t tp); }
264177	UNIMPL
265178	UNIMPL
266179	UNIMPL
267180	UNIMPL
268
269; Syscalls 180-199 are used by/reserved for BSD
270181	STD		{ int netbsd32_setgid(gid_t gid); }
271182	STD		{ int netbsd32_setegid(gid_t egid); }
272183	STD		{ int netbsd32_seteuid(uid_t euid); }
273#if defined(LFS) || !defined(_KERNEL)
274184	STD		{ int netbsd32_sys_lfs_bmapv(netbsd32_fsid_tp_t fsidp, netbsd32_block_infop_t blkiov, int blkcnt); }
275185	STD		{ int netbsd32_sys_lfs_markv(netbsd32_fsid_tp_t fsidp, netbsd32_block_infop_t blkiov, int blkcnt); }
276186	STD		{ int netbsd32_sys_lfs_segclean(netbsd32_fsid_tp_t fsidp, netbsd32_u_long segment); }
277187	STD		{ int netbsd32_sys_lfs_segwait(netbsd32_fsid_tp_t fsidp, netbsd32_timevalp_t tv); }
278#else
279184	EXCL		netbsd32_sys_lfs_bmapv
280185	EXCL		netbsd32_sys_lfs_markv
281186	EXCL		netbsd32_sys_lfs_segclean
282187	EXCL		netbsd32_sys_lfs_segwait
283#endif
284188	COMPAT_12	{ int netbsd32_stat12(netbsd32_charp path, netbsd32_stat12p_t ub); }
285189	COMPAT_12	{ int netbsd32_fstat12(int fd, netbsd32_stat12p_t sb); }
286190	COMPAT_12	{ int netbsd32_lstat12(netbsd32_charp path, netbsd32_stat12p_t ub); }
287191	STD		{ netbsd32_long netbsd32_pathconf(netbsd32_charp path, int name); }
288192	STD		{ netbsd32_long netbsd32_fpathconf(int fd, int name); }
289193	UNIMPL
290194	STD		{ int netbsd32_getrlimit(int which, netbsd32_rlimitp_t rlp); }
291195	STD		{ int netbsd32_setrlimit(int which, netbsd32_rlimitp_t rlp); }
292196	COMPAT_12	{ int netbsd32_getdirentries(int fd, netbsd32_charp buf, u_int count, netbsd32_longp basep); }
293197	STD		{ netbsd32_voidp netbsd32_mmap(netbsd32_voidp addr, netbsd32_size_t len, int prot, int flags, int fd, netbsd32_long pad, off_t pos); }
294198	INDIR		{ quad_t netbsd32_sys___syscall(quad_t code, \
295			    ... register32_t args[NETBSD32_SYS_MAXSYSARGS]); }
296199	STD		{ off_t netbsd32_lseek(int fd, int pad, off_t offset, int whence); }
297200	STD		{ int netbsd32_truncate(netbsd32_charp path, int pad, off_t length); }
298201	STD		{ int netbsd32_ftruncate(int fd, int pad, off_t length); }
299202	STD		{ int netbsd32___sysctl(netbsd32_intp name, u_int namelen, netbsd32_voidp old, netbsd32_size_tp oldlenp, netbsd32_voidp new, netbsd32_size_t newlen); }
300203	STD		{ int netbsd32_mlock(netbsd32_voidp addr, netbsd32_size_t len); }
301204	STD		{ int netbsd32_munlock(netbsd32_voidp addr, netbsd32_size_t len); }
302205	STD		{ int netbsd32_undelete(netbsd32_charp path); }
303206	STD		{ int netbsd32_futimes(int fd, netbsd32_timevalp_t tptr); }
304207	STD		{ int netbsd32_getpgid(pid_t pid); }
305208	STD		{ int netbsd32_reboot(int opt, netbsd32_charp bootstr); }
306209	STD		{ int netbsd32_poll(netbsd32_pollfdp_t fds, u_int nfds, int timeout); }
307210	UNIMPL
308211	UNIMPL
309212	UNIMPL
310213	UNIMPL
311214	UNIMPL
312215	UNIMPL
313216	UNIMPL
314217	UNIMPL
315218	UNIMPL
316219	UNIMPL
317; System calls 220-300 are reserved for use by NetBSD
318#if defined(SYSVSEM) || !defined(_KERNEL)
319220	COMPAT_14	{ int netbsd32___semctl(int semid, int semnum, int cmd, netbsd32_semunu_t arg); }
320221	STD		{ int netbsd32_semget(netbsd32_key_t key, int nsems, int semflg); }
321222	STD		{ int netbsd32_semop(int semid, netbsd32_sembufp_t sops, netbsd32_size_t nsops); }
322223	STD		{ int netbsd32_semconfig(int flag); }
323#else
324220	EXCL		compat_14_netbsd32_semctl
325221	EXCL		netbsd32_semget
326222	EXCL		netbsd32_semop
327223	EXCL		netbsd32_semconfig
328#endif
329#if defined(SYSVMSG) || !defined(_KERNEL)
330224	COMPAT_14	{ int netbsd32_msgctl(int msqid, int cmd, netbsd32_msqid_dsp_t buf); }
331225	STD		{ int netbsd32_msgget(netbsd32_key_t key, int msgflg); }
332226	STD		{ int netbsd32_msgsnd(int msqid, netbsd32_voidp msgp, netbsd32_size_t msgsz, int msgflg); }
333227	STD		{ netbsd32_ssize_t netbsd32_msgrcv(int msqid, netbsd32_voidp msgp, netbsd32_size_t msgsz, netbsd32_long msgtyp, int msgflg); }
334#else
335224	EXCL		compat_14_netbsd32_msgctl
336225	EXCL		netbsd32_msgget
337226	EXCL		netbsd32_msgsnd
338227	EXCL		netbsd32_msgrcv
339#endif
340#if defined(SYSVSHM) || !defined(_KERNEL)
341228	STD		{ netbsd32_voidp netbsd32_shmat(int shmid, netbsd32_voidp shmaddr, int shmflg); }
342229	COMPAT_14		{ int netbsd32_shmctl(int shmid, int cmd, netbsd32_shmid_dsp_t buf); }
343230	STD		{ int netbsd32_shmdt(netbsd32_voidp shmaddr); }
344231	STD		{ int netbsd32_shmget(netbsd32_key_t key, netbsd32_size_t size, int shmflg); }
345#else
346228	EXCL		netbsd32_shmat
347229	EXCL		compat_14_netbsd32_shmctl
348230	EXCL		netbsd32_shmdt
349231	EXCL		netbsd32_shmget
350#endif
351232	STD		{ int netbsd32_clock_gettime(netbsd32_clockid_t clock_id, netbsd32_timespecp_t tp); }
352233	STD		{ int netbsd32_clock_settime(netbsd32_clockid_t clock_id, netbsd32_timespecp_t tp); }
353234	STD		{ int netbsd32_clock_getres(netbsd32_clockid_t clock_id, netbsd32_timespecp_t tp); }
354235	STD		{ int netbsd32_timer_create(netbsd32_clockid_t clock_id, netbsd32_sigeventp_t evp, \
355			    netbsd32_timerp_t timerid); }
356236	STD		{ int netbsd32_timer_delete(netbsd32_timer_t timerid); }
357237	STD		{ int netbsd32_timer_settime(netbsd32_timer_t timerid, int flags, \
358			    netbsd32_itimerspecp_t value, \
359			    netbsd32_itimerspecp_t ovalue); }
360238	STD		{ int netbsd32_timer_gettime(netbsd32_timer_t timerid, netbsd32_itimerspecp_t value); }
361239	STD		{ int netbsd32_timer_getoverrun(netbsd32_timer_t timerid); }
362;
363; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls
364;
365240	STD		{ int netbsd32_nanosleep(netbsd32_timespecp_t rqtp, netbsd32_timespecp_t rmtp); }
366241	STD		{ int netbsd32_fdatasync(int fd); }
367242	STD		{ int netbsd32_mlockall(int flags); }
368243	NOARGS		{ int sys_munlockall(void); }
369244	STD		{ int netbsd32___sigtimedwait(netbsd32_sigsetp_t set, \
370			    netbsd32_siginfop_t info, \
371			    netbsd32_timespecp_t timeout); }
372245	UNIMPL
373246	UNIMPL
374#if defined(P1003_1B_SEMAPHORE) || (!defined(_KERNEL) && defined(_LIBC))
375247	STD		{ int netbsd32__ksem_init(unsigned int value, netbsd32_semidp_t idp); }
376248	STD		{ int netbsd32__ksem_open(netbsd32_charp name, int oflag, \
377			    mode_t mode, unsigned int value, netbsd32_semidp_t idp); }
378249	STD		{ int netbsd32__ksem_unlink(netbsd32_charp name); }
379250	STD		{ int netbsd32__ksem_close(netbsd32_intptr_t id); }
380251	STD		{ int netbsd32__ksem_post(netbsd32_intptr_t id); }
381252	STD		{ int netbsd32__ksem_wait(netbsd32_intptr_t id); }
382253	STD		{ int netbsd32__ksem_trywait(netbsd32_intptr_t id); }
383254	STD		{ int netbsd32__ksem_getvalue(netbsd32_intptr_t id, \
384			    netbsd32_intp value); }
385255	STD		{ int netbsd32__ksem_destroy(netbsd32_intptr_t id); }
386256	UNIMPL		sys__ksem_timedwait
387#else
388247	EXCL		sys__ksem_init
389248	EXCL		sys__ksem_open
390249	EXCL 		sys__ksem_unlink
391250	EXCL		sys__ksem_close
392251	EXCL		sys__ksem_post
393252	EXCL		sys__ksem_wait
394253	EXCL		sys__ksem_trywait
395254	EXCL		sys__ksem_getvalue
396255	EXCL		sys__ksem_destroy
397256	UNIMPL		sys__ksem_timedwait
398#endif
399257	UNIMPL
400258	UNIMPL
401259	UNIMPL
402260	UNIMPL
403261	UNIMPL
404262	UNIMPL
405263	UNIMPL
406264	UNIMPL
407265	UNIMPL
408266	UNIMPL
409267	UNIMPL
410268	UNIMPL
411269	UNIMPL
412270	STD		{ int netbsd32___posix_rename(netbsd32_charp from, netbsd32_charp to); }
413271	STD		{ int netbsd32_swapctl(int cmd, netbsd32_voidp arg, int misc); }
414272	COMPAT_30	{ int netbsd32_getdents(int fd, netbsd32_charp buf, netbsd32_size_t count); }
415273	STD		{ int netbsd32_minherit(netbsd32_voidp addr, netbsd32_size_t len, int inherit); }
416274	STD		{ int netbsd32_lchmod(netbsd32_charp path, mode_t mode); }
417275	STD		{ int netbsd32_lchown(netbsd32_charp path, uid_t uid, gid_t gid); }
418276	STD		{ int netbsd32_lutimes(netbsd32_charp path, netbsd32_timevalp_t tptr); }
419277	STD		{ int netbsd32___msync13(netbsd32_voidp addr, netbsd32_size_t len, int flags); }
420278	COMPAT_30	{ int netbsd32___stat13(netbsd32_charp path, netbsd32_stat13p_t ub); }
421279	COMPAT_30	{ int netbsd32___fstat13(int fd, netbsd32_stat13p_t sb); }
422280	COMPAT_30	{ int netbsd32___lstat13(netbsd32_charp path, netbsd32_stat13p_t ub); }
423281	STD		{ int netbsd32___sigaltstack14(netbsd32_sigaltstackp_t nss, netbsd32_sigaltstackp_t oss); }
424282	NOARGS		{ int sys___vfork14(void); }
425283	STD		{ int netbsd32___posix_chown(netbsd32_charp path, uid_t uid, gid_t gid); }
426284	STD		{ int netbsd32___posix_fchown(int fd, uid_t uid, gid_t gid); }
427285	STD		{ int netbsd32___posix_lchown(netbsd32_charp path, uid_t uid, gid_t gid); }
428286	STD		{ pid_t netbsd32_getsid(pid_t pid); }
429287	STD		{ int netbsd32___clone(int flags, netbsd32_voidp stack); }
430288	STD		{ int netbsd32_fktrace(int fd, int ops, int facs, int pid); }
431289	STD		{ netbsd32_ssize_t netbsd32_preadv(int fd, netbsd32_iovecp_t iovp, int iovcnt, int pad, off_t offset); }
432290	STD		{ netbsd32_ssize_t netbsd32_pwritev(int fd, netbsd32_iovecp_t iovp, int iovcnt, int pad, off_t offset); }
433291	STD		{ int netbsd32___sigaction14(int signum, \
434			    netbsd32_sigactionp_t nsa, \
435			    netbsd32_sigactionp_t osa); }
436292	STD		{ int netbsd32___sigpending14(netbsd32_sigsetp_t set); }
437293	STD		{ int netbsd32___sigprocmask14(int how, \
438			    netbsd32_sigsetp_t set, \
439			    netbsd32_sigsetp_t oset); }
440294	STD		{ int netbsd32___sigsuspend14(netbsd32_sigsetp_t set); }
441295	COMPAT_16	{ int netbsd32___sigreturn14(netbsd32_sigcontextp_t sigcntxp); }
442296	STD		{ int netbsd32___getcwd(netbsd32_charp bufp, netbsd32_size_t length); }
443297	STD		{ int netbsd32_fchroot(int fd); }
444298	COMPAT_30	{ int netbsd32_fhopen(netbsd32_fhandlep_t fhp, \
445			   int flags); }
446299	COMPAT_30	{ int netbsd32_fhstat(netbsd32_fhandlep_t fhp, \
447			    netbsd32_stat13p_t sb); }
448300	COMPAT_20	{ int netbsd32_fhstatfs(netbsd32_fhandlep_t fhp, \
449			    netbsd32_statp_t buf); }
450#if defined(SYSVSEM) || !defined(_KERNEL)
451301	STD		{ int netbsd32___semctl14(int semid, int semnum, int cmd, \
452			    ... netbsd32_semunp_t arg); }
453#else
454301	EXCL		__semctl14
455#endif
456#if defined(SYSVMSG) || !defined(_KERNEL)
457302	STD		{ int netbsd32___msgctl13(int msqid, int cmd, \
458			    netbsd32_msqid_dsp_t buf); }
459#else
460302	EXCL		__msgctl13
461#endif
462#if defined(SYSVSHM) || !defined(_KERNEL)
463303	STD		{ int netbsd32___shmctl13(int shmid, int cmd, \
464			    netbsd32_shmid_dsp_t buf); }
465#else
466303	EXCL		__shmctl13
467#endif
468304	STD		{ int netbsd32_lchflags(netbsd32_charp path, netbsd32_u_long flags); }
469305	NOARGS 		{ int sys_issetugid(void); }
470306	STD		{ int netbsd32_utrace(netbsd32_charp label, netbsd32_voidp addr, \
471			    netbsd32_size_t len); }
472307	STD		{ int netbsd32_getcontext(netbsd32_ucontextp ucp); }
473308	STD		{ int netbsd32_setcontext(netbsd32_ucontextp ucp, \
474			    uint32_t flags, netbsd32_lwpidp new_lwp); }
475309	STD		{ int netbsd32__lwp_create(netbsd32_ucontextp ucp, \
476			    netbsd32_u_long flags, netbsd32_lwpidp new_lwp); }
477310	NOARGS		{ int sys__lwp_exit(void); }
478311	NOARGS 		{ lwpid_t sys__lwp_self(void); }
479312	STD 		{ int netbsd32__lwp_wait(lwpid_t wait_for, \
480			    netbsd32_lwpidp departed); }
481313	STD 		{ int netbsd32__lwp_suspend(lwpid_t target); }
482314	STD 		{ int netbsd32__lwp_continue(lwpid_t target); }
483315	STD 		{ int netbsd32__lwp_wakeup(lwpid_t target); }
484316	NOARGS 		{ void *sys__lwp_getprivate(void); }
485317	STD 		{ void netbsd32__lwp_setprivate(netbsd32_voidp ptr); }
486318	STD		{ int netbsd32__lwp_kill(lwpid_t target, int signo); }
487319	STD 		{ int netbsd32__lwp_detach(lwpid_t target); }
488320	STD 		{ int netbsd32__lwp_park(netbsd32_timespecp_t ts, \
489				lwpid_t unpark, netbsd32_voidp hint, \
490				netbsd32_voidp unparkhint); }
491321	STD 		{ int netbsd32__lwp_unpark(lwpid_t target, netbsd32_voidp hint); }
492322	STD 		{ netbsd32_size_t netbsd32__lwp_unpark_all(netbsd32_lwpidp targets, \
493				netbsd32_size_t ntargets, netbsd32_voidp hint); }
494323	STD		{ int netbsd32__lwp_setname(lwpid_t target, \
495				netbsd32_charp name); }
496324	STD		{ int netbsd32__lwp_getname(lwpid_t target, \
497				netbsd32_charp name, netbsd32_size_t len); }
498325	STD 		{ int netbsd32__lwp_ctl(int features, \
499				netbsd32_pointer_t address); }
500326	UNIMPL
501327	UNIMPL
502328	UNIMPL
503329	UNIMPL
504330	STD		{ int netbsd32_sa_register(netbsd32_sa_upcall_t new, \
505			    netbsd32_sa_upcallp_t old, int flags, \
506			    netbsd32_ssize_t stackinfo_offset); }
507331	STD		{ int netbsd32_sa_stacks(int num, netbsd32_stackp_t stacks); }
508332	NOARGS		{ int sys_sa_enable(void); }
509333	STD		{ int netbsd32_sa_setconcurrency(int concurrency); }
510334	NOARGS		{ int sys_sa_yield(void); }
511335	STD		{ int netbsd32_sa_preempt(int sa_id); }
512336	OBSOL		sys_sa_unblockyield
513337	UNIMPL
514338	UNIMPL
515339	UNIMPL
516340	STD		{ int netbsd32___sigaction_sigtramp(int signum, \
517			    netbsd32_sigactionp_t nsa, \
518			    netbsd32_sigactionp_t osa, \
519			    netbsd32_voidp tramp, int vers); }
520341	UNIMPL
521342	UNIMPL
522343	STD		{ int netbsd32_rasctl(netbsd32_caddr_t addr, netbsd32_size_t len, \
523			    int op); }
524344	NOARGS		{ int sys_kqueue(void); }
525345	STD		{ int netbsd32_kevent(int fd, \
526			    netbsd32_keventp_t changelist, netbsd32_size_t nchanges, \
527			    netbsd32_keventp_t eventlist, netbsd32_size_t nevents, \
528			    netbsd32_timespecp_t timeout); }
529346	UNIMPL
530347	UNIMPL
531348	UNIMPL
532349	UNIMPL
533350	NOARGS 		{ int sys_sched_yield(void); }
534351	UNIMPL
535352	UNIMPL
536353	UNIMPL
537354	STD		{ int netbsd32_fsync_range(int fd, int flags, off_t start, \
538			    off_t length); }
539355	STD		{ int netbsd32_uuidgen(netbsd32_uuidp_t store, int count); }
540356	STD		{ int netbsd32_getvfsstat(netbsd32_statvfsp_t buf, \
541			    netbsd32_size_t bufsize, int flags); }
542357	STD		{ int netbsd32_statvfs1(netbsd32_charp path, \
543			    netbsd32_statvfsp_t buf, int flags); }
544358	STD		{ int netbsd32_fstatvfs1(int fd, netbsd32_statvfsp_t buf, \
545			    int flags); }
546359	COMPAT_30	{ int netbsd32_fhstatvfs1(netbsd32_fhandlep_t fhp, \
547			    netbsd32_statvfsp_t buf, int flags); }
548360	STD		{ int netbsd32_extattrctl(netbsd32_charp path, \
549			    int cmd, netbsd32_charp filename, int attrnamespace, \
550			    netbsd32_charp attrname); }
551361	STD		{ int netbsd32_extattr_set_file(netbsd32_charp path, \
552			    int attrnamespace, netbsd32_charp attrname, \
553			    netbsd32_voidp data, netbsd32_size_t nbytes); }
554362	STD		{ int netbsd32_extattr_get_file(netbsd32_charp path, \
555			    int attrnamespace, netbsd32_charp attrname, \
556			    netbsd32_voidp data, netbsd32_size_t nbytes); }
557363	STD		{ int netbsd32_extattr_delete_file(netbsd32_charp path, \
558			    int attrnamespace, netbsd32_charp attrname); }
559364	STD		{ int netbsd32_extattr_set_fd(int fd, \
560			    int attrnamespace, netbsd32_charp attrname, \
561			    netbsd32_voidp data, netbsd32_size_t nbytes); }
562365	STD		{ int netbsd32_extattr_get_fd(int fd, \
563			    int attrnamespace, netbsd32_charp attrname, \
564			    netbsd32_voidp data, netbsd32_size_t nbytes); }
565366	STD		{ int netbsd32_extattr_delete_fd(int fd, \
566			    int attrnamespace, netbsd32_charp attrname); }
567367	STD		{ int netbsd32_extattr_set_link(netbsd32_charp path, \
568			    int attrnamespace, netbsd32_charp attrname, \
569			    netbsd32_voidp data, netbsd32_size_t nbytes); }
570368	STD		{ int netbsd32_extattr_get_link(netbsd32_charp path, \
571			    int attrnamespace, netbsd32_charp attrname, \
572			    netbsd32_voidp data, netbsd32_size_t nbytes); }
573369	STD		{ int netbsd32_extattr_delete_link(netbsd32_charp path, \
574			    int attrnamespace, netbsd32_charp attrname); }
575370	STD		{ int netbsd32_extattr_list_fd(int fd, \
576			    int attrnamespace, netbsd32_voidp data, \
577			    netbsd32_size_t nbytes); }
578371	STD		{ int netbsd32_extattr_list_file(netbsd32_charp path, \
579			    int attrnamespace, netbsd32_voidp data, \
580			    netbsd32_size_t nbytes); }
581372	STD		{ int netbsd32_extattr_list_link(netbsd32_charp path, \
582			    int attrnamespace, netbsd32_voidp data, \
583			    netbsd32_size_t nbytes); }
584373	STD		{ int netbsd32_pselect(int nd, netbsd32_fd_setp_t in, \
585			    netbsd32_fd_setp_t ou, netbsd32_fd_setp_t ex, \
586			    netbsd32_timespecp_t ts, netbsd32_sigsetp_t mask); }
587374	STD		{ int netbsd32_pollts(netbsd32_pollfdp_t fds, u_int nfds, \
588			    netbsd32_timespecp_t ts, netbsd32_sigsetp_t mask); }
589375	STD		{ int netbsd32_setxattr(netbsd32_charp path, \
590			    netbsd32_charp name, netbsd32_voidp value, \
591			    netbsd32_size_t size, int flags); }
592376	STD		{ int netbsd32_lsetxattr(netbsd32_charp path, \
593			    netbsd32_charp name, netbsd32_voidp value, \
594			    netbsd32_size_t size, int flags); }
595377	STD		{ int netbsd32_fsetxattr(int fd, \
596			    netbsd32_charp name, netbsd32_voidp value, \
597			    netbsd32_size_t size, int flags); }
598378	STD		{ int netbsd32_getxattr(netbsd32_charp path, \
599			    netbsd32_charp name, netbsd32_voidp value, \
600			    netbsd32_size_t size); }
601379	STD		{ int netbsd32_lgetxattr(netbsd32_charp path, \
602			    netbsd32_charp name, netbsd32_voidp value, \
603			    netbsd32_size_t size); }
604380	STD		{ int netbsd32_fgetxattr(int fd, \
605			    netbsd32_charp name, netbsd32_voidp value, \
606			    netbsd32_size_t size); }
607381	STD		{ int netbsd32_listxattr(netbsd32_charp path, \
608			    netbsd32_charp list, netbsd32_size_t size); }
609382	STD		{ int netbsd32_llistxattr(netbsd32_charp path, \
610			    netbsd32_charp list, netbsd32_size_t size); }
611383	STD		{ int netbsd32_flistxattr(int fd, \
612			    netbsd32_charp list, netbsd32_size_t size); }
613384	STD		{ int netbsd32_removexattr(netbsd32_charp path, \
614			    netbsd32_charp name); }
615385	STD		{ int netbsd32_lremovexattr(netbsd32_charp path, \
616			    netbsd32_charp name); }
617386	STD		{ int netbsd32_fremovexattr(int fd, \
618			    netbsd32_charp name); }
619387     STD             { int netbsd32_sys___stat30(netbsd32_charp path, \
620			    netbsd32_statp_t ub); }
621388     STD             { int netbsd32_sys___fstat30(int fd, \
622			    netbsd32_statp_t sb); }
623389     STD             { int netbsd32_sys___lstat30( \
624			    netbsd32_charp path, netbsd32_statp_t ub); }
625390     STD             { int netbsd32_sys___getdents30(int fd, \
626			    netbsd32_charp buf, netbsd32_size_t count); }
627391	IGNORED		old posix fadvise
628392	COMPAT_30	{ int netbsd32_sys___fhstat30( \
629			    netbsd32_fhandlep_t fhp, \
630			    netbsd32_statp_t sb); }
631393	STD		{ int netbsd32_ntp_gettime(netbsd32_ntptimevalp_t ntvp); }
632394	STD		{ int netbsd32_sys___socket30(int domain, int type, int protocol); }
633395	STD		{ int netbsd32___getfh30(netbsd32_charp fname, netbsd32_pointer_t fhp, netbsd32_size_tp fh_size); }
634396	STD		{ int netbsd32___fhopen40(netbsd32_pointer_t fhp, \
635			    netbsd32_size_t fh_size, int flags); }
636397	STD		{ int netbsd32___fhstatvfs140(	\
637			    netbsd32_pointer_t fhp, netbsd32_size_t fh_size,\
638			    netbsd32_statvfsp_t buf, int flags); }
639398	STD		{ int netbsd32___fhstat40(	\
640			    netbsd32_pointer_t fhp, netbsd32_size_t fh_size,\
641			    netbsd32_statp_t sb); }
642
643; Asynchronous I/O system calls
644399	UNIMPL	{ int sys_aio_cancel(int fildes, struct aiocb *aiocbp); }
645400	UNIMPL	{ int sys_aio_error(const struct aiocb *aiocbp); }
646401	UNIMPL	{ int sys_aio_fsync(int op, struct aiocb *aiocbp); }
647402	UNIMPL	{ int sys_aio_read(struct aiocb *aiocbp); }
648403	UNIMPL	{ int sys_aio_return(struct aiocb *aiocbp); }
649404	UNIMPL	{ int sys_aio_suspend(const struct aiocb *const *list, \
650			    int nent, const struct timespec *timeout); }
651405	UNIMPL	{ int sys_aio_write(struct aiocb *aiocbp); }
652406	UNIMPL	{ int sys_lio_listio(int mode, struct aiocb *const *list, \
653			    int nent, struct sigevent *sig); }
654
655407	UNIMPL
656408	UNIMPL
657409	UNIMPL
658
659410	UNIMPL		{ int sys___mount50(const char *type, \
660			    const char *path, int flags, void *data, \
661			    size_t data_len); }
662411	STD 		{ netbsd32_voidp netbsd32_mremap( \
663			    netbsd32_voidp old_address, \
664			    netbsd32_size_t old_size, \
665			    netbsd32_voidp new_address, \
666			    netbsd32_size_t new_size, int flags); }
667
668412	UNIMPL
669413	UNIMPL
670414	UNIMPL
671415	UNIMPL
672
673416	STD 		{ int netbsd32___posix_fadvise50(int fd, int pad, \
674			    off_t offset, off_t len, int advice); }
675