$NetBSD: syscalls.master,v 1.147 2025/05/09 10:19:03 martin Exp $

;       from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp
;       @(#)syscalls.master     8.2 (Berkeley) 1/13/94

; NetBSD system call name/number "master" file.
; (See syscalls.conf to see what it is processed into.)
;
; Fields: number type [type-dependent ...]
;       number  system call number, must be in order
;       type    one of STD, OBSOL, UNIMPL, IGNORED, NODEF, NOARGS, or one of
;               the compatibility options defined in syscalls.conf.
;
; types:
;       STD     always included
;       OBSOL   obsolete, not included in system
;       IGNORED syscall is a null op, but always succeeds
;       UNIMPL  unimplemented, not included in system
;       EXCL    implemented, but not included in system
;       NODEF   included, but don't define the syscall number
;       NOARGS  included, but don't define the syscall args structure
;       INDIR   included, but don't define the syscall args structure,
;               and allow it to be "really" varargs.
;
; The compat options are defined in the syscalls.conf file, and the
; compat option name is prefixed to the syscall name.  Other than
; that, they're like NODEF (for 'compat' options), or STD (for
; 'libcompat' options).
;
; The type-dependent arguments are as follows:
; For STD, NODEF, NOARGS, and compat syscalls:
;       { pseudo-proto } [alias]
; For other syscalls:
;       [comment]
;
; #ifdef's, etc. may be included, and are copied to the output files.
; #include's are copied to the syscall names and switch definition files only.

#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
#include "opt_ntp.h"
#include "opt_compat_43.h"
#include "opt_quota.h"
#endif

#include <sys/param.h>
#include <sys/systm.h>
#include <sys/signal.h>
#include <sys/mount.h>
#include <sys/syscallargs.h>

#include <compat/netbsd32/netbsd32.h>
#include <compat/netbsd32/netbsd32_syscall.h>
#include <compat/netbsd32/netbsd32_syscallargs.h>

%%

; Reserved/unimplemented system calls in the range 0-150 inclusive
; are reserved for use in future Berkeley releases.
; Additional system calls implemented in vendor and other
; redistributions should be placed in the reserved range at the end
; of the current calls.

0       INDIR           { int|netbsd32||syscall(int code, \
                           ... register32_t args[NETBSD32_SYS_MAXSYSARGS]); }
1       STD             { void|netbsd32||exit(int rval); }
2       NOARGS          { int|sys||fork(void); }
3       STD             { netbsd32_ssize_t|netbsd32||read(int fd, \
                           netbsd32_voidp buf, netbsd32_size_t nbyte); }
4       STD             { netbsd32_ssize_t|netbsd32||write(int fd, \
                           netbsd32_voidp buf, netbsd32_size_t nbyte); }
5       STD             { int|netbsd32||open(netbsd32_charp path, int flags, \
                           ... mode_t mode); }
6       STD             { int|netbsd32||close(int fd); }
7       COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||wait4(int pid, netbsd32_intp status, \
                           int options, netbsd32_rusage50p_t rusage); }
8       COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||ocreat(netbsd32_charp path, \
                           mode_t mode); }
9       STD             { int|netbsd32||link(netbsd32_charp path, \
                           netbsd32_charp link); }
10      STD             { int|netbsd32||unlink(netbsd32_charp path); }
11      OBSOL           execv
12      STD             { int|netbsd32||chdir(netbsd32_charp path); }
13      STD             { int|netbsd32||fchdir(int fd); }
14      COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||mknod(netbsd32_charp path, mode_t mode, \
                           uint32_t dev); }
15      STD             { int|netbsd32||chmod(netbsd32_charp path, mode_t mode); }
16      STD             { int|netbsd32||chown(netbsd32_charp path, uid_t uid, \
                           gid_t gid); }
17      STD             { int|netbsd32||break(netbsd32_charp nsize); }
18      COMPAT_20 MODULAR compat_netbsd32_20    \
                       { int|netbsd32||getfsstat(netbsd32_statfsp_t buf, \
                           netbsd32_long bufsize, int flags); }
19      COMPAT_43 MODULAR compat_netbsd32_43    \
                       { netbsd32_long|netbsd32||olseek(int fd, \
                           netbsd32_long offset, int whence); }
20      NOARGS          { pid_t|sys||getpid_with_ppid(void); } getpid
21      COMPAT_40 MODULAR compat_netbsd32_40    \
                       { int|netbsd32||mount(netbsd32_charp type, \
                           netbsd32_charp path, int flags, \
                           netbsd32_voidp data); }
22      STD             { int|netbsd32||unmount(netbsd32_charp path, \
                           int flags); }
23      STD             { int|netbsd32||setuid(uid_t uid); }
24      NOARGS          { uid_t|sys||getuid_with_euid(void); } getuid
25      NOARGS          { uid_t|sys||geteuid(void); }
26      STD MODULAR compat_netbsd32_ptrace \
                       { int|netbsd32||ptrace(int req, pid_t pid, \
                           netbsd32_voidp addr, int data); }
27      STD             { netbsd32_ssize_t|netbsd32||recvmsg(int s, \
                           netbsd32_msghdrp_t msg, int flags); }
28      STD             { netbsd32_ssize_t|netbsd32||sendmsg(int s, \
                           netbsd32_msghdrp_t msg, int flags); }
29      STD             { netbsd32_ssize_t|netbsd32||recvfrom(int s, \
                           netbsd32_voidp buf, netbsd32_size_t len, \
                           int flags, netbsd32_sockaddrp_t from, \
                           netbsd32_intp fromlenaddr); }
30      STD             { int|netbsd32||accept(int s, \
                           netbsd32_sockaddrp_t name, \
                           netbsd32_intp anamelen); }
31      STD             { int|netbsd32||getpeername(int fdes, \
                           netbsd32_sockaddrp_t asa, netbsd32_intp alen); }
32      STD             { int|netbsd32||getsockname(int fdes, \
                           netbsd32_sockaddrp_t asa, netbsd32_intp alen); }
33      STD             { int|netbsd32||access(netbsd32_charp path, int flags); }
34      STD             { int|netbsd32||chflags(netbsd32_charp path, \
                           netbsd32_u_long flags); }
35      STD             { int|netbsd32||fchflags(int fd, \
                           netbsd32_u_long flags); }
36      NOARGS          { void|sys||sync(void); }
37      STD             { int|netbsd32||kill(int pid, int signum); }
38      COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||stat43(netbsd32_charp path, \
                           netbsd32_stat43p_t ub); }
39      NOARGS          { pid_t|sys||getppid(void); }
40      COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||lstat43(netbsd32_charp path, \
                           netbsd32_stat43p_t ub); }
41      STD             { int|netbsd32||dup(int fd); }
42      NOARGS          { int|sys||pipe(void); }
43      NOARGS          { gid_t|sys||getegid(void); }
44      STD             { int|netbsd32||profil(netbsd32_voidp samples, \
                           netbsd32_size_t size, netbsd32_u_long offset, \
                           u_int scale); }
45      STD             { int|netbsd32||ktrace(netbsd32_charp fname, int ops, \
                           int facs, int pid); }
46      STD             { int|netbsd32||sigaction(int signum, \
                           netbsd32_sigactionp_t nsa, \
                           netbsd32_sigactionp_t osa); }
47      NOARGS          { gid_t|sys||getgid_with_egid(void); } getgid
48      COMPAT_13 MODULAR compat_netbsd32_13    \
                       { int|netbsd32||sigprocmask(int how, \
                           int mask); } sigprocmask13
49      STD             { int|netbsd32||__getlogin(netbsd32_charp namebuf, \
                           u_int namelen); }
50      STD             { int|netbsd32||setlogin(netbsd32_charp namebuf); }
51      STD             { int|netbsd32||acct(netbsd32_charp path); }
52      COMPAT_13 MODULAR compat_netbsd32_13    \
                       { int|sys||sigpending(void); } sigpending13
53      COMPAT_13 MODULAR compat_netbsd32_13    \
                       { int|netbsd32||sigaltstack13( \
                           netbsd32_sigaltstack13p_t nss, \
                           netbsd32_sigaltstack13p_t oss); }
54      STD             { int|netbsd32||ioctl(int fd, netbsd32_u_long com, \
                           ... netbsd32_voidp data); }
55      COMPAT_12 MODULAR compat_netbsd32_12    \
                       { int|netbsd32||reboot(int opt); }
