1 $NetBSD: syscalls.master,v 1.33 2009/10/30 10:57:40 njoly Exp $
3 ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
5 ; NetBSD amd64 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)
38 #include "opt_compat_43.h"
39 #include "opt_compat_netbsd.h"
43 #include <sys/param.h>
45 #include <sys/systm.h>
46 #include <sys/signal.h>
47 #include <sys/mount.h>
48 #include <sys/syscallargs.h>
51 #include <compat/sys/time.h>
53 #include <compat/linux/common/linux_types.h>
54 #include <compat/linux/common/linux_mmap.h>
55 #include <compat/linux/common/linux_ipc.h>
56 #include <compat/linux/common/linux_msg.h>
57 #include <compat/linux/common/linux_sem.h>
58 #include <compat/linux/common/linux_shm.h>
59 #include <compat/linux/common/linux_signal.h>
60 #include <compat/linux/common/linux_siginfo.h>
61 #include <compat/linux/common/linux_machdep.h>
63 #include <compat/linux/linux_syscallargs.h>
67 0 NOARGS { int|sys||read(int fd, char *buf, u_int nbyte); }
68 1 NOARGS { int|sys||write(int fd, char *buf, u_int nbyte); }
69 2 STD { int|linux_sys||open(const char *path, int flags, \
71 3 NOARGS { int|sys||close(int fd); }
72 4 STD { int|linux_sys||stat64(const char *path, \
73 struct linux_stat64 *sp); }
74 5 STD { int|linux_sys||fstat64(int fd, \
75 struct linux_stat64 *sp); }
76 6 STD { int|linux_sys||lstat64(const char *path, \
77 struct linux_stat64 *sp); }
78 7 NOARGS { int|sys||poll(struct pollfd *fds, u_int nfds, \
80 8 NOARGS { long|compat_43_sys||lseek(int fd, long offset, \
82 9 NOARGS { linux_off_t|linux_sys||mmap(unsigned long addr, \
83 size_t len, int prot, int flags, int fd, \
84 linux_off_t offset); }
85 10 STD { int|linux_sys||mprotect(const void *start, \
86 unsigned long len, int prot); }
87 11 NOARGS { int|sys||munmap(void *addr, int len); }
88 12 STD { int|linux_sys||brk(char *nsize); }
89 13 STD { int|linux_sys||rt_sigaction(int signum, \
90 const struct linux_sigaction *nsa, \
91 struct linux_sigaction *osa, \
93 14 STD { int|linux_sys||rt_sigprocmask(int how, \
94 const linux_sigset_t *set, \
95 linux_sigset_t *oset, \
97 15 NOARGS { int|linux_sys||rt_sigreturn(void); }
98 16 STD { int|linux_sys||ioctl(int fd, u_long com, \
100 17 STD { int|linux_sys||pread(int fd, char *buf, \
101 size_t nbyte, linux_off_t offset); }
102 18 STD { int|linux_sys||pwrite(int fd, char *buf, \
103 size_t nbyte, linux_off_t offset); }
104 19 NOARGS { int|sys||readv(int fd, struct iovec *iovp, \
106 20 NOARGS { int|sys||writev(int fd, struct iovec *iovp, \
108 21 NOARGS { int|sys||access(const char *path, int flags); }
109 22 STD { int|linux_sys||pipe(int *pfds); }
110 23 STD { int|linux_sys||select(int nfds, fd_set *readfds, \
111 fd_set *writefds, fd_set *exceptfds, \
112 struct timeval50 *timeout); }
113 24 STD { int|linux_sys||sched_yield(void); }
114 25 STD { void *|linux_sys||mremap(void *old_address, \
115 size_t old_size, size_t new_size, u_long flags); }
116 26 NOARGS { int|sys|13|msync(void *addr, size_t len, int flags); }
117 27 NOARGS { int|sys||mincore(void *addr, size_t len, char *vec); }
118 28 NOARGS { int|sys||madvise(void *addr, size_t len, int behav); }
120 29 NOARGS { int|linux_sys||shmget(key_t key, size_t size, \
122 30 NOARGS { int|sys||shmat(int shmid, void *shmaddr, int shmflg); }
123 31 NOARGS { int|linux_sys||shmctl(int shmid, int cmd, \
124 struct linux_shmid_ds *buf); }
130 32 NOARGS { int|sys||dup(u_int fd); }
131 33 NOARGS { int|sys||dup2(u_int from, u_int to); }
132 34 STD { int|linux_sys||pause(void); }
133 35 STD { int|linux_sys||nanosleep( \
134 const struct linux_timespec *rqtp, \
135 struct linux_timespec *rmtp); }
136 36 NOARGS { int|compat_50_sys||getitimer(u_int which, \
137 struct itimerval50 *itv); }
138 37 STD { int|linux_sys||alarm(unsigned int secs); }
139 38 NOARGS { int|compat_50_sys||setitimer(u_int which, \
140 struct itimerval50 *itv, \
141 struct itimerval50 *oitv); }
142 39 STD { pid_t|linux_sys||getpid(void); }
144 41 STD { int|linux_sys||socket(int domain, \
145 int type, int protocol); }
146 42 STD { int|linux_sys||connect(int s, \
147 const struct osockaddr *name, \
148 unsigned int namelen); }
149 43 STD { int|linux_sys||accept(int s, struct osockaddr *name, \
150 int *anamelen); } oaccept
151 44 STD { ssize_t|linux_sys||sendto(int s, void *msg, int len, \
152 int flags, struct osockaddr *to, int tolen); }
153 45 STD { ssize_t|linux_sys||recvfrom(int s, void *buf, \
154 size_t len, int flags, struct osockaddr *from, \
155 unsigned int *fromlenaddr); }
156 46 STD { int|linux_sys||sendmsg(int s, \
157 const struct linux_msghdr *msg, int flags); }
158 47 STD { ssize_t|linux_sys||recvmsg(int s, \
159 struct linux_msghdr *msg, int flags); }
160 48 NOARGS { int|sys||shutdown(int s, int how); }
161 49 STD { int|linux_sys||bind(int s, \
162 const struct osockaddr *name, \
163 unsigned int namelen); }
164 50 NOARGS { int|sys||listen(int s, int backlog); }
165 51 STD { int|linux_sys||getsockname(int fdec, void *asa, \
167 52 STD { int|linux_sys||getpeername(int fdes, \
168 struct sockaddr *asa, unsigned int *alen); }
169 53 STD { int|linux_sys||socketpair(int domain, int type, \
170 int protocol, int *rsv); }
171 54 STD { int|linux_sys||setsockopt(int s, int level, \
172 int optname, void *optval, int optlen); }
173 55 STD { int|linux_sys||getsockopt(int s, int level, \
174 int optname, void *optval, int *optlen); }
175 56 STD { int|linux_sys||clone(int flags, void *stack, \
176 void *parent_tidptr, void *child_tidptr); }
177 57 NOARGS { int|sys||fork(void); }
178 58 NOARGS { int|sys|14|vfork(void); }
179 59 NOARGS { int|sys||execve(const char *path, char **argp, \
181 60 NOARGS { int|sys||exit(int rval); }
182 61 STD { int|linux_sys||wait4(int pid, int *status, \
183 int options, struct rusage50 *rusage); }
184 62 STD { int|linux_sys||kill(int pid, int signum); }
185 63 STD { int|linux_sys||uname(struct linux_utsname *up); }
187 64 NOARGS { int|sys||semget(key_t key, int nsems, int semflg); }
188 65 NOARGS { int|sys||semop(int semid, struct sembuf *sops, \
190 66 STD { int|linux_sys||semctl(int semid, int semnum, \
191 int cmd, union linux_semun arg); }
198 67 NOARGS { int|sys||shmdt(const void *shmaddr); }
203 68 NOARGS { int|sys||msgget(key_t key, int msgflg); }
204 69 NOARGS { int|sys||msgsnd(int msqid, void *msgp, size_t msgsz, \
206 70 NOARGS { ssize_t|sys||msgrcv(int msqid, void *msgp, \
207 size_t msgsz, long msgtyp, int msgflg); }
208 71 NOARGS { int|linux_sys||msgctl(int msqid, int cmd, \
209 struct linux_msqid_ds *buf); }
216 72 STD { int|linux_sys||fcntl(int fd, int cmd, void *arg); }
217 73 NOARGS { int|sys||flock(int fd, int how); }
218 74 NOARGS { int|sys||fsync(int fd); }
219 75 STD { int|linux_sys||fdatasync(int fd); }
220 76 STD { int|linux_sys||truncate64(const char *path, \
222 77 STD { int|linux_sys||ftruncate64(unsigned int fd, \
224 78 STD { int|linux_sys||getdents(int fd, \
225 struct linux_dirent *dent, unsigned int count); }
226 79 NOARGS { int|sys||__getcwd(char *bufp, size_t length); }
227 80 NOARGS { int|sys||chdir(const char *path); }
228 81 NOARGS { int|sys||fchdir(int fd); }
229 82 NOARGS { int|sys||__posix_rename(const char *from, \
231 83 NOARGS { int|sys||mkdir(const char *path, int mode); }
232 84 NOARGS { int|sys||rmdir(const char *path); }
233 85 STD { int|linux_sys||creat(const char *path, int mode); }
234 86 NOARGS { int|sys||link(const char *path, const char *link); }
235 87 STD { int|linux_sys||unlink(const char *path); }
236 88 NOARGS { int|sys||symlink(const char *path, const char *to); }
237 89 NOARGS { int|sys||readlink(const char *name, char *buf, \
239 90 NOARGS { int|sys||chmod(const char *path, int mode); }
240 91 NOARGS { int|sys||fchmod(int fd, int mode); }
241 92 NOARGS { int|sys||__posix_chown(const char *path, uid_t uid, \
243 93 NOARGS { int|sys||__posix_fchown(int fd, uid_t uid, \
245 94 NOARGS { int|sys||__posix_lchown(const char *path, uid_t uid, \
247 95 NOARGS { int|sys||umask(int newmask); }
248 96 STD { int|linux_sys||gettimeofday(struct timeval50 *tp, \
249 struct timezone *tzp); }
250 97 STD { int|linux_sys||getrlimit(int which, \
251 struct rlimit *rlp); }
252 98 NOARGS { int|compat_50_sys||getrusage(int who, \
253 struct rusage50 *rusage); }
254 99 STD { int|linux_sys||sysinfo(struct linux_sysinfo *arg); }
255 100 STD { int|linux_sys||times(struct times *tms); }
256 101 STD { int|linux_sys||ptrace(long request, long pid, \
257 long addr, long data); }
258 102 NOARGS { uid_t|sys||getuid(void); }
260 104 NOARGS { gid_t|sys||getgid(void); }
261 105 NOARGS { void|sys||setuid(uid_t uid); }
262 106 NOARGS { void|sys||setgid(gid_t gid); }
263 107 NOARGS { uid_t|sys||geteuid(void); }
264 108 NOARGS { gid_t|sys||getegid(void); }
265 109 NOARGS { int|sys||setpgid(int pid, int pgid); }
266 110 STD { pid_t|linux_sys||getppid(void); }
267 111 NOARGS { int|sys||getpgrp(void); }
268 112 NOARGS { int|sys||setsid(void); }
269 113 NOARGS { int|sys||setreuid(uid_t ruid, uid_t euid); }
270 114 NOARGS { int|sys||setregid(gid_t rgid, gid_t egid); }
271 115 NOARGS { int|sys||getgroups(u_int gidsetsize, gid_t *gidset); }
272 116 NOARGS { int|sys||setgroups(u_int gidsetsize, gid_t *gidset); }
273 117 STD { int|linux_sys||setresuid(uid_t ruid, uid_t euid, \
275 118 STD { int|linux_sys||getresuid(uid_t *ruid, uid_t *euid, \
277 119 STD { int|linux_sys||setresgid(gid_t rgid, gid_t egid, \
279 120 STD { int|linux_sys||getresgid(gid_t *rgid, gid_t *egid, \
281 121 NOARGS { pid_t|sys||getpgid(pid_t pid); }
282 122 STD { int|linux_sys||setfsuid(uid_t uid); }
283 123 STD { int|linux_sys||setfsgid(gid_t gid); }
284 124 NOARGS { pid_t|sys||getsid(pid_t pid); }
287 127 STD { int|linux_sys||rt_sigpending( \
288 linux_sigset_t *set, \
289 size_t sigsetsize); }
290 128 UNIMPL rt_sigtimedwait
291 129 STD { int|linux_sys||rt_queueinfo(int pid, int signum, \
292 linux_siginfo_t *uinfo); }
293 130 STD { int|linux_sys||rt_sigsuspend(linux_sigset_t *unewset, \
294 size_t sigsetsize); }
295 131 STD { int|linux_sys||sigaltstack( \
296 const struct linux_sigaltstack *ss, \
297 struct linux_sigaltstack *oss); }
298 132 STD { int|linux_sys||utime(const char *path, \
299 struct linux_utimbuf *times); }
300 133 STD { int|linux_sys||mknod(const char *path, int mode, \
303 134 STD { int|linux_sys||uselib(const char *path); }
305 134 UNIMPL sys_uselib
307 135 STD { int|linux_sys||personality(unsigned long per); }
309 137 STD { int|linux_sys||statfs(const char *path, \
310 struct linux_statfs *sp); }
311 138 STD { int|linux_sys||fstatfs(int fd, \
312 struct linux_statfs *sp); }
314 140 STD { int|linux_sys||getpriority(int which, int who); }
315 141 NOARGS { int|sys||setpriority(int which, int who, int prio); }
316 142 STD { int|linux_sys||sched_setparam(pid_t pid, \
317 const struct linux_sched_param *sp); }
318 143 STD { int|linux_sys||sched_getparam(pid_t pid, \
319 struct linux_sched_param *sp); }
320 144 STD { int|linux_sys||sched_setscheduler(pid_t pid, \
321 int policy, const struct linux_sched_param *sp); }
322 145 STD { int|linux_sys||sched_getscheduler(pid_t pid); }
323 146 STD { int|linux_sys||sched_get_priority_max(int policy); }
324 147 STD { int|linux_sys||sched_get_priority_min(int policy); }
325 148 UNIMPL sys_sched_rr_get_interval
326 149 NOARGS { int|sys||mlock(void *addr, size_t len); }
327 150 NOARGS { int|sys||munlock(void *addr, size_t len); }
328 151 NOARGS { int|sys||mlockall(int flags); }
329 152 NOARGS { int|sys||munlockall(void); }
331 154 STD { int|linux_sys||modify_ldt(int func, void *ptr, \
333 155 UNIMPL pivot_root
334 156 STD { int|linux_sys||__sysctl(struct linux___sysctl *lsp); }
336 158 STD { int|linux_sys||arch_prctl(int code, \
337 unsigned long addr); }
339 160 STD { int|linux_sys||setrlimit(u_int which, \
340 struct rlimit *rlp); }
341 161 NOARGS { int|sys||chroot(char *path); }
342 162 NOARGS { int|sys||sync(void); }
343 163 NOARGS { int|sys||acct(char *path); }
344 164 STD { int|linux_sys||settimeofday(struct timeval50 *tp, \
345 struct timezone *tzp); }
348 167 STD { int|linux_sys||swapon(char *name); }
349 168 STD { int|linux_sys||swapoff(const char *path); }
350 169 STD { int|linux_sys||reboot(int magic1, int magic2, \
351 int cmd, void *arg); }
352 170 NOARGS { int|compat_43_sys||sethostname(char *hostname, \
354 171 STD { int|linux_sys||setdomainname(char *domainname, \
356 172 STD { int|linux_sys||iopl(int level); }
357 173 STD { int|linux_sys||ioperm(unsigned int lo, \
358 unsigned int hi, int val); }
359 174 UNIMPL create_module
360 175 UNIMPL init_module
361 176 UNIMPL delete_module
362 177 UNIMPL get_kernel_syms
363 178 UNIMPL query_module
365 180 UNIMPL nfsservctl
368 183 UNIMPL afs_syscall
371 186 STD { pid_t|linux_sys||gettid(void); }
373 188 STD { int|linux_sys||setxattr(char *path, char *name, \
374 void *value, size_t size, int flags); }
375 189 STD { int|linux_sys||lsetxattr(char *path, char *name, \
376 void *value, size_t size, int flags); }
377 190 STD { int|linux_sys||fsetxattr(int fd, char *name, \
378 void *value, size_t size, int flags); }
379 191 STD { ssize_t|linux_sys||getxattr(char *path, char *name, \
380 void *value, size_t size); }
381 192 STD { ssize_t|linux_sys||lgetxattr(char *path, char *name, \
382 void *value, size_t size); }
383 193 STD { ssize_t|linux_sys||fgetxattr(int fd, char *name, \
384 void *value, size_t size); }
385 194 STD { ssize_t|linux_sys||listxattr(char *path, char *list, \
387 195 STD { ssize_t|linux_sys||llistxattr(char *path, char *list, \
389 196 STD { ssize_t|linux_sys||flistxattr(int fd, char *list, \
391 197 STD { int|linux_sys||removexattr(char *path, char *name); }
392 198 STD { int|linux_sys||lremovexattr(char *path, char *name); }
393 199 STD { int|linux_sys||fremovexattr(int fd, char *name); }
394 200 STD { int|linux_sys||tkill(int tid, int sig); }
395 201 STD { int|linux_sys||time(linux_time_t *t); }
396 202 STD { int|linux_sys||futex(int *uaddr, int op, int val, \
397 const struct linux_timespec *timeout, int *uaddr2, \
399 203 STD { int|linux_sys||sched_setaffinity(pid_t pid, \
400 unsigned int len, unsigned long *mask); }
401 204 STD { int|linux_sys||sched_getaffinity(pid_t pid, \
402 unsigned int len, unsigned long *mask); }
403 205 UNIMPL set_thread_area
405 207 UNIMPL io_destroy
406 208 UNIMPL io_getevents
409 211 UNIMPL get_thread_area
410 212 UNIMPL lookup_dcookie
411 213 UNIMPL epoll_create
412 214 UNIMPL epoll_ctl_old
413 215 UNIMPL epoll_wait_old
414 216 UNIMPL remap_file_pages
415 217 STD { int|linux_sys||getdents64(int fd, \
416 struct linux_dirent64 *dent, unsigned int count); }
417 218 STD { int|linux_sys||set_tid_address(int *tid); }
418 219 UNIMPL restart_syscall
419 220 UNIMPL semtimedop
421 222 UNIMPL timer_create
422 223 UNIMPL timer_settime
423 224 UNIMPL timer_gettime
424 225 UNIMPL timer_getoverrun
425 226 UNIMPL timer_delete
426 227 STD { int|linux_sys||clock_settime(clockid_t which, \
427 struct linux_timespec *tp); }
428 228 STD { int|linux_sys||clock_gettime(clockid_t which, \
429 struct linux_timespec *tp); }
430 229 STD { int|linux_sys||clock_getres(clockid_t which, \
431 struct linux_timespec *tp); }
432 230 STD { int|linux_sys||clock_nanosleep(clockid_t which, \
433 int flags, struct linux_timespec *rqtp, \
434 struct linux_timespec *rmtp); }
435 231 STD { int|linux_sys||exit_group(int error_code); }
436 232 UNIMPL epoll_wait
438 234 STD { int|linux_sys||tgkill(int tgid, int tid, int sig); }
442 238 UNIMPL set_mempolicy
443 239 UNIMPL get_mempolicy
446 242 UNIMPL mq_timedsend
447 243 UNIMPL mq_timedreceive
449 245 UNIMPL mq_getsetattr
450 246 UNIMPL kexec_load
453 249 UNIMPL request_key
455 251 UNIMPL ioprio_set
456 252 UNIMPL ioprio_get
457 253 UNIMPL inotify_init
458 254 UNIMPL inotify_add_watch
459 255 UNIMPL inotify_rm_watch
460 256 UNIMPL migrate_pages
466 262 UNIMPL newfstatat
471 267 UNIMPL readlinkat
477 273 STD { int|linux_sys||set_robust_list( \
478 struct linux_robust_list_head *head, size_t len); }
479 274 STD { int|linux_sys||get_robust_list(int pid, \
480 struct linux_robust_list_head **head, \
484 277 UNIMPL sync_file_range
486 279 UNIMPL move_pages
488 281 UNIMPL epoll_pwait
490 283 UNIMPL timerfd_create
493 286 STD { int|linux_sys||nosys(void); }