NetBSD/sys/compat/svr4/syscalls.master
pooka a9a2ce837b Convert the syscalls.master to a format from which it is easier
to parse and generate the compat name and basename (e.g. __stat50
and stat).  Use this to autogenerate __RENAME()'s to the rump_syscalls
header so that they can be called e.g. rump_sys_socket() instead
of rump_sys___socket30().
2009-01-13 22:27:43 +00:00

425 lines
15 KiB
Plaintext

$NetBSD: syscalls.master,v 1.61 2009/01/13 22:27:44 pooka Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
; NetBSD COMPAT_SVR4 system call name/number "master" file.
; (See syscalls.conf to see what it is processed into.)
;
; Fields: number type [type-dependent ...]
; number system call number, must be in order
; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
; the compatibility options defined in syscalls.conf.
;
; types:
; STD always included
; OBSOL obsolete, not included in system
; UNIMPL unimplemented, not included in system
; NODEF included, but don't define the syscall number
; NOARGS included, but don't define the syscall args structure
;
; The compat options are defined in the syscalls.conf file, and the
; compat option name is prefixed to the syscall name. Other than
; that, they're like NODEF (for 'compat' options), or STD (for
; 'libcompat' options).
;
; The type-dependent arguments are as follows:
; For STD, NODEF, NOARGS, and compat syscalls:
; { pseudo-proto } [alias]
; For other syscalls:
; [comment]
;
; #ifdef's, etc. may be included, and are copied to the output files.
; #include's are copied to the syscall names and switch definition files only.
#if defined(_KERNEL_OPT)
#include "opt_ntp.h"
#include "opt_sysv.h"
#endif
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/signal.h>
#include <sys/mount.h>
#include <sys/poll.h>
#include <sys/sched.h>
#include <sys/syscallargs.h>
#include <compat/svr4/svr4_types.h>
#include <compat/svr4/svr4_time.h>
#include <compat/svr4/svr4_signal.h>
#include <compat/svr4/svr4_ucontext.h>
#include <compat/svr4/svr4_lwp.h>
#include <compat/svr4/svr4_syscallargs.h>
#include <compat/svr4/svr4_statvfs.h>
#include <compat/svr4/svr4_resource.h>
#include <compat/svr4/svr4_acl.h>
#include <compat/svr4/svr4_schedctl.h>
%%
0 NOARGS { int|sys||nosys(void); } syscall
1 NOARGS { int|sys||exit(int rval); }
2 NOARGS { int|sys||fork(void); }
3 NOARGS { int|sys||read(int fd, char *buf, u_int nbyte); }
4 NOARGS { int|sys||write(int fd, char *buf, u_int nbyte); }
5 STD { int|svr4_sys||open(const char *path, int flags, \
int mode); }
6 NOARGS { int|sys||close(int fd); }
7 STD { int|svr4_sys||wait(int *status); }
8 STD { int|svr4_sys||creat(const char *path, int mode); }
9 NOARGS { int|sys||link(char *path, char *link); }
10 NOARGS { int|sys||unlink(char *path); }
11 STD { int|svr4_sys||execv(const char *path, char **argp); }
12 NOARGS { int|sys||chdir(char *path); }
13 STD { int|svr4_sys||time(svr4_time_t *t); }
14 STD { int|svr4_sys||mknod(const char* path, int mode, \
int dev); }
15 NOARGS { int|sys||chmod(char *path, int mode); }
16 NOARGS { int|sys||__posix_chown(char *path, int uid, \
int gid); } chown
17 STD { int|svr4_sys||break(void *nsize); }
18 STD { int|svr4_sys||stat(const char* path, \
struct svr4_stat* ub); }
19 NOARGS { long|compat_43_sys||lseek(int fd, long offset, \
int whence); }
20 NOARGS { pid_t|sys||getpid(void); }
21 UNIMPL old_mount
22 UNIMPL System V umount
23 NOARGS { int|sys||setuid(uid_t uid); }
24 NOARGS { uid_t|sys||getuid_with_euid(void); }
25 UNIMPL stime
26 UNIMPL ptrace
27 STD { int|svr4_sys||alarm(unsigned sec); }
28 STD { int|svr4_sys||fstat(int fd, struct svr4_stat *sb); }
29 STD { int|svr4_sys||pause(void); }
30 STD { int|svr4_sys||utime(const char *path, \
struct svr4_utimbuf *ubuf); }
31 UNIMPL was stty
32 UNIMPL was gtty
33 STD { int|svr4_sys||access(const char *path, int flags); }
34 STD { int|svr4_sys||nice(int prio); }
35 UNIMPL statfs
36 NOARGS { int|sys||sync(void); }
37 STD { int|svr4_sys||kill(int pid, int signum); }
38 UNIMPL fstatfs
39 STD { int|svr4_sys||pgrpsys(int cmd, int pid, int pgid); }
40 UNIMPL xenix
41 NOARGS { int|sys||dup(u_int fd); }
42 NOARGS { int|sys||pipe(void); }
43 STD { int|svr4_sys||times(struct tms *tp); }
44 UNIMPL profil
45 UNIMPL plock
46 NOARGS { int|sys||setgid(gid_t gid); }
47 NOARGS { gid_t|sys||getgid_with_egid(void); }
48 STD { int|svr4_sys||signal(int signum, svr4_sig_t handler); }
#ifdef SYSVMSG
49 STD { int|svr4_sys||msgsys(int what, int a2, int a3, \
int a4, int a5); }
#else
49 UNIMPL msgsys
#endif
50 STD { int|svr4_sys||sysarch(int op, void *a1); }
51 UNIMPL acct
#ifdef SYSVSHM
52 STD { int|svr4_sys||shmsys(int what, int a2, int a3, \
int a4); }
#else
52 UNIMPL shmsys
#endif
#ifdef SYSVSEM
53 STD { int|svr4_sys||semsys(int what, int a2, int a3, \
int a4, int a5); }
#else
53 UNIMPL semsys
#endif
54 STD { int|svr4_sys||ioctl(int fd, u_long com, \
void *data); }
55 UNIMPL uadmin
56 UNIMPL exch
57 STD { int|svr4_sys||utssys(void *a1, void *a2, int sel, \
void *a3); }
58 NOARGS { int|sys||fsync(int fd); }
59 STD { int|svr4_sys||execve(const char *path, char **argp, \
char **envp); }
60 NOARGS { int|sys||umask(int newmask); }
61 NOARGS { int|sys||chroot(char *path); }
62 STD { int|svr4_sys||fcntl(int fd, int cmd, char *arg); }
63 STD { long|svr4_sys||ulimit(int cmd, long newlimit); }
64 UNIMPL reserved for unix/pc
65 UNIMPL reserved for unix/pc
66 UNIMPL reserved for unix/pc
67 UNIMPL reserved for unix/pc
68 UNIMPL reserved for unix/pc
69 UNIMPL reserved for unix/pc
70 OBSOL advfs
71 OBSOL unadvfs
72 OBSOL rmount
73 OBSOL rumount
74 OBSOL rfstart
75 OBSOL sigret
76 OBSOL rdebug
77 OBSOL rfstop
78 UNIMPL rfsys
79 NOARGS { int|sys||rmdir(char *path); }
80 NOARGS { int|sys||mkdir(char *path, int mode); }
81 STD { int|svr4_sys||getdents(int fd, char *buf, \
int nbytes); }
82 OBSOL libattach
83 OBSOL libdetach
84 UNIMPL sysfs
85 STD { int|svr4_sys||getmsg(int fd, struct svr4_strbuf *ctl, \
struct svr4_strbuf *dat, int *flags); }
86 STD { int|svr4_sys||putmsg(int fd, struct svr4_strbuf *ctl, \
struct svr4_strbuf *dat, int flags); }
87 NOARGS { int|sys||poll(struct pollfd *fds, u_int nfds, \
int timeout); }
88 STD { int|svr4_sys||lstat(const char *path, \
struct svr4_stat *ub); }
89 NOARGS { int|sys||symlink(char *path, char *link); }
90 NOARGS { int|sys||readlink(char *path, char *buf, int count); }
91 NOARGS { int|sys||getgroups(u_int gidsetsize, gid_t *gidset); }
92 NOARGS { int|sys||setgroups(u_int gidsetsize, gid_t *gidset); }
93 NOARGS { int|sys||fchmod(int fd, int mode); }
94 NOARGS { int|sys||__posix_fchown(int fd, int uid, int gid); } \
fchown
95 STD { int|svr4_sys||sigprocmask(int how, \
const svr4_sigset_t *set, \
svr4_sigset_t *oset); }
96 STD { int|svr4_sys||sigsuspend( \
const svr4_sigset_t *set); }
97 STD { int|svr4_sys||sigaltstack( \
const struct svr4_sigaltstack *nss, \
struct svr4_sigaltstack *oss); }
98 STD { int|svr4_sys||sigaction(int signum, \
const struct svr4_sigaction *nsa, \
struct svr4_sigaction *osa); }
99 STD { int|svr4_sys||sigpending(int what, \
svr4_sigset_t *set); }
100 STD { int|svr4_sys||context(int func, \
struct svr4_ucontext *uc); }
101 UNIMPL evsys
102 UNIMPL evtrapret
103 STD { int|svr4_sys||statvfs(const char *path, \
struct svr4_statvfs *fs); }
104 STD { int|svr4_sys||fstatvfs(int fd, \
struct svr4_statvfs *fs); }
105 UNIMPL
106 UNIMPL nfssvc
107 STD { int|svr4_sys||waitsys(int grp, int id, \
union svr4_siginfo *info, int options); }
108 UNIMPL sigsendsys
109 STD { int|svr4_sys||hrtsys(int cmd, int fun, int sub, \
void *rv1, void *rv2); }
110 UNIMPL acancel
111 UNIMPL async
112 UNIMPL priocntlsys
113 STD { int|svr4_sys||pathconf(const char *path, int name); }
114 UNIMPL mincore
115 STD { void *|svr4_sys||mmap(void *addr, \
svr4_size_t len, int prot, int flags, int fd, \
svr4_off_t pos); }
116 NOARGS { int|sys||mprotect(void *addr, int len, int prot); }
117 NOARGS { int|sys||munmap(void *addr, int len); }
118 STD { int|svr4_sys||fpathconf(int fd, int name); }
119 NOARGS { int|sys||vfork(void); }
120 NOARGS { int|sys||fchdir(int fd); }
121 NOARGS { int|sys||readv(int fd, struct iovec *iovp, \
u_int iovcnt); }
122 NOARGS { int|sys||writev(int fd, struct iovec *iovp, \
u_int iovcnt); }
123 STD { int|svr4_sys||xstat(int two, const char *path, \
struct svr4_xstat *ub); }
124 STD { int|svr4_sys||lxstat(int two, const char *path, \
struct svr4_xstat *ub); }
125 STD { int|svr4_sys||fxstat(int two, int fd, \
struct svr4_xstat *sb); }
126 STD { int|svr4_sys||xmknod(int two, char *path, \
svr4_mode_t mode, svr4_dev_t dev); }
127 UNIMPL clocal
128 STD { int|svr4_sys||setrlimit(int which, \
const struct svr4_rlimit *rlp); }
129 STD { int|svr4_sys||getrlimit(int which, \
struct svr4_rlimit *rlp); }
130 NOARGS { int|sys||__posix_lchown(char *path, int uid, \
int gid); } lchown
131 STD { int|svr4_sys||memcntl(void *addr, \
svr4_size_t len, int cmd, void *arg, \
int attr, int mask); }
132 UNIMPL getpmsg
133 UNIMPL putpmsg
134 NOARGS { int|sys||__posix_rename(char *from, char *to); } \
rename
135 STD { int|svr4_sys||uname(struct svr4_utsname* name, \
int dummy); }
136 NOARGS { int|sys||setegid(gid_t egid); }
137 STD { int|svr4_sys||sysconfig(int name); }
138 NOARGS { int|compat_50_sys||adjtime(struct timeval50 *delta, \
struct timeval50 *olddelta); }
139 STD { long|svr4_sys||systeminfo(int what, char *buf, \
long len); }
140 UNIMPL
141 NOARGS { int|sys||seteuid(uid_t euid); }
142 UNIMPL vtrace
143 NOARGS { int|sys||fork(void); } fork1
144 UNIMPL sigtimedwait
145 STD { int|svr4_sys||_lwp_info(struct svr4_lwpinfo *lwpinfo);}
146 UNIMPL yield
147 UNIMPL lwp_sema_wait
148 UNIMPL lwp_sema_post
149 UNIMPL lwp_sema_trywait
150 UNIMPL
151 UNIMPL
152 UNIMPL modctl
153 NOARGS { int|sys||fchroot(int fd); }
154 STD { int|svr4_sys||utimes(const char *path, \
struct timeval50 *tptr); }
155 STD { int|svr4_sys||vhangup(void); }
156 STD { int|svr4_sys||gettimeofday(struct timeval50 *tp); }
157 NOARGS { int|compat_50_sys||getitimer(u_int which, \
struct itimerval50 *itv); }
158 NOARGS { int|compat_50_sys||setitimer(u_int which, \
struct itimerval50 *itv, struct itimerval50 *oitv); }
159 STD { int|svr4_sys||_lwp_create(svr4_ucontext_t *uc, \
unsigned long flags, svr4_lwpid_t *lwpid); }
160 STD { int|svr4_sys||_lwp_exit(void); }
161 STD { int|svr4_sys||_lwp_suspend(svr4_lwpid_t lwpid); }
162 STD { int|svr4_sys||_lwp_continue(svr4_lwpid_t lwpid); }
163 STD { int|svr4_sys||_lwp_kill(svr4_lwpid_t lwpid, \
int signum); }
164 STD { svr4_lwpid_t|svr4_sys||_lwp_self(void); }
165 STD { void *|svr4_sys||_lwp_getprivate(void); }
166 STD { int|svr4_sys||_lwp_setprivate(void *buffer); }
167 STD { int|svr4_sys||_lwp_wait(svr4_lwpid_t wait_for, \
svr4_lwpid_t *departed_lwp); }
168 UNIMPL lwp_mutex_unlock
169 UNIMPL lwp_mutex_lock
170 UNIMPL lwp_cond_wait
171 UNIMPL lwp_cond_signal
172 UNIMPL lwp_cond_broadcast
173 STD { ssize_t|svr4_sys||pread(int fd, void *buf, \
size_t nbyte, svr4_off_t off); }
174 STD { ssize_t|svr4_sys||pwrite(int fd, const void *buf, \
size_t nbyte, svr4_off_t off); }
175 STD { svr4_off64_t|svr4_sys||llseek(int fd, \
long offset1, long offset2, int whence); }
176 UNIMPL inst_sync
177 UNIMPL
178 UNIMPL kaio
179 UNIMPL
180 UNIMPL
181 UNIMPL
182 UNIMPL
183 UNIMPL
184 UNIMPL tsolsys
185 STD { int|svr4_sys||acl(char *path, int cmd, int num, \
struct svr4_aclent *buf); }
186 STD { int|svr4_sys||auditsys(int code, int a1, int a2, \
int a3, int a4, int a5); }
187 UNIMPL processor_bind
188 UNIMPL processor_info
189 UNIMPL p_online
190 UNIMPL sigqueue
191 UNIMPL clock_gettime
192 UNIMPL clock_settime
193 UNIMPL clock_getres
194 UNIMPL timer_create
195 UNIMPL timer_delete
196 UNIMPL timer_settime
197 UNIMPL timer_gettime
198 UNIMPL timer_getoverrun
199 NOARGS { int|compat_50_sys||nanosleep( \
const struct timespec50 *rqtp, \
struct timespec50 *rmtp); }
200 STD { int|svr4_sys||facl(int fd, int cmd, int num, \
struct svr4_aclent *buf); }
201 UNIMPL door
202 NOARGS { int|sys||setreuid(int ruid, int euid); }
203 NOARGS { int|sys||setregid(int rgid, int egid); }
204 UNIMPL install_utrap
205 UNIMPL signotify
206 STD { int|svr4_sys||schedctl(unsigned int x, int y, void **z); }
207 UNIMPL pset
208 UNIMPL
209 STD { int|svr4_sys||resolvepath(const char *path, \
char *buf, size_t bufsiz); }
210 UNIMPL signotifywait
211 UNIMPL lwp_sigredirect
212 UNIMPL lwp_alarm
213 STD { int|svr4_sys||getdents64(int fd, \
struct svr4_dirent64 *dp, \
int nbytes); }
214 STD { void *|svr4_sys||mmap64(void *addr, \
svr4_size_t len, int prot, int flags, int fd, \
svr4_off64_t pos); }
215 STD { int|svr4_sys||stat64(const char* path, \
struct svr4_stat64 *sb); }
216 STD { int|svr4_sys||lstat64(const char* path, \
struct svr4_stat64 *sb); }
217 STD { int|svr4_sys||fstat64(int fd, \
struct svr4_stat64 *sb); }
218 STD { int|svr4_sys||statvfs64(const char *path, \
struct svr4_statvfs64 *fs); }
219 STD { int|svr4_sys||fstatvfs64(int fd, \
struct svr4_statvfs64 *fs); }
220 STD { int|svr4_sys||setrlimit64(int which, \
const struct svr4_rlimit64 *rlp); }
221 STD { int|svr4_sys||getrlimit64(int which, \
struct svr4_rlimit64 *rlp); }
222 STD { ssize_t|svr4_sys||pread64(int fd, void *buf, \
size_t nbyte, svr4_off64_t off); }
223 STD { ssize_t|svr4_sys||pwrite64(int fd, \
const void *buf, size_t nbyte, svr4_off64_t off); }
224 STD { int|svr4_sys||creat64(char *path, int mode); }
225 STD { int|svr4_sys||open64(char *path, int flags, \
int mode); }
226 UNIMPL rpcsys
227 UNIMPL
228 UNIMPL
229 UNIMPL
230 STD { int|svr4_sys||socket(int domain, int type, \
int protocol); }
231 NOARGS { int|sys||socketpair(int domain, int type, \
int protocol, int *rsv); }
232 NOARGS { int|sys||bind(int s, const struct sockaddr *name, \
int namelen); }
233 NOARGS { int|sys||listen(int s, int backlog); }
234 NOARGS { int|compat_43_sys||accept(int s, \
struct sockaddr *name, int *anamelen); }
235 NOARGS { int|sys||connect(int s, const struct sockaddr *name, \
int namelen); }
236 NOARGS { int|sys||shutdown(int s, int how); }
237 NOARGS { int|compat_43_sys||recv(int s, void *buf, int len, \
int flags); }
238 NOARGS { ssize_t|compat_43_sys||recvfrom(int s, void *buf, \
size_t len, int flags, struct sockaddr *from, \
int *fromlenaddr); }
239 NOARGS { ssize_t|compat_43_sys||recvmsg(int s, \
struct msghdr *msg, int flags); }
240 NOARGS { int|compat_43_sys||send(int s, void *buf, int len, \
int flags); }
241 NOARGS { ssize_t|compat_43_sys||sendmsg(int s, \
const struct msghdr *msg, int flags); }
242 NOARGS { ssize_t|sys||sendto(int s, const void *buf, \
size_t len, int flags, const struct sockaddr *to, \
int tolen); }
243 NOARGS { int|compat_43_sys||getpeername(int fdes, \
struct sockaddr *asa, int *alen); }
244 NOARGS { int|compat_43_sys||getsockname(int fdes, \
struct sockaddr *asa, int *alen); }
245 NOARGS { int|sys||getsockopt(int s, int level, int name, \
void *val, int *avalsize); }
246 NOARGS { int|sys||setsockopt(int s, int level, int name, \
const void *val, int valsize); }
247 UNIMPL sockconfig
248 UNIMPL sys_ntp_gettime
#if defined(NTP) || !defined(_KERNEL)
249 NOARGS { int|sys||ntp_adjtime(struct timex *tp); }
#else
249 EXCL ntp_adjtime
#endif
250 UNIMPL lwp_mutex_unlock
251 UNIMPL lwp_mutex_trylock
252 UNIMPL lwp_mutex_init
253 UNIMPL cladm
254 UNIMPL lwp_sigtimedwait
255 UNIMPL umount2