56      STD             { int|netbsd32||revoke(netbsd32_charp path); }
57      STD             { int|netbsd32||symlink(netbsd32_charp path, \
                           netbsd32_charp link); }
58      STD             { int|netbsd32||readlink(netbsd32_charp path, \
                           netbsd32_charp buf, netbsd32_size_t count); }
59      STD             { int|netbsd32||execve(netbsd32_charp path, \
                           netbsd32_charpp argp, netbsd32_charpp envp); }
60      STD             { mode_t|netbsd32||umask(mode_t newmask); }
61      STD             { int|netbsd32||chroot(netbsd32_charp path); }
62      COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||fstat43(int fd, netbsd32_stat43p_t sb); }
63      COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||ogetkerninfo(int op, \
                           netbsd32_charp where, netbsd32_intp size, \
                           int arg); }
64      COMPAT_43 MODULAR compat_43     \
                       { int|sys||getpagesize(void); } ogetpagesize
65      COMPAT_12 MODULAR compat_netbsd32_12    \
                       { int|netbsd32||msync(netbsd32_voidp addr, \
                           netbsd32_size_t len); }
; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)?
66      NOARGS          { int|sys||vfork(void); }
67      OBSOL           vread
68      OBSOL           vwrite
69      OBSOL           sbrk
70      OBSOL           sstk
71      COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||ommap(netbsd32_voidp addr, \
                           netbsd32_size_t len, int prot, int flags, int fd, \
                           netbsd32_long pos); }
72      STD             { int|netbsd32||ovadvise(int anom); } vadvise
73      STD             { int|netbsd32||munmap(netbsd32_voidp addr, \
                           netbsd32_size_t len); }
74      STD             { int|netbsd32||mprotect(netbsd32_voidp addr, \
                           netbsd32_size_t len, int prot); }
75      STD             { int|netbsd32||madvise(netbsd32_voidp addr, \
                           netbsd32_size_t len, int behav); }
76      OBSOL           vhangup
77      OBSOL           vlimit
78      STD             { int|netbsd32||mincore(netbsd32_voidp addr, \
                           netbsd32_size_t len, netbsd32_charp vec); }
79      STD             { int|netbsd32||getgroups(int gidsetsize, \
                           netbsd32_gid_tp gidset); }
80      STD             { int|netbsd32||setgroups(int gidsetsize, \
                           netbsd32_gid_tp gidset); }
81      NOARGS          { int|sys||getpgrp(void); }
82      STD             { int|netbsd32||setpgid(int pid, int pgid); }
83      COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||setitimer(int which, \
                           netbsd32_itimerval50p_t itv, \
                           netbsd32_itimerval50p_t oitv); }
84      COMPAT_43 MODULAR compat_43     \
                       { int|sys||wait(void); } owait
85      COMPAT_12 MODULAR compat_netbsd32_12    \
                       { int|netbsd32||oswapon(netbsd32_charp name); }
86      COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||getitimer(int which, \
                           netbsd32_itimerval50p_t itv); }
87      COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||ogethostname(netbsd32_charp hostname, \
                           u_int len); }
88      COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||osethostname(netbsd32_charp hostname, \
                           u_int len); }
89      COMPAT_43 MODULAR compat_43     \
                       { int|sys||getdtablesize(void); } ogetdtablesize
90      STD             { int|netbsd32||dup2(int from, int to); }
91      STD             { netbsd32_ssize_t|netbsd32||getrandom( \
                           netbsd32_voidp buf, netbsd32_size_t buflen, \
                           unsigned int flags); }
92      STD             { int|netbsd32||fcntl(int fd, int cmd, \
                           ... netbsd32_voidp arg); }
93      COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||select(int nd, netbsd32_fd_setp_t in, \
                           netbsd32_fd_setp_t ou, netbsd32_fd_setp_t ex, \
                           netbsd32_timeval50p_t tv); }
94      UNIMPL          setdopt
95      STD             { int|netbsd32||fsync(int fd); }
96      STD             { int|netbsd32||setpriority(int which, int who, \
                           int prio); }
97      COMPAT_30 MODULAR compat_netbsd32_30    \
                       { int|netbsd32||socket(int domain, int type, \
                           int protocol); }
98      STD             { int|netbsd32||connect(int s, \
                           netbsd32_sockaddrp_t name, int namelen); }
99      COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||oaccept(int s, netbsd32_voidp name, \
                           netbsd32_intp anamelen); }
100     STD             { int|netbsd32||getpriority(int which, int who); }
101     COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||osend(int s, netbsd32_voidp buf, \
                           int len, int flags); }
102     COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||orecv(int s, netbsd32_voidp buf, \
                           int len, int flags); }
103     COMPAT_13 MODULAR compat_netbsd32_13    \
                       { int|netbsd32||sigreturn( \
                           netbsd32_sigcontextp_t sigcntxp); } sigreturn13
104     STD             { int|netbsd32||bind(int s, netbsd32_sockaddrp_t name, \
                           int namelen); }
105     STD             { int|netbsd32||setsockopt(int s, int level, int name, \
                           netbsd32_voidp val, int valsize); }
106     STD             { int|netbsd32||listen(int s, int backlog); }
107     OBSOL           vtimes
108     COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||osigvec(int signum, \
                           netbsd32_sigvecp_t nsv, netbsd32_sigvecp_t osv); }
109     COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||sigblock(int mask); }
110     COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||sigsetmask(int mask); }
111     COMPAT_13 MODULAR compat_netbsd32_13    \
                       { int|netbsd32||sigsuspend(int mask); } sigsuspend13
112     COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||osigstack(netbsd32_sigstackp_t nss, \
                           netbsd32_sigstackp_t oss); }
113     COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||orecvmsg(int s, \
                           netbsd32_omsghdrp_t msg, int flags); }
114     COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||osendmsg(int s, netbsd32_voidp msg, \
                           int flags); }
115     OBSOL           vtrace
116     COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||gettimeofday(netbsd32_timeval50p_t tp, \
                           netbsd32_timezonep_t tzp); }
117     COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||getrusage(int who, \
                           netbsd32_rusage50p_t rusage); }
118     STD             { int|netbsd32||getsockopt(int s, int level, int name, \
                           netbsd32_voidp val, netbsd32_intp avalsize); }
119     OBSOL           resuba
120     STD             { netbsd32_ssize_t|netbsd32||readv(int fd, \
                           netbsd32_iovecp_t iovp, int iovcnt); }
121     STD             { netbsd32_ssize_t|netbsd32||writev(int fd, \
                           netbsd32_iovecp_t iovp, int iovcnt); }
122     COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||settimeofday(netbsd32_timeval50p_t tv, \
                           netbsd32_timezonep_t tzp); }
123     STD             { int|netbsd32||fchown(int fd, uid_t uid, gid_t gid); }
124     STD             { int|netbsd32||fchmod(int fd, mode_t mode); }
125     COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||orecvfrom(int s, netbsd32_voidp buf, \
                           netbsd32_size_t len, int flags, \
                           netbsd32_voidp from, netbsd32_intp fromlenaddr); }
126     STD             { int|netbsd32||setreuid(uid_t ruid, uid_t euid); }
127     STD             { int|netbsd32||setregid(gid_t rgid, gid_t egid); }
128     STD             { int|netbsd32||rename(netbsd32_charp from, \
                           netbsd32_charp to); }
129     COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||otruncate(netbsd32_charp path, \
                           netbsd32_long length); }
130     COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||oftruncate(int fd, \
                           netbsd32_long length); }
131     STD             { int|netbsd32||flock(int fd, int how); }
132     STD             { int|netbsd32||mkfifo(netbsd32_charp path, \
                           mode_t mode); }
133     STD             { netbsd32_ssize_t|netbsd32||sendto(int s, \
                           netbsd32_voidp buf, netbsd32_size_t len, \
                           int flags, netbsd32_sockaddrp_t to, int tolen); }
134     STD             { int|netbsd32||shutdown(int s, int how); }
135     STD             { int|netbsd32||socketpair(int domain, int type, \
                           int protocol, netbsd32_intp rsv); }
136     STD             { int|netbsd32||mkdir(netbsd32_charp path, \
                           mode_t mode); }
137     STD             { int|netbsd32||rmdir(netbsd32_charp path); }
138     COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||utimes(netbsd32_charp path, \
                           netbsd32_timeval50p_t tptr); }
139     OBSOL           4.2 sigreturn
140     COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||adjtime(netbsd32_timeval50p_t delta, \
                           netbsd32_timeval50p_t olddelta); }
