1 $NetBSD: syscalls.master,v 1.42 2009/06/08 13:26:57 njoly Exp $
3 ; Derived from sys/compat/linux/arch/*/syscalls.master
4 ; and from Linux 2.4.12 arch/arm/kernel/calls.S
6 ; NetBSD/arm COMPAT_LINUX system call name/number "master" file.
7 ; (See syscalls.conf to see what it is processed into.)
9 ; Fields: number type [type-dependent ...]
10 ; number system call number, must be in order
11 ; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
12 ; the compatibility options defined in syscalls.conf.
16 ; OBSOL obsolete, not included in system
17 ; UNIMPL unimplemented, not included in system
18 ; NODEF included, but don't define the syscall number
19 ; NOARGS included, but don't define the syscall args structure
20 ; INDIR included, but don't define the syscall args structure
21 ; and allow it to be "really" varargs.
23 ; The compat options are defined in the syscalls.conf file, and the
24 ; compat option name is prefixed to the syscall name. Other than
25 ; that, they're like NODEF (for 'compat' options), or STD (for
26 ; 'libcompat' options).
28 ; The type-dependent arguments are as follows:
29 ; For STD, NODEF, NOARGS, and compat syscalls:
30 ; { pseudo-proto } [alias]
34 ; #ifdef's, etc. may be included, and are copied to the output files.
35 ; #include's are copied to the syscall names and switch definition files only.
37 #include <sys/param.h>
39 #include <sys/systm.h>
40 #include <sys/signal.h>
41 #include <sys/mount.h>
42 #include <sys/syscallargs.h>
45 #include <compat/sys/time.h>
46 #include <compat/linux/common/linux_types.h>
47 #include <compat/linux/common/linux_mmap.h>
48 #include <compat/linux/common/linux_signal.h>
49 #include <compat/linux/common/linux_siginfo.h>
50 #include <compat/linux/common/linux_machdep.h>
52 #include <compat/linux/linux_syscallargs.h>
55 ; XXX We have to explicitly declare linux_sys_nosys.
56 0 NOARGS { int|linux_sys||nosys(void); }
57 1 NOARGS { int|sys||exit(int rval); }
58 2 NOARGS { int|sys||fork(void); }
59 3 NOARGS { int|sys||read(int fd, char *buf, u_int nbyte); }
60 4 NOARGS { int|sys||write(int fd, char *buf, u_int nbyte); }
61 5 STD { int|linux_sys||open(const char *path, int flags, \
63 6 NOARGS { int|sys||close(int fd); }
64 7 STD { int|linux_sys||waitpid(int pid, int *status, \
66 8 STD { int|linux_sys||creat(const char *path, int mode); }
67 9 NOARGS { int|sys||link(const char *path, const char *link); }
68 10 STD { int|linux_sys||unlink(const char *path); }
69 11 NOARGS { int|sys||execve(const char *path, char **argp, \
71 12 NOARGS { int|sys||chdir(const char *path); }
72 13 STD { int|linux_sys||time(linux_time_t *t); }
73 14 STD { int|linux_sys||mknod(const char *path, int mode, \
75 15 NOARGS { int|sys||chmod(const char *path, int mode); }
76 16 STD { int|linux_sys||lchown16(const char *path, \
77 linux_uid16_t uid, linux_gid16_t gid); }
80 19 NOARGS { long|compat_43_sys||lseek(int fd, long offset, \
82 20 NOARGS { pid_t|sys||getpid(void); }
85 23 NOARGS { int|sys||setuid(uid_t uid); }
86 24 NOARGS { uid_t|sys||getuid(void); }
87 25 STD { int|linux_sys||stime(linux_time_t *t); }
88 26 STD { int|linux_sys||ptrace(int request, int pid, \
89 int addr, int data); }
90 27 STD { int|linux_sys||alarm(unsigned int secs); }
92 29 STD { int|linux_sys||pause(void); }
93 30 STD { int|linux_sys||utime(const char *path, \
94 struct linux_utimbuf *times); }
97 33 NOARGS { int|sys||access(const char *path, int flags); }
98 34 STD { int|linux_sys||nice(int incr); }
100 36 NOARGS { int|sys||sync(void); }
101 37 STD { int|linux_sys||kill(int pid, int signum); }
102 38 NOARGS { int|sys||__posix_rename(const char *from, \
104 39 NOARGS { int|sys||mkdir(const char *path, int mode); }
105 40 NOARGS { int|sys||rmdir(const char *path); }
106 41 NOARGS { int|sys||dup(u_int fd); }
107 42 STD { int|linux_sys||pipe(int *pfds); }
108 43 STD { int|linux_sys||times(struct times *tms); }
110 45 STD { int|linux_sys||brk(char *nsize); }
111 46 NOARGS { int|sys||setgid(gid_t gid); }
112 47 NOARGS { gid_t|sys||getgid(void); }
113 48 STD { int|linux_sys||signal(int signum, \
114 linux_handler_t handler); }
115 49 NOARGS { uid_t|sys||geteuid(void); }
116 50 NOARGS { gid_t|sys||getegid(void); }
117 51 NOARGS { int|sys||acct(char *path); }
120 54 STD { int|linux_sys||ioctl(int fd, u_long com, \
122 55 STD { int|linux_sys||fcntl(int fd, int cmd, void *arg); }
124 57 NOARGS { int|sys||setpgid(int pid, int pgid); }
126 59 STD { int|linux_sys||oldolduname( \
127 struct linux_oldold_utsname *up); }
128 60 NOARGS { int|sys||umask(int newmask); }
129 61 NOARGS { int|sys||chroot(char *path); }
131 63 NOARGS { int|sys||dup2(u_int from, u_int to); }
132 64 NOARGS { pid_t|sys||getppid(void); }
133 65 NOARGS { int|sys||getpgrp(void); }
134 66 NOARGS { int|sys||setsid(void); }
135 67 STD { int|linux_sys||sigaction(int signum, \
136 const struct linux_old_sigaction *nsa, \
137 struct linux_old_sigaction *osa); }
138 68 STD { int|linux_sys||siggetmask(void); }
139 69 STD { int|linux_sys||sigsetmask(linux_old_sigset_t mask); }
140 70 STD { int|linux_sys||setreuid16(linux_uid16_t ruid, \
141 linux_uid16_t euid); }
142 71 STD { int|linux_sys||setregid16(linux_gid16_t rgid, \
143 linux_gid16_t egid); }
144 72 STD { int|linux_sys||sigsuspend(void *restart, \
145 int oldmask, int mask); }
146 73 STD { int|linux_sys||sigpending(linux_old_sigset_t *set); }
147 74 NOARGS { int|compat_43_sys||sethostname(char *hostname, \
149 75 STD { int|linux_sys||setrlimit(u_int which, \
150 struct orlimit *rlp); }
151 76 STD { int|linux_sys||getrlimit(u_int which, \
152 struct orlimit *rlp); }
153 77 NOARGS { int|compat_50_sys||getrusage(int who, struct rusage50 *rusage); }
154 78 STD { int|linux_sys||gettimeofday(struct timeval50 *tp, \
155 struct timezone *tzp); }
156 79 STD { int|linux_sys||settimeofday(struct timeval50 *tp, \
157 struct timezone *tzp); }
158 80 STD { int|linux_sys||getgroups16(int gidsetsize, \
159 linux_gid16_t *gidset); }
160 81 STD { int|linux_sys||setgroups16(int gidsetsize, \
161 linux_gid16_t *gidset); }
162 82 STD { int|linux_sys||oldselect(struct linux_oldselect *lsp); }
163 83 NOARGS { int|sys||symlink(const char *path, const char *to); }
164 84 NOARGS { int|compat_43_sys||lstat(const char *path, \
165 struct stat43 *up); } oolstat
166 85 NOARGS { int|sys||readlink(const char *name, char *buf, \
169 86 STD { int|linux_sys||uselib(const char *path); }
173 87 STD { int|linux_sys||swapon(char *name); }
174 88 STD { int|linux_sys||reboot(int magic1, int magic2, \
175 int cmd, void *arg); }
176 89 STD { int|linux_sys||readdir(int fd, void *dent, \
177 unsigned int count); }
178 90 STD { int|linux_sys||old_mmap(struct linux_oldmmap *lmp); }
179 91 NOARGS { int|sys||munmap(void *addr, int len); }
180 92 NOARGS { int|compat_43_sys||truncate(const char *path, \
182 93 NOARGS { int|compat_43_sys||ftruncate(int fd, long length); }
183 94 NOARGS { int|sys||fchmod(int fd, int mode); }
184 95 STD { int|linux_sys||fchown16(int fd, linux_uid16_t uid, \
185 linux_gid16_t gid); }
186 96 STD { int|linux_sys||getpriority(int which, int who); }
187 97 NOARGS { int|sys||setpriority(int which, int who, int prio); }
188 98 NOARGS { int|sys||profil(void *samples, u_int size, \
189 u_int offset, u_int scale); }
190 99 STD { int|linux_sys||statfs(const char *path, \
191 struct linux_statfs *sp); }
192 100 STD { int|linux_sys||fstatfs(int fd, \
193 struct linux_statfs *sp); }
195 102 STD { int|linux_sys||socketcall(int what, void *args); }
197 104 NOARGS { int|compat_50_sys||setitimer(u_int which, \
198 struct itimerval50 *itv, \
199 struct itimerval50 *oitv); }
200 105 NOARGS { int|compat_50_sys||getitimer(u_int which, \
201 struct itimerval50 *itv); }
202 106 STD { int|linux_sys||stat(const char *path, \
203 struct linux_stat *sp); }
204 107 STD { int|linux_sys||lstat(const char *path, \
205 struct linux_stat *sp); }
206 108 STD { int|linux_sys||fstat(int fd, struct linux_stat *sp); }
207 109 STD { int|linux_sys||olduname(struct linux_oldutsname *up); }
212 114 STD { int|linux_sys||wait4(int pid, int *status, \
213 int options, struct rusage50 *rusage); }
214 115 STD { int|linux_sys||swapoff(const char *path); }
215 116 STD { int|linux_sys||sysinfo(struct linux_sysinfo *arg); }
216 117 STD { int|linux_sys||ipc(int what, int a1, int a2, int a3, \
218 118 NOARGS { int|sys||fsync(int fd); }
219 119 STD { int|linux_sys||sigreturn(struct linux_sigcontext *scp); }
220 120 STD { int|linux_sys||clone(int flags, void *stack); }
221 121 STD { int|linux_sys||setdomainname(char *domainname, \
223 122 STD { int|linux_sys||uname(struct linux_utsname *up); }
224 123 UNIMPL modify_ldt
226 125 STD { int|linux_sys||mprotect(const void *start, \
227 unsigned long len, int prot); }
228 126 STD { int|linux_sys||sigprocmask(int how, \
229 const linux_old_sigset_t *set, \
230 linux_old_sigset_t *oset); }
231 127 UNIMPL create_module
232 128 UNIMPL init_module
233 129 UNIMPL delete_module
234 130 UNIMPL get_kernel_syms
236 132 NOARGS { pid_t|sys||getpgid(pid_t pid); }
237 133 NOARGS { int|sys||fchdir(int fd); }
240 136 STD { int|linux_sys||personality(unsigned long per); }
241 137 UNIMPL afs_syscall
242 138 STD { int|linux_sys||setfsuid(uid_t uid); }
243 139 STD { int|linux_sys||setfsgid(gid_t gid); }
244 140 STD { int|linux_sys||llseek(int fd, u_int32_t ohigh, \
245 u_int32_t olow, void *res, int whence); }
246 141 STD { int|linux_sys||getdents(int fd, \
247 struct linux_dirent *dent, unsigned int count); }
248 142 STD { int|linux_sys||select(int nfds, fd_set *readfds, \
249 fd_set *writefds, fd_set *exceptfds, \
250 struct timeval50 *timeout); }
251 143 NOARGS { int|sys||flock(int fd, int how); }
252 144 NOARGS { int|sys|13|msync(void *addr, size_t len, int flags); }
253 145 NOARGS { int|sys||readv(int fd, struct iovec *iovp, \
255 146 NOARGS { int|sys||writev(int fd, struct iovec *iovp, \
257 147 NOARGS { pid_t|sys||getsid(pid_t pid); }
258 148 STD { int|linux_sys||fdatasync(int fd); }
259 149 STD { int|linux_sys||__sysctl(struct linux___sysctl *lsp); }
260 150 NOARGS { int|sys||mlock(void *addr, size_t len); }
261 151 NOARGS { int|sys||munlock(void *addr, size_t len); }
262 152 NOARGS { int|sys||mlockall(int flags); }
263 153 NOARGS { int|sys||munlockall(void); }
264 154 STD { int|linux_sys||sched_setparam(pid_t pid, \
265 const struct linux_sched_param *sp); }
266 155 STD { int|linux_sys||sched_getparam(pid_t pid, \
267 struct linux_sched_param *sp); }
268 156 STD { int|linux_sys||sched_setscheduler(pid_t pid, \
269 int policy, const struct linux_sched_param *sp); }
270 157 STD { int|linux_sys||sched_getscheduler(pid_t pid); }
271 158 STD { int|linux_sys||sched_yield(void); }
272 159 STD { int|linux_sys||sched_get_priority_max(int policy); }
273 160 STD { int|linux_sys||sched_get_priority_min(int policy); }
274 161 UNIMPL sched_rr_get_interval
275 162 STD { int|linux_sys||nanosleep( \
276 const struct linux_timespec *rqtp, \
277 struct linux_timespec *rmtp); }
278 163 STD { void *|linux_sys||mremap(void *old_address, \
279 size_t old_size, size_t new_size, u_long flags); }
280 164 STD { int|linux_sys||setresuid16(linux_uid16_t ruid, \
281 linux_uid16_t euid, linux_uid16_t suid); }
282 165 STD { int|linux_sys||getresuid16(linux_uid16_t *ruid, \
283 linux_uid16_t *euid, linux_uid16_t *suid); }
285 167 UNIMPL query_module
286 168 NOARGS { int|sys||poll(struct pollfd *fds, u_int nfds, \
288 169 UNIMPL nfsservctl
289 170 STD { int|linux_sys||setresgid16(linux_gid16_t rgid, \
290 linux_gid16_t egid, linux_gid16_t sgid); }
291 171 STD { int|linux_sys||getresgid16(linux_gid16_t *rgid, \
292 linux_gid16_t *egid, linux_gid16_t *sgid); }
294 173 UNIMPL rt_sigreturn
295 ;173 STD { int|linux_sys||rt_sigreturn( \
296 ; struct linux_rt_sigframe *sfp); }
297 174 STD { int|linux_sys||rt_sigaction(int signum, \
298 const struct linux_sigaction *nsa, \
299 struct linux_sigaction *osa, \
300 size_t sigsetsize); }
301 175 STD { int|linux_sys||rt_sigprocmask(int how, \
302 const linux_sigset_t *set, \
303 linux_sigset_t *oset, \
304 size_t sigsetsize); }
305 176 STD { int|linux_sys||rt_sigpending( \
306 linux_sigset_t *set, \
307 size_t sigsetsize); }
308 177 UNIMPL rt_sigtimedwait
309 178 STD { int|linux_sys||rt_queueinfo(int pid, int signum, \
310 linux_siginfo_t *uinfo); }
311 179 STD { int|linux_sys||rt_sigsuspend(linux_sigset_t *unewset, \
312 size_t sigsetsize); }
313 180 STD { int|linux_sys||pread(int fd, char *buf, \
314 size_t nbyte, linux_off_t offset); }
315 181 STD { int|linux_sys||pwrite(int fd, char *buf, \
316 size_t nbyte, linux_off_t offset); }
317 182 STD { int|linux_sys||chown16(const char *path, \
318 linux_uid16_t uid, linux_gid16_t gid); }
319 183 NOARGS { int|sys||__getcwd(char *bufp, size_t length); }
322 186 STD { int|linux_sys||sigaltstack( \
323 const struct linux_sigaltstack *ss, \
324 struct linux_sigaltstack *oss); }
328 190 NOARGS vfork { int|sys|14|vfork(void); }
329 191 STD { int|linux_sys||ugetrlimit(int which, \
330 struct rlimit *rlp); }
331 #define linux_sys_mmap2_args linux_sys_mmap_args
332 192 NOARGS { linux_off_t|linux_sys||mmap2(unsigned long addr, \
333 size_t len, int prot, int flags, int fd, \
334 linux_off_t offset); }
335 193 STD { int|linux_sys||truncate64(const char *path, \
337 194 STD { int|linux_sys||ftruncate64(unsigned int fd, \
339 195 STD { int|linux_sys||stat64(const char *path, \
340 struct linux_stat64 *sp); }
341 196 STD { int|linux_sys||lstat64(const char *path, \
342 struct linux_stat64 *sp); }
343 197 STD { int|linux_sys||fstat64(int fd, \
344 struct linux_stat64 *sp); }
345 198 NOARGS { int|sys||__posix_lchown(const char *path, uid_t uid, \
347 199 NOARGS getuid32 { uid_t|sys||getuid(void); }
348 200 NOARGS getgid32 { gid_t|sys||getgid(void); }
349 201 NOARGS geteuid32 { uid_t|sys||geteuid(void); }
350 202 NOARGS getegid32 { gid_t|sys||getegid(void); }
351 203 NOARGS setreuid32 { int|sys||setreuid(uid_t ruid, \
353 204 NOARGS setregid32 { int|sys||setregid(gid_t rgid, \
355 205 NOARGS getgroups32 { int|sys||getgroups(u_int gidsetsize, \
357 206 NOARGS setgroups32 { int|sys||setgroups(u_int gidsetsize, \
359 207 NOARGS fchown32 { int|sys||__posix_fchown(int fd, uid_t uid, \
361 208 STD setresuid32 { int|linux_sys||setresuid(uid_t ruid, \
362 uid_t euid, uid_t suid); }
363 209 STD getresuid32 { int|linux_sys||getresuid(uid_t *ruid, \
364 uid_t *euid, uid_t *suid); }
365 210 STD setresgid32 { int|linux_sys||setresgid(gid_t rgid, \
366 gid_t egid, gid_t sgid); }
367 211 STD getresgid32 { int|linux_sys||getresgid(gid_t *rgid, \
368 gid_t *egid, gid_t *sgid); }
369 212 NOARGS chown32 { int|sys||__posix_chown(const char *path, \
370 uid_t uid, gid_t gid); }
371 213 NOARGS setuid32 { int|sys||setuid(uid_t uid); }
372 214 NOARGS setgid32 { int|sys||setgid(gid_t gid); }
373 215 NOARGS setfsuid32 { int|linux_sys||setfsuid(uid_t uid); }
374 216 NOARGS setfsgid32 { int|linux_sys||setfsgid(gid_t gid); }
375 217 STD { int|linux_sys||getdents64(int fd, \
376 struct linux_dirent64 *dent, unsigned int count); }
377 218 UNIMPL pivot_root
378 219 NOARGS { int|sys||mincore(void *addr, size_t len, char *vec); }
379 220 NOARGS { int|sys||madvise(void *addr, size_t len, int behav); }
380 221 STD { int|linux_sys||fcntl64(int fd, int cmd, void *arg); }
381 222 UNIMPL /* for tux */
382 223 UNIMPL /* unused */
385 226 STD { int|linux_sys||setxattr(char *path, char *name, \
386 void *value, size_t size, int flags); }
387 227 STD { int|linux_sys||lsetxattr(char *path, char *name, \
388 void *value, size_t size, int flags); }
389 228 STD { int|linux_sys||fsetxattr(int fd, char *name, \
390 void *value, size_t size, int flags); }
391 229 STD { ssize_t|linux_sys||getxattr(char *path, char *name, \
392 void *value, size_t size); }
393 230 STD { ssize_t|linux_sys||lgetxattr(char *path, char *name, \
394 void *value, size_t size); }
395 231 STD { ssize_t|linux_sys||fgetxattr(int fd, char *name, \
396 void *value, size_t size); }
397 232 STD { ssize_t|linux_sys||listxattr(char *path, char *list, \
399 233 STD { ssize_t|linux_sys||llistxattr(char *path, char *list, \
401 234 STD { ssize_t|linux_sys||flistxattr(int fd, char *list, \
403 235 STD { int|linux_sys||removexattr(char *path, char *name); }
404 236 STD { int|linux_sys||lremovexattr(char *path, char *name); }
405 237 STD { int|linux_sys||fremovexattr(int fd, char *name); }
407 239 UNIMPL sendfile64
409 241 UNIMPL sched_setaffinity
410 242 UNIMPL sched_getaffinity
412 244 UNIMPL io_destroy
413 245 UNIMPL io_getevents
416 248 STD { int|linux_sys||exit_group(int error_code); }
417 249 UNIMPL lookup_dcookie
418 250 UNIMPL epoll_create
420 252 UNIMPL epoll_wait
421 253 UNIMPL remap_file_pages
422 254 UNIMPL /* for set_thread_area */
423 255 UNIMPL /* for get_thread_area */
424 256 UNIMPL /* for set_tid_address */
425 257 UNIMPL timer_create
426 258 UNIMPL timer_settime
427 259 UNIMPL timer_gettime
428 260 UNIMPL timer_getoverrun
429 261 UNIMPL timer_delete
430 262 STD { int|linux_sys||clock_settime(clockid_t which, \
431 struct linux_timespec *tp); }
432 263 STD { int|linux_sys||clock_gettime(clockid_t which, \
433 struct linux_timespec *tp); }
434 264 STD { int|linux_sys||clock_getres(clockid_t which, \
435 struct linux_timespec *tp); }
436 265 STD { int|linux_sys||clock_nanosleep(clockid_t which, \
437 int flags, struct linux_timespec *rqtp, \
438 struct linux_timespec *rmtp); }
439 266 STD { int|linux_sys||statfs64(const char *path, \
440 size_t sz, struct linux_statfs64 *sp); }
441 267 STD { int|linux_sys||fstatfs64(int fd, \
442 size_t sz, struct linux_statfs64 *sp); }
445 270 UNIMPL fadvise64_64
446 271 UNIMPL pciconfig_iobase
447 272 UNIMPL pciconfig_read
448 273 UNIMPL pciconfig_write
560 ; ARMLinux actually has two ranges of syscalls. Normal syscalls use
561 ; SWI numbers starting at 0x900000 (__NR_SYSCALL_BASE). Special
562 ; ARM-specific syscalls use SWI numbers starting at 0x9f0000
563 ; (__ARM_NR_BASE). linux_syscall() (in arch/arm/arm/linux_syscall.c)
564 ; remaps these down to 0x900180 so that we can use one linux_sysent
565 ; array for the whole lot.
567 384 UNIMPL /* base */
568 385 STD { int|linux_sys||breakpoint(void); }
569 386 STD { int|linux_sys||cacheflush(uintptr_t from, \