syscalls.master revision 1.3 1 $NetBSD: syscalls.master,v 1.3 2006/06/25 16:15:39 manu Exp $
2
3 ; NetBSD i386 COMPAT_LINUX32 system call name/number "master" file.
4 ; (See syscalls.conf to see what it is processed into.)
5 ;
6 ; Fields: number type [type-dependent ...]
7 ; number system call number, must be in order
8 ; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
9 ; the compatibility options defined in syscalls.conf.
10 ;
11 ; types:
12 ; STD always included
13 ; OBSOL obsolete, not included in system
14 ; UNIMPL unimplemented, not included in system
15 ; NODEF included, but don't define the syscall number
16 ;
17 ; INDIR included, but don't define the syscall args structure
18 ; and allow it to be "really" varargs.
19 ;
20 ; The compat options are defined in the syscalls.conf file, and the
21 ; compat option name is prefixed to the syscall name. Other than
22 ; that, they're like NODEF (for 'compat' options), or STD (for
23 ; 'libcompat' options).
24 ;
25 ; The type-dependent arguments are as follows:
26 ; For STD, NODEF, NOARGS, and compat syscalls:
27 ; { pseudo-proto } [alias]
28 ; For other syscalls:
29 ; [comment]
30 ;
31 ; #ifdef's, etc. may be included, and are copied to the output files.
32 ; #include's are copied to the syscall names and switch definition files only.
33
34 #if defined(_KERNEL_OPT)
35 #include "opt_compat_43.h"
36 #endif
37
38 #include <sys/param.h>
39 #include <sys/poll.h>
40 #include <sys/systm.h>
41 #include <sys/signal.h>
42 #include <sys/mount.h>
43 #include <sys/sa.h>
44 #include <sys/syscallargs.h>
45
46 #include <machine/netbsd32_machdep.h>
47
48 #include <compat/netbsd32/netbsd32.h>
49 #include <compat/netbsd32/netbsd32_syscallargs.h>
50
51 #include <compat/linux32/common/linux32_types.h>
52 #include <compat/linux32/common/linux32_signal.h>
53 #include <compat/linux32/arch/amd64/linux32_missing.h>
54 #include <compat/linux32/linux32_syscallargs.h>
55
56 #include <compat/linux/common/linux_types.h>
57 #include <compat/linux/common/linux_mmap.h>
58 #include <compat/linux/common/linux_signal.h>
59 #include <compat/linux/common/linux_siginfo.h>
60 #include <compat/linux/common/linux_machdep.h>
61
62 #include <compat/linux/linux_syscallargs.h>
63
64 %%
65
66 0 NOARGS { int linux_sys_nosys(void); } syscall
67 1 NOARGS { int sys_exit(int rval); }
68 2 NOARGS { int sys_fork(void); }
69 3 NOARGS { netbsd32_ssize_t netbsd32_read(int fd, \
70 netbsd32_voidp buf, netbsd32_size_t nbyte); }
71 4 NOARGS { netbsd32_ssize_t netbsd32_write(int fd, \
72 const netbsd32_voidp buf, netbsd32_size_t nbyte); }
73 5 STD { int linux32_sys_open(const netbsd32_charp path, int flags, \
74 int mode); }
75 6 NOARGS { int sys_close(int fd); }
76 7 STD { int linux32_sys_waitpid(int pid, netbsd32_intp status, \
77 int options);}
78 8 STD { int linux32_sys_creat(const netbsd32_charp path, int mode); }
79 9 STD { int linux32_sys_link(const netbsd32_charp path, \
80 const netbsd32_charp link); }
81 10 STD { int linux32_sys_unlink(const netbsd32_charp path); }
82 11 NOARGS execve { int netbsd32_execve(const netbsd32_charp path, \
83 netbsd32_charpp argp, netbsd32_charpp envp); }
84 12 STD { int linux32_sys_chdir(const netbsd32_charp path); }
85 13 STD { int linux32_sys_time(linux32_timep_t t); }
86 14 STD { int linux32_sys_mknod(const netbsd32_charp path, \
87 int mode, int dev); }
88 15 STD { int linux32_sys_chmod(const netbsd32_charp path, int mode); }
89 16 STD { int linux32_sys_lchown16(const netbsd32_charp path, \
90 int uid, int gid); }
91 17 STD { int linux32_sys_break(netbsd32_charp nsize); }
92 18 OBSOL ostat
93 19 NOARGS { netbsd32_long compat_43_netbsd32_olseek(int fd, \
94 netbsd32_long offset, int chence); }
95 20 STD { pid_t linux_sys_getpid(void); }
96 21 UNIMPL mount
97 22 UNIMPL umount
98 23 NOARGS linux_setuid16 { int sys_setuid(uid_t uid); }
99 24 NOARGS linux_getuid16 { uid_t sys_getuid(void); }
100 25 STD { int linux32_sys_stime(linux32_timep_t t); }
101 26 UNIMPL ptrace
102 27 NOARGS { int linux_sys_alarm(unsigned int secs); }
103 28 OBSOL ofstat
104 29 NOARGS { int linux_sys_pause(void); }
105 30 STD { int linux32_sys_utime(const netbsd32_charp path, \
106 linux32_utimbufp_t times); }
107 31 OBSOL stty
108 32 OBSOL gtty
109 33 STD { int linux32_sys_access(const netbsd32_charp path, \
110 int flags); }
111 34 NOARGS { int linux_sys_nice(int incr); }
112 35 OBSOL ftime
113 36 NOARGS { int sys_sync(void); }
114 37 STD { int linux32_sys_kill(int pid, int signum); }
115 38 STD { int linux32_sys_rename(const netbsd32_charp from, \
116 const netbsd32_charp to); }
117 39 STD { int linux32_sys_mkdir(const netbsd32_charp path, int mode); }
118 40 STD { int linux32_sys_rmdir(const netbsd32_charp path); }
119 41 NOARGS { int netbsd32_dup(u_int fd); }
120 42 STD { int linux32_sys_pipe(netbsd32_intp fd); }
121 43 STD { int linux32_sys_times(linux32_tmsp_t tms); }
122 44 OBSOL prof
123 45 STD { int linux32_sys_brk(netbsd32_charp nsize); }
124 46 NOARGS linux_setgid16 { int sys_setgid(gid_t gid); }
125 47 NOARGS linux_getgid16 { gid_t sys_getgid(void); }
126 48 STD { int linux32_sys_signal(int signum, \
127 linux32_handler_t handler); }
128 49 NOARGS linux_geteuid16 { uid_t sys_geteuid(void); }
129 50 NOARGS linux_getegid16 { gid_t sys_getegid(void); }
130 51 NOARGS acct { int netbsd32_acct(netbsd32_charp path); }
131 52 OBSOL phys
132 53 OBSOL lock
133 54 STD { int linux32_sys_ioctl(int fd, netbsd32_u_long com, \
134 netbsd32_charp data); }
135 55 STD { int linux32_sys_fcntl(int fd, \
136 int cmd, netbsd32_voidp arg); }
137 56 OBSOL mpx
138 57 NOARGS { int sys_setpgid(int pid, int pgid); }
139 58 OBSOL ulimit
140 59 STD { int linux32_sys_oldolduname( \
141 linux32_oldold_utsnamep_t up); }
142 60 NOARGS { int sys_umask(int newmask); }
143 61 NOARGS chroot { int netbsd32_chroot(netbsd32_charp path); }
144 62 UNIMPL ustat
145 63 NOARGS { int netbsd32_dup2(u_int from, u_int to); }
146 64 STD { pid_t linux_sys_getppid(void); }
147 65 NOARGS { int sys_getpgrp(void); }
148 66 NOARGS { int sys_setsid(void); }
149 67 UNIMPL sigaction
150 68 UNIMPL siggetmask
151 69 UNIMPL sigsetmask
152 70 STD { int linux_sys_setreuid16(int ruid, int euid); }
153 71 STD { int linux_sys_setregid16(int rgid, int egid); }
154 72 UNIMPL sigsuspend
155 73 UNIMPL sigpending
156 74 NOARGS { int compat_43_netbsd32_osethostname(netbsd32_charp hostname, \
157 u_int len); }
158 75 STD { int linux32_sys_setrlimit(u_int which, \
159 netbsd32_orlimitp_t rlp); }
160 76 STD { int linux32_sys_getrlimit(u_int which, \
161 netbsd32_orlimitp_t rlp); }
162 77 NOARGS getrusage { int netbsd32_getrusage(int who, \
163 netbsd32_rusagep_t rusage); }
164 78 STD { int linux32_sys_gettimeofday(netbsd32_timevalp_t tp, \
165 netbsd32_timezonep_t tzp); }
166 79 STD { int linux32_sys_settimeofday(netbsd32_timevalp_t tp, \
167 netbsd32_timezonep_t tzp); }
168 80 STD { int linux32_sys_getgroups16(int gidsetsize, \
169 linux32_gidp_t gidset); }
170 81 STD { int linux32_sys_setgroups16(int gidsetsize, \
171 linux32_gidp_t gidset); }
172 82 STD { int linux32_sys_oldselect(linux32_oldselectp_t lsp); }
173 83 STD { int linux32_sys_symlink(netbsd32_charp path, \
174 const netbsd32_charp link); }
175 84 NOARGS lstat { int compat_43_netbsd32_lstat43(const netbsd32_charp \
176 path, netbsd32_stat43p_t ub); }
177 85 STD { int linux32_sys_readlink(const netbsd32_charp name, \
178 netbsd32_charp buf, int count); }
179 86 UNIMPL uselib
180 87 STD { int linux32_sys_swapon(netbsd32_charp name); }
181 88 STD { int linux32_sys_reboot(int magic1, int magic2, int cmd, \
182 netbsd32_voidp arg); }
183 89 UNIMPL readdir
184 90 STD { int linux32_sys_old_mmap(linux32_oldmmapp lmp); }
185 91 NOARGS munmap { int netbsd32_munmap(netbsd32_caddr_t addr, int len); }
186 92 STD { int linux32_sys_truncate(const netbsd32_charp path, \
187 netbsd32_long length); }
188 93 NOARGS { int compat_43_sys_ftruncate(int fd, long length); }
189 94 NOARGS { int sys_fchmod(int fd, int mode); }
190 95 STD { int linux32_sys_fchown16(int fd, int uid, int gid); }
191 96 STD { int linux32_sys_getpriority(int which, int who); }
192 97 STD { int linux32_sys_setpriority(int which, int who, int prio); }
193 98 UNIMPL profil
194 99 UNIMPL statfs
195 100 UNIMPL fstatfs
196 101 UNIMPL ioperm
197 102 STD { int linux32_sys_socketcall(int what, netbsd32_voidp args); }
198 103 UNIMPL syslog
199 104 NOARGS setitimer { int netbsd32_setitimer(u_int which, \
200 netbsd32_itimervalp_t itv, netbsd32_itimervalp_t oitv); }
201 105 NOARGS getitimer { int netbsd32_getitimer(u_int which, \
202 netbsd32_itimervalp_t itv); }
203 106 UNIMPL stat
204 107 UNIMPL lstat
205 108 UNIMPL fstat
206 109 UNIMPL olduname
207 110 UNIMPL iopl
208 111 UNIMPL vhangup
209 112 UNIMPL idle
210 113 UNIMPL vm86old
211 114 STD { int linux32_sys_wait4(int pid, netbsd32_intp status, \
212 int options, netbsd32_rusagep_t rusage); }
213 115 STD { int linux32_sys_swapoff(const netbsd32_charp path); }
214 116 UNIMPL sysinfo
215 117 UNIMPL ipc
216 118 NOARGS { int sys_fsync(int fd); }
217 119 STD { int linux32_sys_sigreturn(linux32_sigcontextp_t scp); }
218 120 STD { int linux32_sys_clone(int flags, netbsd32_voidp stack); }
219 121 UNIMPL setdomainname
220 122 STD { int linux32_sys_uname(linux32_utsnamep up); }
221 123 UNIMPL modify_ldt
222 124 UNIMPL adjtimex
223 125 STD { int linux32_sys_mprotect(netbsd32_voidp addr, \
224 netbsd32_size_t len, int prot); }
225 126 UNIMPL sigprocmask
226 127 UNIMPL create_module
227 128 UNIMPL init_module
228 129 UNIMPL delete_module
229 130 UNIMPL get_kernel_syms
230 131 UNIMPL quotactl
231 132 UNIMPL getpgid
232 133 NOARGS { int sys_fchdir(int fd); }
233 134 UNIMPL bdflush
234 135 UNIMPL sysfs
235 136 UNIMPL personality
236 137 UNIMPL afs_syscall
237 138 UNIMPL int
238 139 UNIMPL int
239 140 STD { int linux32_sys_llseek(int fd, u_int32_t ohigh, \
240 u_int32_t olow, netbsd32_caddr_t res, int whence); }
241 141 STD { int linux32_sys_getdents(int fd, \
242 linux32_direntp_t dent, unsigned int count); }
243 142 STD { int linux32_sys_select(int nfds, \
244 netbsd32_fd_setp_t readfds, \
245 netbsd32_fd_setp_t writefds, \
246 netbsd32_fd_setp_t exceptfds, \
247 netbsd32_timevalp_t timeout); }
248 143 NOARGS { int sys_flock(int fd, int how); }
249 144 UNIMPL msync
250 145 NOARGS readv { int netbsd32_readv(int fd, \
251 const netbsd32_iovecp_t iovp, u_int iovcnt); }
252 146 NOARGS writev { netbsd32_ssize_t netbsd32_writev(int fd, \
253 const netbsd32_iovecp_t iovp, int iovcnt); }
254 147 NOARGS { pid_t sys_getsid(pid_t pid); }
255 148 UNIMPL fdatasync
256 149 STD { int linux32_sys___sysctl(linux32___sysctlp_t lsp); }
257 150 UNIMPL mlock
258 151 UNIMPL munlock
259 152 NOARGS { int sys_mlockall(int flags); }
260 153 NOARGS { int sys_munlockall(void); }
261 154 UNIMPL sched_setparam
262 155 UNIMPL sched_getparam
263 156 STD { int linux32_sys_sched_setscheduler(pid_t pid, \
264 int policy, const linux32_sched_paramp_t sp); }
265 157 UNIMPL sched_getscheduler
266 158 UNIMPL sched_yield
267 159 UNIMPL sched_get_priority_max
268 160 UNIMPL sched_get_priority_min
269 161 UNIMPL sched_rr_get_interval
270 162 NOARGS nanosleep { int netbsd32_nanosleep(const \
271 netbsd32_timespecp_t rqtp \
272 netbsd32_timespecp_t rmtp); }
273 163 UNIMPL *mremap
274 164 NOARGS { int linux_sys_setresuid16(uid_t ruid, uid_t euid, \
275 uid_t suid); }
276 165 UNIMPL int
277 166 UNIMPL vm86
278 167 UNIMPL query_module
279 168 NOARGS poll { int netbsd32_poll(struct pollfd *fds, u_int nfds, \
280 int timeout); }
281 169 UNIMPL nfsservctl
282 170 NOARGS { int linux_sys_setresgid16(gid_t rgid, gid_t egid, \
283 gid_t sgid); }
284 171 UNIMPL int
285 172 UNIMPL prctl
286 173 STD { int linux32_sys_rt_sigreturn(linux32_ucontextp_t ucp); }
287 174 STD { int linux32_sys_rt_sigaction(int signum, \
288 const linux32_sigactionp_t nsa, \
289 linux32_sigactionp_t osa, \
290 netbsd32_size_t sigsetsize); }
291 175 STD { int linux32_sys_rt_sigprocmask(int how, \
292 const linux32_sigsetp_t set, \
293 linux32_sigsetp_t oset, \
294 netbsd32_size_t sigsetsize); }
295 176 UNIMPL rt_sigpending
296 177 UNIMPL rt_sigtimedwait
297 178 UNIMPL rt_queueinfo
298 179 STD { int linux32_sys_rt_sigsuspend(linux32_sigsetp_t unewset, \
299 netbsd32_size_t sigsetsize); }
300 180 UNIMPL pread
301 181 UNIMPL pwrite
302 182 UNIMPL chown16
303 183 NOARGS { int netbsd32___getcwd(netbsd32_charp bufp, \
304 netbsd32_size_t length); }
305 184 UNIMPL capget
306 185 UNIMPL capset
307 186 UNIMPL sigaltstack
308 187 UNIMPL sendfile
309 188 UNIMPL getpmsg
310 189 UNIMPL putpmsg
311 190 NOARGS { int sys___vfork14(void); }
312 191 STD { int linux32_sys_ugetrlimit(int which, \
313 netbsd32_orlimitp_t rlp); }
314 192 UNIMPL mmap2
315 193 UNIMPL truncate64
316 194 UNIMPL ftruncate64
317 195 STD { int linux32_sys_stat64(const netbsd32_charp path, \
318 linux32_stat64p sp); }
319 196 STD { int linux32_sys_lstat64(const netbsd32_charp path, \
320 linux32_stat64p sp); }
321 197 STD { int linux32_sys_fstat64(int fd, \
322 linux32_stat64p sp); }
323 198 UNIMPL lchown
324 199 NOARGS { uid_t sys_getuid(void); }
325 200 NOARGS { gid_t sys_getgid(void); }
326 201 NOARGS { uid_t sys_geteuid(void); }
327 202 NOARGS { gid_t sys_getegid(void); }
328 203 NOARGS { int sys_setreuid(uid_t ruid, uid_t euid); }
329 204 NOARGS { int sys_setregid(gid_t rgid, gid_t egid); }
330 205 NOARGS { int netbsd32_getgroups(int gidsetsize, \
331 netbsd32_gid_tp gidset); }
332 206 NOARGS { int netbsd32_setgroups(int gidsetsize, \
333 netbsd32_gid_tp gidset); }
334 207 NOARGS { int sys___posix_fchown(int fd, uid_t uid, gid_t gid); }
335 208 NOARGS { int linux_sys_setresuid(uid_t ruid, uid_t euid, \
336 uid_t suid); }
337 209 UNIMPL getresuid
338 210 NOARGS { int linux_sys_setresgid(gid_t rgid, gid_t egid, \
339 gid_t sgid); }
340 211 UNIMPL getresgid
341 212 UNIMPL chown
342 213 NOARGS { int sys_setuid(uid_t uid); }
343 214 NOARGS { int sys_setgid(gid_t gid); }
344 215 UNIMPL setfsuid
345 216 UNIMPL getfsuid
346 217 UNIMPL pivot_root
347 218 UNIMPL mincore
348 219 UNIMPL madvise
349 220 STD { int linux32_sys_getdents64(int fd, \
350 linux32_dirent64p_t dent, unsigned int count); }
351 221 STD { int linux32_sys_fcntl64(int fd, \
352 int cmd, netbsd32_voidp arg); }
353 222 UNIMPL /* unused */
354 223 UNIMPL /* unused */
355 224 STD { pid_t linux_sys_gettid(void); }
356 225 UNIMPL readahead
357 226 UNIMPL setxattr
358 227 UNIMPL lsetxattr
359 228 UNIMPL fsetxattr
360 229 UNIMPL getxattr
361 230 UNIMPL lgetxattr
362 231 UNIMPL fgetxattr
363 232 UNIMPL listxattr
364 233 UNIMPL llistxattr
365 234 UNIMPL flistxattr
366 235 UNIMPL removexattr
367 236 UNIMPL lremovexattr
368 237 UNIMPL fremovexattr
369 238 UNIMPL tkill
370 239 UNIMPL sendfile64
371 240 UNIMPL futex
372 241 UNIMPL sched_setaffinity
373 242 UNIMPL sched_getaffinity
374 243 UNIMPL set_thread_area
375 244 UNIMPL get_thread_area
376 245 UNIMPL io_setup
377 246 UNIMPL io_destroy
378 247 UNIMPL io_getevents
379 248 UNIMPL io_submit
380 249 UNIMPL io_cancel
381 250 UNIMPL fadvise64
382 251 UNIMPL /* unused */
383 252 NOARGS { int linux_sys_exit_group(int error_code); }
384 253 UNIMPL lookup_dcookie
385 254 UNIMPL epoll_create
386 255 UNIMPL epoll_ctl
387 256 UNIMPL epoll_wait
388 257 UNIMPL remap_file_pages
389 258 UNIMPL set_tid_address
390 259 UNIMPL timer_create
391 260 UNIMPL timer_settime
392 261 UNIMPL timer_gettime
393 262 UNIMPL timer_getoverrun
394 263 UNIMPL timer_delete
395 264 UNIMPL clock_settime
396 265 UNIMPL clock_gettime
397 266 UNIMPL clock_getres
398 267 UNIMPL clock_nanosleep
399 268 UNIMPL statfs64
400 269 UNIMPL fstatfs64
401 270 UNIMPL tgkill
402 271 UNIMPL utimes
403 272 UNIMPL fadvise64_64
404 273 UNIMPL vserver
405 274 UNIMPL mbind
406 275 UNIMPL get_mempolicy
407 276 UNIMPL set_mempolicy
408 277 UNIMPL mq_open
409 278 UNIMPL mq_unlink
410 279 UNIMPL mq_timedsend
411 280 UNIMPL mq_timedreceive
412 281 UNIMPL mq_notify
413 282 UNIMPL mq_getsetattr
414 283 UNIMPL kexec_load
415