141     COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||ogetpeername(int fdes, \
                           netbsd32_voidp asa, netbsd32_intp alen); }
142     COMPAT_43 MODULAR compat_43     \
                       { int32_t|sys||gethostid(void); } ogethostid
143     COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||sethostid(int32_t hostid); }
144     COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||ogetrlimit(int which, \
                           netbsd32_orlimitp_t rlp); }
145     COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||osetrlimit(int which, \
                           netbsd32_orlimitp_t rlp); }
146     COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||killpg(int pgid, int signum); }
147     NOARGS          { int|sys||setsid(void); }
148     COMPAT_50 MODULAR compat_netbsd32_quota_50      \
                       { int|netbsd32||quotactl(netbsd32_charp path, int cmd, \
                           int uid, netbsd32_voidp arg); }
149     EXCL            compat_netbsd32_quota
150     COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||ogetsockname(int fdec, \
                           netbsd32_voidp asa, netbsd32_intp alen); }

; Syscalls 151-180 inclusive are reserved for vendor-specific
; system calls.  (This includes various calls added for compatibity
; with other Unix variants.)
; Some of these calls are now supported by BSD...
151     UNIMPL
152     UNIMPL
153     UNIMPL
154     UNIMPL
155     STD MODULAR compat_netbsd32_nfssrv      \
                       { int|netbsd32||nfssvc(int flag, netbsd32_voidp argp); }
156     COMPAT_43 MODULAR compat_netbsd32_43    \
                       { int|netbsd32||ogetdirentries(int fd, \
                           netbsd32_charp buf, u_int count, \
                           netbsd32_longp basep); }
157     COMPAT_20 MODULAR compat_netbsd32_20    \
                       { int|netbsd32||statfs(netbsd32_charp path, \
                           netbsd32_statfsp_t buf); }
158     COMPAT_20 MODULAR compat_netbsd32_20    \
                       { int|netbsd32||fstatfs(int fd, \
                           netbsd32_statfsp_t buf); }
159     UNIMPL
160     UNIMPL
161     COMPAT_30 MODULAR compat_netbsd32_30    \
                       { int|netbsd32||getfh(netbsd32_charp fname, \
                           netbsd32_compat_30_fhandlep_t fhp); }
162     COMPAT_09 MODULAR compat_netbsd32_09    \
                       { int|netbsd32||ogetdomainname( \
                           netbsd32_charp domainname, int len); }
163     COMPAT_09 MODULAR compat_netbsd32_09    \
                       { int|netbsd32||osetdomainname( \
                           netbsd32_charp domainname, int len); }
164     COMPAT_09 MODULAR compat_netbsd32_09    \
                       { int|netbsd32||uname(netbsd32_outsnamep_t name); }
165     STD             { int|netbsd32||sysarch(int op, netbsd32_voidp parms); }
166     STD             { int|netbsd32||__futex(netbsd32_intp uaddr, int op, \
                           int val, const netbsd32_timespecp_t timeout, \
                           netbsd32_intp uaddr2, int val2, int val3); }
167     STD             { int|netbsd32||__futex_set_robust_list( \
                           netbsd32_voidp head, netbsd32_size_t len); }
168     STD             { int|netbsd32||__futex_get_robust_list(lwpid_t lwpid, \
                           netbsd32_voidp headp, netbsd32_size_tp lenp); }
169     COMPAT_10 MODULAR compat_netbsd32_sysvipc_10    \
                       { int|netbsd32||semsys(int which, int a2, int a3, \
                           int a4, int a5); } osemsys
170     COMPAT_10 MODULAR compat_netbsd32_sysvipc_10    \
                       { int|netbsd32||msgsys(int which, int a2, int a3, \
                           int a4, int a5, int a6); } omsgsys
171     COMPAT_10 MODULAR compat_netbsd32_sysvipc_10    \
                       { int|netbsd32||shmsys(int which, int a2, int a3, \
                           int a4); } oshmsys
172     UNIMPL
173     STD             { netbsd32_ssize_t|netbsd32||pread(int fd, \
                           netbsd32_voidp buf, netbsd32_size_t nbyte, \
                           int PAD, netbsd32_off_t offset); }
174     STD             { netbsd32_ssize_t|netbsd32||pwrite(int fd, \
                           netbsd32_voidp buf, netbsd32_size_t nbyte, \
                           int PAD, netbsd32_off_t offset); }
175     COMPAT_30 MODULAR compat_netbsd32_30    \
                       { int|netbsd32||ntp_gettime( \
                           netbsd32_ntptimeval50p_t ntvp); }
#if defined(NTP) || !defined(_KERNEL_OPT)
176     STD             { int|netbsd32||ntp_adjtime(netbsd32_timexp_t tp); }
#else
176     EXCL            ntp_adjtime
#endif
177     STD             { int|netbsd32||timerfd_create( \
                           netbsd32_clockid_t clock_id, \
                           int flags); }
178     STD             { int|netbsd32||timerfd_settime(int fd, int flags, \
                           const netbsd32_itimerspecp_t new_value, \
                           netbsd32_itimerspecp_t old_value); }
179     STD             { int|netbsd32||timerfd_gettime(int fd, \
                           netbsd32_itimerspecp_t curr_value); }
180     UNIMPL

; Syscalls 180-199 are used by/reserved for BSD
181     STD             { int|netbsd32||setgid(gid_t gid); }
182     STD             { int|netbsd32||setegid(gid_t egid); }
183     STD             { int|netbsd32||seteuid(uid_t euid); }
184     EXCL            netbsd32_lfs_bmapv
185     EXCL            netbsd32_lfs_markv
186     EXCL            netbsd32_lfs_segclean
187     EXCL            netbsd32_lfs_segwait
188     COMPAT_12 MODULAR compat_netbsd32_12    \
                       { int|netbsd32||stat12(netbsd32_charp path, \
                           netbsd32_stat12p_t ub); }
189     COMPAT_12 MODULAR compat_netbsd32_12    \
                       { int|netbsd32||fstat12(int fd, netbsd32_stat12p_t sb); }
190     COMPAT_12 MODULAR compat_netbsd32_12    \
                       { int|netbsd32||lstat12(netbsd32_charp path, \
                           netbsd32_stat12p_t ub); }
191     STD             { netbsd32_long|netbsd32||pathconf(netbsd32_charp path, \
                           int name); }
192     STD             { netbsd32_long|netbsd32||fpathconf(int fd, int name); }
193     STD             { int|netbsd32||getsockopt2(int s, int level, int name, \
                           netbsd32_voidp val, netbsd32_intp avalsize); }
194     STD             { int|netbsd32||getrlimit(int which, \
                           netbsd32_rlimitp_t rlp); }
195     STD             { int|netbsd32||setrlimit(int which, \
                           netbsd32_rlimitp_t rlp); }
196     COMPAT_12 MODULAR compat_netbsd32_12    \
                       { int|netbsd32||getdirentries(int fd, \
                           netbsd32_charp buf, u_int count, \
                           netbsd32_longp basep); }
197     STD             { netbsd32_voidp|netbsd32||mmap(netbsd32_voidp addr, \
                           netbsd32_size_t len, int prot, int flags, int fd, \
                           netbsd32_long PAD, netbsd32_off_t pos); }
198     INDIR           { quad_t|netbsd32||___syscall(quad_t code, \
                           ... register32_t args[NETBSD32_SYS_MAXSYSARGS]); }
199     STD             { netbsd32_off_t|netbsd32||lseek(int fd, int PAD, \
                           netbsd32_off_t offset, int whence); }
200     STD             { int|netbsd32||truncate(netbsd32_charp path, int PAD, \
                           netbsd32_off_t length); }
201     STD             { int|netbsd32||ftruncate(int fd, int PAD, \
                           netbsd32_off_t length); }
202     STD             { int|netbsd32||__sysctl(netbsd32_intp name, \
                           u_int namelen, netbsd32_voidp oldv, \
                           netbsd32_size_tp oldlenp, netbsd32_voidp newv, \
                           netbsd32_size_t newlen); }
203     STD             { int|netbsd32||mlock(netbsd32_voidp addr, \
                           netbsd32_size_t len); }
204     STD             { int|netbsd32||munlock(netbsd32_voidp addr, \
                           netbsd32_size_t len); }
205     STD             { int|netbsd32||undelete(netbsd32_charp path); }
206     COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||futimes(int fd, \
                           netbsd32_timeval50p_t tptr); }
