1 $NetBSD: syscalls.master,v 1.100 2009/06/08 13:26:57 njoly Exp $
3 ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
5 ; NetBSD i386 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 #include <sys/param.h>
38 #include <sys/systm.h>
39 #include <sys/signal.h>
40 #include <sys/mount.h>
41 #include <sys/syscallargs.h>
43 #include <compat/sys/time.h>
45 #include <compat/linux/common/linux_types.h>
46 #include <compat/linux/common/linux_mmap.h>
47 #include <compat/linux/common/linux_signal.h>
48 #include <compat/linux/common/linux_siginfo.h>
49 #include <compat/linux/common/linux_machdep.h>
51 #include <compat/linux/linux_syscallargs.h>
55 0 NOARGS { int|linux_sys||nosys(void); } syscall
56 1 NOARGS { int|sys||exit(int rval); }
57 2 NOARGS { int|sys||fork(void); }
58 3 NOARGS { int|sys||read(int fd, char *buf, u_int nbyte); }
59 4 NOARGS { int|sys||write(int fd, char *buf, u_int nbyte); }
60 5 STD { int|linux_sys||open(const char *path, int flags, \
62 6 NOARGS { int|sys||close(int fd); }
63 7 STD { int|linux_sys||waitpid(int pid, int *status, \
65 8 STD { int|linux_sys||creat(const char *path, int mode); }
66 9 NOARGS { int|sys||link(const char *path, const char *link); }
67 10 STD { int|linux_sys||unlink(const char *path); }
68 11 NOARGS { int|sys||execve(const char *path, char **argp, \
70 12 NOARGS { int|sys||chdir(const char *path); }
71 13 STD { int|linux_sys||time(linux_time_t *t); }
72 14 STD { int|linux_sys||mknod(const char *path, int mode, \
74 15 NOARGS { int|sys||chmod(const char *path, int mode); }
75 16 STD { int|linux_sys||lchown16(const char *path, \
76 linux_uid16_t uid, linux_gid16_t gid); }
77 ;17 - no longer in linux source.
78 17 STD { int|linux_sys||break(char *nsize); }
80 19 NOARGS { long|compat_43_sys||lseek(int fd, long offset, \
83 20 STD { pid_t|linux_sys||getpid(void); }
85 20 NOARGS { pid_t|sys||getpid(void); }
89 23 NOARGS linux_setuid16 { int|sys||setuid(uid_t uid); }
90 24 NOARGS linux_getuid16 { uid_t|sys||getuid(void); }
91 25 STD { int|linux_sys||stime(linux_time_t *t); }
92 26 STD { int|linux_sys||ptrace(int request, int pid, \
93 int addr, int data); }
94 27 STD { int|linux_sys||alarm(unsigned int secs); }
96 29 STD { int|linux_sys||pause(void); }
97 30 STD { int|linux_sys||utime(const char *path, \
98 struct linux_utimbuf *times); }
101 33 NOARGS { int|sys||access(const char *path, int flags); }
102 34 STD { int|linux_sys||nice(int incr); }
104 36 NOARGS { int|sys||sync(void); }
105 37 STD { int|linux_sys||kill(int pid, int signum); }
106 38 NOARGS { int|sys||__posix_rename(const char *from, \
108 39 NOARGS { int|sys||mkdir(const char *path, int mode); }
109 40 NOARGS { int|sys||rmdir(const char *path); }
110 41 NOARGS { int|sys||dup(u_int fd); }
111 42 STD { int|linux_sys||pipe(int *pfds); }
112 43 STD { int|linux_sys||times(struct times *tms); }
114 45 STD { int|linux_sys||brk(char *nsize); }
115 46 NOARGS linux_setgid16 { int|sys||setgid(gid_t gid); }
116 47 NOARGS linux_getgid16 { gid_t|sys||getgid(void); }
117 48 STD { int|linux_sys||signal(int signum, \
118 linux_handler_t handler); }
119 49 NOARGS linux_geteuid16 { uid_t|sys||geteuid(void); }
120 50 NOARGS linux_getegid16 { gid_t|sys||getegid(void); }
121 51 NOARGS { int|sys||acct(char *path); }
124 54 STD { int|linux_sys||ioctl(int fd, u_long com, \
126 55 STD { int|linux_sys||fcntl(int fd, int cmd, void *arg); }
128 57 NOARGS { int|sys||setpgid(int pid, int pgid); }
130 59 STD { int|linux_sys||oldolduname( \
131 struct linux_oldold_utsname *up); }
132 60 NOARGS { int|sys||umask(int newmask); }
133 61 NOARGS { int|sys||chroot(char *path); }
135 63 NOARGS { int|sys||dup2(u_int from, u_int to); }
137 64 STD { pid_t|linux_sys||getppid(void); }
139 64 NOARGS { pid_t|sys||getppid(void); }
141 65 NOARGS { int|sys||getpgrp(void); }
142 66 NOARGS { int|sys||setsid(void); }
143 67 STD { int|linux_sys||sigaction(int signum, \
144 const struct linux_old_sigaction *nsa, \
145 struct linux_old_sigaction *osa); }
146 68 STD { int|linux_sys||siggetmask(void); }
147 69 STD { int|linux_sys||sigsetmask(linux_old_sigset_t mask); }
148 70 STD { int|linux_sys||setreuid16(linux_uid16_t ruid, \
149 linux_uid16_t euid); }
150 71 STD { int|linux_sys||setregid16(linux_gid16_t rgid, \
151 linux_gid16_t egid); }
152 72 STD { int|linux_sys||sigsuspend(void *restart, \
153 int oldmask, int mask); }
154 73 STD { int|linux_sys||sigpending(linux_old_sigset_t *set); }
155 74 NOARGS { int|compat_43_sys||sethostname(char *hostname, \
157 75 STD { int|linux_sys||setrlimit(u_int which, \
158 struct orlimit *rlp); }
159 76 STD { int|linux_sys||getrlimit(u_int which, \
160 struct orlimit *rlp); }
161 77 NOARGS { int|compat_50_sys||getrusage(int who, \
162 struct rusage50 *rusage); }
163 78 STD { int|linux_sys||gettimeofday(struct timeval50 *tp, \
164 struct timezone *tzp); }
165 79 STD { int|linux_sys||settimeofday(struct timeval50 *tp, \
166 struct timezone *tzp); }
167 80 STD { int|linux_sys||getgroups16(int gidsetsize, \
168 linux_gid16_t *gidset); }
169 81 STD { int|linux_sys||setgroups16(int gidsetsize, \
170 linux_gid16_t *gidset); }
171 82 STD { int|linux_sys||oldselect(struct linux_oldselect *lsp); }
172 83 NOARGS { int|sys||symlink(const char *path, const char *to); }
173 84 NOARGS { int|compat_43_sys||lstat(const char *path, \
174 struct stat43 *up); } oolstat
175 85 NOARGS { int|sys||readlink(const char *name, char *buf, \
178 86 STD { int|linux_sys||uselib(const char *path); }
182 87 STD { int|linux_sys||swapon(char *name); }
183 88 STD { int|linux_sys||reboot(int magic1, int magic2, \
184 int cmd, void *arg); }
185 89 STD { int|linux_sys||readdir(int fd, void *dent, \
186 unsigned int count); }
187 90 STD { int|linux_sys||old_mmap(struct linux_oldmmap *lmp); }
188 91 NOARGS { int|sys||munmap(void *addr, int len); }
189 92 NOARGS { int|compat_43_sys||truncate(const char *path, \
191 93 NOARGS { int|compat_43_sys||ftruncate(int fd, long length); }
192 94 NOARGS { int|sys||fchmod(int fd, int mode); }
193 95 STD { int|linux_sys||fchown16(int fd, linux_uid16_t uid, \
194 linux_gid16_t gid); }
195 96 STD { int|linux_sys||getpriority(int which, int who); }
196 97 NOARGS { int|sys||setpriority(int which, int who, int prio); }
197 98 NOARGS { int|sys||profil(void *samples, u_int size, \
198 u_int offset, u_int scale); }
199 99 STD { int|linux_sys||statfs(const char *path, \
200 struct linux_statfs *sp); }
201 100 STD { int|linux_sys||fstatfs(int fd, \
202 struct linux_statfs *sp); }
203 101 STD { int|linux_sys||ioperm(unsigned int lo, \
204 unsigned int hi, int val); }
205 102 STD { int|linux_sys||socketcall(int what, void *args); }
207 104 NOARGS { int|compat_50_sys||setitimer(u_int which, \
208 struct itimerval50 *itv, struct itimerval50 *oitv); }
209 105 NOARGS { int|compat_50_sys||getitimer(u_int which, \
210 struct itimerval50 *itv); }
211 106 STD { int|linux_sys||stat(const char *path, \
212 struct linux_stat *sp); }
213 107 STD { int|linux_sys||lstat(const char *path, \
214 struct linux_stat *sp); }
215 108 STD { int|linux_sys||fstat(int fd, struct linux_stat *sp); }
216 109 STD { int|linux_sys||olduname(struct linux_old_utsname *up); }
217 110 STD { int|linux_sys||iopl(int level); }
221 114 STD { int|linux_sys||wait4(int pid, int *status, \
222 int options, struct rusage50 *rusage); }
223 115 STD { int|linux_sys||swapoff(const char *path); }
224 116 STD { int|linux_sys||sysinfo(struct linux_sysinfo *arg); }
225 117 STD { int|linux_sys||ipc(int what, int a1, int a2, int a3, \
227 118 NOARGS { int|sys||fsync(int fd); }
228 119 STD { int|linux_sys||sigreturn(struct linux_sigcontext *scp); }
229 120 STD { int|linux_sys||clone(int flags, void *stack, \
230 void *parent_tidptr, void *child_tidptr); }
231 121 STD { int|linux_sys||setdomainname(char *domainname, \
233 122 STD { int|linux_sys||uname(struct linux_utsname *up); }
234 123 STD { int|linux_sys||modify_ldt(int func, void *ptr, \
237 125 STD { int|linux_sys||mprotect(const void *start, \
238 unsigned long len, int prot); }
239 126 STD { int|linux_sys||sigprocmask(int how, \
240 const linux_old_sigset_t *set, \
241 linux_old_sigset_t *oset); }
242 127 UNIMPL create_module
243 128 UNIMPL init_module
244 129 UNIMPL delete_module
245 130 UNIMPL get_kernel_syms
247 132 NOARGS { pid_t|sys||getpgid(pid_t pid); }
248 133 NOARGS { int|sys||fchdir(int fd); }
251 136 STD { int|linux_sys||personality(unsigned long per); }
252 137 UNIMPL afs_syscall
253 138 NOARGS linux_setfsuid16 { int|linux_sys||setfsuid(uid_t uid); }
254 139 NOARGS linux_setfsgid16 { int|linux_sys||setfsgid(gid_t gid); }
255 140 STD { int|linux_sys||llseek(int fd, u_int32_t ohigh, \
256 u_int32_t olow, void *res, int whence); }
257 141 STD { int|linux_sys||getdents(int fd, \
258 struct linux_dirent *dent, unsigned int count); }
259 142 STD { int|linux_sys||select(int nfds, fd_set *readfds, \
260 fd_set *writefds, fd_set *exceptfds, \
261 struct timeval50 *timeout); }
262 143 NOARGS { int|sys||flock(int fd, int how); }
263 144 NOARGS { int|sys|13|msync(void *addr, size_t len, int flags); }
264 145 NOARGS { int|sys||readv(int fd, struct iovec *iovp, \
266 146 NOARGS { int|sys||writev(int fd, struct iovec *iovp, \
268 147 NOARGS { pid_t|sys||getsid(pid_t pid); }
269 148 STD { int|linux_sys||fdatasync(int fd); }
270 149 STD { int|linux_sys||__sysctl(struct linux___sysctl *lsp); }
271 150 NOARGS { int|sys||mlock(void *addr, size_t len); }
272 151 NOARGS { int|sys||munlock(void *addr, size_t len); }
273 152 NOARGS { int|sys||mlockall(int flags); }
274 153 NOARGS { int|sys||munlockall(void); }
275 154 STD { int|linux_sys||sched_setparam(pid_t pid, \
276 const struct linux_sched_param *sp); }
277 155 STD { int|linux_sys||sched_getparam(pid_t pid, \
278 struct linux_sched_param *sp); }
279 156 STD { int|linux_sys||sched_setscheduler(pid_t pid, \
280 int policy, const struct linux_sched_param *sp); }
281 157 STD { int|linux_sys||sched_getscheduler(pid_t pid); }
282 158 STD { int|linux_sys||sched_yield(void); }
283 159 STD { int|linux_sys||sched_get_priority_max(int policy); }
284 160 STD { int|linux_sys||sched_get_priority_min(int policy); }
285 161 UNIMPL sys_sched_rr_get_interval
286 162 STD { int|linux_sys||nanosleep( \
287 const struct linux_timespec *rqtp, \
288 struct linux_timespec *rmtp); }
289 163 STD { void *|linux_sys||mremap(void *old_address, \
290 size_t old_size, size_t new_size, u_long flags); }
291 164 STD { int|linux_sys||setresuid16(linux_uid16_t ruid, \
292 linux_uid16_t euid, linux_uid16_t suid); }
293 165 STD { int|linux_sys||getresuid16(linux_uid16_t *ruid, \
294 linux_uid16_t *euid, linux_uid16_t *suid); }
296 167 UNIMPL query_module
297 168 NOARGS { int|sys||poll(struct pollfd *fds, u_int nfds, \
299 169 UNIMPL nfsservctl
300 170 STD { int|linux_sys||setresgid16(linux_gid16_t rgid, \
301 linux_gid16_t egid, linux_gid16_t sgid); }
302 171 STD { int|linux_sys||getresgid16(linux_gid16_t *rgid, \
303 linux_gid16_t *egid, linux_gid16_t *sgid); }
305 173 STD { int|linux_sys||rt_sigreturn( \
306 struct linux_ucontext *ucp); }
307 174 STD { int|linux_sys||rt_sigaction(int signum, \
308 const struct linux_sigaction *nsa, \
309 struct linux_sigaction *osa, \
310 size_t sigsetsize); }
311 175 STD { int|linux_sys||rt_sigprocmask(int how, \
312 const linux_sigset_t *set, \
313 linux_sigset_t *oset, \
314 size_t sigsetsize); }
315 176 STD { int|linux_sys||rt_sigpending( \
316 linux_sigset_t *set, \
317 size_t sigsetsize); }
318 177 UNIMPL rt_sigtimedwait
319 178 STD { int|linux_sys||rt_queueinfo(int pid, int signum, \
320 linux_siginfo_t *uinfo); }
321 179 STD { int|linux_sys||rt_sigsuspend(linux_sigset_t *unewset, \
322 size_t sigsetsize); }
323 180 STD { int|linux_sys||pread(int fd, char *buf, \
324 size_t nbyte, linux_off_t offset); }
325 181 STD { int|linux_sys||pwrite(int fd, char *buf, \
326 size_t nbyte, linux_off_t offset); }
327 182 STD { int|linux_sys||chown16(const char *path, \
328 linux_uid16_t uid, linux_gid16_t gid); }
329 183 NOARGS { int|sys||__getcwd(char *bufp, size_t length); }
332 186 STD { int|linux_sys||sigaltstack( \
333 const struct linux_sigaltstack *ss, \
334 struct linux_sigaltstack *oss); }
338 190 NOARGS { int|sys|14|vfork(void); }
339 191 STD { int|linux_sys||ugetrlimit(int which, \
340 struct orlimit *rlp); }
341 #define linux_sys_mmap2_args linux_sys_mmap_args
342 192 NOARGS { linux_off_t|linux_sys||mmap2(unsigned long addr, \
343 size_t len, int prot, int flags, int fd, \
344 linux_off_t offset); }
345 193 STD { int|linux_sys||truncate64(const char *path, \
347 194 STD { int|linux_sys||ftruncate64(unsigned int fd, \
349 195 STD { int|linux_sys||stat64(const char *path, \
350 struct linux_stat64 *sp); }
351 196 STD { int|linux_sys||lstat64(const char *path, \
352 struct linux_stat64 *sp); }
353 197 STD { int|linux_sys||fstat64(int fd, \
354 struct linux_stat64 *sp); }
355 198 NOARGS { int|sys||__posix_lchown(const char *path, uid_t uid, \
357 199 NOARGS { uid_t|sys||getuid(void); }
358 200 NOARGS { gid_t|sys||getgid(void); }
359 201 NOARGS { uid_t|sys||geteuid(void); }
360 202 NOARGS { gid_t|sys||getegid(void); }
361 203 NOARGS { int|sys||setreuid(uid_t ruid, uid_t euid); }
362 204 NOARGS { int|sys||setregid(gid_t rgid, gid_t egid); }
363 205 NOARGS { int|sys||getgroups(u_int gidsetsize, gid_t *gidset); }
364 206 NOARGS { int|sys||setgroups(u_int gidsetsize, gid_t *gidset); }
365 207 NOARGS { int|sys||__posix_fchown(int fd, uid_t uid, \
367 208 STD { int|linux_sys||setresuid(uid_t ruid, uid_t euid, \
369 209 STD { int|linux_sys||getresuid(uid_t *ruid, uid_t *euid, \
371 210 STD { int|linux_sys||setresgid(gid_t rgid, gid_t egid, \
373 211 STD { int|linux_sys||getresgid(gid_t *rgid, gid_t *egid, \
375 212 NOARGS { int|sys||__posix_chown(const char *path, uid_t uid, \
377 213 NOARGS { int|sys||setuid(uid_t uid); }
378 214 NOARGS { int|sys||setgid(gid_t gid); }
379 215 STD { int|linux_sys||setfsuid(uid_t uid); }
380 216 STD { int|linux_sys||setfsgid(gid_t gid); }
381 217 UNIMPL pivot_root
382 218 NOARGS { int|sys||mincore(void *addr, size_t len, char *vec); }
383 219 NOARGS { int|sys||madvise(void *addr, size_t len, int behav); }
384 220 STD { int|linux_sys||getdents64(int fd, \
385 struct linux_dirent64 *dent, unsigned int count); }
386 221 STD { int|linux_sys||fcntl64(int fd, int cmd, void *arg); }
387 222 UNIMPL /* unused */
388 223 UNIMPL /* unused */
390 224 STD { pid_t|linux_sys||gettid(void); }
396 226 STD { int|linux_sys||setxattr(char *path, char *name, \
397 void *value, size_t size, int flags); }
398 227 STD { int|linux_sys||lsetxattr(char *path, char *name, \
399 void *value, size_t size, int flags); }
400 228 STD { int|linux_sys||fsetxattr(int fd, char *name, \
401 void *value, size_t size, int flags); }
402 229 STD { ssize_t|linux_sys||getxattr(char *path, char *name, \
403 void *value, size_t size); }
404 230 STD { ssize_t|linux_sys||lgetxattr(char *path, char *name, \
405 void *value, size_t size); }
406 231 STD { ssize_t|linux_sys||fgetxattr(int fd, char *name, \
407 void *value, size_t size); }
408 232 STD { ssize_t|linux_sys||listxattr(char *path, char *list, \
410 233 STD { ssize_t|linux_sys||llistxattr(char *path, char *list, \
412 234 STD { ssize_t|linux_sys||flistxattr(int fd, char *list, \
414 235 STD { int|linux_sys||removexattr(char *path, char *name); }
415 236 STD { int|linux_sys||lremovexattr(char *path, char *name); }
416 237 STD { int|linux_sys||fremovexattr(int fd, char *name); }
418 238 STD { int|linux_sys||tkill(int tid, int sig); }
422 239 UNIMPL sendfile64
423 240 STD { int|linux_sys||futex(int *uaddr, int op, int val, \
424 const struct linux_timespec *timeout, int *uaddr2, \
427 241 STD { int|linux_sys||sched_setaffinity(pid_t pid, \
428 unsigned int len, unsigned long *mask); }
429 242 STD { int|linux_sys||sched_getaffinity(pid_t pid, \
430 unsigned int len, unsigned long *mask); }
432 241 UNIMPL setaffinity
433 242 UNIMPL getaffinity
436 243 STD { int|linux_sys||set_thread_area( \
437 struct linux_user_desc *desc); }
438 244 STD { int|linux_sys||get_thread_area( \
439 struct linux_user_desc *desc); }
441 243 UNIMPL set_thread_area
442 244 UNIMPL get_thread_area
445 246 UNIMPL io_destroy
446 247 UNIMPL io_getevents
450 251 UNIMPL /* unused */
451 252 STD { int|linux_sys||exit_group(int error_code); }
452 253 UNIMPL lookup_dcookie
453 254 UNIMPL epoll_create
455 256 UNIMPL epoll_wait
456 257 UNIMPL remap_file_pages
458 258 STD { int|linux_sys||set_tid_address(int *tid); }
460 258 UNIMPL set_tid_address
462 259 UNIMPL timer_create
463 260 UNIMPL timer_settime
464 261 UNIMPL timer_gettime
465 262 UNIMPL timer_getoverrun
466 263 UNIMPL timer_delete
467 264 STD { int|linux_sys||clock_settime(clockid_t which, \
468 struct linux_timespec *tp); }
469 265 STD { int|linux_sys||clock_gettime(clockid_t which, \
470 struct linux_timespec *tp); }
471 266 STD { int|linux_sys||clock_getres(clockid_t which, \
472 struct linux_timespec *tp); }
473 267 STD { int|linux_sys||clock_nanosleep(clockid_t which, \
474 int flags, struct linux_timespec *rqtp, \
475 struct linux_timespec *rmtp); }
476 268 STD { int|linux_sys||statfs64(const char *path, \
477 size_t sz, struct linux_statfs64 *sp); }
478 269 STD { int|linux_sys||fstatfs64(int fd, \
479 size_t sz, struct linux_statfs64 *sp); }
481 270 STD { int|linux_sys||tgkill(int tgid, int tid, int sig); }
486 272 UNIMPL fadvise64_64
489 275 UNIMPL get_mempolicy
490 276 UNIMPL set_mempolicy
493 279 UNIMPL mq_timedsend
494 280 UNIMPL mq_timedreceive
496 282 UNIMPL mq_getsetattr
497 283 UNIMPL sys_kexec_load
499 285 OBSOL /* XXXJDM really? */
501 287 UNIMPL request_key
503 289 UNIMPL ioprio_set
504 290 UNIMPL ioprio_get
505 291 UNIMPL inotify_init
506 292 UNIMPL inotify_add_watch
507 293 UNIMPL inotify_rm_watch
508 294 UNIMPL migrate_pages
519 305 UNIMPL readlinkat
525 311 STD { int|linux_sys||set_robust_list( \
526 struct linux_robust_list_head *head, size_t len); }
527 312 STD { int|linux_sys||get_robust_list(int pid, \
528 struct linux_robust_list_head **head, \
531 314 UNIMPL sync_file_range