1 $NetBSD: syscalls.master,v 1.67 2009/06/08 13:26:57 njoly Exp $
3 ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
5 ; NetBSD m68k COMPAT_LINUX system call name/number "master" file.
6 ; (See syscalls.conf to see what it is processed into.)
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.
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.
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).
27 ; The type-dependent arguments are as follows:
28 ; For STD, NODEF, NOARGS, and compat syscalls:
29 ; { pseudo-proto } [alias]
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.
36 #if defined(_KERNEL_OPT)
37 #include "opt_compat_netbsd.h"
38 #include "opt_compat_43.h"
41 #include <sys/param.h>
43 #include <sys/systm.h>
44 #include <sys/signal.h>
45 #include <sys/mount.h>
46 #include <sys/sched.h>
47 #include <sys/syscallargs.h>
49 #include <compat/linux/common/linux_types.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 #include <compat/linux/common/linux_mmap.h>
55 #include <compat/linux/linux_syscallargs.h>
59 0 NOARGS { int|linux_sys||nosys(void); } syscall
60 1 NOARGS { int|sys||exit(int rval); }
61 2 NOARGS { int|sys||fork(void); }
62 3 NOARGS { int|sys||read(int fd, char *buf, u_int nbyte); }
63 4 NOARGS { int|sys||write(int fd, char *buf, u_int nbyte); }
64 5 STD { int|linux_sys||open(const char *path, int flags, \
66 6 NOARGS { int|sys||close(int fd); }
67 7 STD { int|linux_sys||waitpid(int pid, int *status, \
69 8 STD { int|linux_sys||creat(const char *path, int mode); }
70 9 NOARGS { int|sys||link(const char *path, const char *link); }
71 10 STD { int|linux_sys||unlink(const char *path); }
72 11 NOARGS { int|sys||execve(const char *path, char **argp, \
74 12 NOARGS { int|sys||chdir(const char *path); }
75 13 STD { int|linux_sys||time(linux_time_t *t); }
76 14 STD { int|linux_sys||mknod(const char *path, int mode, \
78 15 NOARGS { int|sys||chmod(const char *path, int mode); }
79 ;16 lchown on i386; chown on m68k.
80 16 STD { int|linux_sys||chown16(const char *path, \
81 linux_uid16_t uid, linux_gid16_t gid); }
84 #if !defined(_KERNEL) || defined(COMPAT_43)
85 19 NOARGS { long|compat_43_sys||lseek(int fd, long offset, \
88 19 UNIMPL compat_43_sys_lseek
90 20 NOARGS { pid_t|sys||getpid(void); }
93 23 NOARGS linux_setuid16 { int|sys||setuid(uid_t uid); }
94 24 NOARGS linux_getuid16 { uid_t|sys||getuid(void); }
95 25 STD { int|linux_sys||stime(linux_time_t *t); }
96 26 STD { int|linux_sys||ptrace(int request, int pid, \
97 int addr, int data); }
98 27 STD { int|linux_sys||alarm(unsigned int secs); }
100 29 STD { int|linux_sys||pause(void); }
101 30 STD { int|linux_sys||utime(const char *path, \
102 struct linux_utimbuf *times); }
105 33 NOARGS { int|sys||access(const char *path, int flags); }
106 34 STD { int|linux_sys||nice(int incr); }
108 36 NOARGS { int|sys||sync(void); }
109 37 STD { int|linux_sys||kill(int pid, int signum); }
110 38 NOARGS { int|sys||__posix_rename(const char *from, \
112 39 NOARGS { int|sys||mkdir(const char *path, int mode); }
113 40 NOARGS { int|sys||rmdir(const char *path); }
114 41 NOARGS { int|sys||dup(u_int fd); }
115 42 STD { int|linux_sys||pipe(int *pfds); }
116 43 STD { int|linux_sys||times(struct times *tms); }
118 45 STD { int|linux_sys||brk(char *nsize); }
119 46 NOARGS linux_setgid16 { int|sys||setgid(gid_t gid); }
120 47 NOARGS linux_getgid16 { gid_t|sys||getgid(void); }
121 48 STD { int|linux_sys||signal(int signum, \
122 linux_handler_t handler); }
123 49 NOARGS linux_geteuid16 { uid_t|sys||geteuid(void); }
124 50 NOARGS linux_getegid16 { gid_t|sys||getegid(void); }
125 51 NOARGS { int|sys||acct(char *path); }
128 54 STD { int|linux_sys||ioctl(int fd, u_long com, \
130 55 STD { int|linux_sys||fcntl(int fd, int cmd, void *arg); }
132 57 NOARGS { int|sys||setpgid(int pid, int pgid); }
134 59 UNIMPL oldolduname
135 60 NOARGS { int|sys||umask(int newmask); }
136 61 NOARGS { int|sys||chroot(char *path); }
138 63 NOARGS { int|sys||dup2(u_int from, u_int to); }
139 64 NOARGS { pid_t|sys||getppid(void); }
140 65 NOARGS { int|sys||getpgrp(void); }
141 66 NOARGS { int|sys||setsid(void); }
142 67 STD { int|linux_sys||sigaction(int signum, \
143 const struct linux_old_sigaction *nsa, \
144 struct linux_old_sigaction *osa); }
145 68 STD { int|linux_sys||siggetmask(void); }
146 69 STD { int|linux_sys||sigsetmask(linux_old_sigset_t mask); }
147 70 STD { int|linux_sys||setreuid16(linux_uid16_t ruid, \
148 linux_uid16_t euid); }
149 71 STD { int|linux_sys||setregid16(linux_gid16_t rgid, \
150 linux_gid16_t egid); }
151 72 STD { int|linux_sys||sigsuspend(void *restart, \
152 int oldmask, int mask); }
153 73 STD { int|linux_sys||sigpending(linux_old_sigset_t *set); }
154 #if !defined(_KERNEL) || defined(COMPAT_43)
155 74 NOARGS { int|compat_43_sys||sethostname(char *hostname, \
158 74 UNIMPL compat_43_sys_sethostname
160 75 STD { int|linux_sys||setrlimit(u_int which, \
161 struct orlimit *rlp); }
162 76 STD { int|linux_sys||getrlimit(u_int which, \
163 struct orlimit *rlp); }
164 77 NOARGS { int|compat_50_sys||getrusage(int who, \
165 struct rusage50 *rusage); }
166 78 STD { int|linux_sys||gettimeofday(struct timeval50 *tp, \
167 struct timezone *tzp); }
168 79 STD { int|linux_sys||settimeofday(struct timeval50 *tp, \
169 struct timezone *tzp); }
170 80 STD { int|linux_sys||getgroups16(int gidsetsize, \
171 linux_gid16_t *gidset); }
172 81 STD { int|linux_sys||setgroups16(int gidsetsize, \
173 linux_gid16_t *gidset); }
174 82 STD { int|linux_sys||oldselect(struct linux_oldselect *lsp); }
175 83 NOARGS { int|sys||symlink(const char *path, const char *to); }
176 #if !defined(_KERNEL) || defined(COMPAT_43)
177 84 NOARGS { int|compat_43_sys||lstat(const char *path, \
178 struct stat43 *up); } oolstat
180 84 UNIMPL compat_43_sys_lstat
182 85 NOARGS { int|sys||readlink(const char *name, char *buf, \
185 86 STD { int|linux_sys||uselib(const char *path); }
189 87 STD { int|linux_sys||swapon(char *name); }
190 88 STD { int|linux_sys||reboot(int magic1, int magic2, \
191 int cmd, void *arg); }
192 89 STD { int|linux_sys||readdir(int fd, void *dent, \
193 unsigned int count); }
194 90 STD { int|linux_sys||old_mmap(struct linux_oldmmap *lmp); }
195 91 NOARGS { int|sys||munmap(void *addr, int len); }
196 92 NOARGS { int|compat_43_sys||truncate(const char *path, \
198 #if !defined(_KERNEL) || defined(COMPAT_43)
199 93 NOARGS { int|compat_43_sys||ftruncate(int fd, long length); }
201 93 UNIMPL compat_43_sys_ftruncate
203 94 NOARGS { int|sys||fchmod(int fd, int mode); }
204 95 STD { int|linux_sys||fchown16(int fd, linux_uid16_t uid, \
205 linux_gid16_t gid); }
206 96 STD { int|linux_sys||getpriority(int which, int who); }
207 97 NOARGS { int|sys||setpriority(int which, int who, int prio); }
208 98 NOARGS { int|sys||profil(void *samples, u_int size, \
209 u_int offset, u_int scale); }
210 99 STD { int|linux_sys||statfs(const char *path, \
211 struct linux_statfs *sp); }
212 100 STD { int|linux_sys||fstatfs(int fd, \
213 struct linux_statfs *sp); }
215 102 STD { int|linux_sys||socketcall(int what, void *args); }
217 104 NOARGS { int|compat_50_sys||setitimer(u_int which, \
218 struct itimerval50 *itv, \
219 struct itimerval50 *oitv); }
220 105 NOARGS { int|compat_50_sys||getitimer(u_int which, \
221 struct itimerval50 *itv); }
222 106 STD { int|linux_sys||stat(const char *path, \
223 struct linux_stat *sp); }
224 107 STD { int|linux_sys||lstat(const char *path, \
225 struct linux_stat *sp); }
226 108 STD { int|linux_sys||fstat(int fd, struct linux_stat *sp); }
232 114 STD { int|linux_sys||wait4(int pid, int *status, \
233 int options, struct rusage50 *rusage); }
234 115 STD { int|linux_sys||swapoff(const char *path); }
235 116 STD { int|linux_sys||sysinfo(struct linux_sysinfo *arg); }
236 117 STD { int|linux_sys||ipc(int what, int a1, int a2, int a3, \
238 118 NOARGS { int|sys||fsync(int fd); }
239 119 STD { int|linux_sys||sigreturn(void); }
240 120 STD { int|linux_sys||clone(int flags, void *stack); }
241 121 STD { int|linux_sys||setdomainname(char *domainname, \
243 122 STD { int|linux_sys||uname(struct linux_utsname *up); }
244 123 STD { int|linux_sys||cacheflush(unsigned long addr, \
245 int scope, int cache, unsigned long len); }
247 125 STD { int|linux_sys||mprotect(const void *start, \
248 unsigned long len, int prot); }
249 126 STD { int|linux_sys||sigprocmask(int how, \
250 const linux_old_sigset_t *set, \
251 linux_old_sigset_t *oset); }
252 127 UNIMPL create_module
253 128 UNIMPL init_module
254 129 UNIMPL delete_module
255 130 UNIMPL get_kernel_syms
257 132 NOARGS { pid_t|sys||getpgid(pid_t pid); }
258 133 NOARGS { int|sys||fchdir(int fd); }
261 136 STD { int|linux_sys||personality(unsigned long per); }
262 137 UNIMPL afs_syscall
263 138 NOARGS linux_setfsuid16 { int|linux_sys||setfsuid(uid_t uid); }
264 139 NOARGS linux_setfsgid16 { int|linux_sys||setfsgid(gid_t gid); }
265 140 STD { int|linux_sys||llseek(int fd, u_int32_t ohigh, \
266 u_int32_t olow, void *res, int whence); }
267 141 STD { int|linux_sys||getdents(int fd, \
268 struct linux_dirent *dent, unsigned int count); }
269 142 STD { int|linux_sys||select(int nfds, fd_set *readfds, \
270 fd_set *writefds, fd_set *exceptfds, \
271 struct timeval50 *timeout); }
272 143 NOARGS { int|sys||flock(int fd, int how); }
273 144 NOARGS { int|sys|13|msync(void *addr, size_t len, int flags); }
274 145 NOARGS { int|sys||readv(int fd, struct iovec *iovp, \
276 146 NOARGS { int|sys||writev(int fd, struct iovec *iovp, \
278 147 NOARGS { pid_t|sys||getsid(pid_t pid); }
279 148 STD { int|linux_sys||fdatasync(int fd); }
280 149 STD { int|linux_sys||__sysctl(struct linux___sysctl *lsp); }
281 150 NOARGS { int|sys||mlock(void *addr, size_t len); }
282 151 NOARGS { int|sys||munlock(void *addr, size_t len); }
283 152 NOARGS { int|sys||mlockall(int flags); }
284 153 NOARGS { int|sys||munlockall(void); }
285 154 STD { int|linux_sys||sched_setparam(pid_t pid, \
286 const struct linux_sched_param *sp); }
287 155 STD { int|linux_sys||sched_getparam(pid_t pid, \
288 struct linux_sched_param *sp); }
289 156 STD { int|linux_sys||sched_setscheduler(pid_t pid, \
290 int policy, const struct linux_sched_param *sp); }
291 157 STD { int|linux_sys||sched_getscheduler(pid_t pid); }
292 158 STD { int|linux_sys||sched_yield(void); }
293 159 STD { int|linux_sys||sched_get_priority_max(int policy); }
294 160 STD { int|linux_sys||sched_get_priority_min(int policy); }
295 161 UNIMPL sched_rr_get_interval
296 162 STD { int|linux_sys||nanosleep( \
297 const struct linux_timespec *rqtp, \
298 struct linux_timespec *rmtp); }
299 163 STD { void *|linux_sys||mremap(void *old_address, \
300 size_t old_size, size_t new_size, u_long flags); }
301 164 STD { int|linux_sys||setresuid16(linux_uid16_t ruid, \
302 linux_uid16_t euid, linux_uid16_t suid); }
303 165 STD { int|linux_sys||getresuid16(linux_uid16_t *ruid, \
304 linux_uid16_t *euid, linux_uid16_t *suid); }
306 167 UNIMPL query_module
307 168 NOARGS { int|sys||poll(struct pollfd *fds, u_int nfds, \
309 169 UNIMPL nfsservctl
310 170 STD { int|linux_sys||setresgid16(linux_gid16_t rgid, \
311 linux_gid16_t egid, linux_gid16_t sgid); }
312 171 STD { int|linux_sys||getresgid16(linux_gid16_t *rgid, \
313 linux_gid16_t *egid, linux_gid16_t *sgid); }
315 173 STD { int|linux_sys||rt_sigreturn(void); }
316 174 STD { int|linux_sys||rt_sigaction(int signum, \
317 const struct linux_sigaction *nsa, \
318 struct linux_sigaction *osa, \
319 size_t sigsetsize); }
320 175 STD { int|linux_sys||rt_sigprocmask(int how, \
321 const linux_sigset_t *set, \
322 linux_sigset_t *oset, \
323 size_t sigsetsize); }
324 176 STD { int|linux_sys||rt_sigpending( \
325 linux_sigset_t *set, \
326 size_t sigsetsize); }
327 177 UNIMPL rt_sigtimedwait
328 178 STD { int|linux_sys||rt_queueinfo(int pid, int signum, \
329 linux_siginfo_t *uinfo); }
330 179 STD { int|linux_sys||rt_sigsuspend(linux_sigset_t *unewset, \
331 size_t sigsetsize); }
332 180 STD { int|linux_sys||pread(int fd, char *buf, \
333 size_t nbyte, linux_off_t offset); }
334 181 STD { int|linux_sys||pwrite(int fd, char *buf, \
335 size_t nbyte, linux_off_t offset); }
336 ;182 chown on i386; lchown on m68k.
337 182 STD { int|linux_sys||lchown16(const char *path, \
338 linux_uid16_t uid, linux_gid16_t gid); }
339 183 NOARGS { int|sys||__getcwd(char *bufp, size_t length); }
342 186 STD { int|linux_sys||sigaltstack( \
343 const struct linux_sigaltstack *ss, \
344 struct linux_sigaltstack *oss); }
348 190 NOARGS { int|sys|14|vfork(void); }
349 191 STD { int|linux_sys||ugetrlimit(int which, \
350 struct orlimit *rlp); }
351 #define linux_sys_mmap2_args linux_sys_mmap_args
352 192 NOARGS { linux_off_t|linux_sys||mmap2(unsigned long addr, \
353 size_t len, int prot, int flags, int fd, \
354 linux_off_t offset); }
355 193 STD { int|linux_sys||truncate64(const char *path, \
357 194 STD { int|linux_sys||ftruncate64(unsigned int fd, \
359 195 STD { int|linux_sys||stat64(const char *path, \
360 struct linux_stat64 *sp); }
361 196 STD { int|linux_sys||lstat64(const char *path, \
362 struct linux_stat64 *sp); }
363 197 STD { int|linux_sys||fstat64(int fd, \
364 struct linux_stat64 *sp); }
365 198 NOARGS { int|sys||__posix_chown(const char *path, uid_t uid, \
367 199 NOARGS { uid_t|sys||getuid(void); }
368 200 NOARGS { gid_t|sys||getgid(void); }
369 201 NOARGS { uid_t|sys||geteuid(void); }
370 202 NOARGS { gid_t|sys||getegid(void); }
371 203 NOARGS { int|sys||setreuid(uid_t ruid, uid_t euid); }
372 204 NOARGS { int|sys||setregid(gid_t rgid, gid_t egid); }
373 205 NOARGS { int|sys||getgroups(u_int gidsetsize, gid_t *gidset); }
374 206 NOARGS { int|sys||setgroups(u_int gidsetsize, gid_t *gidset); }
375 207 NOARGS { int|sys||__posix_fchown(int fd, uid_t uid, \
377 208 STD { int|linux_sys||setresuid(uid_t ruid, uid_t euid, \
379 209 STD { int|linux_sys||getresuid(uid_t *ruid, uid_t *euid, \
381 210 STD { int|linux_sys||setresgid(gid_t rgid, gid_t egid, \
383 211 STD { int|linux_sys||getresgid(gid_t *rgid, gid_t *egid, \
385 212 NOARGS { int|sys||__posix_lchown(const char *path, uid_t uid, \
387 213 NOARGS { int|sys||setuid(uid_t uid); }
388 214 NOARGS { int|sys||setgid(gid_t gid); }
389 215 STD { int|linux_sys||setfsuid(uid_t uid); }
390 216 STD { int|linux_sys||setfsgid(gid_t gid); }
391 217 UNIMPL /* unused */
392 218 UNIMPL /* unused */
393 219 UNIMPL /* unused */
394 220 STD { int|linux_sys||getdents64(int fd, \
395 struct linux_dirent64 *dent, unsigned int count); }
398 223 STD { int|linux_sys||setxattr(char *path, char *name, \
399 void *value, size_t size, int flags); }
400 224 STD { int|linux_sys||lsetxattr(char *path, char *name, \
401 void *value, size_t size, int flags); }
402 225 STD { int|linux_sys||fsetxattr(int fd, char *name, \
403 void *value, size_t size, int flags); }
404 226 STD { ssize_t|linux_sys||getxattr(char *path, char *name, \
405 void *value, size_t size); }
406 227 STD { ssize_t|linux_sys||lgetxattr(char *path, char *name, \
407 void *value, size_t size); }
408 228 STD { ssize_t|linux_sys||fgetxattr(int fd, char *name, \
409 void *value, size_t size); }
410 229 STD { ssize_t|linux_sys||listxattr(char *path, char *list, \
412 230 STD { ssize_t|linux_sys||llistxattr(char *path, char *list, \
414 231 STD { ssize_t|linux_sys||flistxattr(int fd, char *list, \
416 232 STD { int|linux_sys||removexattr(char *path, char *name); }
417 233 STD { int|linux_sys||lremovexattr(char *path, char *name); }
418 234 STD { int|linux_sys||fremovexattr(int fd, char *name); }
420 236 UNIMPL sendfile64
426 242 UNIMPL io_destroy
427 243 UNIMPL io_getevents
431 247 UNIMPL exit_group
432 248 UNIMPL lookup_dcookie
433 249 UNIMPL epoll_create
435 251 UNIMPL epoll_wait
436 252 UNIMPL remap_file_pages
437 253 UNIMPL set_tid_address
438 254 UNIMPL timer_create
439 255 UNIMPL timer_settime
440 256 UNIMPL timer_gettime
441 257 UNIMPL timer_getoverrun
442 258 UNIMPL timer_delete
443 259 STD { int|linux_sys||clock_settime(clockid_t which, \
444 struct linux_timespec *tp); }
445 260 STD { int|linux_sys||clock_gettime(clockid_t which, \
446 struct linux_timespec *tp); }
447 261 STD { int|linux_sys||clock_getres(clockid_t which, \
448 struct linux_timespec *tp); }
449 262 STD { int|linux_sys||clock_nanosleep(clockid_t which, \
450 int flags, struct linux_timespec *rqtp, \
451 struct linux_timespec *rmtp); }