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