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