syscalls.master revision 1.73
11.73Spooka	$NetBSD: syscalls.master,v 1.73 2009/01/13 21:57:55 pooka Exp $
21.20Scgd
31.17Scgd;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
41.1Sderaadt
51.18Sderaadt; NetBSD COMPAT_SUNOS system call name/number "master" file.
61.18Sderaadt; (See syscalls.conf to see what it is processed into.)
71.18Sderaadt;
81.18Sderaadt; Fields: number type [type-dependent ...]
91.1Sderaadt;	number	system call number, must be in order
101.18Sderaadt;	type	one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
111.18Sderaadt;		the compatibility options defined in syscalls.conf.
121.18Sderaadt;
131.1Sderaadt; types:
141.1Sderaadt;	STD	always included
151.18Sderaadt;	OBSOL	obsolete, not included in system
161.18Sderaadt;	UNIMPL	unimplemented, not included in system
171.18Sderaadt;	NODEF	included, but don't define the syscall number
181.18Sderaadt;	NOARGS	included, but don't define the syscall args structure
191.18Sderaadt;
201.18Sderaadt; The compat options are defined in the syscalls.conf file, and the
211.18Sderaadt; compat option name is prefixed to the syscall name.  Other than
221.18Sderaadt; that, they're like NODEF (for 'compat' options), or STD (for
231.18Sderaadt; 'libcompat' options).
241.18Sderaadt;
251.18Sderaadt; The type-dependent arguments are as follows:
261.18Sderaadt; For STD, NODEF, NOARGS, and compat syscalls:
271.18Sderaadt;	{ pseudo-proto } [alias]
281.18Sderaadt; For other syscalls:
291.18Sderaadt;	[comment]
301.18Sderaadt;
311.18Sderaadt; #ifdef's, etc. may be included, and are copied to the output files.
321.45Sthorpej; #include's are copied to the syscall names and switch definition files only.
331.46Sthorpej
341.58Smrg#if defined(_KERNEL_OPT)
351.48Stron#include "opt_sysv.h"
361.56Smycroft#endif
371.1Sderaadt
381.18Sderaadt#include <sys/param.h>
391.18Sderaadt#include <sys/systm.h>
401.18Sderaadt#include <sys/signal.h>
411.18Sderaadt#include <sys/mount.h>
421.37Smycroft#include <sys/poll.h>
431.69Stsutsui#include <sys/sched.h>
441.18Sderaadt#include <sys/syscallargs.h>
451.37Smycroft
461.18Sderaadt#include <compat/sunos/sunos.h>
471.19Sderaadt#include <compat/sunos/sunos_syscallargs.h>
481.56Smycroft
491.56Smycroft%%
501.1Sderaadt
511.32Smycroft0	NOARGS		{ int sys_nosys(void); } syscall
521.32Smycroft1	NOARGS		{ int sys_exit(int rval); }
531.32Smycroft2	NOARGS		{ int sys_fork(void); }
541.32Smycroft3	NOARGS		{ int sys_read(int fd, char *buf, u_int nbyte); }
551.32Smycroft4	NOARGS		{ int sys_write(int fd, char *buf, u_int nbyte); }
561.51Schristos5	STD		{ int sunos_sys_open(const char *path, int flags, \
571.51Schristos			    int mode); }
581.32Smycroft6	NOARGS		{ int sys_close(int fd); }
591.32Smycroft7	STD		{ int sunos_sys_wait4(int pid, int *status, \
601.72Stsutsui			    int options, struct rusage50 *rusage); }
611.51Schristos8	STD		{ int sunos_sys_creat(const char *path, int mode); }
621.32Smycroft9	NOARGS		{ int sys_link(char *path, char *link); }
631.32Smycroft10	NOARGS		{ int sys_unlink(char *path); }
641.51Schristos11	STD		{ int sunos_sys_execv(const char *path, char **argp); }
651.32Smycroft12	NOARGS		{ int sys_chdir(char *path); }
661.54Smrg13	OBSOL		old_time
671.51Schristos14	STD		{ int sunos_sys_mknod(const char *path, int mode, \
681.51Schristos			    int dev); }
691.32Smycroft15	NOARGS		{ int sys_chmod(char *path, int mode); }
701.32Smycroft16	NOARGS		{ int sys_chown(char *path, int uid, int gid); }
711.32Smycroft17	NOARGS		{ int sys_obreak(char *nsize); } break
721.54Smrg18	OBSOL		old_stat
731.32Smycroft19	NOARGS		{ long compat_43_sys_lseek(int fd, long offset, int whence); }
741.57Smycroft20	NOARGS		{ pid_t sys_getpid_with_ppid(void); }
751.18Sderaadt21	OBSOL		sunos_old_mount
761.18Sderaadt22	UNIMPL		System V umount
771.32Smycroft23	NOARGS		{ int sys_setuid(uid_t uid); }
781.57Smycroft24	NOARGS		{ uid_t sys_getuid_with_euid(void); }
791.71Schristos25	STD		{ int sunos_sys_stime(sunos_time_t *tp); }
801.32Smycroft26	STD		{ long sunos_sys_ptrace(int req, pid_t pid, \
811.67Schristos			    void *addr, int data, char *addr2); }
821.54Smrg27	UNIMPL		old_sunos_alarm
831.54Smrg28	UNIMPL		old_sunos_fstat
841.54Smrg29	UNIMPL		old_sunos_pause
851.54Smrg30	UNIMPL		old_sunos_utime
861.54Smrg31	UNIMPL		old_sunos_stty
871.54Smrg32	UNIMPL		old_sunos_gtty
881.68Sdsl33	NOARGS		{ int sys_access(const char *path, int flags); }
891.54Smrg34	UNIMPL		old_sunos_nice
901.54Smrg35	UNIMPL		old_sunos_ftime
911.32Smycroft36	NOARGS		{ int sys_sync(void); }
921.32Smycroft37	NOARGS		{ int sys_kill(int pid, int signum); }
931.68Sdsl38	NOARGS		{ int compat_43_sys_stat(const char *path, \
941.51Schristos			    struct stat43 *ub); }
951.18Sderaadt39	UNIMPL		sunos_setpgrp
961.68Sdsl40	NOARGS		{ int compat_43_sys_lstat(const char *path, \
971.51Schristos			    struct stat43 *ub); }
981.32Smycroft41	NOARGS		{ int sys_dup(u_int fd); }
991.32Smycroft42	NOARGS		{ int sys_pipe(void); }
1001.18Sderaadt43	UNIMPL		sunos_times
1011.67Schristos44	NOARGS		{ int sys_profil(void *samples, u_int size, \
1021.18Sderaadt			    u_int offset, u_int scale); }
1031.61Sperry45	UNIMPL
1041.32Smycroft46	NOARGS		{ int sys_setgid(uid_t gid); }
1051.57Smycroft47	NOARGS		{ gid_t sys_getgid_with_egid(void); }
1061.18Sderaadt48	UNIMPL		sunos_ssig
1071.18Sderaadt49	UNIMPL		reserved for USG
1081.18Sderaadt50	UNIMPL		reserved for USG
1091.32Smycroft51	NOARGS		{ int sys_acct(char *path); }
1101.61Sperry52	UNIMPL
1111.44Schristos53	STD		{ int sunos_sys_mctl(void *addr, int len, int func, \
1121.18Sderaadt			    void *arg); }
1131.32Smycroft54	STD		{ int sunos_sys_ioctl(int fd, u_long com, \
1141.67Schristos			    void *data); }
1151.32Smycroft55	STD		{ int sunos_sys_reboot(int howto, char *bootstr); }
1161.18Sderaadt56	OBSOL		sunos_owait3
1171.32Smycroft57	NOARGS		{ int sys_symlink(char *path, char *link); }
1181.32Smycroft58	NOARGS		{ int sys_readlink(char *path, char *buf, int count); }
1191.51Schristos59	STD		{ int sunos_sys_execve(const char *path, char **argp, \
1201.32Smycroft			    char **envp); }
1211.32Smycroft60	NOARGS		{ int sys_umask(int newmask); }
1221.32Smycroft61	NOARGS		{ int sys_chroot(char *path); }
1231.43Schristos62	NOARGS		{ int compat_43_sys_fstat(int fd, struct stat43 *sb); }
1241.61Sperry63	UNIMPL
1251.32Smycroft64	NOARGS		{ int compat_43_sys_getpagesize(void); }
1261.67Schristos65	STD		{ int sunos_sys_omsync(void *addr, size_t len, \
1271.32Smycroft			    int flags); }
1281.32Smycroft66	NOARGS		{ int sys_vfork(void); }
1291.18Sderaadt67	OBSOL		vread
1301.18Sderaadt68	OBSOL		vwrite
1311.53Skleink69	NOARGS		{ int sys_sbrk(intptr_t incr); }
1321.32Smycroft70	NOARGS		{ int sys_sstk(int incr); }
1331.44Schristos71	STD		{ void *sunos_sys_mmap(void *addr, size_t len, \
1341.32Smycroft			    int prot, int flags, int fd, long pos); }
1351.32Smycroft72	NOARGS		{ int sys_ovadvise(int anom); } vadvise
1361.44Schristos73	NOARGS		{ int sys_munmap(void *addr, size_t len); }
1371.44Schristos74	NOARGS		{ int sys_mprotect(void *addr, size_t len, \
1381.32Smycroft			    int prot); }
1391.44Schristos75	NOARGS		{ int sys_madvise(void *addr, size_t len, \
1401.32Smycroft			    int behav); }
1411.32Smycroft76	STD		{ int sunos_sys_vhangup(void); }
1421.18Sderaadt77	UNIMPL		vlimit
1431.44Schristos78	NOARGS		{ int sys_mincore(void *addr, size_t len, \
1441.32Smycroft			    char *vec); }
1451.32Smycroft79	NOARGS		{ int sys_getgroups(u_int gidsetsize, gid_t *gidset); }
1461.32Smycroft80	NOARGS		{ int sys_setgroups(u_int gidsetsize, gid_t *gidset); }
1471.32Smycroft81	NOARGS		{ int sys_getpgrp(void); }
1481.32Smycroft82	STD		{ int sunos_sys_setpgrp(int pid, int pgid); }
1491.72Stsutsui83	NOARGS		{ int compat_50_sys_setitimer(u_int which, \
1501.72Stsutsui			    struct itimerval50 *itv, \
1511.72Stsutsui			    struct itimerval50 *oitv); }
1521.73Spooka84	UNIMPL		sunos_sys_wait
1531.41Sthorpej85	NOARGS		{ int compat_12_sys_swapon(char *name); }
1541.72Stsutsui86	NOARGS		{ int compat_50_sys_getitimer(u_int which, \
1551.72Stsutsui			    struct itimerval50 *itv); }
1561.32Smycroft87	NOARGS		{ int compat_43_sys_gethostname(char *hostname, \
1571.32Smycroft			    u_int len); }
1581.32Smycroft88	NOARGS		{ int compat_43_sys_sethostname(char *hostname, \
1591.32Smycroft			    u_int len); }
1601.32Smycroft89	NOARGS		{ int compat_43_sys_getdtablesize(void); }
1611.32Smycroft90	NOARGS		{ int sys_dup2(u_int from, u_int to); }
1621.18Sderaadt91	UNIMPL		getdopt
1631.33Spk92	STD		{ int sunos_sys_fcntl(int fd, int cmd, void *arg); }
1641.72Stsutsui93	NOARGS		{ int compat_50_sys_select(u_int nd, fd_set *in, \
1651.72Stsutsui			    fd_set *ou, fd_set *ex, struct timeval50 *tv); }
1661.18Sderaadt94	UNIMPL		setdopt
1671.32Smycroft95	NOARGS		{ int sys_fsync(int fd); }
1681.32Smycroft96	NOARGS		{ int sys_setpriority(int which, int who, int prio); }
1691.59Smrg97	STD		{ int sunos_sys_socket(int domain, int type, int protocol); }
1701.67Schristos98	NOARGS		{ int sys_connect(int s, void *name, int namelen); }
1711.67Schristos99	NOARGS		{ int compat_43_sys_accept(int s, void *name, \
1721.32Smycroft			    int *anamelen); }
1731.32Smycroft100	NOARGS		{ int sys_getpriority(int which, int who); }
1741.67Schristos101	NOARGS		{ int compat_43_sys_send(int s, void *buf, int len, \
1751.32Smycroft			    int flags); }
1761.67Schristos102	NOARGS		{ int compat_43_sys_recv(int s, void *buf, int len, \
1771.32Smycroft			    int flags); }
1781.18Sderaadt103	UNIMPL		old socketaddr
1791.67Schristos104	NOARGS		{ int sys_bind(int s, void *name, int namelen); }
1801.32Smycroft105	STD		{ int sunos_sys_setsockopt(int s, int level, int name, \
1811.67Schristos			    void *val, int valsize); }
1821.32Smycroft106	NOARGS		{ int sys_listen(int s, int backlog); }
1831.18Sderaadt107	UNIMPL		vtimes
1841.32Smycroft108	STD		{ int sunos_sys_sigvec(int signum, struct sigvec *nsv, \
1851.18Sderaadt			    struct sigvec *osv); }
1861.32Smycroft109	NOARGS		{ int compat_43_sys_sigblock(int mask); }
1871.32Smycroft110	NOARGS		{ int compat_43_sys_sigsetmask(int mask); }
1881.47Spk111	STD		{ int sunos_sys_sigsuspend(int mask); }
1891.32Smycroft112	NOARGS		{ int compat_43_sys_sigstack(struct sigstack *nss, \
1901.18Sderaadt			    struct sigstack *oss); }
1911.32Smycroft113	NOARGS		{ int compat_43_sys_recvmsg(int s, \
1921.32Smycroft			    struct omsghdr *msg, int flags); }
1931.67Schristos114	NOARGS		{ int compat_43_sys_sendmsg(int s, void *msg, \
1941.32Smycroft			    int flags); }
1951.18Sderaadt115	OBSOL		vtrace
1961.72Stsutsui116	NOARGS		{ int compat_50_sys_gettimeofday(struct timeval50 *tp, \
1971.18Sderaadt			    struct timezone *tzp); }
1981.72Stsutsui117	NOARGS		{ int compat_50_sys_getrusage(int who, \
1991.72Stsutsui			    struct rusage50 *rusage); }
2001.32Smycroft118	NOARGS		{ int sys_getsockopt(int s, int level, int name, \
2011.67Schristos			    void *val, int *avalsize); }
2021.61Sperry119	UNIMPL
2031.32Smycroft120	NOARGS		{ int sys_readv(int fd, struct iovec *iovp, \
2041.32Smycroft			    u_int iovcnt); }
2051.32Smycroft121	NOARGS		{ int sys_writev(int fd, struct iovec *iovp, \
2061.18Sderaadt			    u_int iovcnt); }
2071.72Stsutsui122	NOARGS		{ int compat_50_sys_settimeofday(struct timeval50 *tv, \
2081.18Sderaadt			    struct timezone *tzp); }
2091.32Smycroft123	NOARGS		{ int sys_fchown(int fd, int uid, int gid); }
2101.32Smycroft124	NOARGS		{ int sys_fchmod(int fd, int mode); }
2111.67Schristos125	NOARGS		{ int compat_43_sys_recvfrom(int s, void *buf, \
2121.67Schristos			    size_t len, int flags, void *from, \
2131.32Smycroft			    int *fromlenaddr); }
2141.34Smycroft126	NOARGS		{ int sys_setreuid(int ruid, int euid); }
2151.34Smycroft127	NOARGS		{ int sys_setregid(int rgid, int egid); }
2161.32Smycroft128	NOARGS		{ int sys_rename(char *from, char *to); }
2171.32Smycroft129	NOARGS		{ int compat_43_sys_truncate(char *path, long length); }
2181.32Smycroft130	NOARGS		{ int compat_43_sys_ftruncate(int fd, long length); }
2191.32Smycroft131	NOARGS		{ int sys_flock(int fd, int how); }
2201.61Sperry132	UNIMPL
2211.67Schristos133	NOARGS		{ int sys_sendto(int s, void *buf, size_t len, \
2221.67Schristos			    int flags, void *to, int tolen); }
2231.32Smycroft134	NOARGS		{ int sys_shutdown(int s, int how); }
2241.59Smrg135	STD		{ int sunos_sys_socketpair(int domain, int type, \
2251.32Smycroft			    int protocol, int *rsv); }
2261.32Smycroft136	NOARGS		{ int sys_mkdir(char *path, int mode); }
2271.32Smycroft137	NOARGS		{ int sys_rmdir(char *path); }
2281.72Stsutsui138	NOARGS		{ int compat_50_sys_utimes(char *path, \
2291.72Stsutsui			    struct timeval50 *tptr); }
2301.32Smycroft139	STD		{ int sunos_sys_sigreturn(struct sigcontext *sigcntxp); }
2311.72Stsutsui140	NOARGS		{ int compat_50_sys_adjtime(struct timeval50 *delta, \
2321.72Stsutsui			    struct timeval50 *olddelta); }
2331.67Schristos141	NOARGS		{ int compat_43_sys_getpeername(int fdes, void *asa, \
2341.32Smycroft			    int *alen); }
2351.32Smycroft142	NOARGS		{ int compat_43_sys_gethostid(void); }
2361.18Sderaadt143	UNIMPL		old sethostid
2371.32Smycroft144	STD		{ int sunos_sys_getrlimit(u_int which, \
2381.32Smycroft			    struct orlimit *rlp); }
2391.32Smycroft145	STD		{ int sunos_sys_setrlimit(u_int which, \
2401.32Smycroft			    struct orlimit *rlp); }
2411.32Smycroft146	NOARGS		{ int compat_43_sys_killpg(int pgid, int signum); }
2421.61Sperry147	UNIMPL
2431.61Sperry148	UNIMPL
2441.61Sperry149	UNIMPL
2451.67Schristos150	NOARGS		{ int compat_43_sys_getsockname(int fdes, void *asa, \
2461.32Smycroft			    int *alen); }
2471.18Sderaadt151	UNIMPL		getmsg
2481.18Sderaadt152	UNIMPL		putmsg
2491.38Smycroft153	NOARGS		{ int sys_poll(struct pollfd *fds, u_int nfds, \
2501.37Smycroft			    int timeout); }
2511.61Sperry154	UNIMPL
2521.32Smycroft155	STD		{ int sunos_sys_nfssvc(int fd); }
2531.42Sfvdl156	NOARGS		{ int compat_12_sys_getdirentries(int fd, char *buf, \
2541.32Smycroft			    u_int count, long *basep); }
2551.51Schristos157	STD		{ int sunos_sys_statfs(const char *path, \
2561.32Smycroft			    struct sunos_statfs *buf); }
2571.32Smycroft158	STD		{ int sunos_sys_fstatfs(int fd, \
2581.32Smycroft			    struct sunos_statfs *buf); }
2591.32Smycroft159	STD		{ int sunos_sys_unmount(char *path); }
2601.18Sderaadt160	NOARGS		{ int async_daemon(void); }
2611.63Spavel161	NOARGS		{ int compat_30_sys_getfh(char *fname, fhandle_t *fhp); }
2621.32Smycroft162	NOARGS		{ int compat_09_sys_getdomainname(char *domainname, \
2631.32Smycroft			    int len); }
2641.32Smycroft163	NOARGS		{ int compat_09_sys_setdomainname(char *domainname, \
2651.32Smycroft			    int len); }
2661.18Sderaadt164	UNIMPL		rtschedule
2671.32Smycroft165	STD		{ int sunos_sys_quotactl(int cmd, char *special, \
2681.67Schristos			    int uid, void *addr); }
2691.32Smycroft166	STD		{ int sunos_sys_exportfs(char *path, char *ex); }
2701.32Smycroft167	STD		{ int sunos_sys_mount(char *type, char *dir, \
2711.67Schristos			    int flags, void *data); }
2721.32Smycroft168	STD		{ int sunos_sys_ustat(int dev, \
2731.32Smycroft			    struct sunos_ustat *buf); }
2741.6Sderaadt#ifdef SYSVSEM
2751.32Smycroft169	NOARGS		{ int compat_10_sys_semsys(int which, int a2, int a3, \
2761.32Smycroft			    int a4, int a5); }
2771.6Sderaadt#else
2781.32Smycroft169	UNIMPL		semsys
2791.6Sderaadt#endif
2801.6Sderaadt#ifdef SYSVMSG
2811.32Smycroft170	NOARGS		{ int compat_10_sys_msgsys(int which, int a2, int a3, \
2821.32Smycroft			    int a4, int a5, int a6); }
2831.6Sderaadt#else
2841.32Smycroft170	UNIMPL		msgsys
2851.6Sderaadt#endif
2861.1Sderaadt#ifdef SYSVSHM
2871.32Smycroft171	NOARGS		{ int compat_10_sys_shmsys(int which, int a2, int a3, \
2881.32Smycroft			    int a4); }
2891.1Sderaadt#else
2901.32Smycroft171	UNIMPL		shmsys
2911.1Sderaadt#endif
2921.32Smycroft172	STD		{ int sunos_sys_auditsys(char *record); }
2931.18Sderaadt173	UNIMPL		rfssys
2941.32Smycroft174	STD		{ int sunos_sys_getdents(int fd, char *buf, \
2951.32Smycroft			    int nbytes); }
2961.32Smycroft175	NOARGS		{ int sys_setsid(void); }
2971.32Smycroft176	NOARGS		{ int sys_fchdir(int fd); }
2981.52Ssommerfe177	NOARGS		{ int sys_fchroot(int fd); }
2991.18Sderaadt178	UNIMPL		vpixsys
3001.18Sderaadt179	UNIMPL		aioread
3011.18Sderaadt180	UNIMPL		aiowrite
3021.18Sderaadt181	UNIMPL		aiowait
3031.18Sderaadt182	UNIMPL		aiocancel
3041.32Smycroft183	STD		{ int sunos_sys_sigpending(int *mask); }
3051.61Sperry184	UNIMPL
3061.32Smycroft185	NOARGS		{ int sys_setpgid(int pid, int pgid); }
3071.32Smycroft186	NOARGS		{ long sys_pathconf(char *path, int name); }
3081.32Smycroft187	NOARGS		{ long sys_fpathconf(int fd, int name); }
3091.32Smycroft188	STD		{ int sunos_sys_sysconf(int name); }
3101.32Smycroft189	STD		{ int sunos_sys_uname(struct sunos_utsname *name); }
311