syscalls.master revision 1.22 1 $NetBSD: syscalls.master,v 1.22 2000/12/12 19:02:00 jdolecek Exp $
2
3 ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
4
5 ; NetBSD m68k COMPAT_LINUX system call name/number "master" file.
6 ; (See syscalls.conf to see what it is processed into.)
7 ;
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.
12 ;
13 ; types:
14 ; STD always included
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.
21 ;
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).
26 ;
27 ; The type-dependent arguments are as follows:
28 ; For STD, NODEF, NOARGS, and compat syscalls:
29 ; { pseudo-proto } [alias]
30 ; For other syscalls:
31 ; [comment]
32 ;
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.
35
36 #if defined(_KERNEL) && !defined(_LKM)
37 #include "opt_compat_netbsd.h"
38 #include "opt_compat_43.h"
39 #endif
40
41 #include <sys/param.h>
42 #include <sys/poll.h>
43 #include <sys/systm.h>
44 #include <sys/signal.h>
45 #include <sys/mount.h>
46 #include <sys/syscallargs.h>
47
48 #include <compat/linux/common/linux_types.h>
49 #include <compat/linux/common/linux_signal.h>
50 #include <compat/linux/common/linux_siginfo.h>
51 #include <compat/linux/common/linux_machdep.h>
52
53 #include <compat/linux/linux_syscallargs.h>
54
55 %%
56
57 0 NOARGS { int sys_nosys(void); } syscall
58 1 NOARGS { int sys_exit(int rval); }
59 2 NOARGS { int sys_fork(void); }
60 3 NOARGS { int sys_read(int fd, char *buf, u_int nbyte); }
61 4 NOARGS { int sys_write(int fd, char *buf, u_int nbyte); }
62 5 STD { int linux_sys_open(const char *path, int flags, \
63 int mode); }
64 6 NOARGS { int sys_close(int fd); }
65 7 STD { int linux_sys_waitpid(int pid, int *status, \
66 int options);}
67 8 STD { int linux_sys_creat(const char *path, int mode); }
68 9 NOARGS { int sys_link(const char *path, const char *link); }
69 10 STD { int linux_sys_unlink(const char *path); }
70 11 STD { int linux_sys_execve(const char *path, char **argp, \
71 char **envp); }
72 12 STD { int linux_sys_chdir(const char *path); }
73 13 STD { int linux_sys_time(linux_time_t *t); }
74 14 STD { int linux_sys_mknod(const char *path, int mode, \
75 int dev); }
76 15 STD { int linux_sys_chmod(const char *path, int mode); }
77 ;16 lchown on i386; chown on m68k.
78 16 STD { int linux_sys_chown(const char *path, \
79 int uid, int gid); }
80 17 OBSOL break
81 18 OBSOL ostat
82 #if !defined(_KERNEL) || defined(COMPAT_43)
83 19 NOARGS { long compat_43_sys_lseek(int fd, long offset, \
84 int whence); }
85 #else
86 19 UNIMPL compat_43_sys_lseek
87 #endif
88 20 NOARGS { pid_t sys_getpid(void); }
89 21 UNIMPL mount
90 22 OBSOL umount
91 23 NOARGS { int sys_setuid(uid_t uid); }
92 24 NOARGS { uid_t sys_getuid(void); }
93 25 STD { int linux_sys_stime(linux_time_t *t); }
94 26 STD { int linux_sys_ptrace(int request, int pid, \
95 int addr, int data); }
96 27 STD { int linux_sys_alarm(unsigned int secs); }
97 28 OBSOL ofstat
98 29 STD { int linux_sys_pause(void); }
99 30 STD { int linux_sys_utime(const char *path, \
100 struct linux_utimbuf *times); }
101 31 OBSOL stty
102 32 OBSOL gtty
103 33 STD { int linux_sys_access(const char *path, int flags); }
104 34 STD { int linux_sys_nice(int incr); }
105 35 OBSOL ftime
106 36 NOARGS { int sys_sync(void); }
107 37 STD { int linux_sys_kill(int pid, int signum); }
108 38 STD { int linux_sys_rename(const char *from, \
109 const char *to); }
110 39 STD { int linux_sys_mkdir(const char *path, int mode); }
111 40 STD { int linux_sys_rmdir(const char *path); }
112 41 NOARGS { int sys_dup(u_int fd); }
113 42 STD { int linux_sys_pipe(int *pfds); }
114 43 STD { int linux_sys_times(struct times *tms); }
115 44 OBSOL prof
116 45 STD { int linux_sys_brk(char *nsize); }
117 46 NOARGS { int sys_setgid(gid_t gid); }
118 47 NOARGS { gid_t sys_getgid(void); }
119 48 STD { int linux_sys_signal(int signum, \
120 linux_handler_t handler); }
121 49 NOARGS { uid_t sys_geteuid(void); }
122 50 NOARGS { gid_t sys_getegid(void); }
123 51 NOARGS { int sys_acct(char *path); }
124 52 UNIMPL umount
125 53 OBSOL lock
126 54 STD { int linux_sys_ioctl(int fd, u_long com, \
127 caddr_t data); }
128 55 STD { int linux_sys_fcntl(int fd, int cmd, void *arg); }
129 56 OBSOL mpx
130 57 NOARGS { int sys_setpgid(int pid, int pgid); }
131 58 OBSOL ulimit
132 59 UNIMPL oldolduname
133 60 NOARGS { int sys_umask(int newmask); }
134 61 NOARGS { int sys_chroot(char *path); }
135 62 UNIMPL ustat
136 63 NOARGS { int sys_dup2(u_int from, u_int to); }
137 64 NOARGS { pid_t sys_getppid(void); }
138 65 NOARGS { int sys_getpgrp(void); }
139 66 NOARGS { int sys_setsid(void); }
140 67 STD { int linux_sys_sigaction(int signum, \
141 const struct linux_old_sigaction *nsa, \
142 struct linux_old_sigaction *osa); }
143 68 STD { int linux_sys_siggetmask(void); }
144 69 STD { int linux_sys_sigsetmask(linux_old_sigset_t mask); }
145 70 STD { int linux_sys_setreuid(int ruid, int euid); }
146 71 STD { int linux_sys_setregid(int rgid, int egid); }
147 72 STD { int linux_sys_sigsuspend(caddr_t restart, \
148 int oldmask, int mask); }
149 73 STD { int linux_sys_sigpending(linux_old_sigset_t *set); }
150 #if !defined(_KERNEL) || defined(COMPAT_43)
151 74 NOARGS { int compat_43_sys_sethostname(char *hostname, \
152 u_int len);}
153 75 NOARGS { int compat_43_sys_setrlimit(u_int which, \
154 struct orlimit *rlp); }
155 76 NOARGS { int compat_43_sys_getrlimit(u_int which, \
156 struct orlimit *rlp); }
157 #else
158 74 UNIMPL compat_43_sys_sethostname
159 75 UNIMPL compat_43_sys_setrlimit
160 76 UNIMPL compat_43_sys_getrlimit
161 #endif
162 77 NOARGS { int sys_getrusage(int who, struct rusage *rusage); }
163 78 NOARGS { int sys_gettimeofday(struct timeval *tp, \
164 struct timezone *tzp); }
165 79 NOARGS { int sys_settimeofday(struct timeval *tp, \
166 struct timezone *tzp); }
167 80 NOARGS { int sys_getgroups(u_int gidsetsize, gid_t *gidset); }
168 81 NOARGS { int sys_setgroups(u_int gidsetsize, gid_t *gidset); }
169 82 STD { int linux_sys_oldselect(struct linux_oldselect *lsp); }
170 83 STD { int linux_sys_symlink(const char *path, \
171 const char *to); }
172 #if !defined(_KERNEL) || defined(COMPAT_43)
173 84 NOARGS { int compat_43_sys_lstat(const char *path, \
174 struct stat43 *up); } oolstat
175 #else
176 84 UNIMPL compat_43_sys_lstat
177 #endif
178 85 STD { int linux_sys_readlink(const char *name, char *buf, \
179 int count); }
180 86 STD { int linux_sys_uselib(const char *path); }
181 87 STD { int linux_sys_swapon(char *name); }
182 88 STD { int linux_sys_reboot(int magic1, int magic2, \
183 int cmd, void *arg); }
184 89 STD { int linux_sys_readdir(int fd, caddr_t dent, \
185 unsigned int count); }
186 90 STD { int linux_sys_old_mmap(struct linux_oldmmap *lmp); }
187 91 NOARGS { int sys_munmap(caddr_t addr, int len); }
188 92 STD { int linux_sys_truncate(const char *path, \
189 long length); }
190 #if !defined(_KERNEL) || defined(COMPAT_43)
191 93 NOARGS { int compat_43_sys_ftruncate(int fd, long length); }
192 #else
193 93 UNIMPL compat_43_sys_ftruncate
194 #endif
195 94 NOARGS { int sys_fchmod(int fd, int mode); }
196 95 STD { int linux_sys_fchown(int fd, int uid, int gid); }
197 96 NOARGS { int sys_getpriority(int which, int who); }
198 97 NOARGS { int sys_setpriority(int which, int who, int prio); }
199 98 NOARGS { int sys_profil(caddr_t samples, u_int size, \
200 u_int offset, u_int scale); }
201 99 STD { int linux_sys_statfs(const char *path, \
202 struct linux_statfs *sp); }
203 100 STD { int linux_sys_fstatfs(int fd, \
204 struct linux_statfs *sp); }
205 101 UNIMPL ioperm
206 102 STD { int linux_sys_socketcall(int what, void *args); }
207 103 UNIMPL syslog
208 104 NOARGS { int sys_setitimer(u_int which, \
209 struct itimerval *itv, struct itimerval *oitv); }
210 105 NOARGS { int sys_getitimer(u_int which, \
211 struct itimerval *itv); }
212 106 STD { int linux_sys_stat(const char *path, \
213 struct linux_stat *sp); }
214 107 STD { int linux_sys_lstat(const char *path, \
215 struct linux_stat *sp); }
216 108 STD { int linux_sys_fstat(int fd, struct linux_stat *sp); }
217 109 UNIMPL olduname
218 110 UNIMPL iopl
219 111 UNIMPL vhangup
220 112 UNIMPL idle
221 113 UNIMPL vm86old
222 114 STD { int linux_sys_wait4(int pid, int *status, \
223 int options, struct rusage *rusage); }
224 115 STD { int linux_sys_swapoff(const char *path); }
225 116 UNIMPL sysinfo
226 117 STD { int linux_sys_ipc(int what, int a1, int a2, int a3, \
227 caddr_t ptr); }
228 118 NOARGS { int sys_fsync(int fd); }
229 119 STD { int linux_sys_sigreturn(void); }
230 120 STD { int linux_sys_clone(int flags, void *stack); }
231 121 STD { int linux_sys_setdomainname(char *domainname, \
232 int len); }
233 122 STD { int linux_sys_uname(struct linux_utsname *up); }
234 123 STD { int linux_sys_cacheflush(unsigned long addr, \
235 int scope, int cache, unsigned long len); }
236 124 UNIMPL adjtimex
237 125 NOARGS { int sys_mprotect(caddr_t addr, int len, int prot); }
238 126 STD { int linux_sys_sigprocmask(int how, \
239 const linux_old_sigset_t *set, \
240 linux_old_sigset_t *oset); }
241 127 UNIMPL create_module
242 128 UNIMPL init_module
243 129 UNIMPL delete_module
244 130 UNIMPL get_kernel_syms
245 131 UNIMPL quotactl
246 132 STD { int linux_sys_getpgid(int pid); }
247 133 NOARGS { int sys_fchdir(int fd); }
248 134 UNIMPL bdflush
249 135 UNIMPL sysfs
250 136 STD { int linux_sys_personality(int per); }
251 137 UNIMPL afs_syscall
252 138 STD { int linux_sys_setfsuid(uid_t uid); }
253 139 NOARGS { int linux_sys_getfsuid(void); }
254 140 STD { int linux_sys_llseek(int fd, u_int32_t ohigh, \
255 u_int32_t olow, caddr_t res, int whence); }
256 141 STD { int linux_sys_getdents(int fd, \
257 struct linux_dirent *dent, unsigned int count); }
258 142 STD { int linux_sys_select(int nfds, fd_set *readfds, \
259 fd_set *writefds, fd_set *exceptfds, \
260 struct timeval *timeout); }
261 143 NOARGS { int sys_flock(int fd, int how); }
262 144 STD { int linux_sys_msync(caddr_t addr, int len, int fl); }
263 145 NOARGS { int sys_readv(int fd, struct iovec *iovp, \
264 u_int iovcnt); }
265 146 NOARGS { int sys_writev(int fd, struct iovec *iovp, \
266 u_int iovcnt); }
267 147 NOARGS { pid_t sys_getsid(pid_t pid); }
268 148 STD { int linux_sys_fdatasync(int fd); }
269 149 STD { int linux_sys___sysctl(struct linux___sysctl *lsp); }
270 150 NOARGS { int sys_mlock(caddr_t addr, size_t len); }
271 151 NOARGS { int sys_munlock(caddr_t addr, size_t len); }
272 152 NOARGS { int sys_mlockall(int flags); }
273 153 NOARGS { int sys_munlockall(void); }
274 154 STD { int linux_sys_sched_setparam(pid_t pid, \
275 const struct linux_sched_param *sp); }
276 155 STD { int linux_sys_sched_getparam(pid_t pid, \
277 struct linux_sched_param *sp); }
278 156 STD { int linux_sys_sched_setscheduler(pid_t pid, \
279 int policy, const struct linux_sched_param *sp); }
280 157 STD { int linux_sys_sched_getscheduler(pid_t pid); }
281 158 STD { int linux_sys_sched_yield(void); }
282 159 STD { int linux_sys_sched_get_priority_max(int policy); }
283 160 STD { int linux_sys_sched_get_priority_min(int policy); }
284 161 UNIMPL sched_rr_get_interval
285 162 NOARGS { int sys_nanosleep(const struct timespec *rqtp, \
286 struct timespec *rmtp); }
287 163 STD { void *linux_sys_mremap(void *old_address, \
288 size_t old_size, size_t new_size, u_long flags); }
289 164 STD { int linux_sys_setresuid(uid_t ruid, uid_t euid, \
290 uid_t suid); }
291 165 STD { int linux_sys_getresuid(uid_t *ruid, uid_t *euid, \
292 uid_t *suid); }
293 166 UNIMPL vm86
294 167 UNIMPL query_module
295 168 NOARGS { int sys_poll(struct pollfd *fds, u_int nfds, \
296 int timeout); }
297 169 UNIMPL nfsservctl
298 170 STD { int linux_sys_setresgid(gid_t rgid, gid_t egid, \
299 gid_t sgid); }
300 171 STD { int linux_sys_getresgid(gid_t *rgid, gid_t *egid, \
301 gid_t *sgid); }
302 172 UNIMPL prctl
303 173 STD { int linux_sys_rt_sigreturn(void); }
304 174 STD { int linux_sys_rt_sigaction(int signum, \
305 const struct linux_sigaction *nsa, \
306 struct linux_sigaction *osa, \
307 size_t sigsetsize); }
308 175 STD { int linux_sys_rt_sigprocmask(int how, \
309 const linux_sigset_t *set, \
310 linux_sigset_t *oset, \
311 size_t sigsetsize); }
312 176 STD { int linux_sys_rt_sigpending( \
313 linux_sigset_t *set, \
314 size_t sigsetsize); }
315 177 UNIMPL rt_sigtimedwait
316 ; XXX XAX int here? sigset_t here? siginfo_t
317 178 STD { int linux_sys_rt_queueinfo(int pid, int signum, \
318 void *uinfo); }
319 179 STD { int linux_sys_rt_sigsuspend(linux_sigset_t *unewset, \
320 size_t sigsetsize); }
321 180 STD { int linux_sys_pread(int fd, char *buf, \
322 size_t nbyte, linux_off_t offset); }
323 181 STD { int linux_sys_pwrite(int fd, char *buf, \
324 size_t nbyte, linux_off_t offset); }
325 ;182 chown on i386; lchown on m68k.
326 182 STD { int linux_sys_lchown(const char *path, int uid, \
327 int gid); }
328 183 NOARGS { int sys___getcwd(char *bufp, size_t length); }
329 184 UNIMPL capget
330 185 UNIMPL capset
331 186 STD { int linux_sys_sigaltstack( \
332 const struct linux_sigaltstack *ss, \
333 struct linux_sigaltstack *oss); }
334 187 UNIMPL sendfile
335 188 UNIMPL getpmsg
336 189 UNIMPL putpmsg
337 190 NOARGS { int sys___vfork14(void); }
338 191 UNIMPL getrlimit
339 192 UNIMPL mmap2
340 193 NOARGS truncate64 { int sys_truncate(const char *path, \
341 off_t length); }
342 194 NOARGS ftruncate64 { int sys_ftruncate(const char *path, \
343 off_t length); }
344 195 STD { int linux_sys_stat64(const char *path, \
345 struct linux_stat64 *sp); }
346 196 STD { int linux_sys_lstat64(const char *path, \
347 struct linux_stat64 *sp); }
348 197 STD { int linux_sys_fstat64(int fd, \
349 struct linux_stat64 *sp); }
350 198 UNIMPL lchown
351 199 UNIMPL getuid
352 200 UNIMPL getgid
353 201 UNIMPL geteuid
354 202 UNIMPL getegid
355 203 UNIMPL getreuid
356 204 UNIMPL getregid
357 205 UNIMPL getgroups
358 206 UNIMPL setgroups
359 207 UNIMPL fchown
360 208 UNIMPL setresuid
361 209 UNIMPL getresuid
362 210 UNIMPL setresgid
363 211 UNIMPL getresgid
364 ;212 chown on i386; lchown on m68k
365 212 UNIMPL lchown
366 213 UNIMPL setuid
367 214 UNIMPL setgid
368 215 UNIMPL setfsuid
369 216 UNIMPL setfsgid
370 217 UNIMPL pivot_root
371