NetBSD/sys/compat/linux/arch/amd64/syscalls.master
2006-06-10 21:15:33 +00:00

436 lines
17 KiB
Plaintext

$NetBSD: syscalls.master,v 1.11 2006/06/10 21:15:33 christos Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
; NetBSD amd64 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.
#if defined(_KERNEL_OPT)
#include "opt_sysv.h"
#include "opt_compat_43.h"
#endif
#include <sys/param.h>
#include <sys/poll.h>
#include <sys/systm.h>
#include <sys/signal.h>
#include <sys/mount.h>
#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
#include <compat/linux/common/linux_mmap.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/common/linux_signal.h>
#include <compat/linux/common/linux_siginfo.h>
#include <compat/linux/common/linux_machdep.h>
#include <compat/linux/linux_syscallargs.h>
%%
0 NOARGS { int sys_read(int fd, char *buf, u_int nbyte); }
1 NOARGS { int sys_write(int fd, char *buf, u_int nbyte); }
2 STD { int linux_sys_open(const char *path, int flags, \
int mode); }
3 NOARGS { int sys_close(int fd); }
4 STD { int linux_sys_stat64(const char *path, \
struct linux_stat *sp); }
5 STD { int linux_sys_fstat64(int fd, \
struct linux_stat *sp); }
6 STD { int linux_sys_lstat64(const char *path, \
struct linux_stat *sp); }
7 NOARGS { int sys_poll(struct pollfd *fds, u_int nfds, \
int timeout); }
8 NOARGS { long compat_43_sys_lseek(int fd, long offset, \
int whence); }
9 NOARGS { linux_off_t linux_sys_mmap(unsigned long addr, \
size_t len, int prot, int flags, int fd, \
linux_off_t offset); }
10 STD { int linux_sys_mprotect(const void *start, \
unsigned long len, int prot); }
11 NOARGS { int sys_munmap(caddr_t addr, int len); }
12 STD { int linux_sys_brk(char *nsize); }
13 STD { int linux_sys_rt_sigaction(int signum, \
const struct linux_sigaction *nsa, \
struct linux_sigaction *osa, \
size_t sigsetsize); }
14 STD { int linux_sys_rt_sigprocmask(int how, \
const linux_sigset_t *set, \
linux_sigset_t *oset, \
size_t sigsetsize); }
15 NOARGS { int linux_sys_rt_sigreturn(void); }
16 STD { int linux_sys_ioctl(int fd, u_long com, \
caddr_t data); }
17 STD { int linux_sys_pread(int fd, char *buf, \
size_t nbyte, linux_off_t offset); }
18 STD { int linux_sys_pwrite(int fd, char *buf, \
size_t nbyte, linux_off_t offset); }
19 NOARGS { int sys_readv(int fd, struct iovec *iovp, \
u_int iovcnt); }
20 NOARGS { int sys_writev(int fd, struct iovec *iovp, \
u_int iovcnt); }
21 STD { int linux_sys_access(const char *path, int flags); }
22 STD { int linux_sys_pipe(int *pfds); }
23 STD { int linux_sys_select(int nfds, fd_set *readfds, \
fd_set *writefds, fd_set *exceptfds, \
struct timeval *timeout); }
24 STD { int linux_sys_sched_yield(void); }
25 STD { void *linux_sys_mremap(void *old_address, \
size_t old_size, size_t new_size, u_long flags); }
26 STD { int linux_sys_msync(caddr_t addr, int len, int fl); }
27 NOARGS { int sys_mincore(void *addr, size_t len, char *vec); }
28 NOARGS { int sys_madvise(void *addr, size_t len, int behav); }
#ifdef SYSVSHM
29 STD { int linux_sys_shmget(key_t key, size_t size, int shmflg); }
30 STD { int linux_sys_shmat(int shmid, void *shmaddr, \
int shmflg, u_long *raddr); }
31 STD { int linux_sys_shmctl(int shmid, int cmd, \
struct linux_shmid_ds *buf); }
#else
29 UNIMPL shmget
30 UNIMPL shmat
31 UNIMPL shmctl
#endif
32 NOARGS { int sys_dup(u_int fd); }
33 NOARGS { int sys_dup2(u_int from, u_int to); }
34 STD { int linux_sys_pause(void); }
35 NOARGS { int sys_nanosleep(const struct timespec *rqtp, \
struct timespec *rmtp); }
36 NOARGS { int sys_getitimer(u_int which, \
struct itimerval *itv); }
37 STD { int linux_sys_alarm(unsigned int secs); }
38 NOARGS { int sys_setitimer(u_int which, \
struct itimerval *itv, struct itimerval *oitv); }
39 NOARGS MPSAFE { pid_t sys_getpid(void); }
40 UNIMPL sendfile
41 STD { int linux_sys_socket(int domain, \
int type, int protocol); }
42 STD { int linux_sys_connect(int s, \
const struct osockaddr *name, \
unsigned int namelen); }
43 STD { int linux_sys_accept(int s, struct osockaddr *name, \
int *anamelen); } oaccept
44 STD { ssize_t linux_sys_sendto(int s, void *msg, int len, \
int flags, struct osockaddr *to, int tolen); }
45 STD { ssize_t linux_sys_recvfrom(int s, void *buf, \
size_t len, int flags, struct osockaddr *from, \
unsigned int *fromlenaddr); }
46 STD { int linux_sys_sendmsg(int s, \
const struct msghdr *msg, int flags); }
47 STD { ssize_t linux_sys_recvmsg(int s, \
struct msghdr *msg, int flags); }
48 NOARGS { int sys_shutdown(int s, int how); }
49 STD { int linux_sys_bind(int s, \
const struct osockaddr *name, \
unsigned int namelen); }
50 NOARGS { int sys_listen(int s, int backlog); }
51 STD { int linux_sys_getsockname(int fdec, caddr_t asa, \
int *alen); }
52 STD { int linux_sys_getpeername(int fdes, \
struct sockaddr *asa, unsigned int *alen); }
53 STD { int linux_sys_socketpair(int domain, int type, \
int protocol, int *rsv); }
54 STD { int linux_sys_setsockopt(int s, int level, \
int optname, void *optval, int optlen); }
55 STD { int linux_sys_getsockopt(int s, int level, \
int optname, void *optval, int *optlen); }
56 STD { int linux_sys_clone(int flags, void *stack, \
void *parent_tidptr, void *child_tidptr); }
57 NOARGS { int sys_fork(void); }
58 NOARGS { int sys___vfork14(void); }
59 STD { int linux_sys_execve(const char *path, char **argp, \
char **envp); }
60 NOARGS { int sys_exit(int rval); }
61 STD { int linux_sys_wait4(int pid, int *status, \
int options, struct rusage *rusage); }
62 STD { int linux_sys_kill(int pid, int signum); }
63 STD { int linux_sys_uname(struct linux_utsname *up); }
#ifdef SYSVSEM
64 NOARGS { int sys_semget(key_t key, int nsems, int semflg); }
65 NOARGS { int sys_semop(int semid, struct sembuf *sops, \
size_t nsops); }
66 STD { int linux_sys_semctl(int semid, int semnum, \
int cmd, union linux_semun arg); }
#else
64 UNIMPL semget
65 UNIMPL semop
66 UNIMPL semctl
#endif
#ifdef SYSVSHM
67 NOARGS { int sys_shmdt(const void *shmaddr); }
#else
67 UNIMPL shmdt
#endif
#ifdef SYSVMSG
68 NOARGS { int sys_msgget(key_t key, int msgflg); }
69 NOARGS { int sys_msgsnd(int msqid, void *msgp, size_t msgsz, \
int msgflg); }
70 NOARGS { ssize_t sys_msgrcv(int msqid, void *msgp, \
size_t msgsz, long msgtyp, int msgflg); }
71 STD { int linux_sys_msgctl(int msqid, int cmd, \
struct linux_msqid_ds *buf); }
#else
68 UNIMPL msgget
69 UNIMPL msgsnd
70 UNIMPL msgrcv
71 UNIMPL msgctl
#endif
72 STD { int linux_sys_fcntl(int fd, int cmd, void *arg); }
73 NOARGS { int sys_flock(int fd, int how); }
74 NOARGS { int sys_fsync(int fd); }
75 STD { int linux_sys_fdatasync(int fd); }
76 STD { int linux_sys_truncate64(const char *path, \
off_t length); }
77 STD { int linux_sys_ftruncate64(unsigned int fd, \
off_t length); }
78 STD { int linux_sys_getdents(int fd, \
struct linux_dirent *dent, unsigned int count); }
79 NOARGS { int sys___getcwd(char *bufp, size_t length); }
80 STD { int linux_sys_chdir(const char *path); }
81 NOARGS { int sys_fchdir(int fd); }
82 STD { int linux_sys_rename(const char *from, \
const char *to); }
83 STD { int linux_sys_mkdir(const char *path, int mode); }
84 STD { int linux_sys_rmdir(const char *path); }
85 STD { int linux_sys_creat(const char *path, int mode); }
86 STD { int linux_sys_link(const char *path, \
const char *link); }
87 STD { int linux_sys_unlink(const char *path); }
88 STD { int linux_sys_symlink(const char *path, \
const char *to); }
89 STD { int linux_sys_readlink(const char *name, char *buf, \
int count); }
90 STD { int linux_sys_chmod(const char *path, int mode); }
91 NOARGS { int sys_fchmod(int fd, int mode); }
92 STD { int linux_sys_chown(const char *path, uid_t uid, \
gid_t gid); }
93 NOARGS { int sys___posix_fchown(int fd, uid_t uid, \
gid_t gid); }
94 STD { int linux_sys_lchown(const char *path, uid_t uid, \
gid_t gid); }
95 NOARGS { int sys_umask(int newmask); }
96 STD { int linux_sys_gettimeofday(struct timeval *tp, \
struct timezone *tzp); }
97 STD { int linux_sys_getrlimit(int which, \
struct rlimit *rlp); }
98 NOARGS { int sys_getrusage(int who, struct rusage *rusage); }
99 STD { int linux_sys_sysinfo(struct linux_sysinfo *arg); }
100 STD { int linux_sys_times(struct times *tms); }
101 STD { int linux_sys_ptrace(long request, long pid, \
long addr, long data); }
102 NOARGS { uid_t sys_getuid(void); }
103 UNIMPL syslog
104 NOARGS { gid_t sys_getgid(void); }
105 NOARGS { void sys_setuid(uid_t uid); }
106 NOARGS { void sys_setgid(gid_t gid); }
107 NOARGS { uid_t sys_geteuid(void); }
108 NOARGS { gid_t sys_getegid(void); }
109 NOARGS { int sys_setpgid(int pid, int pgid); }
110 NOARGS { pid_t sys_getppid(void); }
111 NOARGS { int sys_getpgrp(void); }
112 NOARGS { int sys_setsid(void); }
113 NOARGS { int sys_setreuid(uid_t ruid, uid_t euid); }
114 NOARGS { int sys_setregid(gid_t rgid, gid_t egid); }
115 NOARGS { int sys_getgroups(u_int gidsetsize, gid_t *gidset); }
116 NOARGS { int sys_setgroups(u_int gidsetsize, gid_t *gidset); }
117 STD { int linux_sys_setresuid(uid_t ruid, uid_t euid, \
uid_t suid); }
118 STD { int linux_sys_getresuid(uid_t *ruid, uid_t *euid, \
uid_t *suid); }
119 STD { int linux_sys_setresgid(gid_t rgid, gid_t egid, \
gid_t sgid); }
120 STD { int linux_sys_getresgid(gid_t *rgid, gid_t *egid, \
gid_t *sgid); }
121 STD { int linux_sys_getpgid(int pid); }
122 STD { int linux_sys_setfsuid(uid_t uid); }
123 STD { int linux_sys_getfsuid(void); }
124 NOARGS { pid_t sys_getsid(pid_t pid); }
125 UNIMPL capget
126 UNIMPL capset
127 STD { int linux_sys_rt_sigpending( \
linux_sigset_t *set, \
size_t sigsetsize); }
128 UNIMPL rt_sigtimedwait
129 STD { int linux_sys_rt_queueinfo(int pid, int signum, \
siginfo_t *uinfo); }
130 STD { int linux_sys_rt_sigsuspend(linux_sigset_t *unewset, \
size_t sigsetsize); }
131 STD { int linux_sys_sigaltstack( \
const struct linux_sigaltstack *ss, \
struct linux_sigaltstack *oss); }
132 STD { int linux_sys_utime(const char *path, \
struct linux_utimbuf *times); }
133 STD { int linux_sys_mknod(const char *path, int mode, \
int dev); }
#ifdef EXEC_AOUT
134 STD { int linux_sys_uselib(const char *path); }
#else
134 UNIMPL sys_uselib
#endif
135 STD { int linux_sys_personality(int per); }
136 UNIMPL ustat
137 STD { int linux_sys_statfs64(const char *path, \
size_t sz, struct linux_statfs64 *sp); }
138 STD { int linux_sys_fstatfs64(int fd, \
size_t sz, struct linux_statfs64 *sp); }
139 UNIMPL sysfs
140 STD { int linux_sys_getpriority(int which, int who); }
141 NOARGS { int sys_setpriority(int which, int who, int prio); }
142 STD { int linux_sys_sched_setparam(pid_t pid, \
const struct linux_sched_param *sp); }
143 STD { int linux_sys_sched_getparam(pid_t pid, \
struct linux_sched_param *sp); }
144 STD { int linux_sys_sched_setscheduler(pid_t pid, \
int policy, const struct linux_sched_param *sp); }
145 STD { int linux_sys_sched_getscheduler(pid_t pid); }
146 STD { int linux_sys_sched_get_priority_max(int policy); }
147 STD { int linux_sys_sched_get_priority_min(int policy); }
148 UNIMPL sys_sched_rr_get_interval
149 NOARGS { int sys_mlock(caddr_t addr, size_t len); }
150 NOARGS { int sys_munlock(caddr_t addr, size_t len); }
151 NOARGS { int sys_mlockall(int flags); }
152 NOARGS { int sys_munlockall(void); }
153 UNIMPL vhangup
154 STD { int linux_sys_modify_ldt(int func, void *ptr, \
size_t bytecount); }
155 UNIMPL pivot_root
156 STD { int linux_sys___sysctl(struct linux___sysctl *lsp); }
157 UNIMPL prctl
158 STD { int linux_sys_arch_prctl(int code, \
unsigned long addr); }
159 UNIMPL adjtimex
160 STD { int linux_sys_setrlimit(u_int which, \
struct rlimit *rlp); }
161 NOARGS { int sys_chroot(char *path); }
162 NOARGS { int sys_sync(void); }
163 NOARGS { int sys_acct(char *path); }
164 STD { int linux_sys_settimeofday(struct timeval *tp, \
struct timezone *tzp); }
165 UNIMPL mount
166 UNIMPL umount2
167 STD { int linux_sys_swapon(char *name); }
168 STD { int linux_sys_swapoff(const char *path); }
169 STD { int linux_sys_reboot(int magic1, int magic2, \
int cmd, void *arg); }
170 NOARGS { int compat_43_sys_sethostname(char *hostname, \
u_int len);}
171 STD { int linux_sys_setdomainname(char *domainname, \
int len); }
172 STD { int linux_sys_iopl(int level); }
173 STD { int linux_sys_ioperm(unsigned int lo, \
unsigned int hi, int val); }
174 UNIMPL create_module
175 UNIMPL init_module
176 UNIMPL delete_module
177 UNIMPL get_kernel_syms
178 UNIMPL query_module
179 UNIMPL quotactl
180 UNIMPL nfsservctl
181 UNIMPL getpmsg
182 UNIMPL putpmsg
183 UNIMPL afs_syscall
184 UNIMPL tuxcall
185 UNIMPL security
186 STD { pid_t linux_sys_gettid(void); }
187 UNIMPL readahead
188 STD { int linux_sys_setxattr(char *path, char *name, \
void *value, size_t size, int flags); }
189 STD { int linux_sys_lsetxattr(char *path, char *name, \
void *value, size_t size, int flags); }
190 STD { int linux_sys_fsetxattr(int fd, char *name, \
void *value, size_t size, int flags); }
191 STD { ssize_t linux_sys_getxattr(char *path, char *name, \
void *value, size_t size); }
192 STD { ssize_t linux_sys_lgetxattr(char *path, char *name, \
void *value, size_t size); }
193 STD { ssize_t linux_sys_fgetxattr(int fd, char *name, \
void *value, size_t size); }
194 STD { ssize_t linux_sys_listxattr(char *path, char *list, \
size_t size); }
195 STD { ssize_t linux_sys_llistxattr(char *path, char *list, \
size_t size); }
196 STD { ssize_t linux_sys_flistxattr(int fd, char *list, \
size_t size); }
197 STD { int linux_sys_removexattr(char *path, char *name); }
198 STD { int linux_sys_lremovexattr(char *path, char *name); }
199 STD { int linux_sys_fremovexattr(int fd, char *name); }
200 STD { int linux_sys_tkill(int tid, int sig); }
201 STD { int linux_sys_time(linux_time_t *t); }
202 STD { int linux_sys_futex(int *uaddr, int op, int val, \
const struct timespec *timeout, int *uaddr2, \
int val3); }
203 STD { int linux_sys_sched_setaffinity(pid_t pid, \
unsigned int len, unsigned long *mask); }
204 STD { int linux_sys_sched_getaffinity(pid_t pid, \
unsigned int len, unsigned long *mask); }
205 UNIMPL set_thread_area
206 UNIMPL io_setup
207 UNIMPL io_destroy
208 UNIMPL io_getevents
209 UNIMPL io_submit
210 UNIMPL io_cancel
211 UNIMPL get_thread_area
212 UNIMPL lookup_dcookie
213 UNIMPL epoll_create
214 UNIMPL epoll_ctl_old
215 UNIMPL epoll_wait_old
216 UNIMPL remap_file_pages
217 STD { int linux_sys_getdents64(int fd, \
struct linux_dirent64 *dent, unsigned int count); }
218 STD { int linux_sys_set_tid_address(int *tid); }
219 UNIMPL restart_syscall
220 UNIMPL semtimedop
221 UNIMPL fadvise64
222 UNIMPL timer_create
223 UNIMPL timer_settime
224 UNIMPL timer_gettime
225 UNIMPL timer_getoverrun
226 UNIMPL timer_delete
227 STD { int linux_sys_clock_settime(clockid_t which, \
struct linux_timespec *tp); }
228 STD { int linux_sys_clock_gettime(clockid_t which, \
struct linux_timespec *tp); }
229 STD { int linux_sys_clock_getres(clockid_t which, \
struct linux_timespec *tp); }
230 STD { int linux_sys_clock_nanosleep(clockid_t which, \
int flags, struct linux_timespec *rqtp, \
struct linux_timespec *rmtp); }
231 STD { int linux_sys_exit_group(int error_code); }
232 UNIMPL epoll_wait
233 UNIMPL epoll_ctl
234 STD { int linux_sys_tgkill(int tgid, int tid, int sig); }
235 UNIMPL utimes
236 UNIMPL vserver
; Not really syscall 237, but we need it to be defined somewhere
237 STD { int linux_sys_nosys(void); }