207     STD             { int|netbsd32||getpgid(pid_t pid); }
208     STD             { int|netbsd32||reboot(int opt, \
                           netbsd32_charp bootstr); }
209     STD             { int|netbsd32||poll(netbsd32_pollfdp_t fds, \
                           u_int nfds, int timeout); }
210     UNIMPL          { int|netbsd32||afssys(long id, long a1, long a2, \
                           long a3, long a4, long a5, long a6); }
211     UNIMPL
212     UNIMPL
213     UNIMPL
214     UNIMPL
215     UNIMPL
216     UNIMPL
217     UNIMPL
218     UNIMPL
219     UNIMPL
; System calls 220-300 are reserved for use by NetBSD
220     COMPAT_14 MODULAR compat_netbsd32_sysvipc_14    \
                       { int|netbsd32||__semctl(int semid, int semnum, \
                           int cmd, netbsd32_semunu_t arg); }
221     STD MODULAR compat_netbsd32_sysvipc     \
                       { int|netbsd32||semget(netbsd32_key_t key, int nsems, \
                           int semflg); }
222     STD MODULAR compat_netbsd32_sysvipc     \
                       { int|netbsd32||semop(int semid, \
                           netbsd32_sembufp_t sops, netbsd32_size_t nsops); }
223     STD MODULAR compat_netbsd32_sysvipc     \
                       { int|netbsd32||semconfig(int flag); }
224     COMPAT_14 MODULAR compat_netbsd32_sysvipc_14    \
                       { int|netbsd32||msgctl(int msqid, int cmd, \
                           netbsd32_msqid_ds14p_t buf); }
225     STD MODULAR compat_netbsd32_sysvipc     \
                       { int|netbsd32||msgget(netbsd32_key_t key, int msgflg); }
226     STD MODULAR compat_netbsd32_sysvipc     \
                       { int|netbsd32||msgsnd(int msqid, netbsd32_voidp msgp, \
                           netbsd32_size_t msgsz, int msgflg); }
227     STD MODULAR compat_netbsd32_sysvipc     \
                       { netbsd32_ssize_t|netbsd32||msgrcv(int msqid, \
                           netbsd32_voidp msgp, netbsd32_size_t msgsz, \
                           netbsd32_long msgtyp, int msgflg); }
228     STD MODULAR compat_netbsd32_sysvipc     \
                       { netbsd32_voidp|netbsd32||shmat(int shmid, \
                           netbsd32_voidp shmaddr, int shmflg); }
229     COMPAT_14 MODULAR compat_netbsd32_sysvipc_14    \
                       { int|netbsd32||shmctl(int shmid, int cmd, \
                           netbsd32_shmid_dsp_t buf); }
230     STD MODULAR compat_netbsd32_sysvipc     \
                       { int|netbsd32||shmdt(netbsd32_voidp shmaddr); }
231     STD MODULAR compat_netbsd32_sysvipc     \
                       { int|netbsd32||shmget(netbsd32_key_t key, \
                           netbsd32_size_t size, int shmflg); }
232     COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||clock_gettime( \
                           netbsd32_clockid_t clock_id, \
                           netbsd32_timespec50p_t tp); }
233     COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||clock_settime( \
                           netbsd32_clockid_t clock_id, \
                           netbsd32_timespec50p_t tp); }
234     COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||clock_getres( \
                           netbsd32_clockid_t clock_id, \
                           netbsd32_timespec50p_t tp); }
235     STD             { int|netbsd32||timer_create( \
                           netbsd32_clockid_t clock_id, \
                           netbsd32_sigeventp_t evp, \
                           netbsd32_timerp_t timerid); }
236     STD             { int|netbsd32||timer_delete(netbsd32_timer_t timerid); }
237     COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||timer_settime(netbsd32_timer_t timerid, \
                           int flags, \
                           netbsd32_itimerspec50p_t value, \
                           netbsd32_itimerspec50p_t ovalue); }
238     COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||timer_gettime(netbsd32_timer_t timerid, \
                           netbsd32_itimerspec50p_t value); }
239     STD             { int|netbsd32||timer_getoverrun( \
                           netbsd32_timer_t timerid); }
;
; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls
;
240     COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||nanosleep(netbsd32_timespec50p_t rqtp, \
                           netbsd32_timespec50p_t rmtp); }
241     STD             { int|netbsd32||fdatasync(int fd); }
242     STD             { int|netbsd32||mlockall(int flags); }
243     NOARGS          { int|sys||munlockall(void); }
244     COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||__sigtimedwait(netbsd32_sigsetp_t set, \
                           netbsd32_siginfop_t info, \
                           netbsd32_timespec50p_t timeout); }
245     STD             { int|netbsd32||sigqueueinfo(pid_t pid, \
                           const netbsd32_siginfop_t info); }
246     STD             { int|netbsd32||modctl(int cmd, netbsd32_voidp arg); }
247     STD             { int|netbsd32||_ksem_init(unsigned int value, \
                           netbsd32_semidp_t idp); }
248     STD             { int|netbsd32||_ksem_open(netbsd32_charp name, \
                           int oflag, mode_t mode, unsigned int value, \
                           netbsd32_semidp_t idp); }
249     STD             { int|netbsd32||_ksem_unlink(netbsd32_charp name); }
250     STD             { int|netbsd32||_ksem_close(netbsd32_intptr_t id); }
251     STD             { int|netbsd32||_ksem_post(netbsd32_intptr_t id); }
252     STD             { int|netbsd32||_ksem_wait(netbsd32_intptr_t id); }
253     STD             { int|netbsd32||_ksem_trywait(netbsd32_intptr_t id); }
254     STD             { int|netbsd32||_ksem_getvalue(netbsd32_intptr_t id, \
                           netbsd32_intp value); }
255     STD             { int|netbsd32||_ksem_destroy(netbsd32_intptr_t id); }
256     STD             { int|netbsd32||_ksem_timedwait(intptr_t id, \
                               const netbsd32_timespecp_t abstime); }
257     STD MODULAR compat_netbsd32_mqueue      \
                       { mqd_t|netbsd32||mq_open(const netbsd32_charp name, \
                           int oflag, mode_t mode, \
                           netbsd32_mq_attrp_t attr); }
258     STD MODULAR compat_netbsd32_mqueue      \
                       { int|netbsd32||mq_close(mqd_t mqdes); }
259     STD MODULAR compat_netbsd32_mqueue      \
                       { int|netbsd32||mq_unlink(const netbsd32_charp name); }
260     STD MODULAR compat_netbsd32_mqueue      \
                       { int|netbsd32||mq_getattr(mqd_t mqdes, \
                           netbsd32_mq_attrp_t mqstat); }
261     STD MODULAR compat_netbsd32_mqueue      \
                       { int|netbsd32||mq_setattr(mqd_t mqdes, \
                           const netbsd32_mq_attrp_t mqstat, \
                           netbsd32_mq_attrp_t omqstat); }
262     STD MODULAR compat_netbsd32_mqueue      \
                       { int|netbsd32||mq_notify(mqd_t mqdes, \
                           const netbsd32_sigeventp_t notification); }
263     STD MODULAR compat_netbsd32_mqueue      \
                       { int|netbsd32||mq_send(mqd_t mqdes, \
                           const netbsd32_charp msg_ptr, \
                           netbsd32_size_t msg_len, unsigned msg_prio); }
264     STD MODULAR compat_netbsd32_mqueue      \
                       { netbsd32_ssize_t|netbsd32||mq_receive(mqd_t mqdes, \
                           netbsd32_charp msg_ptr, \
                           netbsd32_size_t msg_len, netbsd32_uintp msg_prio); }
265     COMPAT_50 MODULAR compat_netbsd32_mqueue        \
                       { int|netbsd32||mq_timedsend(mqd_t mqdes, \
                           const netbsd32_charp msg_ptr, \
                           netbsd32_size_t msg_len, \
                           unsigned msg_prio, \
                           const netbsd32_timespec50p_t abs_timeout); }
266     COMPAT_50 MODULAR compat_netbsd32_mqueue        \
                       { netbsd32_ssize_t|netbsd32||mq_timedreceive( \
                           mqd_t mqdes, \
                           netbsd32_charp msg_ptr, netbsd32_size_t msg_len, \
                           netbsd32_uintp msg_prio, \
                           const netbsd32_timespec50p_t abs_timeout); }
