xref: /netbsd/sys/compat/sunos32/syscalls.master (revision 6550d01e)
1;	$NetBSD: syscalls.master,v 1.21 2010/03/02 21:07:22 pooka Exp $
2
3;	from :NetBSD: syscalls.master,v 1.57 2000/12/09 07:10:36 mycroft Exp
4
5; NetBSD COMPAT_SUNOS, 32 bit mode for sparc64 system call name/number "master" file.
6; (See syscalls32.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;
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).
24;
25; The type-dependent arguments are as follows:
26; For STD, NODEF, NOARGS, and compat syscalls:
27;	{ pseudo-proto } [alias]
28; For other syscalls:
29;	[comment]
30;
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.
33
34#if defined(_KERNEL_OPT)
35#include "opt_sysv.h"
36#include "opt_compat_sunos.h"
37#endif
38
39#include <sys/param.h>
40#include <sys/systm.h>
41#include <sys/signal.h>
42#include <sys/mount.h>
43#include <sys/poll.h>
44#include <sys/syscallargs.h>
45
46#include <compat/sunos/sunos.h>
47#include <compat/sunos/sunos_syscallargs.h>
48
49#include <compat/netbsd32/netbsd32.h>
50#include <compat/netbsd32/netbsd32_syscallargs.h>
51
52#include <compat/sunos32/sunos32.h>
53#include <compat/sunos32/sunos32_syscallargs.h>
54
55%%
56
570	NOARGS		{ int|sys||nosys(void); } syscall
581	NOARGS		{ int|netbsd32||exit(int rval); }
592	NOARGS		{ int|sys||fork(void); }
603	NOARGS		{ netbsd32_ssize_t|netbsd32||read(int fd, netbsd32_voidp buf, netbsd32_size_t nbyte); }
614	NOARGS		{ netbsd32_ssize_t|netbsd32||write(int fd, const netbsd32_voidp buf, netbsd32_size_t nbyte); }
625	STD		{ int|sunos32_sys||open(const netbsd32_charp path, int flags, \
63			    int mode); }
646	NOARGS		{ int|netbsd32||close(int fd); }
657	STD		{ int|sunos32_sys||wait4(int pid, netbsd32_intp status, \
66			    int options, netbsd32_rusagep_t rusage); }
678	STD		{ int|sunos32_sys||creat(const netbsd32_charp path, int mode); }
689	NOARGS		{ int|netbsd32||link(netbsd32_charp path, netbsd32_charp link); }
6910	NOARGS		{ int|netbsd32||unlink(netbsd32_charp path); }
7011	STD		{ int|sunos32_sys||execv(const netbsd32_charp path, netbsd32_charpp argp); }
7112	NOARGS		{ int|netbsd32||chdir(netbsd32_charp path); }
7213	OBSOL		old_time
7314	STD		{ int|sunos32_sys||mknod(const netbsd32_charp path, int mode, \
74			    int dev); }
7515	NOARGS		{ int|netbsd32||chmod(netbsd32_charp path, int mode); }
7616	NOARGS		{ int|netbsd32||chown(netbsd32_charp path, int uid, int gid); }
7717	NOARGS		{ int|netbsd32||break(netbsd32_charp nsize); }
7818	OBSOL		old_stat
7919	NOARGS		{ netbsd32_long|compat_43_netbsd32||olseek(int fd, netbsd32_long offset, int whence); }
8020	NOARGS		{ pid_t|sys||getpid_with_ppid(void); }
8121	OBSOL		sunos_old_mount
8222	UNIMPL		System V umount
8323	NOARGS		{ int|netbsd32||setuid(uid_t uid); }
8424	NOARGS		{ uid_t|sys||getuid_with_euid(void); }
8525	STD		{ int|sunos32_sys||stime(sunos32_time_tp tp); }
8626	STD		{ netbsd32_long|sunos32_sys||ptrace(int req, pid_t pid, \
87			    netbsd32_caddr_t addr, int data, netbsd32_charp addr2); }
8827	UNIMPL		old_sunos_alarm
8928	UNIMPL		old_sunos_fstat
9029	UNIMPL		old_sunos_pause
9130	UNIMPL		old_sunos_utime
9231	UNIMPL		old_sunos_stty
9332	UNIMPL		old_sunos_gtty
9433	STD		{ int|sunos32_sys||access(const netbsd32_charp path, int flags); }
9534	UNIMPL		old_sunos_nice
9635	UNIMPL		old_sunos_ftime
9736	NOARGS		{ int|sys||sync(void); }
9837	NOARGS		{ int|netbsd32||kill(int pid, int signum); }
9938	STD		{ int|sunos32_sys||stat(const netbsd32_charp path, \
100			    netbsd32_stat43p_t ub); }
10139	UNIMPL		sunos_setpgrp
10240	STD		{ int|sunos32_sys||lstat(const netbsd32_charp path, \
103			    netbsd32_stat43p_t ub); }
10441	NOARGS		{ int|netbsd32||dup(u_int fd); }
10542	NOARGS		{ int|sys||pipe(void); }
10643	UNIMPL		sunos_times
10744	NOARGS		{ int|netbsd32||profil(netbsd32_caddr_t samples, u_int size, \
108			    u_int offset, u_int scale); }
10945	UNIMPL
11046	NOARGS		{ int|netbsd32||setgid(uid_t gid); }
11147	NOARGS		{ gid_t|sys||getgid_with_egid(void); }
11248	UNIMPL		sunos_ssig
11349	UNIMPL		reserved for USG
11450	UNIMPL		reserved for USG
11551	NOARGS		{ int|netbsd32||acct(netbsd32_charp path); }
11652	UNIMPL
11753	STD		{ int|sunos32_sys||mctl(netbsd32_voidp addr, int len, int func, \
118			    netbsd32_voidp arg); }
11954	STD		{ int|sunos32_sys||ioctl(int fd, netbsd32_u_long com, \
120			    netbsd32_caddr_t data); }
12155	STD		{ int|sunos32_sys||reboot(int howto, netbsd32_charp bootstr); }
12256	OBSOL		sunos_owait3
12357	NOARGS		{ int|netbsd32||symlink(netbsd32_charp path, netbsd32_charp link); }
12458	NOARGS		{ int|netbsd32||readlink(netbsd32_charp path, netbsd32_charp buf, int count); }
12559	STD		{ int|sunos32_sys||execve(const netbsd32_charp path, netbsd32_charpp argp, \
126			    netbsd32_charpp envp); }
12760	NOARGS		{ int|netbsd32||umask(int newmask); }
12861	NOARGS		{ int|netbsd32||chroot(netbsd32_charp path); }
12962	NOARGS		{ int|compat_43_netbsd32||fstat43(int fd, netbsd32_stat43p_t sb); }
13063	UNIMPL
13164	NOARGS		{ int|compat_43_sys||getpagesize(void); } ogetpagesize
13265	STD		{ int|sunos32_sys||omsync(netbsd32_caddr_t addr, netbsd32_size_t len, \
133			    int flags); }
13466	NOARGS		{ int|sys||vfork(void); }
13567	OBSOL		vread
13668	OBSOL		vwrite
13769	NOARGS		{ int|netbsd32||sbrk(netbsd32_intptr_t incr); }
13870	NOARGS		{ int|netbsd32||sstk(int incr); }
13971	STD		{ netbsd32_voidp|sunos32_sys||mmap(netbsd32_voidp addr, netbsd32_size_t len, \
140			    int prot, int flags, int fd, netbsd32_long pos); }
14172	NOARGS		{ int|netbsd32||ovadvise(int anom); } vadvise
14273	NOARGS		{ int|netbsd32||munmap(netbsd32_voidp addr, netbsd32_size_t len); }
14374	NOARGS		{ int|netbsd32||mprotect(netbsd32_voidp addr, netbsd32_size_t len, \
144			    int prot); }
14575	NOARGS		{ int|netbsd32||madvise(netbsd32_voidp addr, netbsd32_size_t len, \
146			    int behav); }
14776	STD		{ int|sunos32_sys||vhangup(void); }
14877	UNIMPL		vlimit
14978	NOARGS		{ int|netbsd32||mincore(netbsd32_caddr_t addr, netbsd32_size_t len, netbsd32_charp vec); }
15079	NOARGS		{ int|netbsd32||getgroups(u_int gidsetsize, netbsd32_gid_tp gidset); }
15180	NOARGS		{ int|netbsd32||setgroups(u_int gidsetsize, netbsd32_gid_tp gidset); }
15281	NOARGS		{ int|sys||getpgrp(void); }
15382	STD		{ int|sunos32_sys||setpgrp(int pid, int pgid); }
15483	NOARGS		{ int|compat_50_netbsd32||setitimer(u_int which, netbsd32_itimervalp_t itv, netbsd32_itimervalp_t oitv); }
15584	UNIMPL		sunos32_sys_wait
15685	NOARGS		{ int|compat_12_netbsd32||oswapon(netbsd32_charp name); }
15786	NOARGS		{ int|compat_50_netbsd32||getitimer(u_int which, netbsd32_itimervalp_t itv); }
15887	NOARGS		{ int|compat_43_netbsd32||ogethostname(netbsd32_charp hostname, u_int len); }
15988	NOARGS		{ int|compat_43_netbsd32||osethostname(netbsd32_charp hostname, u_int len); }
16089	NOARGS		{ int|compat_43_sys||getdtablesize(void); } ogetdtablesize
16190	NOARGS		{ int|netbsd32||dup2(u_int from, u_int to); }
16291	UNIMPL		getdopt
16392	STD		{ int|sunos32_sys||fcntl(int fd, int cmd, netbsd32_voidp arg); }
16493	NOARGS		{ int|compat_50_netbsd32||select(u_int nd, netbsd32_fd_setp_t in, netbsd32_fd_setp_t ou, \
165			    netbsd32_fd_setp_t ex, netbsd32_timevalp_t tv); }
16694	UNIMPL		setdopt
16795	NOARGS		{ int|netbsd32||fsync(int fd); }
16896	NOARGS		{ int|netbsd32||setpriority(int which, int who, int prio); }
16997	STD		{ int|sunos32_sys||socket(int domain, int type, int protocol); }
17098	NOARGS		{ int|netbsd32||connect(int s, netbsd32_caddr_t name, int namelen); }
17199	NOARGS		{ int|compat_43_netbsd32||oaccept(int s, netbsd32_caddr_t name, netbsd32_intp anamelen); }
172100	NOARGS		{ int|netbsd32||getpriority(int which, int who); }
173101	NOARGS		{ int|compat_43_netbsd32||osend(int s, netbsd32_caddr_t buf, int len, \
174			    int flags); }
175102	NOARGS		{ int|compat_43_netbsd32||orecv(int s, netbsd32_caddr_t buf, int len, \
176			    int flags); }
177103	UNIMPL		old socketaddr
178104	NOARGS		{ int|netbsd32||bind(int s, netbsd32_caddr_t name, int namelen); }
179105	STD		{ int|sunos32_sys||setsockopt(int s, int level, int name, \
180			    netbsd32_caddr_t val, int valsize); }
181106	NOARGS		{ int|netbsd32||listen(int s, int backlog); }
182107	UNIMPL		vtimes
183108	STD		{ int|sunos32_sys||sigvec(int signum, netbsd32_sigvecp_t nsv, \
184			    netbsd32_sigvecp_t osv); }
185109	NOARGS		{ int|compat_43_netbsd32||sigblock(int mask); }
186110	NOARGS		{ int|compat_43_netbsd32||sigsetmask(int mask); }
187111	STD		{ int|sunos32_sys||sigsuspend(int mask); }
188112	NOARGS		{ int|compat_43_netbsd32||osigstack(netbsd32_sigstackp_t nss, \
189			    netbsd32_sigstackp_t oss); }
190113	NOARGS		{ int|compat_43_netbsd32||orecvmsg(int s, \
191			    netbsd32_omsghdrp_t msg, int flags); }
192114	NOARGS		{ int|compat_43_netbsd32||osendmsg(int s, netbsd32_caddr_t msg, \
193			    int flags); }
194115	OBSOL		vtrace
195116	NOARGS		{ int|compat_50_netbsd32||gettimeofday(netbsd32_timevalp_t tp, \
196			    netbsd32_timezonep_t tzp); }
197117	NOARGS		{ int|compat_50_netbsd32||getrusage(int who, netbsd32_rusagep_t rusage); }
198118	NOARGS		{ int|netbsd32||getsockopt(int s, int level, int name, \
199			    netbsd32_caddr_t val, netbsd32_intp avalsize); }
200119	UNIMPL
201120	NOARGS		{ int|netbsd32||readv(int fd, netbsd32_iovecp_t iovp, \
202			    u_int iovcnt); }
203121	NOARGS		{ int|netbsd32||writev(int fd, netbsd32_iovecp_t iovp, \
204			    u_int iovcnt); }
205122	NOARGS		{ int|compat_50_netbsd32||settimeofday(netbsd32_timevalp_t tv, \
206			    netbsd32_timezonep_t tzp); }
207123	NOARGS		{ int|netbsd32||fchown(int fd, int uid, int gid); }
208124	NOARGS		{ int|netbsd32||fchmod(int fd, int mode); }
209125	NOARGS		{ int|compat_43_netbsd32||orecvfrom(int s, netbsd32_caddr_t buf, \
210			    netbsd32_size_t len, int flags, netbsd32_caddr_t from, \
211			    netbsd32_intp fromlenaddr); }
212126	NOARGS		{ int|netbsd32||setreuid(int ruid, int euid); }
213127	NOARGS		{ int|netbsd32||setregid(int rgid, int egid); }
214128	NOARGS		{ int|netbsd32||rename(netbsd32_charp from, netbsd32_charp to); }
215129	NOARGS		{ int|compat_43_netbsd32||otruncate(netbsd32_charp path, netbsd32_long length); }
216130	NOARGS		{ int|compat_43_netbsd32||oftruncate(int fd, netbsd32_long length); }
217131	NOARGS		{ int|netbsd32||flock(int fd, int how); }
218132	UNIMPL
219133	NOARGS		{ int|netbsd32||sendto(int s, netbsd32_caddr_t buf, netbsd32_size_t len, \
220			    int flags, netbsd32_caddr_t to, int tolen); }
221134	NOARGS		{ int|netbsd32||shutdown(int s, int how); }
222135	STD		{ int|sunos32_sys||socketpair(int domain, int type, \
223			    int protocol, netbsd32_intp rsv); }
224136	NOARGS		{ int|netbsd32||mkdir(netbsd32_charp path, int mode); }
225137	NOARGS		{ int|netbsd32||rmdir(netbsd32_charp path); }
226138	NOARGS		{ int|compat_50_netbsd32||utimes(netbsd32_charp path, netbsd32_timevalp_t tptr); }
227139	STD		{ int|sunos32_sys||sigreturn(netbsd32_sigcontextp_t sigcntxp); }
228140	NOARGS		{ int|compat_50_netbsd32||adjtime(netbsd32_timevalp_t delta, \
229			    netbsd32_timevalp_t olddelta); }
230141	NOARGS		{ int|compat_43_netbsd32||ogetpeername(int fdes, netbsd32_caddr_t asa, \
231			    netbsd32_intp alen); }
232142	NOARGS		{ int|compat_43_sys||gethostid(void); }
233143	UNIMPL		old sethostid
234144	STD		{ int|sunos32_sys||getrlimit(u_int which, \
235			    netbsd32_orlimitp_t rlp); }
236145	STD		{ int|sunos32_sys||setrlimit(u_int which, \
237			    netbsd32_orlimitp_t rlp); }
238146	NOARGS		{ int|compat_43_netbsd32||killpg(int pgid, int signum); }
239147	UNIMPL
240148	UNIMPL
241149	UNIMPL
242150	NOARGS		{ int|compat_43_netbsd32||ogetsockname(int fdes, netbsd32_caddr_t asa, \
243			    netbsd32_intp alen); }
244151	UNIMPL		getmsg
245152	UNIMPL		putmsg
246153	NOARGS		{ int|netbsd32||poll(netbsd32_pollfdp_t fds, u_int nfds, \
247			    int timeout); }
248154	UNIMPL
249155	UNIMPL		nfssvc
250156	NOARGS		{ int|compat_43_netbsd32||ogetdirentries(int fd, netbsd32_charp buf, \
251			    u_int count, netbsd32_longp basep); }
252157	STD		{ int|sunos32_sys||statfs(const netbsd32_charp path, \
253			    sunos32_statfsp_t buf); }
254158	STD		{ int|sunos32_sys||fstatfs(int fd, \
255			    sunos32_statfsp_t buf); }
256159	STD		{ int|sunos32_sys||unmount(netbsd32_charp path); }
257160	UNIMPL		async_daemon
258161	NOARGS		{ int|compat_30_sys||getfh(netbsd32_charp fname, netbsd32_fhandlep_t fhp); }
259162	NOARGS		{ int|compat_09_netbsd32||ogetdomainname(netbsd32_charp domainname, \
260			    int len); }
261163	NOARGS		{ int|compat_09_netbsd32||osetdomainname(netbsd32_charp domainname, \
262			    int len); }
263164	UNIMPL		rtschedule
264165	STD		{ int|sunos32_sys||quotactl(int cmd, netbsd32_charp special, \
265			    int uid, netbsd32_caddr_t addr); }
266166	STD		{ int|sunos32_sys||exportfs(netbsd32_charp path, netbsd32_charp ex); }
267167	STD		{ int|sunos32_sys||mount(netbsd32_charp type, netbsd32_charp path, \
268			    int flags, netbsd32_caddr_t data); }
269168	STD		{ int|sunos32_sys||ustat(int dev, \
270			    sunos32_ustatp_t buf); }
271#ifdef SYSVSEM
272169	NOARGS		{ int|compat_10_netbsd32||semsys(int which, int a2, int a3, \
273			    int a4, int a5); } osemsys
274#else
275169	UNIMPL		semsys
276#endif
277#ifdef SYSVMSG
278170	NOARGS		{ int|compat_10_netbsd32||msgsys(int which, int a2, int a3, \
279			    int a4, int a5, int a6); } omsgsys
280#else
281170	UNIMPL		msgsys
282#endif
283#ifdef SYSVSHM
284171	NOARGS		{ int|compat_10_netbsd32||shmsys(int which, int a2, int a3, \
285			    int a4); } oshmsys
286#else
287171	UNIMPL		shmsys
288#endif
289172	STD		{ int|sunos32_sys||auditsys(netbsd32_charp record); }
290173	UNIMPL		rfssys
291174	STD		{ int|sunos32_sys||getdents(int fd, netbsd32_charp buf, \
292			    int nbytes); }
293175	NOARGS		{ int|sys||setsid(void); }
294176	NOARGS		{ int|netbsd32||fchdir(int fd); }
295177	NOARGS		{ int|netbsd32||fchroot(int fd); }
296178	UNIMPL		vpixsys
297179	UNIMPL		aioread
298180	UNIMPL		aiowrite
299181	UNIMPL		aiowait
300182	UNIMPL		aiocancel
301183	STD		{ int|sunos32_sys||sigpending(netbsd32_intp mask); }
302184	UNIMPL
303185	NOARGS		{ int|netbsd32||setpgid(int pid, int pgid); }
304186	NOARGS		{ netbsd32_long|netbsd32||pathconf(netbsd32_charp path, int name); }
305187	NOARGS		{ netbsd32_long|netbsd32||fpathconf(int fd, int name); }
306188	STD		{ int|sunos32_sys||sysconf(int name); }
307189	STD		{ int|sunos32_sys||uname(sunos32_utsnamep_t name); }
308