1 $NetBSD: syscalls.master,v 1.18 2009/01/13 22:10:58 pooka Exp $
3 ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
5 ; NetBSD COMPAT_SVR4 system call name/number "master" file.
6 ; (See syscalls.conf to see what it is processed into.)
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.
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
20 ; The compat options are defined in the syscalls.conf file, and the
21 ; compat option name is prefixed to the syscall name. Other than
22 ; that, they're like NODEF (for 'compat' options), or STD (for
23 ; 'libcompat' options).
25 ; The type-dependent arguments are as follows:
26 ; For STD, NODEF, NOARGS, and compat syscalls:
27 ; { pseudo-proto } [alias]
31 ; #ifdef's, etc. may be included, and are copied to the output files.
32 ; #include's are copied to the syscall names and switch definition files only.
34 #if defined(_KERNEL_OPT)
39 #include <sys/param.h>
40 #include <sys/systm.h>
41 #include <sys/signal.h>
42 #include <sys/mount.h>
44 #include <sys/syscallargs.h>
46 #include <compat/svr4_32/svr4_32_types.h>
47 #include <compat/netbsd32/netbsd32_syscallargs.h>
48 #include <compat/svr4_32/svr4_32_time.h>
49 #include <compat/svr4_32/svr4_32_signal.h>
50 #include <compat/svr4_32/svr4_32_ucontext.h>
51 #include <compat/svr4_32/svr4_32_lwp.h>
52 #include <compat/svr4_32/svr4_32_syscallargs.h>
53 #include <compat/svr4_32/svr4_32_statvfs.h>
54 #include <compat/svr4_32/svr4_32_resource.h>
55 #include <compat/svr4_32/svr4_32_acl.h>
56 #include <compat/svr4_32/svr4_32_schedctl.h>
60 0 NOARGS { int|sys||nosys(void); } syscall
61 1 NOARGS { int|netbsd32||exit(int rval); }
62 2 NOARGS { int|sys||fork(void); }
63 3 NOARGS { int|netbsd32||read(int fd, netbsd32_charp buf, u_int nbyte); }
64 4 NOARGS { int|netbsd32||write(int fd, netbsd32_charp buf, u_int nbyte); }
65 5 STD { int|svr4_32_sys||open(netbsd32_charp path, int flags, \
67 6 NOARGS { int|netbsd32||close(int fd); }
68 7 STD { int|svr4_32_sys||wait(netbsd32_intp status); }
69 8 STD { int|svr4_32_sys||creat(netbsd32_charp path, int mode); }
70 9 NOARGS { int|netbsd32||link(netbsd32_charp path, netbsd32_charp link); }
71 10 NOARGS { int|netbsd32||unlink(netbsd32_charp path); }
72 11 STD { int|svr4_32_sys||execv(netbsd32_charp path, netbsd32_charpp argp); }
73 12 NOARGS { int|netbsd32||chdir(netbsd32_charp path); }
74 13 STD { int|svr4_32_sys||time(svr4_32_time_tp t); }
75 14 STD { int|svr4_32_sys||mknod(netbsd32_charp path, int mode, \
77 15 NOARGS { int|netbsd32||chmod(netbsd32_charp path, mode_t mode); }
78 16 NOARGS { int|netbsd32||__posix_chown(netbsd32_charp path, uid_t \
79 uid, gid_t gid); } chown
80 17 STD { int|svr4_32_sys||break(netbsd32_caddr_t nsize); }
81 18 STD { int|svr4_32_sys||stat(netbsd32_charp path, \
83 19 NOARGS { netbsd32_long|compat_43_netbsd32||olseek(int fd, \
84 netbsd32_long offset, int whence); }
85 20 NOARGS { pid_t|sys||getpid(void); }
87 22 UNIMPL System V umount
88 23 NOARGS { int|netbsd32||setuid(uid_t uid); }
89 24 NOARGS { uid_t|sys||getuid_with_euid(void); }
92 27 STD { int|svr4_32_sys||alarm(unsigned sec); }
93 28 STD { int|svr4_32_sys||fstat(int fd, svr4_32_statp sb); }
94 29 STD { int|svr4_32_sys||pause(void); }
95 30 STD { int|svr4_32_sys||utime(netbsd32_charp path, \
96 svr4_32_utimbufp ubuf); }
99 33 STD { int|svr4_32_sys||access(netbsd32_charp path, int flags); }
100 34 STD { int|svr4_32_sys||nice(int prio); }
102 36 NOARGS { int|sys||sync(void); }
103 37 STD { int|svr4_32_sys||kill(int pid, int signum); }
105 39 STD { int|svr4_32_sys||pgrpsys(int cmd, int pid, int pgid); }
107 41 NOARGS { int|netbsd32||dup(u_int fd); }
108 42 NOARGS { int|sys||pipe(void); }
109 43 STD { int|svr4_32_sys||times(svr4_32_tms_tp tp); }
112 46 NOARGS { int|netbsd32||setgid(gid_t gid); }
113 47 NOARGS { gid_t|sys||getgid_with_egid(void); }
114 48 STD { int|svr4_32_sys||signal(int signum, svr4_sig_t handler); }
116 49 STD { int|svr4_32_sys||msgsys(int what, int a2, int a3, \
121 50 STD { int|svr4_32_sys||sysarch(int op, netbsd32_voidp a1); }
124 52 STD { int|svr4_32_sys||shmsys(int what, int a2, int a3, \
130 53 STD { int|svr4_32_sys||semsys(int what, int a2, int a3, \
135 54 STD { int|svr4_32_sys||ioctl(int fd, netbsd32_u_long com, \
136 netbsd32_caddr_t data); }
139 57 STD { int|svr4_32_sys||utssys(netbsd32_voidp a1, \
140 netbsd32_voidp a2, int sel, \
141 netbsd32_voidp a3); }
142 58 NOARGS { int|netbsd32||fsync(int fd); }
143 59 NOARGS { int|netbsd32||execve(netbsd32_charp path, netbsd32_charpp argp, \
144 netbsd32_charpp envp); }
145 60 NOARGS { int|netbsd32||umask(int newmask); }
146 61 NOARGS { int|netbsd32||chroot(netbsd32_charp path); }
147 62 STD { int|svr4_32_sys||fcntl(int fd, int cmd, netbsd32_charp arg); }
148 63 STD { netbsd32_long|svr4_32_sys||ulimit(int cmd, netbsd32_long newlimit); }
149 64 UNIMPL reserved for unix/pc
150 65 UNIMPL reserved for unix/pc
151 66 UNIMPL reserved for unix/pc
152 67 UNIMPL reserved for unix/pc
153 68 UNIMPL reserved for unix/pc
154 69 UNIMPL reserved for unix/pc
164 79 NOARGS { int|netbsd32||rmdir(netbsd32_charp path); }
165 80 NOARGS { int|netbsd32||mkdir(netbsd32_charp path, mode_t mode); }
166 81 STD { int|svr4_32_sys||getdents(int fd, netbsd32_charp buf, \
171 85 STD { int|svr4_32_sys||getmsg(int fd, svr4_32_strbuf_tp ctl, \
172 svr4_32_strbuf_tp dat, netbsd32_intp flags); }
173 86 STD { int|svr4_32_sys||putmsg(int fd, svr4_32_strbuf_tp ctl, \
174 svr4_32_strbuf_tp dat, int flags); }
175 87 NOARGS { int|netbsd32||poll(netbsd32_pollfdp_t fds, u_int nfds, \
177 88 STD { int|svr4_32_sys||lstat(netbsd32_charp path, \
178 svr4_32_stat_tp ub); }
179 89 NOARGS { int|netbsd32||symlink(netbsd32_charp path, netbsd32_charp link); }
180 90 NOARGS { int|netbsd32||readlink(netbsd32_charp path, netbsd32_charp buf, netbsd32_size_t count); }
181 91 NOARGS { int|netbsd32||getgroups(int gidsetsize, netbsd32_gid_tp gidset); }
182 92 NOARGS { int|netbsd32||setgroups(int gidsetsize, netbsd32_gid_tp gidset); }
183 93 NOARGS { int|netbsd32||fchmod(int fd, int mode); }
184 94 NOARGS { int|netbsd32||__posix_fchown(int fd, int uid, int gid); } \
186 95 STD { int|svr4_32_sys||sigprocmask(int how, \
187 svr4_32_sigset_tp set, \
188 svr4_32_sigset_tp oset); }
189 96 STD { int|svr4_32_sys||sigsuspend( \
190 svr4_32_sigset_tp set); }
191 97 STD { int|svr4_32_sys||sigaltstack( \
192 svr4_32_sigaltstack_tp nss, \
193 svr4_32_sigaltstack_tp oss); }
194 98 STD { int|svr4_32_sys||sigaction(int signum, \
195 svr4_32_sigaction_tp nsa, \
196 svr4_32_sigaction_tp osa); }
197 99 STD { int|svr4_32_sys||sigpending(int what, \
198 svr4_32_sigset_tp set); }
199 100 STD { int|svr4_32_sys||context(int func, \
200 svr4_32_ucontext_tp uc); }
203 103 STD { int|svr4_32_sys||statvfs(netbsd32_charp path, \
204 svr4_32_statvfs_tp fs); }
205 104 STD { int|svr4_32_sys||fstatvfs(int fd, \
206 svr4_32_statvfs_tp fs); }
207 105 UNIMPL getloadavg
209 107 STD { int|svr4_32_sys||waitsys(int grp, int id, \
210 svr4_32_siginfo_tp info, int options); }
211 108 UNIMPL sigsendsys
212 109 STD { int|svr4_32_sys||hrtsys(int cmd, int fun, int sub, \
213 netbsd32_voidp rv1, netbsd32_voidp rv2); }
216 112 UNIMPL priocntlsys
217 113 STD { int|svr4_32_sys||pathconf(netbsd32_charp path, int name); }
219 115 STD { netbsd32_voidp|svr4_32_sys||mmap(netbsd32_voidp addr, \
220 svr4_32_size_t len, int prot, int flags, int fd, \
221 svr4_32_off_t pos); }
222 116 NOARGS { int|netbsd32||mprotect(netbsd32_voidp addr, netbsd32_size_t len, int prot); }
223 117 NOARGS { int|netbsd32||munmap(netbsd32_voidp addr, netbsd32_size_t len); }
224 118 STD { int|svr4_32_sys||fpathconf(int fd, int name); }
225 119 NOARGS { int|sys||vfork(void); }
226 120 NOARGS { int|netbsd32||fchdir(int fd); }
227 121 NOARGS { int|netbsd32||readv(int fd, netbsd32_iovecp_t iovp, int iovcnt); }
228 122 NOARGS { int|netbsd32||writev(int fd, netbsd32_iovecp_t iovp, int iovcnt); }
229 123 STD { int|svr4_32_sys||xstat(int two, netbsd32_charp path, \
230 svr4_32_xstat_tp ub); }
231 124 STD { int|svr4_32_sys||lxstat(int two, netbsd32_charp path, \
232 svr4_32_xstat_tp ub); }
233 125 STD { int|svr4_32_sys||fxstat(int two, int fd, \
234 svr4_32_xstat_tp sb); }
235 126 STD { int|svr4_32_sys||xmknod(int two, netbsd32_charp path, \
236 svr4_32_mode_t mode, svr4_dev_t dev); }
238 128 STD { int|svr4_32_sys||setrlimit(int which, \
239 svr4_32_rlimit_tp rlp); }
240 129 STD { int|svr4_32_sys||getrlimit(int which, \
241 svr4_32_rlimit_tp rlp); }
242 130 NOARGS { int|netbsd32||lchown(netbsd32_charp path, uid_t uid, gid_t gid); } lchown
243 131 STD { int|svr4_32_sys||memcntl(netbsd32_voidp addr, \
244 svr4_32_size_t len, int cmd, netbsd32_voidp arg, \
245 int attr, int mask); }
248 134 NOARGS { int|netbsd32||__posix_rename(netbsd32_charp from, netbsd32_charp to); } \
250 135 STD { int|svr4_32_sys||uname(svr4_32_utsnamep name, \
252 136 NOARGS { int|netbsd32||setegid(gid_t egid); }
253 137 STD { int|svr4_32_sys||sysconfig(int name); }
254 138 NOARGS { int|compat_50_netbsd32||adjtime(netbsd32_timevalp_t delta, netbsd32_timevalp_t olddelta); }
255 139 STD { netbsd32_long|svr4_32_sys||systeminfo(int what, netbsd32_charp buf, \
256 netbsd32_long len); }
258 141 NOARGS { int|netbsd32||seteuid(uid_t euid); }
260 143 NOARGS { int|sys||fork(void); } fork1
261 144 UNIMPL sigtimedwait
262 145 STD { int|svr4_32_sys||_lwp_info(svr4_32_lwpinfop lwpinfo);}
264 147 UNIMPL lwp_sema_wait
265 148 UNIMPL lwp_sema_post
266 149 UNIMPL lwp_sema_trywait
270 153 NOARGS { int|netbsd32||fchroot(int fd); }
271 154 STD { int|svr4_32_sys||utimes(netbsd32_charp path, \
272 netbsd32_timevalp_t tptr); }
273 155 STD { int|svr4_32_sys||vhangup(void); }
274 156 STD { int|svr4_32_sys||gettimeofday(netbsd32_timevalp_t tp); }
275 157 NOARGS { int|compat_50_netbsd32||getitimer(int which, netbsd32_itimervalp_t itv); }
276 158 NOARGS { int|compat_50_netbsd32||setitimer(int which, \
277 netbsd32_itimervalp_t itv, netbsd32_itimervalp_t oitv); }
278 159 STD { int|svr4_32_sys||_lwp_create(svr4_32_ucontext_tp uc, \
279 netbsd32_u_long flags, svr4_32_lwpid_tp lwpid); }
280 160 STD { int|svr4_32_sys||_lwp_exit(void); }
281 161 STD { int|svr4_32_sys||_lwp_suspend(svr4_lwpid_t lwpid); }
282 162 STD { int|svr4_32_sys||_lwp_continue(svr4_lwpid_t lwpid); }
283 163 STD { int|svr4_32_sys||_lwp_kill(svr4_lwpid_t lwpid, \
285 164 STD { svr4_lwpid_t|svr4_sys||_lwp_self(void); }
286 165 STD { netbsd32_voidp|svr4_32_sys||_lwp_getprivate(void); }
287 166 STD { int|svr4_32_sys||_lwp_setprivate(netbsd32_voidp buffer); }
288 167 STD { int|svr4_32_sys||_lwp_wait(svr4_lwpid_t wait_for, \
289 svr4_32_lwpid_tp departed_lwp); }
290 168 UNIMPL lwp_mutex_wakeup
291 169 UNIMPL lwp_mutex_lock
292 170 UNIMPL lwp_cond_wait
293 171 UNIMPL lwp_cond_signal
294 172 UNIMPL lwp_cond_broadcast
295 173 STD { netbsd32_ssize_t|svr4_32_sys||pread(int fd, netbsd32_voidp buf, \
296 netbsd32_size_t nbyte, svr4_32_off_t off); }
297 174 STD { netbsd32_ssize_t|svr4_32_sys||pwrite(int fd, netbsd32_voidp buf, \
298 netbsd32_size_t nbyte, svr4_32_off_t off); }
299 175 STD { svr4_32_off64_t|svr4_32_sys||llseek(int fd, \
300 netbsd32_long offset1, netbsd32_long offset2, int whence); }
302 177 UNIMPL srmlimitsys
310 185 STD { int|svr4_32_sys||acl(netbsd32_charp path, int cmd, int num, \
311 svr4_32_aclent_tp buf); }
312 186 STD { int|svr4_32_sys||auditsys(int code, int a1, int a2, \
313 int a3, int a4, int a5); }
314 187 UNIMPL processor_bind
315 188 UNIMPL processor_info
318 191 UNIMPL clock_gettime
319 192 UNIMPL clock_settime
320 193 UNIMPL clock_getres
321 194 UNIMPL timer_create
322 195 UNIMPL timer_delete
323 196 UNIMPL timer_settime
324 197 UNIMPL timer_gettime
325 198 UNIMPL timer_getoverrun
326 199 NOARGS { int|compat_50_netbsd32||nanosleep(netbsd32_timespecp_t rqtp, \
327 netbsd32_timespecp_t rmtp); }
328 200 STD { int|svr4_32_sys||facl(int fd, int cmd, int num, \
329 svr4_32_aclent_tp buf); }
331 202 NOARGS { int|netbsd32||setreuid(int ruid, int euid); }
332 203 NOARGS { int|netbsd32||setregid(int rgid, int egid); }
333 204 UNIMPL install_utrap
335 206 STD { int|svr4_32_sys||schedctl(unsigned int x, int y, void **z); }
337 208 UNIMPL sparc_utrap_install
338 209 STD { int|svr4_32_sys||resolvepath(netbsd32_charp path, \
339 netbsd32_charp buf, netbsd32_size_t bufsiz); }
340 210 UNIMPL signotifywait
341 211 UNIMPL lwp_sigredirect
343 213 STD { int|svr4_32_sys||getdents64(int fd, \
344 svr4_32_dirent64_tp dp, \
346 214 STD { netbsd32_voidp|svr4_32_sys||mmap64(netbsd32_voidp addr, \
347 svr4_32_size_t len, int prot, int flags, int fd, \
348 svr4_32_off64_t pos); }
349 215 STD { int|svr4_32_sys||stat64(netbsd32_charp path, \
350 svr4_32_stat64_tp sb); }
351 216 STD { int|svr4_32_sys||lstat64(netbsd32_charp path, \
352 svr4_32_stat64_tp sb); }
353 217 STD { int|svr4_32_sys||fstat64(int fd, \
354 svr4_32_stat64_tp sb); }
355 218 STD { int|svr4_32_sys||statvfs64(netbsd32_charp path, \
356 svr4_32_statvfs64_tp fs); }
357 219 STD { int|svr4_32_sys||fstatvfs64(int fd, \
358 svr4_32_statvfs64_tp fs); }
359 220 STD { int|svr4_32_sys||setrlimit64(int which, \
360 svr4_32_rlimit64_tp rlp); }
361 221 STD { int|svr4_32_sys||getrlimit64(int which, \
362 svr4_32_rlimit64_tp rlp); }
363 222 STD { netbsd32_ssize_t|svr4_32_sys||pread64(int fd, netbsd32_voidp buf, \
364 netbsd32_size_t nbyte, svr4_32_off64_t off); }
365 223 STD { netbsd32_ssize_t|svr4_32_sys||pwrite64(int fd, \
366 netbsd32_voidp buf, netbsd32_size_t nbyte, svr4_32_off64_t off); }
367 #define svr4_32_sys_creat64 svr4_32_sys_creat
368 #define svr4_32_sys_creat64_args svr4_32_sys_creat_args
369 224 NOARGS { int|svr4_32_sys||creat64(netbsd32_charp path, int mode); }
370 #define svr4_32_sys_open64 svr4_32_sys_open
371 #define svr4_32_sys_open64_args svr4_32_sys_open_args
372 225 NOARGS { int|svr4_32_sys||open64(netbsd32_charp path, int flags, \
378 230 STD { int|svr4_32_sys||socket(int domain, int type, \
380 231 NOARGS { int|netbsd32||socketpair(int domain, int type, \
381 int protocol, netbsd32_intp rsv); }
382 232 NOARGS { int|netbsd32||bind(int s, netbsd32_sockaddrp_t name, \
384 233 NOARGS { int|netbsd32||listen(int s, int backlog); }
385 234 NOARGS { int|compat_43_netbsd32||oaccept(int s, \
386 netbsd32_sockaddrp_t name, netbsd32_intp anamelen); }
387 235 NOARGS { int|netbsd32||connect(int s, netbsd32_sockaddrp_t name, \
389 236 NOARGS { int|netbsd32||shutdown(int s, int how); }
390 237 NOARGS { int|compat_43_netbsd32||orecv(int s, netbsd32_caddr_t buf, int len, \
392 238 NOARGS { int|compat_43_netbsd32||orecvfrom(int s, \
393 netbsd32_caddr_t buf, netbsd32_size_t len, int flags, \
394 netbsd32_caddr_t from, netbsd32_intp fromlenaddr); }
395 239 NOARGS { int|compat_43_netbsd32||orecvmsg(int s, \
396 netbsd32_omsghdrp_t msg, int flags); }
397 240 NOARGS { int|compat_43_netbsd32||osend(int s, netbsd32_caddr_t buf, \
398 int len, int flags); }
399 241 NOARGS { int|compat_43_netbsd32||osendmsg(int s, netbsd32_caddr_t msg, \
401 242 NOARGS { netbsd32_ssize_t|netbsd32||sendto(int s, netbsd32_voidp buf, \
402 netbsd32_size_t len, int flags, netbsd32_sockaddrp_t to, \
404 243 NOARGS { int|compat_43_netbsd32||ogetpeername(int fdes, \
405 netbsd32_caddr_t asa, netbsd32_intp alen); }
406 244 NOARGS { int|compat_43_netbsd32||ogetsockname(int fdec, \
407 netbsd32_caddr_t asa, netbsd32_intp alen); }
408 245 NOARGS { int|netbsd32||getsockopt(int s, int level, int name, \
409 netbsd32_voidp val, netbsd32_intp avalsize); }
410 246 NOARGS { int|netbsd32||setsockopt(int s, int level, int name, \
411 netbsd32_voidp val, int valsize); }
412 247 UNIMPL sockconfig
413 248 UNIMPL netbsd32_ntp_gettime
414 #if defined(NTP) || !defined(_KERNEL)
415 249 NOARGS { int|netbsd32||ntp_adjtime(netbsd32_timexp_t tp); }
419 250 UNIMPL lwp_mutex_unlock
420 251 UNIMPL lwp_mutex_trylock
421 252 UNIMPL lwp_mutex_init
423 254 UNIMPL lwp_sigtimedwait