267     STD             { int|netbsd32||eventfd(unsigned int val, int flags); }
268     UNIMPL
269     UNIMPL
270     STD             { int|netbsd32||__posix_rename(netbsd32_charp from, \
                           netbsd32_charp to); }
271     STD             { int|netbsd32||swapctl(int cmd, netbsd32_voidp arg, \
                           int misc); }
272     COMPAT_30 MODULAR compat_netbsd32_30    \
                       { int|netbsd32||getdents(int fd, netbsd32_charp buf, \
                           netbsd32_size_t count); }
273     STD             { int|netbsd32||minherit(netbsd32_voidp addr, \
                           netbsd32_size_t len, int inherit); }
274     STD             { int|netbsd32||lchmod(netbsd32_charp path, \
                           mode_t mode); }
275     STD             { int|netbsd32||lchown(netbsd32_charp path, uid_t uid, \
                           gid_t gid); }
276     COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||lutimes(netbsd32_charp path, \
                           netbsd32_timeval50p_t tptr); }
277     STD             { int|netbsd32|13|msync(netbsd32_voidp addr, \
                           netbsd32_size_t len, int flags); }
278     COMPAT_30 MODULAR compat_netbsd32_30    \
                       { int|netbsd32|13|stat(netbsd32_charp path, \
                           netbsd32_stat13p_t ub); }
279     COMPAT_30 MODULAR compat_netbsd32_30    \
                       { int|netbsd32|13|fstat(int fd, \
                           netbsd32_stat13p_t sb); }
280     COMPAT_30 MODULAR compat_netbsd32_30    \
                       { int|netbsd32|13|lstat(netbsd32_charp path, \
                           netbsd32_stat13p_t ub); }
281     STD             { int|netbsd32|14|sigaltstack(\
                           netbsd32_sigaltstackp_t nss, \
                           netbsd32_sigaltstackp_t oss); }
282     NOARGS          { int|sys|14|vfork(void); }
283     STD             { int|netbsd32||__posix_chown(netbsd32_charp path, \
                           uid_t uid, gid_t gid); }
284     STD             { int|netbsd32||__posix_fchown(int fd, uid_t uid, \
                           gid_t gid); }
285     STD             { int|netbsd32||__posix_lchown(netbsd32_charp path, \
                           uid_t uid, gid_t gid); }
286     STD             { pid_t|netbsd32||getsid(pid_t pid); }
287     STD             { int|netbsd32||__clone(int flags, \
                           netbsd32_voidp stack); }
288     STD             { int|netbsd32||fktrace(int fd, int ops, int facs, \
                           int pid); }
289     STD             { netbsd32_ssize_t|netbsd32||preadv(int fd, \
                           netbsd32_iovecp_t iovp, int iovcnt, int PAD, \
                           netbsd32_off_t offset); }
290     STD             { netbsd32_ssize_t|netbsd32||pwritev(int fd, \
                           netbsd32_iovecp_t iovp, int iovcnt, int PAD, \
                           netbsd32_off_t offset); }
291     STD             { int|netbsd32|14|sigaction(int signum, \
                           netbsd32_sigactionp_t nsa, \
                           netbsd32_sigactionp_t osa); }
292     STD             { int|netbsd32|14|sigpending(netbsd32_sigsetp_t set); }
293     STD             { int|netbsd32|14|sigprocmask(int how, \
                           netbsd32_sigsetp_t set, \
                           netbsd32_sigsetp_t oset); }
294     STD             { int|netbsd32|14|sigsuspend(netbsd32_sigsetp_t set); }
295     COMPAT_16 MODULAR compat_netbsd32_16    \
                       { int|netbsd32|14|sigreturn( \
                           netbsd32_sigcontextp_t sigcntxp); }
296     STD             { int|netbsd32||__getcwd(netbsd32_charp bufp, \
                           netbsd32_size_t length); }
297     STD             { int|netbsd32||fchroot(int fd); }
298     COMPAT_30 MODULAR compat_netbsd32_30    \
                       { int|netbsd32||fhopen(netbsd32_fhandlep_t fhp, \
                          int flags); }
299     COMPAT_30 MODULAR compat_netbsd32_30    \
                       { int|netbsd32||fhstat(netbsd32_fhandlep_t fhp, \
                           netbsd32_stat13p_t sb); }
300     COMPAT_20 MODULAR compat_netbsd32_20    \
                       { int|netbsd32||fhstatfs(netbsd32_fhandlep_t fhp, \
                           netbsd32_stat50p_t buf); }
301     COMPAT_50 MODULAR compat_netbsd32_sysvipc_50    \
                       { int|netbsd32|14|semctl(int semid, int semnum, \
                           int cmd, ... netbsd32_semun50p_t arg); }
302     COMPAT_50 MODULAR compat_netbsd32_sysvipc_50    \
                       { int|netbsd32|13|msgctl(int msqid, int cmd, \
                           netbsd32_msqid_ds50p_t buf); }
303     COMPAT_50 MODULAR compat_netbsd32_sysvipc_50    \
                       { int|netbsd32|13|shmctl(int shmid, int cmd, \
                           netbsd32_shmid_ds50p_t buf); }
304     STD             { int|netbsd32||lchflags(netbsd32_charp path, \
                           netbsd32_u_long flags); }
305     NOARGS          { int|sys||issetugid(void); }
306     STD             { int|netbsd32||utrace(netbsd32_charp label, \
                           netbsd32_voidp addr, netbsd32_size_t len); }
307     STD             { int|netbsd32||getcontext(netbsd32_ucontextp ucp); }
308     STD             { int|netbsd32||setcontext(netbsd32_ucontextp ucp); }
309     STD             { int|netbsd32||_lwp_create(netbsd32_ucontextp ucp, \
                           netbsd32_u_long flags, netbsd32_lwpidp new_lwp); }
310     NOARGS          { int|sys||_lwp_exit(void); }
311     NOARGS          { lwpid_t|sys||_lwp_self(void); }
312     STD             { int|netbsd32||_lwp_wait(lwpid_t wait_for, \
                           netbsd32_lwpidp departed); }
313     STD             { int|netbsd32||_lwp_suspend(lwpid_t target); }
314     STD             { int|netbsd32||_lwp_continue(lwpid_t target); }
315     STD             { int|netbsd32||_lwp_wakeup(lwpid_t target); }
316     NOARGS          { netbsd32_voidp|sys||_lwp_getprivate(void); }
317     STD             { void|netbsd32||_lwp_setprivate(netbsd32_voidp ptr); }
318     STD             { int|netbsd32||_lwp_kill(lwpid_t target, int signo); }
319     STD             { int|netbsd32||_lwp_detach(lwpid_t target); }
320     COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||_lwp_park(netbsd32_timespec50p_t ts, \
                           lwpid_t unpark, netbsd32_voidp hint, \
                           netbsd32_voidp unparkhint); }
321     STD             { int|netbsd32||_lwp_unpark(lwpid_t target, \
                           netbsd32_voidp hint); }
322     STD             { netbsd32_size_t|netbsd32||_lwp_unpark_all( \
                           netbsd32_lwpidp targets, netbsd32_size_t ntargets, \
                           netbsd32_voidp hint); }
323     STD             { int|netbsd32||_lwp_setname(lwpid_t target, \
                               netbsd32_charp name); }
324     STD             { int|netbsd32||_lwp_getname(lwpid_t target, \
                               netbsd32_charp name, netbsd32_size_t len); }
325     STD             { int|netbsd32||_lwp_ctl(int features, \
                               netbsd32_pointer_t address); }
326     UNIMPL
327     UNIMPL
328     UNIMPL
329     UNIMPL
330     OBSOL           netbsd32_sa_register
331     OBSOL           netbsd32_sa_stacks
332     OBSOL           sa_enable
333     OBSOL           netbsd32_sa_setconcurrency
334     OBSOL           sa_yield
335     OBSOL           netbsd32_sa_preempt
336     OBSOL           sys_sa_unblockyield
337     UNIMPL
338     UNIMPL
339     UNIMPL
340     STD             { int|netbsd32||__sigaction_sigtramp(int signum, \
                           netbsd32_sigactionp_t nsa, \
                           netbsd32_sigactionp_t osa, \
                           netbsd32_voidp tramp, int vers); }
341     OBSOL           netbsd32_pmc_get_info
342     OBSOL           netbsd32_pmc_control
343     STD             { int|netbsd32||rasctl(netbsd32_voidp addr, \
                           netbsd32_size_t len, int op); }
