$NetBSD: syscalls.master,v 1.109 2024/09/28 19:35:55 christos Exp $
;
;       @(#)syscalls.master     8.1 (Berkeley) 7/19/93

; NetBSD alpha COMPAT_LINUX 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, NODEF, NOARGS, or one of
;               the compatibility options defined in syscalls.conf.
;
; types:
;       STD     always included
;       OBSOL   obsolete, not included in system
;       UNIMPL  unimplemented, 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.
;
; (ERH: 3/18/00)
;
; XXX XAX things to do:
;               make sure non-linux_foo() matches real linux syscalls.
;                       create new linux_foo functions otherwise
;                       (i.e. reboot, msgrcv? )
;               make sure linux_foo() matches expected prototypes in .c files.
;               kill not used functions.  (ifdef the actual code)
;               make linux_sys_sigreturn in linux_machdep.c use frame.extramask
;
; NOT USED = This syscall is not really used in Linux, except in its
;               osf compat mode.  Since Linux binaries shouldn't ever
;               call it and osf binaries run under a different emulation,
;               it shouldn't matter that the linux version of the
;               function might not DTRT.  Define it anyway so we
;               don't have to split off or ifdef the associated function.
;                   A bit better might be to have makesyscalls identify this
;               as "define but don't include in table" so it doesn't actually
;               ever get called.
; UNIMPL <blank> = not implemented here nor in linux source
; UNIMPL osf_*   = osf functions implemented in linux, not here.
;

#if defined(_KERNEL_OPT)
#include "opt_sysv.h"
#endif

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

#include <compat/linux/common/linux_types.h>
#include <compat/linux/common/linux_signal.h>
#include <compat/linux/common/linux_siginfo.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_msg.h>
#include <compat/linux/common/linux_sched.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/common/linux_shm.h>
#include <compat/linux/common/linux_mmap.h>
#include <compat/linux/common/linux_machdep.h>
#include <compat/linux/common/linux_mqueue.h>

#include <compat/linux/linux_syscallargs.h>
#include <compat/linux/arch/alpha/linux_osf1.h>

%%

0       NOARGS          { int|linux_sys||nosys(void); } syscall
1       STD             { int|linux_sys||exit(int rval); }
2       NOARGS          { int|sys||fork(void); }
3       NOARGS          { ssize_t|sys||read(int fd, void *buf, size_t nbyte); }
4       NOARGS          { ssize_t|sys||write(int fd, const void *buf, \
                           size_t nbyte); }
5       UNIMPL
6       NOARGS          { int|sys||close(int fd); }
7       STD             { int|linux_sys||osf1_wait4(int pid, int *status, \
                           int options, struct osf1_rusage *rusage); }
;8      ALIAS           osf1_sys_old_creat, NOT USED
8       STD             { int|linux_sys||creat(const char *path, linux_umode_t mode); }
9       NOARGS          { int|sys||link(const char *path, const char *link); }
10      STD             { int|linux_sys||unlink(const char *path); }
11      UNIMPL
12      NOARGS          { int|sys||chdir(const char *path); }
13      NOARGS          { int|sys||fchdir(int fd); }
14      STD             { int|linux_sys||mknod(const char *path, linux_umode_t mode, \
                           unsigned dev); }
15      NOARGS          { int|sys||chmod(const char *path, int mode); }
16      NOARGS          { int|sys||__posix_chown(const char *path, uid_t uid, \
                           gid_t gid); }
;17     ALIAS           osf1_sys_brk
17      STD             { int|linux_sys||brk(char *nsize); }
18      UNIMPL
19      NOARGS          { long|compat_43_sys||lseek(int fd, long offset, \
                           int whence); }
20      NOARGS          { pid_t|sys||getpid_with_ppid(void); }
21      STD             { int|linux_sys||osf1_mount(int type, const char *path, \
                           int flags, void *data); }
22      UNIMPL          umount
23      NOARGS          { int|sys||setuid(uid_t uid); }
24      NOARGS          { uid_t|sys||getuid_with_euid(void); }
25      UNIMPL
26      STD             { int|linux_sys||ptrace(long request, long pid, \
                         long addr, long data); }
27      UNIMPL
28      UNIMPL
29      UNIMPL
30      UNIMPL
31      UNIMPL
32      UNIMPL
33      NOARGS          { int|sys||access(const char *path, int flags); }
34      UNIMPL
35      UNIMPL
36      NOARGS          { int|sys||sync(void); }
37      STD             { int|linux_sys||kill(int pid, int signum); }
38      UNIMPL
39      NOARGS          { int|sys||setpgid(int pid, int pgid); }
40      UNIMPL
41      NOARGS          { int|sys||dup(int fd); }
42      NOARGS          { int|linux_sys||pipe(void); }
43      STD             { int|linux_sys||osf1_set_program_attributes( \
                           void *taddr, unsigned long tsize, \
                           void *daddr, unsigned long dsize); }
44      UNIMPL
45      STD             { int|linux_sys||open(const char *path, int flags, \
                           linux_umode_t mode); }
46      UNIMPL
47      NOARGS          { gid_t|sys||getgid_with_egid(void); }
; ALIAS osf1_sys_sigprocmask(int how, unsigned long mask);
; XXX <- copied from osf1/syscalls.master
48      NOARGS          { int|compat_13_sys||sigprocmask(int how, \
                           sigset13_t mask); }
49      UNIMPL
50      UNIMPL
51      NOARGS          { int|sys||acct(const char *path); }
52      STD             { int|linux_sys||sigpending(linux_old_sigset_t *set); }
53      UNIMPL
54      STD             { int|linux_sys||ioctl(int fd, u_long com, \
                           void *data); }
55      UNIMPL
56      UNIMPL
57      NOARGS          { int|sys||symlink(const char *path, const char *to); }
58      NOARGS          { ssize_t|sys||readlink(const char *path, char *buf, \
                           int count); }
59      NOARGS          { int|sys||execve(const char *path, char **argp, \
                           char **envp); }
60      NOARGS          { mode_t|sys||umask(mode_t newmask); }
61      NOARGS          { int|sys||chroot(const char *path); }
62      UNIMPL
63      NOARGS          { int|sys||getpgrp(void); }
64      NOARGS          { int|compat_43_sys||getpagesize(void); }
65      UNIMPL
66      NOARGS          { int|sys|14|vfork(void); }
67      STD             { int|linux_sys||stat(const char *path, \
                           struct linux_stat *sp); }
68      STD             { int|linux_sys||lstat(const char *path, \
                           struct linux_stat *sp); }
69      UNIMPL
70      UNIMPL
;71     ALIAS           osf1_sys_mmap
71      NOARGS          { int|linux_sys||mmap(unsigned long addr, size_t len, \
                           int prot, int flags, int fd, linux_off_t offset); }
72      UNIMPL
73      NOARGS          { int|sys||munmap(void *addr, size_t len); }
74      STD             { int|linux_sys||mprotect(const void *start, \
                           unsigned long len, int prot); }
75      NOARGS          { int|sys||madvise(void *addr, size_t len, int behav); }
76      UNIMPL          vhangup
77      UNIMPL
78      UNIMPL
79      NOARGS          { int|sys||getgroups(int gidsetsize, gid_t *gidset); }
80      NOARGS          { int|sys||setgroups(int gidsetsize, const gid_t *gidset); }
81      UNIMPL
82      UNIMPL          setpgrp
83      STD             { int|linux_sys||osf1_setitimer(int which, \
                           struct osf1_itimerval *itv, \
                           struct osf1_itimerval *oitv); }
84      UNIMPL
85      UNIMPL
86      UNIMPL          osf1_sys_getitimer
87      NOARGS          { int|compat_43_sys||gethostname(char *hostname, \
                           u_int len); }
88      NOARGS          { int|compat_43_sys||sethostname(char *hostname, \
                           u_int len); }
89      UNIMPL          getdtablesize
90      NOARGS          { int|sys||dup2(int from, int to); }
91      STD             { int|linux_sys||fstat(int fd, struct linux_stat *sp); }
92      STD             { int|linux_sys||fcntl(int fd, int cmd, void *arg); }
93      STD             { int|linux_sys||osf1_select(u_int nd, fd_set *in, \
                           fd_set *ou, fd_set *ex, struct osf1_timeval *tv); }
94      NOARGS          { int|sys||poll(struct pollfd *fds, u_int nfds, \
                           int timeout); }
95      NOARGS          { int|sys||fsync(int fd); }
96      NOARGS          { int|sys||setpriority(int which, int who, int prio); }
97      STD             { int|linux_sys||socket(int domain, int type, \
                           int protocol); }
98      STD             { int|linux_sys||connect(int s, \
                           const struct osockaddr *name, \
                           unsigned int namelen); }
99      STD             { int|linux_sys||accept(int s, \
                               struct osockaddr *name, int *anamelen); }
;100    ALIAS           osf1_sys_getpriority
100     STD             { int|linux_sys||getpriority(int which, int who); }
101     STD             { int|linux_sys||send(int s, void *buf, int len, \
                               int flags); }
102     STD             { int|linux_sys||recv(int s, void *buf, int len, \
                               int flags); }
103     STD             { int|linux_sys||sigreturn(struct linux_sigframe *sfp); }
104     STD             { int|linux_sys||bind(int s,         \
                               const struct osockaddr *name, \
                               unsigned int namelen); }
105     STD             { int|linux_sys||setsockopt(int s, int level, \
                               int optname, void *optval, int optlen); }
106     NOARGS          { int|sys||listen(int s, int backlog); }
107     UNIMPL
108     UNIMPL
109     UNIMPL
110     UNIMPL

111     STD             { int|linux_sys||sigsuspend(void *restart, \
                           int oldmask, int mask); }
;112    ALIAS           osf1_sys_sigstack
112     NOARGS          { int|compat_43_sys||sigstack(struct sigstack *nss, \
                           struct sigstack *oss); }
113     STD             { ssize_t|linux_sys||recvmsg(int s, \
                           struct linux_msghdr *msg, int flags); }
114     STD             { ssize_t|linux_sys||sendmsg(int s, \
                               const struct linux_msghdr *msg, int flags); }
115     UNIMPL
116     STD             { int|linux_sys||osf1_gettimeofday(struct osf1_timeval *tv, \
                           struct osf1_timezone *tzp); }
117     STD             { int|linux_sys||osf1_getrusage(int who, \
                           struct osf1_rusage *rusage); }
118     STD             { int|linux_sys||getsockopt(int s, int level, \
                               int optname, void *optval, int *optlen); }
119     UNIMPL
120     NOARGS          { ssize_t|sys||readv(int fd, const struct iovec *iovp, \
                               int iovcnt); }
121     NOARGS          { ssize_t|sys||writev(int fd, const struct iovec *iovp, \
                               int iovcnt); }
122     STD             { int|linux_sys||osf1_settimeofday(struct osf1_timeval *tv, \
                           struct osf1_timezone *tzp); }
123     NOARGS          { int|sys||__posix_fchown(int fd, uid_t uid, \
                           gid_t gid); }
124     NOARGS          { int|sys||fchmod(int fd, linux_umode_t mode); }
125     STD             { int|linux_sys||recvfrom(int s, void *buf, int len, \
                               int flags, struct osockaddr *from, \
                               int *fromlenaddr); }
126     NOARGS          { int|sys||setreuid(uid_t ruid, uid_t euid); }
127     NOARGS          { int|sys||setregid(gid_t rgid, gid_t egid); }
128     NOARGS          { int|sys||__posix_rename(const char *from, const char *to); }
129     NOARGS          { int|compat_43_sys||truncate(const char *path, \
                               long length); }
130     NOARGS          { int|compat_43_sys||ftruncate(int fd, long length); }
131     NOARGS          { int|sys||flock(int fd, int how); }
132     NOARGS          { int|sys||setgid(gid_t gid); }
133     STD             { int|linux_sys||sendto(int s, void *msg, int len, \
                               int flags, struct osockaddr *to, int tolen); }
134     NOARGS          { int|sys||shutdown(int s, int how); }
135     STD             { int|linux_sys||socketpair(int domain, int type, \
                               int protocol, int *rsv); }
136     NOARGS          { int|sys||mkdir(const char *path, linux_umode_t mode); }
137     NOARGS          { int|sys||rmdir(const char *path); }
138     STD             { int|linux_sys||osf1_utimes(const char *path, \
                           const struct osf1_timeval *tptr); }
139     UNIMPL
140     UNIMPL
141     STD             { int|linux_sys||getpeername(int fdes, \
                               void *asa, int *alen); }
142     UNIMPL
143     UNIMPL
144     STD             { int|linux_sys||getrlimit(int which, \
                           struct orlimit *rlp); }
145     STD             { int|linux_sys||setrlimit(int which, \
                           const struct orlimit *rlp); }
146     UNIMPL
147     NOARGS          { int|sys||setsid(void); }
148     UNIMPL          quotactl
149     UNIMPL
150     STD             { int|linux_sys||getsockname(int fdec, \
                               void *asa, int *alen); }
151     UNIMPL
152     UNIMPL
153     UNIMPL
154     UNIMPL
155     UNIMPL
;156    ALIAS           osf1_sys_sigaction
156     STD             { int|linux_sys||sigaction(int signum, \
                               const struct linux_old_sigaction *nsa, \
                               struct linux_old_sigaction *osa); }
157     UNIMPL
158     UNIMPL
;159    ALIAS           osf1_sys_getdirentries
159     NOARGS          { int|compat_43_sys||getdirentries(int fd, char *buf, \
                           u_int count, long *basep); }
160     STD             { int|linux_sys||osf1_statfs(const char *path, \
                           struct osf1_statfs *buf, int len); }
161     STD             { int|linux_sys||osf1_fstatfs(int fd, \
                           struct osf1_statfs *buf, int len); }
162     UNIMPL
163     UNIMPL
164     UNIMPL
;165    ALIAS           osf1_sys_getdomainname
165     NOARGS          { int|compat_09_sys||getdomainname(char *domainname, \
                           int len); }
166     STD             { int|linux_sys||setdomainname(char *domainname, \
                           int len); }
167     UNIMPL
168     UNIMPL
169     UNIMPL
170     UNIMPL
171     UNIMPL
172     UNIMPL
173     UNIMPL
174     UNIMPL
175     UNIMPL
176     UNIMPL
177     UNIMPL
178     UNIMPL
179     UNIMPL
180     UNIMPL
181     UNIMPL
182     UNIMPL
183     UNIMPL
184     UNIMPL
185     UNIMPL
186     UNIMPL
187     UNIMPL
188     UNIMPL
189     UNIMPL
190     UNIMPL
; XXX: Dunno
191     STD             { int|linux_sys||ugetrlimit(int which, \
                           struct rlimit *rlp); }
192     UNIMPL          mmap2
193     UNIMPL
194     UNIMPL
195     UNIMPL
196     UNIMPL
197     UNIMPL
198     UNIMPL
199     UNIMPL          osf1_sys_swapon
#ifdef SYSVMSG
200     NOARGS          { int|linux_sys||msgctl(int msqid, int cmd, \
                           struct linux_msqid_ds *buf); }
201     NOARGS          { int|sys||msgget(key_t key, int msgflg); }
202     NOARGS          { ssize_t|sys||msgrcv(int msqid, void *msgp, \
                           size_t msgsz, long msgtyp, int msgflg); }
203     NOARGS          { int|sys||msgsnd(int msqid, void *msgp, size_t msgsz, \
                           int msgflg); }
#else
200     UNIMPL          msgctl
201     UNIMPL          msgget
202     UNIMPL          msgrcv
203     UNIMPL          msgsnd
#endif
#ifdef SYSVSEM
204     NOARGS          { int|linux_sys||semctl(int semid, int semnum, \
                           int cmd, union linux_semun arg); }
205     NOARGS          { int|sys||semget(key_t key, int nsems, int semflg); }
206     NOARGS          { int|sys||semop(int semid, struct sembuf *sops, \
                           size_t nsops); }
#else
204     UNIMPL          semctl
205     UNIMPL          semget
206     UNIMPL          semop
#endif
;207    ALIAS           osf1_sys_utsname
207     STD             { int|linux_sys||olduname(struct linux_old_utsname *up); }
208     NOARGS          { int|sys||__posix_lchown(const char *path, uid_t uid, \
                           gid_t gid); }
#ifdef SYSVSHM
209     NOARGS          { int|linux_sys||shmat(int shmid, void *shmaddr, \
                           int shmflg, u_long *raddr); }
210     NOARGS          { int|linux_sys||shmctl(int shmid, int cmd, \
                           struct linux_shmid_ds *buf); }
211     NOARGS          { int|sys||shmdt(const void *shmaddr); }
212     NOARGS          { int|linux_sys||shmget(key_t key, size_t size, int shmflg); }
#else
209     UNIMPL          shmat
210     UNIMPL          shmctl
211     UNIMPL          shmdt
212     UNIMPL          shmget
#endif
213     UNIMPL
214     UNIMPL
215     UNIMPL
216     UNIMPL
217     NOARGS          { int|sys|13|msync(void *addr, size_t len, int flags); }
218     UNIMPL
219     UNIMPL
220     UNIMPL
221     UNIMPL
222     UNIMPL
223     UNIMPL
224     UNIMPL
225     UNIMPL
226     UNIMPL
227     UNIMPL
228     UNIMPL
229     UNIMPL
230     UNIMPL
231     UNIMPL
232     UNIMPL
233     NOARGS          { pid_t|sys||getpgid(pid_t pid); }
234     NOARGS          { pid_t|sys||getsid(pid_t pid); }
235     UNIMPL          sigaltstack
236     UNIMPL
237     UNIMPL
238     UNIMPL
239     UNIMPL
240     UNIMPL
241     STD             { int|linux_sys||osf1_sysinfo(int cmd, char *buf, long len); }
242     UNIMPL
243     UNIMPL
244     UNIMPL          osf1_sys_proplist_syscall
245     UNIMPL
246     UNIMPL
247     UNIMPL
248     UNIMPL
249     UNIMPL
250     UNIMPL
251     STD             { int|linux_sys||osf1_usleep_thread( \
                           struct osf1_timeval *sleep, \
                           struct osf1_timeval *slept); }
252     UNIMPL
253     UNIMPL
254     UNIMPL
255     UNIMPL          sysfs
256     STD             { int|linux_sys||osf1_getsysinfo(u_long op, void *buffer, \
                           u_long nbytes, void *arg, u_long flag); }
257     STD             { int|linux_sys||osf1_setsysinfo(u_long op, void *buffer, \
                           u_long nbytes, void *arg, u_long flag); }
258     UNIMPL
259     UNIMPL
260     UNIMPL
; This entry doesn't exist in the Alpha linux syscall table but the function is
; implemented and used on other ports.
261     STD             { int|linux_sys||fdatasync(int fd); }
262     UNIMPL
263     UNIMPL
264     UNIMPL
265     UNIMPL
266     UNIMPL
267     UNIMPL
268     UNIMPL
269     UNIMPL
270     UNIMPL
271     UNIMPL
272     UNIMPL
273     UNIMPL
274     UNIMPL
275     UNIMPL
276     UNIMPL
277     UNIMPL
278     UNIMPL
279     UNIMPL
280     UNIMPL
281     UNIMPL
282     UNIMPL
283     UNIMPL
284     UNIMPL
285     UNIMPL
286     UNIMPL
287     UNIMPL
288     UNIMPL
289     UNIMPL
290     UNIMPL
291     UNIMPL
292     UNIMPL
293     UNIMPL
294     UNIMPL
295     UNIMPL
296     UNIMPL
297     UNIMPL
298     UNIMPL
299     UNIMPL
300     UNIMPL          bdflush
301     UNIMPL          sethae
302     UNIMPL          mount
303     UNIMPL          old_adjtimex
304     STD             { int|linux_sys||swapoff(const char *path); }
305     STD             { int|linux_sys||getdents(int fd, \
                           struct linux_dirent *dent, unsigned int count); }
306     UNIMPL          alpha_create_module
307     UNIMPL          init_module
308     UNIMPL          delete_module
309     UNIMPL          get_kernel_syms
310     UNIMPL          syslog
311     STD             { int|linux_sys||reboot(int magic1, int magic2, \
                           int cmd, void *arg); }
312     STD             { int|linux_sys||clone(int flags, void *stack, \
                           void *parent_tidptr, void *child_tidptr, void *tls); }
#ifdef EXEC_AOUT
313     STD             { int|linux_sys||uselib(const char *path); }
#else
313     UNIMPL          sys_uselib
#endif
314     NOARGS          { int|sys||mlock(const void *addr, size_t len); }
315     NOARGS          { int|sys||munlock(const void *addr, size_t len); }
316     NOARGS          { int|sys||mlockall(int flags); }
317     NOARGS          { int|sys||munlockall(void); }
318     STD             { int|linux_sys||sysinfo(struct linux_sysinfo *arg); }
319     STD             { int|linux_sys||__sysctl(struct linux___sysctl *lsp); }
320     UNIMPL          idle
321     UNIMPL          oldumount
322     STD             { int|linux_sys||swapon(const char *name); }
323     STD             { int|linux_sys||times(struct times *tms); }
324     STD             { int|linux_sys||personality(unsigned long per); }
325     STD             { int|linux_sys||setfsuid(uid_t uid); }
326     STD             { int|linux_sys||setfsgid(gid_t gid); }
327     UNIMPL          ustat
328     STD             { int|linux_sys||statfs(const char *path, \
                           struct linux_statfs *sp); }
329     STD             { int|linux_sys||fstatfs(int fd, \
                           struct linux_statfs *sp); }
330     STD             { int|linux_sys||sched_setparam(pid_t pid, \
                           const struct linux_sched_param *sp); }
331     STD             { int|linux_sys||sched_getparam(pid_t pid, \
                           struct linux_sched_param *sp); }
332     STD             { int|linux_sys||sched_setscheduler(pid_t pid, \
                           int policy, const struct linux_sched_param *sp); }
333     STD             { int|linux_sys||sched_getscheduler(pid_t pid); }
334     STD             { int|linux_sys||sched_yield(void); }
335     STD             { int|linux_sys||sched_get_priority_max(int policy); }
336     STD             { int|linux_sys||sched_get_priority_min(int policy); }
337     UNIMPL          sched_rr_get_interval
338     UNIMPL          afs_syscall
339     STD             { int|linux_sys||uname(struct linux_utsname *up); }
340     STD             { int|linux_sys||nanosleep( \
                           const struct linux_timespec *rqtp, \
                           struct linux_timespec *rmtp); }
341     STD             { void *|linux_sys||mremap(void *old_address, \
                           size_t old_size, size_t new_size, u_long flags); }
342     UNIMPL          nfsservctl
343     STD             { int|linux_sys||setresuid(uid_t ruid, uid_t euid, \
                           uid_t suid); }
344     STD             { int|linux_sys||getresuid(uid_t *ruid, uid_t *euid, \
                           uid_t *suid); }
345     UNIMPL          pciconfig_read
346     UNIMPL          pciconfig_write
347     UNIMPL          query_module
348     UNIMPL          prctl
349     STD             { int|linux_sys||pread(int fd, char *buf, \
                           size_t nbyte, off_t offset); }
350     STD             { int|linux_sys||pwrite(int fd, char *buf, \
                           size_t nbyte, off_t offset); }
351     STD             { int|linux_sys||rt_sigreturn( \
                               struct linux_rt_sigframe *sfp); }
352     STD             { int|linux_sys||rt_sigaction(int signum, \
                               const struct linux_sigaction *nsa, \
                               struct linux_sigaction *osa, \
                               size_t sigsetsize); }
353     STD             { int|linux_sys||rt_sigprocmask(int how, \
                           const linux_sigset_t *set, \
                           linux_sigset_t *oset, \
                           size_t sigsetsize); }
354     STD             { int|linux_sys||rt_sigpending( \
                           linux_sigset_t *set, \
                           size_t sigsetsize); }
355     STD             { int|linux_sys||rt_sigtimedwait( \
                           const linux_sigset_t *set, \
                           linux_siginfo_t *info, \
                           const struct linux_timespec *timeout); }
356     STD             { int|linux_sys||rt_queueinfo(int pid, int signum, \
                           linux_siginfo_t *uinfo); }
357     STD             { int|linux_sys||rt_sigsuspend(linux_sigset_t *unewset, \
                           size_t sigsetsize); }
358     STD             { int|linux_sys||select(int nfds, fd_set *readfds, \
                           fd_set *writefds, fd_set *exceptfds, \
                           struct timeval50 *timeout); }
359     STD             { int|linux_sys||gettimeofday(struct timeval50 *tp, \
                           struct timezone *tzp); }
360     STD             { int|linux_sys||settimeofday(struct timeval50 *tp, \
                           struct timezone *tzp); }
361     NOARGS          { int|compat_50_sys||getitimer(int which, \
                           struct itimerval50 *itv); }
362     NOARGS          { int|compat_50_sys||setitimer(int which, \
                           const struct itimerval50 *itv, \
                           struct itimerval50 *oitv); }
363     NOARGS          { int|compat_50_sys||utimes(const char *path, \
                           const struct timeval50 *tptr); }
364     NOARGS          { int|compat_50_sys||getrusage(int who, \
                           struct rusage50 *rusage); }
365     STD             { int|linux_sys||wait4(int pid, int *status, \
                           int options, struct rusage50 *rusage); }
366     UNIMPL          adjtimex
367     NOARGS          { int|sys||__getcwd(char *bufp, size_t length); }
368     UNIMPL          capget
369     UNIMPL          capset
370     UNIMPL          sendfile
371     UNIMPL          setresgid
372     UNIMPL          getresgid
373     UNIMPL          sys_dipc
374     UNIMPL          pivot_root
375     NOARGS          { int|sys||mincore(void *addr, size_t len, char *vec); }
376     UNIMPL          pciconfig_iobase
377     STD             { int|linux_sys||getdents64(int fd, \
                           struct linux_dirent64 *dent, unsigned int count); }
378     NOARGS          { pid_t|linux_sys||gettid(void); }
379     STD             { ssize_t|linux_sys||readahead(int fd, off_t offset, \
                           size_t count); }
380     UNIMPL          /* unused */
381     STD             { int|linux_sys||tkill(int tid, int sig); }
382     STD             { int|linux_sys||setxattr(char *path, char *name, \
                           void *value, size_t size, int flags); }
383     STD             { int|linux_sys||lsetxattr(char *path, char *name, \
                           void *value, size_t size, int flags); }
384     STD             { int|linux_sys||fsetxattr(int fd, char *name, \
                           void *value, size_t size, int flags); }
385     STD             { ssize_t|linux_sys||getxattr(char *path, char *name, \
                           void *value, size_t size); }
386     STD             { ssize_t|linux_sys||lgetxattr(char *path, char *name, \
                           void *value, size_t size); }
387     STD             { ssize_t|linux_sys||fgetxattr(int fd, char *name, \
                           void *value, size_t size); }
388     STD             { ssize_t|linux_sys||listxattr(char *path, char *list, \
                           size_t size); }
389     STD             { ssize_t|linux_sys||llistxattr(char *path, char *list, \
                           size_t size); }
390     STD             { ssize_t|linux_sys||flistxattr(int fd, char *list, \
                           size_t size); }
391     STD             { int|linux_sys||removexattr(char *path, char *name); }
392     STD             { int|linux_sys||lremovexattr(char *path, char *name); }
393     STD             { int|linux_sys||fremovexattr(int fd, char *name); }
394     STD             { int|linux_sys||futex(int *uaddr, int op, int val, \
                           const struct linux_timespec *timeout, int *uaddr2, \
                           int val3); }
395     STD             { int|linux_sys||sched_setaffinity(pid_t pid, \
                           unsigned int len, unsigned long *mask); }
396     STD             { int|linux_sys||sched_getaffinity(pid_t pid, \
                           unsigned int len, unsigned long *mask); }
397     UNIMPL          tuxcall
398     UNIMPL          io_setup
399     UNIMPL          io_destroy
400     UNIMPL          io_getevents
401     UNIMPL          io_submit
402     UNIMPL          io_cancel
403     UNIMPL          /* unused */
404     UNIMPL          /* unused */
405     STD             { int|linux_sys||exit_group(int error_code); }
406     UNIMPL          lookup_dcookie
407     STD             { int|linux_sys||epoll_create(int size); }
408     STD             { int|linux_sys||epoll_ctl(int epfd, int op, int fd, \
                           struct linux_epoll_event *event); }
409     STD             { int|linux_sys||epoll_wait(int epfd, \
                           struct linux_epoll_event *events, int maxevents, \
                           int timeout); }
410     UNIMPL          remap_file_pages
411     STD             { int|linux_sys||set_tid_address(int *tid); }
412     UNIMPL          restart_syscall
413     STD             { int|linux_sys||fadvise64(int fd, off_t offset, \
                           size_t len, int advice); }
414     STD             { int|linux_sys||timer_create(clockid_t clockid, \
                           struct linux_sigevent *evp, timer_t *timerid); }
415     STD             { int|linux_sys||timer_settime(timer_t timerid, \
                           int flags, const struct linux_itimerspec *tim, \
                           struct linux_itimerspec *otim); }
416     STD             { int|linux_sys||timer_gettime(timer_t timerid, \
                           struct linux_itimerspec *tim); }
417     NOARGS          { int|sys||timer_getoverrun(timer_t timerid); }
418     NOARGS          { int|sys||timer_delete(timer_t timerid); }
419     STD             { int|linux_sys||clock_settime(clockid_t which, \
                           struct linux_timespec *tp); }
420     STD             { int|linux_sys||clock_gettime(clockid_t which, \
                           struct linux_timespec *tp); }
421     STD             { int|linux_sys||clock_getres(clockid_t which, \
                           struct linux_timespec *tp); }
422     STD             { int|linux_sys||clock_nanosleep(clockid_t which, \
                           int flags, struct linux_timespec *rqtp, \
                           struct linux_timespec *rmtp); }
423     UNIMPL          semtimedop
424     STD             { int|linux_sys||tgkill(int tgid, int tid, int sig); }
425     STD             { int|linux_sys||stat64(const char *path, \
                           struct linux_stat64 *sp); }
426     STD             { int|linux_sys||lstat64(const char *path, \
                           struct linux_stat64 *sp); }
427     STD             { int|linux_sys||fstat64(int fd, \
                           struct linux_stat64 *sp); }
428     UNIMPL          vserver
429     UNIMPL          mbind
430     UNIMPL          get_mempolicy
431     UNIMPL          set_mempolicy
432     STD             { linux_mqd_t|linux_sys||mq_open(const char *name, \
                           int oflag, linux_umode_t mode, \
                           struct linux_mq_attr *attr); }
433     STD             { int|linux_sys||mq_unlink(const char *name); }
434     STD             { int|linux_sys||mq_timedsend(linux_mqd_t mqdes, \
                           const char *msg_ptr, size_t msg_len, \
                           unsigned int msg_prio, \
                           const struct linux_timespec *abs_timeout); }
435     STD             { ssize_t|linux_sys||mq_timedreceive(linux_mqd_t mqdes, \
                           char *msg_ptr, size_t msg_len, \
                           unsigned int *msg_prio, \
                           const struct linux_timespec *abs_timeout); }
436     STD             { int|linux_sys||mq_notify(linux_mqd_t mqdes, \
                           const struct linux_sigevent *sevp); }
437     STD             { int|linux_sys||mq_getsetattr(linux_mqd_t mqdes, \
                           const struct linux_mq_attr *newattr, \
                           struct linux_mq_attr *oldattr); }
438     STD             { int|linux_sys||waitid(int idtype, id_t id, \
                           linux_siginfo_t *infop, int options, \
                           struct rusage50 *rusage); }
439     UNIMPL          add_key
440     UNIMPL          request_key
441     UNIMPL          keyctl
442     UNIMPL          ioprio_set
443     UNIMPL          ioprio_get
444     STD             { int|linux_sys||inotify_init(void); }
445     STD             { int|linux_sys||inotify_add_watch(int fd, \
                           const char *pathname, uint32_t mask); }
446     STD             { int|linux_sys||inotify_rm_watch(int fd, int wd); }
447     UNIMPL          fdatasync
448     UNIMPL          kexec_load
449     UNIMPL          migrate_pages
450     STD             { int|linux_sys||openat(int fd, const char *path, \
                           int flags, ... linux_umode_t mode); }
451     NOARGS          { int|sys||mkdirat(int fd, const char *path, \
                           linux_umode_t mode); }
452     STD             { int|linux_sys||mknodat(int fd, const char *path, \
                           linux_umode_t mode, unsigned dev); }
453     STD             { int|linux_sys||fchownat(int fd, const char *path, \
                           uid_t owner, gid_t group, int flag); }
454     UNIMPL          futimesat
455     STD             { int|linux_sys||fstatat64(int fd, const char *path, \
                           struct linux_stat64 *sp, int flag); }
456     STD             { int|linux_sys||unlinkat(int fd, const char *path, \
                           int flag); }
457     NOARGS          { int|sys||renameat(int fromfd, const char *from, \
                           int tofd, const char *to); }
458     STD             { int|linux_sys||linkat(int fd1, const char *name1, \
                           int fd2, const char *name2, int flags); }
459     NOARGS          { int|sys||symlinkat(const char *path1, int fd, \
                           const char *path2); }
460     NOARGS          { ssize_t|sys||readlinkat(int fd, const char *path, \
                           char *buf, size_t bufsize); }
461     STD             { int|linux_sys||fchmodat(int fd, const char *path, \
                           linux_umode_t mode); }
462     STD             { int|linux_sys||faccessat(int fd, const char *path, \
                           int amode); }
463     STD             { int|linux_sys||pselect6(int nfds, fd_set *readfds, \
                          fd_set *writefds, fd_set *exceptfds, \
                          struct linux_timespec *timeout, \
                          linux_sized_sigset_t *ss); }
464     STD             { int|linux_sys||ppoll(struct pollfd *fds, u_int nfds, \
                           struct linux_timespec *timeout, \
                           linux_sigset_t *sigset); }
465     UNIMPL          unshare
                       ;
                       ; The NetBSD native robust list calls have different
                       ; argument names / types, but they are ABI-compatible
                       ; with Linux.
                       ;
466     NOARGS          { int|sys||__futex_set_robust_list(void *head, \
                           size_t len); }
467     NOARGS          { int|sys||__futex_get_robust_list(lwpid_t lwpid, \
                           void **headp, size_t *lenp); }
468     UNIMPL          splice
469     STD             { int|linux_sys||sync_file_range(int fd, \
                           off_t offset, off_t nbytes, unsigned int flags); }
470     UNIMPL          tee
471     UNIMPL          vmsplice
472     UNIMPL          move_pages
473     STD             { int|linux_sys||getcpu(unsigned int *cpu, \
                           unsigned int *node, \
                           struct linux_getcpu_cache *tcache); }
474     STD             { int|linux_sys||epoll_pwait(int epfd, \
                           struct linux_epoll_event *events, int maxevents, \
                           int timeout, const linux_sigset_t *sigmask); }
475     STD             { int|linux_sys||utimensat(int fd, const char *path, \
                           struct linux_timespec *times, int flag); }
476     UNIMPL          signalfd
477     UNIMPL          timerfd
478     STD             { int|linux_sys||eventfd(unsigned int initval); }
479     STD             { int|linux_sys||recvmmsg(int s, \
                           struct linux_mmsghdr *msgvec, unsigned int vlen, \
                           unsigned int flags, struct timespec *timeout); }
480     STD             { int|linux_sys||fallocate(int fd, int mode, \
                           off_t offset, off_t len); }
481     STD             { int|linux_sys||timerfd_create(clockid_t clock_id, \
                           int flags); }
482     STD             { int|linux_sys||timerfd_settime(int fd, int flags, \
                           const struct linux_itimerspec *tim, \
                           struct linux_itimerspec *otim); }
483     STD             { int|linux_sys||timerfd_gettime(int fd, \
                           struct linux_itimerspec *tim); }
484     UNIMPL          signalfd4
485     STD             { int|linux_sys||eventfd2(unsigned int initval, \
                           int flags); }
486     STD             { int|linux_sys||epoll_create1(int flags); }
487     STD             { int|linux_sys||dup3(int from, int to, int flags); }
488     STD             { int|linux_sys||pipe2(int *pfds, int flags); }
489     STD             { int|linux_sys||inotify_init1(int flags); }
490     STD             { int|linux_sys||preadv(int fd, \
                           const struct iovec *iovp, int iovcnt, \
                           unsigned long off_lo, unsigned long off_hi); }
491     STD             { int|linux_sys||pwritev(int fd, \
                           const struct iovcnt *iovp, int iovcnt, \
                           unsigned long off_lo, unsigned long off_hi); }
492     UNIMPL          rt_tgsigqueueinfo
493     UNIMPL          perf_counter_open
494     UNIMPL          fanotify_init
495     UNIMPL          fanotify_mark
496     STD             { int|linux_sys||prlimit64(pid_t pid, int which, \
                           struct rlimit *new_rlp, struct rlimit *old_rlp); }
497     UNIMPL          name_to_handle_at
498     UNIMPL          open_by_handle_at
499     UNIMPL          clock_adjtime
500     STD             { int|linux_sys||syncfs(int fd); }
501     UNIMPL          setns
502     STD             { int|linux_sys||accept4(int s, \
                           struct osockaddr *name, \
                           int *anamelen, int flags); }
503     STD             { int|linux_sys||sendmmsg(int s, \
                           struct linux_mmsghdr *msgvec, unsigned int vlen, \
                           unsigned int flags); }
504     UNIMPL          process_vm_readv
505     UNIMPL          process_vm_writev
506     UNIMPL          kcmp
507     UNIMPL          finit_module
508     UNIMPL          sched_setattr
509     UNIMPL          sched_getattr
510     STD             { int|linux_sys||renameat2(int fromfd, \
                           const char *from, int tofd, const char *to, \
                           unsigned int flags); }
511     UNIMPL
512     UNIMPL
513     UNIMPL
514     UNIMPL
515     UNIMPL
516     UNIMPL
517     UNIMPL
518     UNIMPL
519     STD             { ssize_t|linux_sys||copy_file_range(int fd_in, \
                       off_t * off_in, int fd_out, off_t * off_out, \
                       size_t len, unsigned int flags); }
520     UNIMPL
521     UNIMPL
522     STD             { int|linux_sys||statx(int fd, const char *path, \
                           int flag, unsigned int mask, \
                           struct linux_statx *sp); }
523     UNIMPL
524     UNIMPL
525     UNIMPL
526     UNIMPL
527     UNIMPL
528     UNIMPL
529     UNIMPL
530     UNIMPL
531     UNIMPL
532     UNIMPL
533     UNIMPL
534     UNIMPL
535     UNIMPL
536     UNIMPL
537     UNIMPL
538     UNIMPL
539     UNIMPL
540     UNIMPL
541     UNIMPL
542     UNIMPL
543     UNIMPL
544     UNIMPL
545     STD             { int|linux_sys||clone3( \
                            struct linux_user_clone3_args *cl_args, \
                            size_t size); }
546     STD             { int|linux_sys||close_range(unsigned int first, \
                           unsigned int last, unsigned int flags); }
547     UNIMPL
548     UNIMPL
549     STD             { int|linux_sys||faccessat2(int fd, const char *path, \
                           int amode, int flags); }
550     UNIMPL
551     STD             { int|linux_sys||epoll_pwait2(int epfd, \
                           struct linux_epoll_event *events, int maxevents, \
                           const struct linux_timespec *timeout, \
                           const linux_sigset_t *sigmask); }