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