344     NOARGS          { int|sys||kqueue(void); }
345     COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||kevent(int fd, \
                           netbsd32_kevent100p_t changelist, \
                           netbsd32_size_t nchanges, \
                           netbsd32_kevent100p_t eventlist, \
                           netbsd32_size_t nevents, \
                           netbsd32_timespec50p_t timeout); }
; Scheduling system calls.
346     STD             { int|netbsd32||_sched_setparam(pid_t pid, lwpid_t lid, \
                           int policy, const netbsd32_sched_paramp_t params); }
347     STD             { int|netbsd32||_sched_getparam(pid_t pid, lwpid_t lid, \
                           netbsd32_intp policy, \
                           netbsd32_sched_paramp_t params); }
348     STD             { int|netbsd32||_sched_setaffinity(pid_t pid, \
                           lwpid_t lid, netbsd32_size_t size, \
                           const netbsd32_cpusetp_t cpuset); }
349     STD             { int|netbsd32||_sched_getaffinity(pid_t pid, \
                           lwpid_t lid, netbsd32_size_t size, \
                           netbsd32_cpusetp_t cpuset); }
350     NOARGS          { int|sys||sched_yield(void); }
351     STD             { int|netbsd32||_sched_protect(int priority); }
352     UNIMPL
353     UNIMPL
354     STD             { int|netbsd32||fsync_range(int fd, int flags, \
                           netbsd32_off_t start, netbsd32_off_t length); }
355     STD             { int|netbsd32||uuidgen(netbsd32_uuidp_t store, \
                           int count); }
356     COMPAT_90 MODULAR compat_netbsd32_90 \
                       { int|netbsd32||getvfsstat(netbsd32_statvfs90p_t buf, \
                           netbsd32_size_t bufsize, int flags); }
357     COMPAT_90 MODULAR compat_netbsd32_90 \
                       { int|netbsd32||statvfs1(netbsd32_charp path, \
                           netbsd32_statvfs90p_t buf, int flags); }
358     COMPAT_90 MODULAR compat_netbsd32_90 \
                       { int|netbsd32||fstatvfs1(int fd, \
                           netbsd32_statvfs90p_t buf, int flags); }
359     COMPAT_30 MODULAR compat_netbsd32_30    \
                       { int|netbsd32||fhstatvfs1(netbsd32_fhandlep_t fhp, \
                           netbsd32_statvfs90p_t buf, int flags); }
360     STD             { int|netbsd32||extattrctl(netbsd32_charp path, \
                           int cmd, netbsd32_charp filename, \
                           int attrnamespace, netbsd32_charp attrname); }
361     STD             { int|netbsd32||extattr_set_file(netbsd32_charp path, \
                           int attrnamespace, netbsd32_charp attrname, \
                           netbsd32_voidp data, netbsd32_size_t nbytes); }
362     STD             { int|netbsd32||extattr_get_file(netbsd32_charp path, \
                           int attrnamespace, netbsd32_charp attrname, \
                           netbsd32_voidp data, netbsd32_size_t nbytes); }
363     STD             { int|netbsd32||extattr_delete_file( \
                           netbsd32_charp path, int attrnamespace, \
                           netbsd32_charp attrname); }
364     STD             { int|netbsd32||extattr_set_fd(int fd, \
                           int attrnamespace, netbsd32_charp attrname, \
                           netbsd32_voidp data, netbsd32_size_t nbytes); }
365     STD             { int|netbsd32||extattr_get_fd(int fd, \
                           int attrnamespace, netbsd32_charp attrname, \
                           netbsd32_voidp data, netbsd32_size_t nbytes); }
366     STD             { int|netbsd32||extattr_delete_fd(int fd, \
                           int attrnamespace, netbsd32_charp attrname); }
367     STD             { int|netbsd32||extattr_set_link(netbsd32_charp path, \
                           int attrnamespace, netbsd32_charp attrname, \
                           netbsd32_voidp data, netbsd32_size_t nbytes); }
368     STD             { int|netbsd32||extattr_get_link(netbsd32_charp path, \
                           int attrnamespace, netbsd32_charp attrname, \
                           netbsd32_voidp data, netbsd32_size_t nbytes); }
369     STD             { int|netbsd32||extattr_delete_link( \
                           netbsd32_charp path, int attrnamespace, \
                           netbsd32_charp attrname); }
370     STD             { int|netbsd32||extattr_list_fd(int fd, \
                           int attrnamespace, netbsd32_voidp data, \
                           netbsd32_size_t nbytes); }
371     STD             { int|netbsd32||extattr_list_file(netbsd32_charp path, \
                           int attrnamespace, netbsd32_voidp data, \
                           netbsd32_size_t nbytes); }
372     STD             { int|netbsd32||extattr_list_link(netbsd32_charp path, \
                           int attrnamespace, netbsd32_voidp data, \
                           netbsd32_size_t nbytes); }
373     COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||pselect(int nd, netbsd32_fd_setp_t in, \
                           netbsd32_fd_setp_t ou, netbsd32_fd_setp_t ex, \
                           netbsd32_timespec50p_t ts, \
                           netbsd32_sigsetp_t mask); }
374     COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||pollts(netbsd32_pollfdp_t fds, \
                           u_int nfds, netbsd32_timespec50p_t ts, \
                           netbsd32_sigsetp_t mask); }
375     STD             { int|netbsd32||setxattr(netbsd32_charp path, \
                           netbsd32_charp name, netbsd32_voidp value, \
                           netbsd32_size_t size, int flags); }
376     STD             { int|netbsd32||lsetxattr(netbsd32_charp path, \
                           netbsd32_charp name, netbsd32_voidp value, \
                           netbsd32_size_t size, int flags); }
377     STD             { int|netbsd32||fsetxattr(int fd, \
                           netbsd32_charp name, netbsd32_voidp value, \
                           netbsd32_size_t size, int flags); }
378     STD             { int|netbsd32||getxattr(netbsd32_charp path, \
                           netbsd32_charp name, netbsd32_voidp value, \
                           netbsd32_size_t size); }
379     STD             { int|netbsd32||lgetxattr(netbsd32_charp path, \
                           netbsd32_charp name, netbsd32_voidp value, \
                           netbsd32_size_t size); }
380     STD             { int|netbsd32||fgetxattr(int fd, \
                           netbsd32_charp name, netbsd32_voidp value, \
                           netbsd32_size_t size); }
381     STD             { int|netbsd32||listxattr(netbsd32_charp path, \
                           netbsd32_charp list, netbsd32_size_t size); }
382     STD             { int|netbsd32||llistxattr(netbsd32_charp path, \
                           netbsd32_charp list, netbsd32_size_t size); }
383     STD             { int|netbsd32||flistxattr(int fd, \
                           netbsd32_charp list, netbsd32_size_t size); }
384     STD             { int|netbsd32||removexattr(netbsd32_charp path, \
                           netbsd32_charp name); }
385     STD             { int|netbsd32||lremovexattr(netbsd32_charp path, \
                           netbsd32_charp name); }
386     STD             { int|netbsd32||fremovexattr(int fd, \
                           netbsd32_charp name); }
387     COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32|30|stat(netbsd32_charp path, \
                           netbsd32_stat50p_t ub); }
388     COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32|30|fstat(int fd, \
                           netbsd32_stat50p_t sb); }
389     COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32|30|lstat( \
                           netbsd32_charp path, netbsd32_stat50p_t ub); }
390     STD             { int|netbsd32|30|getdents(int fd, \
                           netbsd32_charp buf, netbsd32_size_t count); }
391     IGNORED         old posix fadvise
392     COMPAT_30 MODULAR compat_netbsd32_30    \
                       { int|netbsd32|30|fhstat( \
                           netbsd32_fhandlep_t fhp, \
                           netbsd32_stat50p_t sb); }
393     COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32||ntp_gettime( \
                           netbsd32_ntptimeval50p_t ntvp); }
394     STD             { int|netbsd32|30|socket(int domain, int type, \
                           int protocol); }
395     STD             { int|netbsd32|30|getfh(netbsd32_charp fname, \
                           netbsd32_pointer_t fhp, netbsd32_size_tp fh_size); }
396     STD             { int|netbsd32|40|fhopen(netbsd32_pointer_t fhp, \
                           netbsd32_size_t fh_size, int flags); }
397     COMPAT_90 MODULAR compat_netbsd90 \
                       { int|netbsd32||fhstatvfs1(     \
                           netbsd32_pointer_t fhp, netbsd32_size_t fh_size,\
                           netbsd32_statvfs90p_t buf, int flags); }
