syscalls.master revision 1.1 1 $NetBSD: syscalls.master,v 1.1 2005/05/03 16:26:30 manu Exp $
2
3 ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
4
5 ; NetBSD amd64 COMPAT_LINUX system call name/number "master" file.
6 ; (See syscalls.conf to see what it is processed into.)
7 ;
8 ; Fields: number type [type-dependent ...]
9 ; number system call number, must be in order
10 ; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
11 ; the compatibility options defined in syscalls.conf.
12 ;
13 ; types:
14 ; STD always included
15 ; OBSOL obsolete, not included in system
16 ; UNIMPL unimplemented, not included in system
17 ; NODEF included, but don't define the syscall number
18 ; NOARGS included, but don't define the syscall args structure
19 ; INDIR included, but don't define the syscall args structure
20 ; and allow it to be "really" varargs.
21 ;
22 ; The compat options are defined in the syscalls.conf file, and the
23 ; compat option name is prefixed to the syscall name. Other than
24 ; that, they're like NODEF (for 'compat' options), or STD (for
25 ; 'libcompat' options).
26 ;
27 ; The type-dependent arguments are as follows:
28 ; For STD, NODEF, NOARGS, and compat syscalls:
29 ; { pseudo-proto } [alias]
30 ; For other syscalls:
31 ; [comment]
32 ;
33 ; #ifdef's, etc. may be included, and are copied to the output files.
34 ; #include's are copied to the syscall names and switch definition files only.
35
36 #if defined(_KERNEL_OPT)
37 #include "opt_compat_43.h"
38 #endif
39
40 #include <sys/param.h>
41 #include <sys/poll.h>
42 #include <sys/systm.h>
43 #include <sys/signal.h>
44 #include <sys/mount.h>
45 #include <sys/sa.h>
46 #include <sys/syscallargs.h>
47
48 #include <compat/linux/common/linux_types.h>
49 #include <compat/linux/common/linux_mmap.h>
50 #include <compat/linux/common/linux_signal.h>
51 #include <compat/linux/common/linux_siginfo.h>
52 #include <compat/linux/common/linux_machdep.h>
53
54 #include <compat/linux/linux_syscallargs.h>
55
56 %%
57
58 0 NOARGS { int sys_read(int fd, char *buf, u_int nbyte); }
59 1 NOARGS { int sys_write(int fd, char *buf, u_int nbyte); }
60 2 STD { int linux_sys_open(const char *path, int flags, \
61 int mode); }
62 3 NOARGS { int sys_close(int fd); }
63 4 STD { int linux_sys_stat64(const char *path, \
64 struct linux_stat *sp); }
65 5 STD { int linux_sys_fstat64(int fd, \
66 struct linux_stat *sp); }
67 6 STD { int linux_sys_lstat64(const char *path, \
68 struct linux_stat *sp); }
69 7 NOARGS { int sys_poll(struct pollfd *fds, u_int nfds, \
70 int timeout); }
71 8 NOARGS { long compat_43_sys_lseek(int fd, long offset, \
72 int whence); }
73 9 NOARGS { linux_off_t linux_sys_mmap(unsigned long addr, \
74 size_t len, int prot, int flags, int fd, \
75 linux_off_t offset); }
76 10 STD { int linux_sys_mprotect(const void *start, \
77 unsigned long len, int prot); }
78 11 NOARGS { int sys_munmap(caddr_t addr, int len); }
79 12 STD { int linux_sys_brk(char *nsize); }
80 13 STD { int linux_sys_rt_sigaction(int signum, \
81 const struct linux_sigaction *nsa, \
82 struct linux_sigaction *osa, \
83 size_t sigsetsize); }
84 14 STD { int linux_sys_rt_sigprocmask(int how, \
85 const linux_sigset_t *set, \
86 linux_sigset_t *oset, \
87 size_t sigsetsize); }
88 15 STD { int linux_sys_rt_sigreturn( \
89 struct linux_ucontext *ucp); }
90 16 STD { int linux_sys_ioctl(int fd, u_long com, \
91 caddr_t data); }
92 17 STD { int linux_sys_pread(int fd, char *buf, \
93 size_t nbyte, linux_off_t offset); }
94 18 STD { int linux_sys_pwrite(int fd, char *buf, \
95 size_t nbyte, linux_off_t offset); }
96 19 NOARGS { int sys_readv(int fd, struct iovec *iovp, \
97 u_int iovcnt); }
98 20 NOARGS { int sys_writev(int fd, struct iovec *iovp, \
99 u_int iovcnt); }
100 21 STD { int linux_sys_access(const char *path, int flags); }
101 22 STD { int linux_sys_pipe(int *pfds); }
102 23 STD { int linux_sys_select(int nfds, fd_set *readfds, \
103 fd_set *writefds, fd_set *exceptfds, \
104 struct timeval *timeout); }
105 24 STD { int linux_sys_sched_yield(void); }
106 25 STD { void *linux_sys_mremap(void *old_address, \
107 size_t old_size, size_t new_size, u_long flags); }
108 26 STD { int linux_sys_msync(caddr_t addr, int len, int fl); }
109 27 NOARGS { int sys_mincore(void *addr, size_t len, char *vec); }
110 28 NOARGS { int sys_madvise(void *addr, size_t len, int behav); }
111 29 UNIMPL shmget
112 30 UNIMPL shmat
113 31 UNIMPL shmctl
114 32 NOARGS { int sys_dup(u_int fd); }
115 33 NOARGS { int sys_dup2(u_int from, u_int to); }
116 34 STD { int linux_sys_pause(void); }
117 35 NOARGS { int sys_nanosleep(const struct timespec *rqtp, \
118 struct timespec *rmtp); }
119 36 NOARGS { int sys_getitimer(u_int which, \
120 struct itimerval *itv); }
121 37 STD { int linux_sys_alarm(unsigned int secs); }
122 38 NOARGS { int sys_setitimer(u_int which, \
123 struct itimerval *itv, struct itimerval *oitv); }
124 39 NOARGS MPSAFE { pid_t sys_getpid(void); }
125 40 UNIMPL sendfile
126 41 STD { int linux_sys_socket(int domain, \
127 int type, int protocol); }
128 42 STD { int linux_sys_connect(int s, \
129 const struct osockaddr *name, \
130 unsigned int namelen); }
131 43 STD { int linux_sys_accept(int s, struct osockaddr *name, \
132 int *anamelen); } oaccept
133 44 STD { ssize_t linux_sys_sendto(int s, void *msg, int len, \
134 int flags, struct osockaddr *to, int tolen); }
135 45 STD { ssize_t linux_sys_recvfrom(int s, void *buf, \
136 size_t len, int flags, struct osockaddr *from, \
137 unsigned int *fromlenaddr); }
138 46 STD { int linux_sys_sendmsg(int s, \
139 const struct msghdr *msg, int flags); }
140 47 STD { ssize_t linux_sys_recvmsg(int s, \
141 struct msghdr *msg, int flags); }
142 48 NOARGS { int sys_shutdown(int s, int how); }
143 49 STD { int linux_sys_bind(int s, \
144 const struct osockaddr *name, \
145 unsigned int namelen); }
146 50 NOARGS { int sys_listen(int s, int backlog); }
147 51 STD { int linux_sys_getsockname(int fdec, caddr_t asa, \
148 int *alen); }
149 52 STD { int linux_sys_getpeername(int fdes, \
150 struct sockaddr *asa, unsigned int *alen); }
151 53 STD { int linux_sys_socketpair(int domain, int type, \
152 int protocol, int *rsv); }
153 54 STD { int linux_sys_setsockopt(int s, int level, \
154 int optname, void *optval, int optlen); }
155 55 STD { int linux_sys_getsockopt(int s, int level, \
156 int optname, void *optval, int *optlen); }
157 56 STD { int linux_sys_clone(int flags, void *stack); }
158 57 NOARGS { int sys_fork(void); }
159 58 NOARGS { int sys___vfork14(void); }
160 59 STD { int linux_sys_execve(const char *path, char **argp, \
161 char **envp); }
162 60 NOARGS { int sys_exit(int rval); }
163 61 STD { int linux_sys_wait4(int pid, int *status, \
164 int options, struct rusage *rusage); }
165 62 STD { int linux_sys_kill(int pid, int signum); }
166 63 STD { int linux_sys_uname(struct linux_utsname *up); }
167 64 UNIMPL semget
168 65 UNIMPL semop
169 66 UNIMPL semctl
170 67 UNIMPL shmdt
171 68 UNIMPL msgget
172 69 UNIMPL msgsnd
173 70 UNIMPL msgrcv
174 71 UNIMPL msgctl
175 72 STD { int linux_sys_fcntl(int fd, int cmd, void *arg); }
176 73 NOARGS { int sys_flock(int fd, int how); }
177 74 NOARGS { int sys_fsync(int fd); }
178 75 STD { int linux_sys_fdatasync(int fd); }
179 76 STD { int linux_sys_truncate64(const char *path, \
180 off_t length); }
181 77 STD { int linux_sys_ftruncate64(unsigned int fd, \
182 off_t length); }
183 78 STD { int linux_sys_getdents(int fd, \
184 struct linux_dirent *dent, unsigned int count); }
185 79 NOARGS { int sys___getcwd(char *bufp, size_t length); }
186 80 STD { int linux_sys_chdir(const char *path); }
187 81 NOARGS { int sys_fchdir(int fd); }
188 82 STD { int linux_sys_rename(const char *from, \
189 const char *to); }
190 83 STD { int linux_sys_mkdir(const char *path, int mode); }
191 84 STD { int linux_sys_rmdir(const char *path); }
192 85 STD { int linux_sys_creat(const char *path, int mode); }
193 86 STD { int linux_sys_link(const char *path, \
194 const char *link); }
195 87 STD { int linux_sys_unlink(const char *path); }
196 88 STD { int linux_sys_symlink(const char *path, \
197 const char *to); }
198 89 STD { int linux_sys_readlink(const char *name, char *buf, \
199 int count); }
200 90 STD { int linux_sys_chmod(const char *path, int mode); }
201 91 NOARGS { int sys_fchmod(int fd, int mode); }
202 92 STD { int linux_sys_chown(const char *path, uid_t uid, \
203 gid_t gid); }
204 93 NOARGS { int sys___posix_fchown(int fd, uid_t uid, \
205 gid_t gid); }
206 94 STD { int linux_sys_lchown(const char *path, uid_t uid, \
207 gid_t gid); }
208 95 NOARGS { int sys_umask(int newmask); }
209 96 STD { int linux_sys_gettimeofday(struct timeval *tp, \
210 struct timezone *tzp); }
211 97 STD { int linux_sys_getrlimit(int which, \
212 struct orlimit *rlp); }
213 98 NOARGS { int sys_getrusage(int who, struct rusage *rusage); }
214 99 STD { int linux_sys_sysinfo(struct linux_sysinfo *arg); }
215 100 STD { int linux_sys_times(struct times *tms); }
216 101 STD { int linux_sys_ptrace(long request, long pid, \
217 long addr, long data); }
218 102 NOARGS { uid_t sys_getuid(void); }
219 103 UNIMPL syslog
220 104 NOARGS { gid_t sys_getgid(void); }
221 105 NOARGS { void sys_setuid(uid_t uid); }
222 106 NOARGS { void sys_setgid(gid_t gid); }
223 107 NOARGS { uid_t sys_geteuid(void); }
224 108 NOARGS { gid_t sys_getegid(void); }
225 109 NOARGS { int sys_setpgid(int pid, int pgid); }
226 110 NOARGS { pid_t sys_getppid(void); }
227 111 NOARGS { int sys_getpgrp(void); }
228 112 NOARGS { int sys_setsid(void); }
229 113 NOARGS { int sys_setreuid(uid_t ruid, uid_t euid); }
230 114 NOARGS { int sys_setregid(gid_t rgid, gid_t egid); }
231 115 NOARGS { int sys_getgroups(u_int gidsetsize, gid_t *gidset); }
232 116 NOARGS { int sys_setgroups(u_int gidsetsize, gid_t *gidset); }
233 117 STD { int linux_sys_setresuid(uid_t ruid, uid_t euid, \
234 uid_t suid); }
235 118 STD { int linux_sys_getresuid(uid_t *ruid, uid_t *euid, \
236 uid_t *suid); }
237 119 STD { int linux_sys_setresgid(gid_t rgid, gid_t egid, \
238 gid_t sgid); }
239 120 STD { int linux_sys_getresgid(gid_t *rgid, gid_t *egid, \
240 gid_t *sgid); }
241 121 STD { int linux_sys_getpgid(int pid); }
242 122 STD { int linux_sys_setfsuid(uid_t uid); }
243 123 STD { int linux_sys_getfsuid(void); }
244 124 NOARGS { pid_t sys_getsid(pid_t pid); }
245 125 UNIMPL capget
246 126 UNIMPL capset
247 127 STD { int linux_sys_rt_sigpending( \
248 linux_sigset_t *set, \
249 size_t sigsetsize); }
250 128 UNIMPL rt_sigtimedwait
251 129 STD { int linux_sys_rt_queueinfo(int pid, int signum, \
252 siginfo_t *uinfo); }
253 130 STD { int linux_sys_rt_sigsuspend(linux_sigset_t *unewset, \
254 size_t sigsetsize); }
255 131 STD { int linux_sys_sigaltstack( \
256 const struct linux_sigaltstack *ss, \
257 struct linux_sigaltstack *oss); }
258 132 STD { int linux_sys_utime(const char *path, \
259 struct linux_utimbuf *times); }
260 133 STD { int linux_sys_mknod(const char *path, int mode, \
261 int dev); }
262 134 STD { int linux_sys_uselib(const char *path); }
263 135 STD { int linux_sys_personality(int per); }
264 136 UNIMPL ustat
265 137 STD { int linux_sys_statfs64(const char *path, \
266 size_t sz, struct linux_statfs64 *sp); }
267 138 STD { int linux_sys_fstatfs64(int fd, \
268 size_t sz, struct linux_statfs64 *sp); }
269 139 UNIMPL sysfs
270 140 NOARGS { int sys_getpriority(int which, int who); }
271 141 NOARGS { int sys_setpriority(int which, int who, int prio); }
272 142 STD { int linux_sys_sched_setparam(pid_t pid, \
273 const struct linux_sched_param *sp); }
274 143 STD { int linux_sys_sched_getparam(pid_t pid, \
275 struct linux_sched_param *sp); }
276 144 STD { int linux_sys_sched_setscheduler(pid_t pid, \
277 int policy, const struct linux_sched_param *sp); }
278 145 STD { int linux_sys_sched_getscheduler(pid_t pid); }
279 146 STD { int linux_sys_sched_get_priority_max(int policy); }
280 147 STD { int linux_sys_sched_get_priority_min(int policy); }
281 148 UNIMPL sys_sched_rr_get_interval
282 149 NOARGS { int sys_mlock(caddr_t addr, size_t len); }
283 150 NOARGS { int sys_munlock(caddr_t addr, size_t len); }
284 151 NOARGS { int sys_mlockall(int flags); }
285 152 NOARGS { int sys_munlockall(void); }
286 153 UNIMPL vhangup
287 154 STD { int linux_sys_modify_ldt(int func, void *ptr, \
288 size_t bytecount); }
289 155 UNIMPL pivot_root
290 156 STD { int linux_sys___sysctl(struct linux___sysctl *lsp); }
291 157 UNIMPL prctl
292 158 STD { int linux_sys_arch_prctl(int code, \
293 unsigned long addr); }
294 159 UNIMPL adjtimex
295 160 STD { int linux_sys_setrlimit(u_int which, \
296 struct orlimit *rlp); }
297 161 NOARGS { int sys_chroot(char *path); }
298 162 NOARGS { int sys_sync(void); }
299 163 NOARGS { int sys_acct(char *path); }
300 164 STD { int linux_sys_settimeofday(struct timeval *tp, \
301 struct timezone *tzp); }
302 165 UNIMPL mount
303 166 UNIMPL umount2
304 167 STD { int linux_sys_swapon(char *name); }
305 168 STD { int linux_sys_swapoff(const char *path); }
306 169 STD { int linux_sys_reboot(int magic1, int magic2, \
307 int cmd, void *arg); }
308 170 NOARGS { int compat_43_sys_sethostname(char *hostname, \
309 u_int len);}
310 171 STD { int linux_sys_setdomainname(char *domainname, \
311 int len); }
312 172 STD { int linux_sys_iopl(int level); }
313 173 STD { int linux_sys_ioperm(unsigned int lo, \
314 unsigned int hi, int val); }
315 174 UNIMPL create_module
316 175 UNIMPL init_module
317 176 UNIMPL delete_module
318 177 UNIMPL get_kernel_syms
319 178 UNIMPL query_module
320 179 UNIMPL quotactl
321 180 UNIMPL nfsservctl
322 181 UNIMPL getpmsg
323 182 UNIMPL putpmsg
324 183 UNIMPL afs_syscall
325 184 UNIMPL tuxcall
326 185 UNIMPL security
327 186 UNIMPL gettid
328 187 UNIMPL readahead
329 188 UNIMPL setxattr
330 189 UNIMPL lsetxattr
331 190 UNIMPL fsetxattr
332 191 UNIMPL getxattr
333 192 UNIMPL lgetxattr
334 193 UNIMPL fgetxattr
335 194 UNIMPL listxattr
336 195 UNIMPL llistxattr
337 196 UNIMPL flistxattr
338 197 UNIMPL removexattr
339 198 UNIMPL lremovexattr
340 199 UNIMPL fremovexattr
341 200 UNIMPL tkill
342 201 STD { int linux_sys_time(linux_time_t *t); }
343 202 UNIMPL futex
344 203 UNIMPL sched_setaffinity
345 204 UNIMPL sched_getaffinity
346 205 UNIMPL set_thread_area
347 206 UNIMPL io_setup
348 207 UNIMPL io_destroy
349 208 UNIMPL io_getevents
350 209 UNIMPL io_submit
351 210 UNIMPL io_cancel
352 211 UNIMPL get_thread_area
353 212 UNIMPL lookup_dcookie
354 213 UNIMPL epoll_create
355 214 UNIMPL epoll_ctl_old
356 215 UNIMPL epoll_wait_old
357 216 UNIMPL remap_file_pages
358 217 STD { int linux_sys_getdents64(int fd, \
359 struct linux_dirent64 *dent, unsigned int count); }
360 218 UNIMPL set_tid_address
361 219 UNIMPL restart_syscall
362 220 UNIMPL semtimedop
363 221 UNIMPL fadvise64
364 222 UNIMPL timer_create
365 223 UNIMPL timer_settime
366 224 UNIMPL timer_gettime
367 225 UNIMPL timer_getoverrun
368 226 UNIMPL timer_delete
369 227 UNIMPL clock_settime
370 228 UNIMPL clock_gettime
371 229 UNIMPL clock_getres
372 230 UNIMPL clock_nanosleep
373 231 STD { int linux_sys_exit_group(int error_code); }
374 232 UNIMPL epoll_wait
375 233 UNIMPL epoll_ctl
376 234 UNIMPL tgkill
377 235 UNIMPL utimes
378 236 UNIMPL vserver
379 ; Not really syscall 237, but we need it to be defined somewhere
380 237 STD { int linux_sys_nosys(void); }
381