398     COMPAT_50 MODULAR compat_netbsd32_50    \
                       { int|netbsd32|40|fhstat(       \
                           netbsd32_pointer_t fhp, netbsd32_size_t fh_size,\
                           netbsd32_stat50p_t sb); }

; Asynchronous I/O system calls
399     UNIMPL          sys_aio_cancel
400     UNIMPL          sys_aio_error
401     UNIMPL          sys_aio_fsync
402     UNIMPL          sys_aio_read
403     UNIMPL          sys_aio_return
404     UNIMPL          sys_aio_suspend
405     UNIMPL          sys_aio_write
406     UNIMPL          sys_lio_listio

407     UNIMPL
408     UNIMPL
409     UNIMPL

410     STD             { int|netbsd32||__mount50(netbsd32_charp type, \
                           netbsd32_charp path, int flags, \
                           netbsd32_voidp data, netbsd32_size_t data_len); }
411     STD             { netbsd32_voidp|netbsd32||mremap( \
                           netbsd32_voidp old_address, \
                           netbsd32_size_t old_size, \
                           netbsd32_voidp new_address, \
                           netbsd32_size_t new_size, int flags); }

412     STD             { int|netbsd32||pset_create(netbsd32_psetidp_t psid); }
413     STD             { int|netbsd32||pset_destroy(psetid_t psid); }
414     STD             { int|netbsd32||pset_assign(psetid_t psid, \
                         cpuid_t cpuid, netbsd32_psetidp_t opsid); }
415     STD             { int|netbsd32||_pset_bind(idtype_t idtype, \
                         id_t first_id, id_t second_id, psetid_t psid, \
                         netbsd32_psetidp_t opsid); }

416     STD             { int|netbsd32|50|posix_fadvise(int fd, int PAD, \
                           netbsd32_off_t offset, netbsd32_off_t len, int advice); }
417     STD             { int|netbsd32|50|select(int nd, \
                           netbsd32_fd_setp_t in,  netbsd32_fd_setp_t ou, \
                           netbsd32_fd_setp_t ex, netbsd32_timevalp_t tv); }
418     STD             { int|netbsd32|50|gettimeofday( \
                           netbsd32_timevalp_t tp, netbsd32_voidp tzp); }
419     STD             { int|netbsd32|50|settimeofday( \
                           const netbsd32_timevalp_t tv, \
                           const netbsd32_voidp tzp); }
420     STD             { int|netbsd32|50|utimes(const netbsd32_charp path, \
                           const netbsd32_timevalp_t tptr); }
421     STD             { int|netbsd32|50|adjtime( \
                           const netbsd32_timevalp_t delta, \
                           netbsd32_timevalp_t olddelta); }
422     EXCL            __lfs_segwait50
423     STD             { int|netbsd32|50|futimes(int fd, \
                           const netbsd32_timevalp_t tptr); }
424     STD             { int|netbsd32|50|lutimes(const netbsd32_charp path, \
                           const netbsd32_timevalp_t tptr); }
425     STD             { int|netbsd32|50|setitimer(int which, \
                           const netbsd32_itimervalp_t itv, \
                           netbsd32_itimervalp_t oitv); }
426     STD             { int|netbsd32|50|getitimer(int which, \
                           netbsd32_itimervalp_t itv); }
427     STD             { int|netbsd32|50|clock_gettime(clockid_t clock_id, \
                           netbsd32_timespecp_t tp); }
428     STD             { int|netbsd32|50|clock_settime(clockid_t clock_id, \
                           const netbsd32_timespecp_t tp); }
429     STD             { int|netbsd32|50|clock_getres(clockid_t clock_id, \
                           netbsd32_timespecp_t tp); }
430     STD             { int|netbsd32|50|nanosleep( \
                           const netbsd32_timespecp_t rqtp, \
                           netbsd32_timespecp_t rmtp); }
431     STD             { int|netbsd32|50|__sigtimedwait( \
                           const netbsd32_sigsetp_t set, \
                           netbsd32_siginfop_t info, \
                           netbsd32_timespecp_t timeout); }
432     STD MODULAR compat_netbsd32_mqueue      \
                       { int|netbsd32|50|mq_timedsend(mqd_t mqdes, \
                           const netbsd32_charp msg_ptr, \
                           netbsd32_size_t msg_len, \
                           unsigned msg_prio, \
                           const netbsd32_timespecp_t abs_timeout); }
433     STD MODULAR compat_netbsd32_mqueue      \
                       { netbsd32_ssize_t|netbsd32|50|mq_timedreceive( \
                           mqd_t mqdes, netbsd32_charp msg_ptr, \
                           netbsd32_size_t msg_len, netbsd32_uintp msg_prio, \
                           const netbsd32_timespecp_t abs_timeout); }
434     COMPAT_60 MODULAR compat_netbsd32_60    \
                       { int|netbsd32||_lwp_park( \
                           const netbsd32_timespecp_t ts, \
                           lwpid_t unpark, const netbsd32_voidp hint, \
                           const netbsd32_voidp unparkhint); }
435     COMPAT_100 MODULAR compat_netbsd32_100  \
                       { int|netbsd32|50|kevent(int fd, \
                           const netbsd32_kevent100p_t changelist, \
                           netbsd32_size_t nchanges, \
                           netbsd32_kevent100p_t eventlist, \
                           netbsd32_size_t nevents, \
                           const netbsd32_timespecp_t timeout); }
436     STD             { int|netbsd32|50|pselect(int nd, \
                           netbsd32_fd_setp_t in, \
                           netbsd32_fd_setp_t ou, \
                           netbsd32_fd_setp_t ex, \
                           const netbsd32_timespecp_t ts, \
                           const netbsd32_sigsetp_t mask); }
437     STD             { int|netbsd32|50|pollts(netbsd32_pollfdp_t fds, \
                           u_int nfds, const netbsd32_timespecp_t ts, \
                           const netbsd32_sigsetp_t mask); }
438     UNIMPL          netbsd32___aio_suspend50
439     STD             { int|netbsd32|50|stat(const netbsd32_charp path, \
                           netbsd32_statp_t ub); }
440     STD             { int|netbsd32|50|fstat(int fd, netbsd32_statp_t sb); }
441     STD             { int|netbsd32|50|lstat(const netbsd32_charp path, \
                           netbsd32_statp_t ub); }
442     STD MODULAR compat_netbsd32_sysvipc     \
                       { int|netbsd32|50|__semctl(int semid, int semnum, \
                           int cmd, ... netbsd32_semunp_t arg); }
443     STD MODULAR compat_netbsd32_sysvipc     \
                       { int|netbsd32|50|shmctl(int shmid, int cmd, \
                           netbsd32_shmid_dsp_t buf); }
444     STD MODULAR compat_netbsd32_sysvipc     \
                       { int|netbsd32|50|msgctl(int msqid, int cmd, \
                           netbsd32_msqid_dsp_t buf); }
445     STD             { int|netbsd32|50|getrusage(int who, \
                           netbsd32_rusagep_t rusage); }
446     STD             { int|netbsd32|50|timer_settime(timer_t timerid, \
                           int flags, const netbsd32_itimerspecp_t value, \
                           netbsd32_itimerspecp_t ovalue); }
447     STD             { int|netbsd32|50|timer_gettime(timer_t timerid, \
                           netbsd32_itimerspecp_t value); }
#if defined(NTP) || !defined(_KERNEL_OPT)
448     STD             { int|netbsd32|50|ntp_gettime( \
                           netbsd32_ntptimevalp_t ntvp); }
#else
448     EXCL            ___ntp_gettime50
#endif
449     STD             { int|netbsd32|50|wait4(int pid, \
                           netbsd32_intp status, \
                           int options, netbsd32_rusagep_t rusage); }
450     STD             { int|netbsd32|50|mknod(const netbsd32_charp path, \
                           mode_t mode, netbsd32_dev_t dev); }
451     STD             { int|netbsd32|50|fhstat(const netbsd32_voidp fhp, \
                           netbsd32_size_t fh_size, netbsd32_statp_t sb); }
452     OBSOL           5.99 quotactl
453     STD             { int|netbsd32||pipe2(netbsd32_intp fildes, int flags); }
454     COMPAT_100 MODULAR compat_netbsd32_100 \
                       { int|netbsd32||dup3(int from, int to, int flags); }
455     STD             { int|netbsd32||kqueue1(int flags); }
456     STD             { int|netbsd32||paccept(int s, \
                           netbsd32_sockaddrp_t name, \
                           netbsd32_socklenp_t anamelen, \
                           const netbsd32_sigsetp_t mask, \
                           int flags); }
457     STD             { int|netbsd32||linkat(int fd1, \
                           const netbsd32_charp name1, \
                           int fd2, \
                           const netbsd32_charp name2, \
                           int flags); }
458     STD             { int|netbsd32||renameat(int fromfd, \
                           const netbsd32_charp from, \
                           int tofd, \
                           const netbsd32_charp to); }
459     STD             { int|netbsd32||mkfifoat(int fd, \
                           const netbsd32_charp path, \
                           mode_t mode); }
460     STD             { int|netbsd32||mknodat(int fd, \
                           const netbsd32_charp path, \
                           mode_t mode, int PAD, \
                           netbsd32_dev_t dev); }
461     STD             { int|netbsd32||mkdirat(int fd, \
                           const netbsd32_charp path, \
                           mode_t mode); }
462     STD             { int|netbsd32||faccessat(int fd, \
                           const netbsd32_charp path, \
                           int amode, \
                           int flag); }
463     STD             { int|netbsd32||fchmodat(int fd, \
                           const netbsd32_charp path, \
                           mode_t mode, \
                           int flag); }
464     STD             { int|netbsd32||fchownat(int fd, \
                           const netbsd32_charp path, \
                           uid_t owner, \
                           gid_t group, \
                           int flag); }
465     STD             { int|netbsd32||fexecve(int fd, \
                           netbsd32_charpp argp, \
                           netbsd32_charpp envp); }
466     STD             { int|netbsd32||fstatat(int fd, \
                           const netbsd32_charp path, \
                           netbsd32_statp_t buf, \
                           int flag); }
467     STD             { int|netbsd32||utimensat(int fd, \
                           const netbsd32_charp path, \
                           const netbsd32_timespecp_t tptr, \
                           int flag); }
468     STD             { int|netbsd32||openat(int fd, \
                           const netbsd32_charp path, \
                           int oflags, ... \
                           mode_t mode); }
469     STD             { netbsd32_ssize_t|netbsd32||readlinkat(int fd, \
                           const netbsd32_charp path, \
                           netbsd32_charp buf, \
                           netbsd32_size_t bufsize); }
470     STD             { int|netbsd32||symlinkat(const netbsd32_charp path1, \
                           int fd, \
                           const netbsd32_charp path2); }
471     STD             { int|netbsd32||unlinkat(int fd, \
                           const netbsd32_charp path, \
                           int flag); }
472     STD             { int|netbsd32||futimens(int fd, \
                           const netbsd32_timespecp_t tptr); }
473     STD MODULAR compat_netbsd32_quota       \
                       { int|netbsd32||__quotactl(const netbsd32_charp path, \
                           netbsd32_voidp args); }
474     NOERR           { int|netbsd32||posix_spawn(netbsd32_pid_tp pid, \
                           const netbsd32_charp path, \
                           const netbsd32_posix_spawn_file_actionsp \
                               file_actions, \
                           const netbsd32_posix_spawnattrp attrp, \
                           netbsd32_charpp argv, netbsd32_charpp envp); }

475     STD             { int|netbsd32||recvmmsg(int s, \
                           netbsd32_mmsghdrp_t mmsg, \
                           unsigned int vlen, unsigned int flags, \
                           netbsd32_timespecp_t timeout); }
476     STD             { int|netbsd32||sendmmsg(int s, \
                           netbsd32_mmsghdrp_t mmsg, \
                           unsigned int vlen, unsigned int flags); }
477     STD             { int|netbsd32||clock_nanosleep(\
                           netbsd32_clockid_t clock_id, \
                           int flags, const netbsd32_timespecp_t rqtp, \
                           netbsd32_timespecp_t rmtp); }
478     STD             { int|netbsd32|60|_lwp_park(\
                           netbsd32_clockid_t clock_id, \
                           int flags, netbsd32_timespecp_t ts, \
                           lwpid_t unpark, netbsd32_voidp hint, \
                           netbsd32_voidp unparkhint); }
479     NOERR           { int|netbsd32||posix_fallocate(int fd, int PAD, \
                           netbsd32_off_t pos, netbsd32_off_t len); }
480     STD             { int|netbsd32||fdiscard(int fd, int PAD, \
                           netbsd32_off_t pos, netbsd32_off_t len); }
481     STD             { int|netbsd32||wait6(idtype_t idtype, id_t id, \
                           netbsd32_intp status, int options, \
                           netbsd32_wrusagep_t wru, netbsd32_siginfop_t info); }
482     STD             { int|netbsd32||clock_getcpuclockid2(idtype_t idtype, \
                           id_t id, netbsd32_clockidp_t clock_id); }
483     STD             { int|netbsd32|90|getvfsstat( \
                           netbsd32_statvfsp_t buf, \
                           netbsd32_size_t bufsize, int flags); }
484     STD             { int|netbsd32|90|statvfs1(netbsd32_charp path, \
                           netbsd32_statvfsp_t buf, int flags); }
485     STD             { int|netbsd32|90|fstatvfs1(int fd, \
                           netbsd32_statvfsp_t buf, int flags); }
486     STD             { int|netbsd32|90|fhstatvfs1(netbsd32_voidp fhp, \
                           netbsd32_size_t fh_size, netbsd32_statvfsp_t buf, \
                           int flags); }
487     STD             { int|netbsd32||__acl_get_link( \
                           const netbsd32_charp path, \
                           acl_type_t type, netbsd32_aclp_t aclp); }
488     STD             { int|netbsd32||__acl_set_link( \
                           const netbsd32_charp path, \
                           acl_type_t type, netbsd32_aclp_t aclp); }
489     STD             { int|netbsd32||__acl_delete_link( \
                           const netbsd32_charp path, \
                           acl_type_t type); }
490     STD             { int|netbsd32||__acl_aclcheck_link( \
                           const netbsd32_charp path, \
                           acl_type_t type, netbsd32_aclp_t aclp); }
491     STD             { int|netbsd32||__acl_get_file( \
                           const netbsd32_charp path, \
                           acl_type_t type, netbsd32_aclp_t aclp); }
492     STD             { int|netbsd32||__acl_set_file( \
                           const netbsd32_charp path, \
                           acl_type_t type, netbsd32_aclp_t aclp); }
493     STD             { int|netbsd32||__acl_get_fd(int filedes, \
                           acl_type_t type, netbsd32_aclp_t aclp); }
494     STD             { int|netbsd32||__acl_set_fd(int filedes, \
                           acl_type_t type, netbsd32_aclp_t aclp); }
495     STD             { int|netbsd32||__acl_delete_file( \
                           const netbsd32_charp path, \
                           acl_type_t type); }
496     STD             { int|netbsd32||__acl_delete_fd(int filedes, \
                           acl_type_t type); }
497     STD             { int|netbsd32||__acl_aclcheck_file( \
                           const netbsd32_charp path, \
                           acl_type_t type, netbsd32_aclp_t aclp); }
498     STD             { int|netbsd32||__acl_aclcheck_fd(int filedes, \
                           acl_type_t type, netbsd32_aclp_t aclp); }
499     STD             { long|netbsd32||lpathconf(const netbsd32_charp path, \
                           int name); }
500     STD             { int|netbsd32||memfd_create( \
                           const netbsd32_charp name, unsigned int flags); }
501     STD             { int|netbsd32|100|kevent(int fd, \
                           const netbsd32_keventp_t changelist, \
                           netbsd32_size_t nchanges, \
                           netbsd32_keventp_t eventlist, \
                           netbsd32_size_t nevents, \
                           const netbsd32_timespecp_t timeout); }
502     STD             { int|netbsd32||epoll_create1(int flags); }
503     STD             { int|netbsd32||epoll_ctl(int epfd, int op, int fd, \
                           netbsd32_epoll_eventp_t event); }
504     STD             { int|netbsd32||epoll_pwait2(int epfd, \
                           netbsd32_epoll_eventp_t events, int maxevents, \
                           netbsd32_timespecp_t timeout, \
                           netbsd32_sigsetp_t sigmask); }
505     STD             { int|netbsd32|100|dup3(int from, int to, \
                           int flags); }
506     STD MODULAR compat_netbsd32_sysvipc { int|netbsd32||semtimedop(int semid, \
                           netbsd32_sembufp_t sops, netbsd32_size_t nsops, \
                           netbsd32_timespecp_t timeout); }