syscalls.master revision 1.223
11.223Sapb	$NetBSD: syscalls.master,v 1.223 2009/02/13 22:41:04 apb Exp $
21.28Smycroft
31.22Scgd;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94
41.1Sglass
51.23Scgd; NetBSD system call name/number "master" file.
61.23Scgd; (See syscalls.conf to see what it is processed into.)
71.23Scgd;
81.23Scgd; Fields: number type [type-dependent ...]
91.1Sglass;	number	system call number, must be in order
101.190Smartin;	type	one of STD, OBSOL, UNIMPL, IGNORED, NODEF, NOARGS, or one of
111.24Smycroft;		the compatibility options defined in syscalls.conf.
121.23Scgd;
131.191Spooka; Optional fields are specified after the type field
141.217Spooka; (NOTE! they *must* be specified in this order):
151.217Spooka;	MODULAR:attempt to autoload system call if not present
161.217Spooka;	RUMP:	the system call can be called directly from rumps
171.108Sthorpej;
181.1Sglass; types:
191.1Sglass;	STD	always included
201.23Scgd;	OBSOL	obsolete, not included in system
211.190Smartin;	IGNORED	syscall is a null op, but always succeeds
221.24Smycroft;	UNIMPL	unimplemented, not included in system
231.92Schristos;	EXCL	implemented, but not included in system
241.23Scgd;	NODEF	included, but don't define the syscall number
251.23Scgd;	NOARGS	included, but don't define the syscall args structure
261.43Scgd;	INDIR	included, but don't define the syscall args structure,
271.43Scgd;		and allow it to be "really" varargs.
281.23Scgd;
291.23Scgd; The compat options are defined in the syscalls.conf file, and the
301.23Scgd; compat option name is prefixed to the syscall name.  Other than
311.23Scgd; that, they're like NODEF (for 'compat' options), or STD (for
321.23Scgd; 'libcompat' options).
331.23Scgd;
341.23Scgd; The type-dependent arguments are as follows:
351.23Scgd; For STD, NODEF, NOARGS, and compat syscalls:
361.221Spooka;	{ return_type|prefix|compat(optional)|basename(pseudo-proto); } [alias]
371.23Scgd; For other syscalls:
381.23Scgd;	[comment]
391.23Scgd;
401.23Scgd; #ifdef's, etc. may be included, and are copied to the output files.
411.70Sthorpej; #include's are copied to the syscall names and switch definition files only.
421.77Sthorpej
431.223Sapb#include "opt_modular.h"
441.102Sbjh21#include "opt_ntp.h"
451.85Stron#include "opt_sysv.h"
461.70Sthorpej
471.70Sthorpej#include "fs_lfs.h"
481.1Sglass
491.23Scgd#include <sys/param.h>
501.23Scgd#include <sys/systm.h>
511.23Scgd#include <sys/signal.h>
521.23Scgd#include <sys/mount.h>
531.204Stsutsui#include <sys/sched.h>
541.23Scgd#include <sys/syscallargs.h>
551.103Smycroft
561.103Smycroft%%
571.1Sglass
581.1Sglass; Reserved/unimplemented system calls in the range 0-150 inclusive
591.1Sglass; are reserved for use in future Berkeley releases.
601.1Sglass; Additional system calls implemented in vendor and other
611.1Sglass; redistributions should be placed in the reserved range at the end
621.1Sglass; of the current calls.
631.1Sglass
641.221Spooka0	INDIR		{ int|sys||syscall(int code, \
651.179Sdsl			    ... register_t args[SYS_MAXSYSARGS]); }
661.221Spooka1	STD 		{ void|sys||exit(int rval); }
671.221Spooka2	STD 		{ int|sys||fork(void); }
681.221Spooka3	STD 	 RUMP	{ ssize_t|sys||read(int fd, void *buf, size_t nbyte); }
691.221Spooka4	STD 	 RUMP	{ ssize_t|sys||write(int fd, const void *buf, \
701.46Scgd			    size_t nbyte); }
711.221Spooka5	STD 	 RUMP	{ int|sys||open(const char *path, \
721.60Schristos			    int flags, ... mode_t mode); }
731.221Spooka6	STD	 RUMP	{ int|sys||close(int fd); }
741.221Spooka7	COMPAT_50 MODULAR { int|sys||wait4(int pid, int *status, \
751.219Schristos			    int options, struct rusage50 *rusage); }
761.221Spooka8	COMPAT_43 MODULAR { int|sys||creat(const char *path, mode_t mode); } ocreat
771.221Spooka9	STD 	 RUMP	{ int|sys||link(const char *path, const char *link); }
781.221Spooka10	STD 	 RUMP	{ int|sys||unlink(const char *path); }
791.23Scgd11	OBSOL		execv
801.221Spooka12	STD 	 RUMP	{ int|sys||chdir(const char *path); }
811.221Spooka13	STD 	 RUMP	{ int|sys||fchdir(int fd); }
821.221Spooka14	COMPAT_50 MODULAR { int|sys||mknod(const char *path, mode_t mode, \
831.219Schristos			    uint32_t dev); }
841.221Spooka15	STD 	 RUMP	{ int|sys||chmod(const char *path, mode_t mode); }
851.221Spooka16	STD 	 RUMP	{ int|sys||chown(const char *path, uid_t uid, \
861.46Scgd			    gid_t gid); }
871.221Spooka17	STD 		{ int|sys||obreak(char *nsize); } break
881.221Spooka18	COMPAT_20 MODULAR { int|sys||getfsstat(struct statfs12 *buf, \
891.139Schristos			    long bufsize, int flags); }
901.221Spooka19	COMPAT_43 MODULAR { long|sys||lseek(int fd, long offset, int whence); }\
911.29Smycroft			    olseek
921.221Spooka20	STD 		{ pid_t|sys||getpid_with_ppid(void); } getpid
931.221Spooka21	COMPAT_40 MODULAR { int|sys||mount(const char *type, const char *path, \
941.46Scgd			    int flags, void *data); }
951.221Spooka22	STD 	 RUMP	{ int|sys||unmount(const char *path, int flags); }
961.221Spooka23	STD 		{ int|sys||setuid(uid_t uid); }
971.221Spooka24	STD 		{ uid_t|sys||getuid_with_euid(void); } getuid
981.221Spooka25	STD 		{ uid_t|sys||geteuid(void); }
991.221Spooka26	STD 		{ int|sys||ptrace(int req, pid_t pid, void *addr, \
1001.23Scgd			    int data); }
1011.222Spooka27	STD 	RUMP	{ ssize_t|sys||recvmsg(int s, struct msghdr *msg, \
1021.28Smycroft			    int flags); }
1031.222Spooka28	STD 	RUMP	{ ssize_t|sys||sendmsg(int s, \
1041.46Scgd			    const struct msghdr *msg, int flags); }
1051.222Spooka29	STD 	RUMP	{ ssize_t|sys||recvfrom(int s, void *buf, size_t len, \
1061.46Scgd			    int flags, struct sockaddr *from, \
1071.88Skleink			    unsigned int *fromlenaddr); }
1081.221Spooka30	STD	RUMP	{ int|sys||accept(int s, struct sockaddr *name, \
1091.88Skleink			    unsigned int *anamelen); }
1101.222Spooka31	STD	RUMP	{ int|sys||getpeername(int fdes, struct sockaddr *asa, \
1111.88Skleink			    unsigned int *alen); }
1121.222Spooka32	STD	RUMP	{ int|sys||getsockname(int fdes, struct sockaddr *asa, \
1131.88Skleink			    unsigned int *alen); }
1141.221Spooka33	STD 		{ int|sys||access(const char *path, int flags); }
1151.221Spooka34	STD 	 RUMP	{ int|sys||chflags(const char *path, u_long flags); }
1161.221Spooka35	STD 		{ int|sys||fchflags(int fd, u_long flags); }
1171.221Spooka36	STD 	 RUMP	{ void|sys||sync(void); }
1181.221Spooka37	STD 		{ int|sys||kill(int pid, int signum); }
1191.221Spooka38	COMPAT_43 MODULAR { int|sys||stat(const char *path, struct stat43 *ub); } \
1201.60Schristos			    stat43
1211.221Spooka39	STD 		{ pid_t|sys||getppid(void); }
1221.221Spooka40	COMPAT_43 MODULAR { int|sys||lstat(const char *path, \
1231.60Schristos			    struct stat43 *ub); } lstat43
1241.221Spooka41	STD 		{ int|sys||dup(int fd); }
1251.221Spooka42	STD 		{ int|sys||pipe(void); }
1261.221Spooka43	STD 		{ gid_t|sys||getegid(void); }
1271.221Spooka44	STD 		{ int|sys||profil(char *samples, size_t size, \
1281.30Scgd			    u_long offset, u_int scale); }
1291.221Spooka45	STD 		{ int|sys||ktrace(const char *fname, int ops, \
1301.46Scgd			    int facs, int pid); }
1311.221Spooka46	COMPAT_13 MODULAR { int|sys||sigaction(int signum, \
1321.82Smycroft			    const struct sigaction13 *nsa, \
1331.82Smycroft			    struct sigaction13 *osa); } sigaction13
1341.221Spooka47	STD 		{ gid_t|sys||getgid_with_egid(void); } getgid
1351.221Spooka48	COMPAT_13 MODULAR { int|sys||sigprocmask(int how, \
1361.82Smycroft			    int mask); } sigprocmask13
1371.221Spooka49	STD 		{ int|sys||__getlogin(char *namebuf, size_t namelen); }
1381.221Spooka50	STD 	 	{ int|sys||__setlogin(const char *namebuf); }
1391.221Spooka51	STD 		{ int|sys||acct(const char *path); }
1401.221Spooka52	COMPAT_13 MODULAR { int|sys||sigpending(void); } sigpending13
1411.221Spooka53	COMPAT_13 MODULAR { int|sys||sigaltstack( \
1421.82Smycroft			    const struct sigaltstack13 *nss, \
1431.82Smycroft			    struct sigaltstack13 *oss); } sigaltstack13
1441.221Spooka54	STD	RUMP	{ int|sys||ioctl(int fd, \
1451.61Schristos			    u_long com, ... void *data); }
1461.221Spooka55	COMPAT_12 MODULAR { int|sys||reboot(int opt); } oreboot
1471.221Spooka56	STD 		{ int|sys||revoke(const char *path); }
1481.221Spooka57	STD 	 RUMP	{ int|sys||symlink(const char *path, \
1491.46Scgd			    const char *link); }
1501.221Spooka58	STD 	 RUMP	{ ssize_t|sys||readlink(const char *path, char *buf, \
1511.72Skleink			    size_t count); }
1521.221Spooka59	STD 		{ int|sys||execve(const char *path, \
1531.46Scgd			    char * const *argp, char * const *envp); }
1541.221Spooka60	STD 		{ mode_t|sys||umask(mode_t newmask); }
1551.221Spooka61	STD 		{ int|sys||chroot(const char *path); }
1561.221Spooka62	COMPAT_43 MODULAR { int|sys||fstat(int fd, struct stat43 *sb); } fstat43
1571.221Spooka63	COMPAT_43 MODULAR { int|sys||getkerninfo(int op, char *where, int *size, \
1581.29Smycroft			    int arg); } ogetkerninfo
1591.221Spooka64	COMPAT_43 MODULAR { int|sys||getpagesize(void); } ogetpagesize
1601.221Spooka65	COMPAT_12 MODULAR { int|sys||msync(void *addr, size_t len); }
1611.67Sthorpej; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)?
1621.221Spooka66	STD 		{ int|sys||vfork(void); }
1631.23Scgd67	OBSOL		vread
1641.23Scgd68	OBSOL		vwrite
1651.221Spooka69	STD 		{ int|sys||sbrk(intptr_t incr); }
1661.221Spooka70	STD 		{ int|sys||sstk(int incr); }
1671.221Spooka71	COMPAT_43 MODULAR { int|sys||mmap(void *addr, size_t len, int prot, \
1681.29Smycroft			    int flags, int fd, long pos); } ommap
1691.221Spooka72	STD 		{ int|sys||ovadvise(int anom); } vadvise
1701.221Spooka73	STD 		{ int|sys||munmap(void *addr, size_t len); }
1711.221Spooka74	STD 		{ int|sys||mprotect(void *addr, size_t len, \
1721.28Smycroft			    int prot); }
1731.221Spooka75	STD 		{ int|sys||madvise(void *addr, size_t len, \
1741.28Smycroft			    int behav); }
1751.23Scgd76	OBSOL		vhangup
1761.23Scgd77	OBSOL		vlimit
1771.221Spooka78	STD 		{ int|sys||mincore(void *addr, size_t len, \
1781.28Smycroft			    char *vec); }
1791.221Spooka79	STD 		{ int|sys||getgroups(int gidsetsize, \
1801.59Smycroft			    gid_t *gidset); }
1811.221Spooka80	STD 		{ int|sys||setgroups(int gidsetsize, \
1821.46Scgd			    const gid_t *gidset); }
1831.221Spooka81	STD 		{ int|sys||getpgrp(void); }
1841.221Spooka82	STD 		{ int|sys||setpgid(int pid, int pgid); }
1851.221Spooka83	COMPAT_50 MODULAR { int|sys||setitimer(int which, \
1861.219Schristos			    const struct itimerval50 *itv, \
1871.219Schristos			    struct itimerval50 *oitv); }
1881.221Spooka84	COMPAT_43 MODULAR { int|sys||wait(void); } owait
1891.221Spooka85	COMPAT_12 MODULAR { int|sys||swapon(const char *name); } oswapon
1901.221Spooka86	COMPAT_50 MODULAR { int|sys||getitimer(int which, \
1911.219Schristos			    struct itimerval50 *itv); }
1921.221Spooka87	COMPAT_43 MODULAR { int|sys||gethostname(char *hostname, u_int len); } \
1931.29Smycroft			    ogethostname
1941.221Spooka88	COMPAT_43 MODULAR { int|sys||sethostname(char *hostname, u_int len); } \
1951.29Smycroft			    osethostname
1961.221Spooka89	COMPAT_43 MODULAR { int|sys||getdtablesize(void); } ogetdtablesize
1971.221Spooka90	STD 		{ int|sys||dup2(int from, int to); }
1981.23Scgd91	UNIMPL		getdopt
1991.221Spooka92	STD 		{ int|sys||fcntl(int fd, int cmd, ... void *arg); }
2001.221Spooka93	COMPAT_50 MODULAR 	{ int|sys||select(int nd, fd_set *in, fd_set *ou, \
2011.219Schristos			    fd_set *ex, struct timeval50 *tv); }
2021.23Scgd94	UNIMPL		setdopt
2031.221Spooka95	STD	RUMP 	{ int|sys||fsync(int fd); }
2041.221Spooka96	STD 		{ int|sys||setpriority(int which, id_t who, int prio); }
2051.221Spooka97	COMPAT_30 MODULAR { int|sys||socket(int domain, int type, int protocol); }
2061.221Spooka98	STD	RUMP	{ int|sys||connect(int s, const struct sockaddr *name, \
2071.88Skleink			    unsigned int namelen); }
2081.221Spooka99	COMPAT_43 MODULAR { int|sys||accept(int s, void *name, \
2091.46Scgd			    int *anamelen); } oaccept
2101.221Spooka100	STD 		{ int|sys||getpriority(int which, id_t who); }
2111.221Spooka101	COMPAT_43 MODULAR { int|sys||send(int s, void *buf, int len, \
2121.29Smycroft			    int flags); } osend
2131.221Spooka102	COMPAT_43 MODULAR { int|sys||recv(int s, void *buf, int len, \
2141.29Smycroft			    int flags); } orecv
2151.221Spooka103	COMPAT_13 MODULAR { int|sys||sigreturn(struct sigcontext13 *sigcntxp); } \
2161.83Smycroft			    sigreturn13
2171.221Spooka104	STD	RUMP	{ int|sys||bind(int s, const struct sockaddr *name, \
2181.88Skleink			    unsigned int namelen); }
2191.221Spooka105	STD	RUMP	{ int|sys||setsockopt(int s, int level, int name, \
2201.88Skleink			    const void *val, unsigned int valsize); }
2211.221Spooka106	STD	RUMP	{ int|sys||listen(int s, int backlog); }
2221.23Scgd107	OBSOL		vtimes
2231.221Spooka108	COMPAT_43 MODULAR { int|sys||sigvec(int signum, struct sigvec *nsv, \
2241.29Smycroft			    struct sigvec *osv); } osigvec
2251.221Spooka109	COMPAT_43 MODULAR { int|sys||sigblock(int mask); } osigblock
2261.221Spooka110	COMPAT_43 MODULAR { int|sys||sigsetmask(int mask); } osigsetmask
2271.221Spooka111	COMPAT_13 MODULAR { int|sys||sigsuspend(int mask); } sigsuspend13
2281.221Spooka112	COMPAT_43 MODULAR { int|sys||sigstack(struct sigstack *nss, \
2291.29Smycroft			    struct sigstack *oss); } osigstack
2301.221Spooka113	COMPAT_43 MODULAR { int|sys||recvmsg(int s, struct omsghdr *msg, \
2311.29Smycroft			    int flags); } orecvmsg
2321.221Spooka114	COMPAT_43 MODULAR { int|sys||sendmsg(int s, void *msg, int flags); } \
2331.29Smycroft			    osendmsg
2341.23Scgd115	OBSOL		vtrace
2351.221Spooka116	COMPAT_50 MODULAR { int|sys||gettimeofday(struct timeval50 *tp, \
2361.141Skleink			    void *tzp); }
2371.221Spooka117	COMPAT_50 MODULAR { int|sys||getrusage(int who, struct rusage50 *rusage); }
2381.221Spooka118	STD	RUMP	{ int|sys||getsockopt(int s, int level, int name, \
2391.88Skleink			    void *val, unsigned int *avalsize); }
2401.26Scgd119	OBSOL		resuba
2411.221Spooka120	STD 		{ ssize_t|sys||readv(int fd, \
2421.58Smycroft			    const struct iovec *iovp, int iovcnt); }
2431.221Spooka121	STD 		{ ssize_t|sys||writev(int fd, \
2441.58Smycroft			    const struct iovec *iovp, int iovcnt); }
2451.221Spooka122	COMPAT_50 MODULAR { int|sys||settimeofday(const struct timeval50 *tv, \
2461.141Skleink			    const void *tzp); }
2471.221Spooka123	STD 		{ int|sys||fchown(int fd, uid_t uid, gid_t gid); }
2481.221Spooka124	STD 		{ int|sys||fchmod(int fd, mode_t mode); }
2491.221Spooka125	COMPAT_43 MODULAR { int|sys||recvfrom(int s, void *buf, size_t len, \
2501.167Schristos			    int flags, void *from, int *fromlenaddr); } \
2511.29Smycroft			    orecvfrom
2521.221Spooka126	STD 		{ int|sys||setreuid(uid_t ruid, uid_t euid); }
2531.221Spooka127	STD 		{ int|sys||setregid(gid_t rgid, gid_t egid); }
2541.221Spooka128	STD 	 RUMP	{ int|sys||rename(const char *from, const char *to); }
2551.221Spooka129	COMPAT_43 MODULAR { int|sys||truncate(const char *path, long length); } \
2561.29Smycroft			    otruncate
2571.221Spooka130	COMPAT_43 MODULAR { int|sys||ftruncate(int fd, long length); } oftruncate
2581.221Spooka131	STD 		{ int|sys||flock(int fd, int how); }
2591.221Spooka132	STD 	 RUMP	{ int|sys||mkfifo(const char *path, mode_t mode); }
2601.222Spooka133	STD 	 RUMP	{ ssize_t|sys||sendto(int s, const void *buf, \
2611.46Scgd			    size_t len, int flags, const struct sockaddr *to, \
2621.88Skleink			    unsigned int tolen); }
2631.222Spooka134	STD	 RUMP	{ int|sys||shutdown(int s, int how); }
2641.222Spooka135	STD	 RUMP	{ int|sys||socketpair(int domain, int type, \
2651.28Smycroft			    int protocol, int *rsv); }
2661.221Spooka136	STD 	 RUMP	{ int|sys||mkdir(const char *path, mode_t mode); }
2671.221Spooka137	STD 	 RUMP	{ int|sys||rmdir(const char *path); }
2681.221Spooka138	COMPAT_50 MODULAR { int|sys||utimes(const char *path, \
2691.219Schristos			    const struct timeval50 *tptr); }
2701.23Scgd139	OBSOL		4.2 sigreturn
2711.221Spooka140	COMPAT_50 MODULAR { int|sys||adjtime(const struct timeval50 *delta, \
2721.219Schristos			    struct timeval50 *olddelta); }
2731.221Spooka141	COMPAT_43 MODULAR { int|sys||getpeername(int fdes, void *asa, \
2741.29Smycroft			    int *alen); } ogetpeername
2751.221Spooka142	COMPAT_43 MODULAR { int32_t|sys||gethostid(void); } ogethostid
2761.221Spooka143	COMPAT_43 MODULAR { int|sys||sethostid(int32_t hostid); } osethostid
2771.221Spooka144	COMPAT_43 MODULAR { int|sys||getrlimit(int which, \
2781.58Smycroft			    struct orlimit *rlp); } ogetrlimit
2791.221Spooka145	COMPAT_43 MODULAR { int|sys||setrlimit(int which, \
2801.58Smycroft			    const struct orlimit *rlp); } osetrlimit
2811.221Spooka146	COMPAT_43 MODULAR { int|sys||killpg(int pgid, int signum); } okillpg
2821.221Spooka147	STD 	 	{ int|sys||setsid(void); }
2831.221Spooka148	STD 		{ int|sys||quotactl(const char *path, int cmd, \
2841.167Schristos			    int uid, void *arg); }
2851.221Spooka149	COMPAT_43 MODULAR { int|sys||quota(void); } oquota
2861.221Spooka150	COMPAT_43 MODULAR { int|sys||getsockname(int fdec, void *asa, \
2871.29Smycroft			    int *alen); } ogetsockname
2881.1Sglass
2891.1Sglass; Syscalls 151-180 inclusive are reserved for vendor-specific
2901.1Sglass; system calls.  (This includes various calls added for compatibity
2911.1Sglass; with other Unix variants.)
2921.1Sglass; Some of these calls are now supported by BSD...
2931.23Scgd151	UNIMPL
2941.23Scgd152	UNIMPL
2951.23Scgd153	UNIMPL
2961.23Scgd154	UNIMPL
2971.221Spooka155	STD MODULAR RUMP  { int|sys||nfssvc(int flag, void *argp); }
2981.221Spooka156	COMPAT_43 MODULAR { int|sys||getdirentries(int fd, char *buf, \
2991.29Smycroft			    u_int count, long *basep); } ogetdirentries
3001.221Spooka157	COMPAT_20 MODULAR { int|sys||statfs(const char *path, \
3011.139Schristos			    struct statfs12 *buf); }
3021.221Spooka158	COMPAT_20 MODULAR { int|sys||fstatfs(int fd, struct statfs12 *buf); }
3031.23Scgd159	UNIMPL
3041.23Scgd160	UNIMPL
3051.221Spooka161	COMPAT_30 MODULAR { int|sys||getfh(const char *fname, \
3061.155Smartin			    struct compat_30_fhandle *fhp); }
3071.221Spooka162	COMPAT_09 MODULAR { int|sys||getdomainname(char *domainname, int len); } \
3081.29Smycroft			    ogetdomainname
3091.221Spooka163	COMPAT_09 MODULAR { int|sys||setdomainname(char *domainname, int len); } \
3101.29Smycroft			    osetdomainname
3111.221Spooka164	COMPAT_09 MODULAR { int|sys||uname(struct outsname *name); } ouname
3121.221Spooka165	STD 		{ int|sys||sysarch(int op, void *parms); }
3131.23Scgd166	UNIMPL
3141.23Scgd167	UNIMPL
3151.23Scgd168	UNIMPL
3161.23Scgd; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
3171.216Sad#if (defined(SYSVSEM) || !defined(_KERNEL_OPT)) && !defined(_LP64)
3181.221Spooka169	COMPAT_10 MODULAR { int|sys||semsys(int which, int a2, int a3, int a4, \
3191.29Smycroft			    int a5); } osemsys
3201.9Scgd#else
3211.92Schristos169	EXCL		1.0 semsys
3221.9Scgd#endif
3231.23Scgd; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
3241.216Sad#if (defined(SYSVMSG) || !defined(_KERNEL_OPT)) && !defined(_LP64)
3251.221Spooka170	COMPAT_10 MODULAR { int|sys||msgsys(int which, int a2, int a3, int a4, \
3261.29Smycroft			    int a5, int a6); } omsgsys
3271.9Scgd#else
3281.92Schristos170	EXCL		1.0 msgsys
3291.9Scgd#endif
3301.23Scgd; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
3311.216Sad#if (defined(SYSVSHM) || !defined(_KERNEL_OPT)) && !defined(_LP64)
3321.221Spooka171	COMPAT_10 MODULAR { int|sys||shmsys(int which, int a2, int a3, int a4); } \
3331.29Smycroft			    oshmsys
3341.1Sglass#else
3351.92Schristos171	EXCL		1.0 shmsys
3361.1Sglass#endif
3371.23Scgd172	UNIMPL
3381.221Spooka173	STD 	 RUMP	{ ssize_t|sys||pread(int fd, void *buf, \
3391.80Sthorpej			    size_t nbyte, int pad, off_t offset); }
3401.221Spooka174	STD 	 RUMP	{ ssize_t|sys||pwrite(int fd, const void *buf, \
3411.80Sthorpej			    size_t nbyte, int pad, off_t offset); }
3421.102Sbjh21; For some reason, ntp_gettime doesn't want to raise SIGSYS when it's excluded.
3431.221Spooka175	COMPAT_30	{ int|sys||ntp_gettime(struct ntptimeval30 *ntvp); }
3441.216Sad#if defined(NTP) || !defined(_KERNEL_OPT)
3451.221Spooka176	STD 		{ int|sys||ntp_adjtime(struct timex *tp); }
3461.102Sbjh21#else
3471.102Sbjh21176	EXCL		ntp_adjtime
3481.102Sbjh21#endif
3491.23Scgd177	UNIMPL
3501.23Scgd178	UNIMPL
3511.23Scgd179	UNIMPL
3521.23Scgd180	UNIMPL
3531.1Sglass
3541.1Sglass; Syscalls 180-199 are used by/reserved for BSD
3551.221Spooka181	STD 		{ int|sys||setgid(gid_t gid); }
3561.221Spooka182	STD 		{ int|sys||setegid(gid_t egid); }
3571.221Spooka183	STD 		{ int|sys||seteuid(uid_t euid); }
3581.92Schristos#if defined(LFS) || !defined(_KERNEL)
3591.221Spooka184	STD 		{ int|sys||lfs_bmapv(fsid_t *fsidp, \
3601.23Scgd			    struct block_info *blkiov, int blkcnt); }
3611.221Spooka185	STD 		{ int|sys||lfs_markv(fsid_t *fsidp, \
3621.23Scgd			    struct block_info *blkiov, int blkcnt); }
3631.221Spooka186	STD		{ int|sys||lfs_segclean(fsid_t *fsidp, u_long segment); }
3641.221Spooka187	COMPAT_50 MODULAR { int|sys||lfs_segwait(fsid_t *fsidp, \
3651.219Schristos			    struct timeval50 *tv); }
3661.92Schristos#else
3671.92Schristos184	EXCL		lfs_bmapv
3681.92Schristos185	EXCL		lfs_markv
3691.92Schristos186	EXCL		lfs_segclean
3701.92Schristos187	EXCL		lfs_segwait
3711.23Scgd#endif
3721.221Spooka188	COMPAT_12 MODULAR { int|sys||stat(const char *path, struct stat12 *ub); } \
3731.60Schristos			    stat12
3741.221Spooka189	COMPAT_12 MODULAR { int|sys||fstat(int fd, struct stat12 *sb); } fstat12
3751.221Spooka190	COMPAT_12 MODULAR { int|sys||lstat(const char *path, \
3761.60Schristos			    struct stat12 *ub); } lstat12
3771.221Spooka191	STD 		{ long|sys||pathconf(const char *path, int name); }
3781.221Spooka192	STD 		{ long|sys||fpathconf(int fd, int name); }
3791.23Scgd193	UNIMPL
3801.221Spooka194	STD 		{ int|sys||getrlimit(int which, \
3811.58Smycroft			    struct rlimit *rlp); }
3821.221Spooka195	STD 		{ int|sys||setrlimit(int which, \
3831.46Scgd			    const struct rlimit *rlp); }
3841.221Spooka196	COMPAT_12 MODULAR { int|sys||getdirentries(int fd, char *buf, \
3851.28Smycroft			    u_int count, long *basep); }
3861.221Spooka197	STD 		{ void *|sys||mmap(void *addr, size_t len, int prot, \
3871.23Scgd			    int flags, int fd, long pad, off_t pos); }
3881.221Spooka198	INDIR		{ quad_t|sys||__syscall(quad_t code, \
3891.179Sdsl			    ... register_t args[SYS_MAXSYSARGS]); }
3901.221Spooka199	STD 		{ off_t|sys||lseek(int fd, int pad, off_t offset, \
3911.23Scgd			    int whence); }
3921.221Spooka200	STD 	 RUMP	{ int|sys||truncate(const char *path, int pad, \
3931.46Scgd			    off_t length); }
3941.221Spooka201	STD 		{ int|sys||ftruncate(int fd, int pad, off_t length); }
3951.221Spooka202	STD	 RUMP 	{ int|sys||__sysctl(const int *name, u_int namelen, \
3961.151Sdrochner			    void *old, size_t *oldlenp, const void *new, \
3971.28Smycroft			    size_t newlen); }
3981.221Spooka203	STD 		{ int|sys||mlock(const void *addr, size_t len); }
3991.221Spooka204	STD 		{ int|sys||munlock(const void *addr, size_t len); }
4001.221Spooka205	STD 		{ int|sys||undelete(const char *path); }
4011.221Spooka206	COMPAT_50 MODULAR { int|sys||futimes(int fd, \
4021.219Schristos			    const struct timeval50 *tptr); }
4031.221Spooka207	STD 		{ pid_t|sys||getpgid(pid_t pid); }
4041.221Spooka208	STD		{ int|sys||reboot(int opt, char *bootstr); }
4051.221Spooka209	STD 		{ int|sys||poll(struct pollfd *fds, u_int nfds, \
4061.35Smycroft			    int timeout); }
4071.11Scgd;
4081.11Scgd; Syscalls 210-219 are reserved for dynamically loaded syscalls
4091.11Scgd;
4101.212Sad210	UNIMPL
4111.212Sad211	UNIMPL
4121.212Sad212	UNIMPL
4131.212Sad213	UNIMPL
4141.212Sad214	UNIMPL
4151.212Sad215	UNIMPL
4161.212Sad216	UNIMPL
4171.212Sad217	UNIMPL
4181.212Sad218	UNIMPL
4191.212Sad219	UNIMPL
4201.49Skleink; System calls 220-300 are reserved for use by NetBSD
4211.216Sad#if defined(SYSVSEM) || !defined(_KERNEL_OPT)
4221.221Spooka220	COMPAT_14 MODULAR { int|sys||__semctl(int semid, int semnum, int cmd, \
4231.97Sthorpej			    union __semun *arg); }
4241.221Spooka221	STD 		{ int|sys||semget(key_t key, int nsems, int semflg); }
4251.221Spooka222	STD 		{ int|sys||semop(int semid, struct sembuf *sops, \
4261.74Skleink			    size_t nsops); }
4271.221Spooka223	STD 		{ int|sys||semconfig(int flag); }
4281.23Scgd#else
4291.97Sthorpej220	EXCL		compat_14_semctl
4301.92Schristos221	EXCL		semget
4311.92Schristos222	EXCL		semop
4321.92Schristos223	EXCL		semconfig
4331.23Scgd#endif
4341.216Sad#if defined(SYSVMSG) || !defined(_KERNEL_OPT)
4351.221Spooka224	COMPAT_14 MODULAR { int|sys||msgctl(int msqid, int cmd, \
4361.97Sthorpej			    struct msqid_ds14 *buf); }
4371.221Spooka225	STD 		{ int|sys||msgget(key_t key, int msgflg); }
4381.221Spooka226	STD 		{ int|sys||msgsnd(int msqid, const void *msgp, \
4391.74Skleink			    size_t msgsz, int msgflg); }
4401.221Spooka227	STD 		{ ssize_t|sys||msgrcv(int msqid, void *msgp, \
4411.74Skleink			    size_t msgsz, long msgtyp, int msgflg); }
4421.23Scgd#else
4431.163Sad224	EXCL 		compat_14_msgctl
4441.163Sad225	EXCL 		msgget
4451.163Sad226	EXCL 		msgsnd
4461.163Sad227	EXCL 		msgrcv
4471.23Scgd#endif
4481.216Sad#if defined(SYSVSHM) || !defined(_KERNEL_OPT)
4491.221Spooka228	STD 		{ void *|sys||shmat(int shmid, const void *shmaddr, \
4501.44Scgd			    int shmflg); }
4511.221Spooka229	COMPAT_14 MODULAR { int|sys||shmctl(int shmid, int cmd, \
4521.97Sthorpej			    struct shmid_ds14 *buf); }
4531.221Spooka230	STD 		{ int|sys||shmdt(const void *shmaddr); }
4541.221Spooka231	STD 		{ int|sys||shmget(key_t key, size_t size, int shmflg); }
4551.23Scgd#else
4561.92Schristos228	EXCL		shmat
4571.97Sthorpej229	EXCL		compat_14_shmctl
4581.92Schristos230	EXCL		shmdt
4591.92Schristos231	EXCL		shmget
4601.23Scgd#endif
4611.221Spooka232	COMPAT_50 MODULAR { int|sys||clock_gettime(clockid_t clock_id, \
4621.219Schristos			    struct timespec50 *tp); }
4631.221Spooka233	COMPAT_50 MODULAR { int|sys||clock_settime(clockid_t clock_id, \
4641.219Schristos			    const struct timespec50 *tp); }
4651.221Spooka234	COMPAT_50 MODULAR { int|sys||clock_getres(clockid_t clock_id, \
4661.219Schristos			    struct timespec50 *tp); }
4671.221Spooka235	STD		{ int|sys||timer_create(clockid_t clock_id, \
4681.118Sthorpej			    struct sigevent *evp, timer_t *timerid); }
4691.221Spooka236	STD		{ int|sys||timer_delete(timer_t timerid); }
4701.221Spooka237	COMPAT_50 MODULAR { int|sys||timer_settime(timer_t timerid, int flags, \
4711.219Schristos			    const struct itimerspec50 *value, \
4721.219Schristos			    struct itimerspec50 *ovalue); }
4731.221Spooka238	COMPAT_50 MODULAR { int|sys||timer_gettime(timer_t timerid, struct \
4741.219Schristos			    itimerspec50 *value); }
4751.221Spooka239	STD		{ int|sys||timer_getoverrun(timer_t timerid); }
4761.54Sveego;
4771.54Sveego; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls
4781.54Sveego;
4791.221Spooka240	COMPAT_50 MODULAR { int|sys||nanosleep(const struct timespec50 *rqtp, \
4801.219Schristos			    struct timespec50 *rmtp); }
4811.221Spooka241	STD 		{ int|sys||fdatasync(int fd); }
4821.221Spooka242	STD 		{ int|sys||mlockall(int flags); }
4831.221Spooka243	STD 		{ int|sys||munlockall(void); }
4841.221Spooka244	COMPAT_50 MODULAR { int|sys||__sigtimedwait(const sigset_t *set, \
4851.127Sjdolecek			    siginfo_t *info, \
4861.219Schristos			    struct timespec50 *timeout); }
4871.127Sjdolecek245	UNIMPL		sys_sigqueue
4881.221Spooka246	STD 	 	{ int|sys||modctl(int cmd, void *arg); }
4891.221Spooka247	STD MODULAR 	{ int|sys||_ksem_init(unsigned int value, intptr_t *idp); }
4901.221Spooka248	STD MODULAR 	{ int|sys||_ksem_open(const char *name, int oflag, \
4911.214Sad			    mode_t mode, unsigned int value, intptr_t *idp); }
4921.221Spooka249	STD MODULAR 	{ int|sys||_ksem_unlink(const char *name); }
4931.221Spooka250	STD MODULAR 	{ int|sys||_ksem_close(intptr_t id); }
4941.221Spooka251	STD MODULAR 	{ int|sys||_ksem_post(intptr_t id); }
4951.221Spooka252	STD MODULAR 	{ int|sys||_ksem_wait(intptr_t id); }
4961.221Spooka253	STD MODULAR 	{ int|sys||_ksem_trywait(intptr_t id); }
4971.221Spooka254	STD MODULAR 	{ int|sys||_ksem_getvalue(intptr_t id, \
4981.119Schristos			    unsigned int *value); }
4991.221Spooka255	STD MODULAR 	{ int|sys||_ksem_destroy(intptr_t id); }
5001.124Sthorpej256	UNIMPL		sys__ksem_timedwait
5011.221Spooka257	STD 		{ mqd_t|sys||mq_open(const char * name, int oflag, \
5021.177Srmind			    mode_t mode, struct mq_attr *attr); }
5031.221Spooka258	STD 		{ int|sys||mq_close(mqd_t mqdes); }
5041.221Spooka259	STD 		{ int|sys||mq_unlink(const char *name); }
5051.221Spooka260	STD 		{ int|sys||mq_getattr(mqd_t mqdes, \
5061.177Srmind			    struct mq_attr *mqstat); }
5071.221Spooka261	STD 		{ int|sys||mq_setattr(mqd_t mqdes, \
5081.177Srmind			    const struct mq_attr *mqstat, \
5091.177Srmind			    struct mq_attr *omqstat); }
5101.221Spooka262	STD 		{ int|sys||mq_notify(mqd_t mqdes, \
5111.177Srmind			    const struct sigevent *notification); }
5121.221Spooka263	STD 		{ int|sys||mq_send(mqd_t mqdes, const char *msg_ptr, \
5131.177Srmind			    size_t msg_len, unsigned msg_prio); }
5141.221Spooka264	STD 		{ ssize_t|sys||mq_receive(mqd_t mqdes, char *msg_ptr, \
5151.177Srmind			    size_t msg_len, unsigned *msg_prio); }
5161.221Spooka265	COMPAT_50 MODULAR { int|sys||mq_timedsend(mqd_t mqdes, \
5171.177Srmind			    const char *msg_ptr, size_t msg_len, \
5181.177Srmind			    unsigned msg_prio, \
5191.219Schristos			    const struct timespec50 *abs_timeout); }
5201.221Spooka266	COMPAT_50 MODULAR { ssize_t|sys||mq_timedreceive(mqd_t mqdes, \
5211.177Srmind			    char *msg_ptr, size_t msg_len, unsigned *msg_prio, \
5221.219Schristos			    const struct timespec50 *abs_timeout); }
5231.49Skleink267	UNIMPL
5241.49Skleink268	UNIMPL
5251.49Skleink269	UNIMPL
5261.221Spooka270	STD 		{ int|sys||__posix_rename(const char *from, \
5271.49Skleink			    const char *to); }
5281.221Spooka271	STD 		{ int|sys||swapctl(int cmd, void *arg, int misc); }
5291.221Spooka272	COMPAT_30 MODULAR { int|sys||getdents(int fd, char *buf, size_t count); }
5301.221Spooka273	STD 		{ int|sys||minherit(void *addr, size_t len, \
5311.54Sveego			    int inherit); }
5321.221Spooka274	STD 	 RUMP	{ int|sys||lchmod(const char *path, mode_t mode); }
5331.221Spooka275	STD 	 RUMP	{ int|sys||lchown(const char *path, uid_t uid, \
5341.56Senami			    gid_t gid); }
5351.221Spooka276	COMPAT_50 MODULAR { int|sys||lutimes(const char *path, \
5361.219Schristos			    const struct timeval50 *tptr); }
5371.221Spooka277	STD 		{ int|sys|13|msync(void *addr, size_t len, int flags); }
5381.221Spooka278	COMPAT_30 MODULAR { int|sys|13|stat(const char *path, struct stat13 *ub); }
5391.221Spooka279	COMPAT_30 MODULAR { int|sys|13|fstat(int fd, struct stat13 *sb); }
5401.221Spooka280	COMPAT_30 MODULAR { int|sys|13|lstat(const char *path, struct stat13 *ub); }
5411.221Spooka281	STD 		{ int|sys|14|sigaltstack( \
5421.82Smycroft			    const struct sigaltstack *nss, \
5431.82Smycroft			    struct sigaltstack *oss); }
5441.221Spooka282	STD 		{ int|sys|14|vfork(void); }
5451.221Spooka283	STD 		{ int|sys||__posix_chown(const char *path, uid_t uid, \
5461.69Skleink			    gid_t gid); }
5471.221Spooka284	STD 		{ int|sys||__posix_fchown(int fd, uid_t uid, \
5481.69Skleink			    gid_t gid); }
5491.221Spooka285	STD 		{ int|sys||__posix_lchown(const char *path, uid_t uid, \
5501.69Skleink			    gid_t gid); }
5511.221Spooka286	STD 		{ pid_t|sys||getsid(pid_t pid); }
5521.221Spooka287	STD 		{ pid_t|sys||__clone(int flags, void *stack); }
5531.221Spooka288	STD 		{ int|sys||fktrace(int fd, int ops, \
5541.73Schristos			    int facs, int pid); }
5551.221Spooka289	STD 		{ ssize_t|sys||preadv(int fd, \
5561.79Sthorpej			    const struct iovec *iovp, int iovcnt, \
5571.80Sthorpej			    int pad, off_t offset); }
5581.221Spooka290	STD 		{ ssize_t|sys||pwritev(int fd, \
5591.79Sthorpej			    const struct iovec *iovp, int iovcnt, \
5601.80Sthorpej			    int pad, off_t offset); }
5611.221Spooka291	COMPAT_16 MODULAR { int|sys|14|sigaction(int signum, \
5621.82Smycroft			    const struct sigaction *nsa, \
5631.82Smycroft			    struct sigaction *osa); }
5641.221Spooka292	STD 		{ int|sys|14|sigpending(sigset_t *set); }
5651.221Spooka293	STD 		{ int|sys|14|sigprocmask(int how, \
5661.82Smycroft			    const sigset_t *set, \
5671.82Smycroft			    sigset_t *oset); }
5681.221Spooka294	STD 		{ int|sys|14|sigsuspend(const sigset_t *set); }
5691.221Spooka295	COMPAT_16 MODULAR { int|sys|14|sigreturn(struct sigcontext *sigcntxp); }
5701.221Spooka296	STD 		{ int|sys||__getcwd(char *bufp, size_t length); }
5711.221Spooka297	STD 		{ int|sys||fchroot(int fd); }
5721.221Spooka298	COMPAT_30 MODULAR { int|sys||fhopen(const struct compat_30_fhandle *fhp, int flags); }
5731.221Spooka299	COMPAT_30 MODULAR { int|sys||fhstat(const struct compat_30_fhandle *fhp, \
5741.152Schristos			    struct stat13 *sb); }
5751.221Spooka300	COMPAT_20 MODULAR { int|sys||fhstatfs(const struct compat_30_fhandle *fhp, \
5761.139Schristos			    struct statfs12 *buf); }
5771.216Sad#if defined(SYSVSEM) || !defined(_KERNEL_OPT)
5781.221Spooka301	COMPAT_50 MODULAR { int|sys|13|__semctl(int semid, int semnum, int cmd, \
5791.99Schristos			    ... union __semun *arg); }
5801.97Sthorpej#else
5811.99Schristos301	EXCL		____semctl13
5821.97Sthorpej#endif
5831.216Sad#if defined(SYSVMSG) || !defined(_KERNEL_OPT)
5841.221Spooka302	COMPAT_50 MODULAR { int|sys|13|msgctl(int msqid, int cmd, \
5851.97Sthorpej			    struct msqid_ds *buf); }
5861.97Sthorpej#else
5871.97Sthorpej302	EXCL		__msgctl13
5881.97Sthorpej#endif
5891.216Sad#if defined(SYSVSHM) || !defined(_KERNEL_OPT)
5901.221Spooka303	COMPAT_50 MODULAR { int|sys|13|shmctl(int shmid, int cmd, \
5911.219Schristos			    struct shmid_ds13 *buf); }
5921.97Sthorpej#else
5931.97Sthorpej303	EXCL		__shmctl13
5941.97Sthorpej#endif
5951.221Spooka304	STD 	 RUMP	{ int|sys||lchflags(const char *path, u_long flags); }
5961.221Spooka305	STD 		{ int|sys||issetugid(void); }
5971.221Spooka306	STD 		{ int|sys||utrace(const char *label, void *addr, \
5981.118Sthorpej				size_t len); }
5991.221Spooka307	STD 		{ int|sys||getcontext(struct __ucontext *ucp); }
6001.221Spooka308	STD 		{ int|sys||setcontext(const struct __ucontext *ucp); }
6011.221Spooka309	STD 		{ int|sys||_lwp_create(const struct __ucontext *ucp, \
6021.118Sthorpej				u_long flags, lwpid_t *new_lwp); }
6031.221Spooka310	STD 		{ int|sys||_lwp_exit(void); }
6041.221Spooka311	STD 		{ lwpid_t|sys||_lwp_self(void); }
6051.221Spooka312	STD 		{ int|sys||_lwp_wait(lwpid_t wait_for, \
6061.118Sthorpej				lwpid_t *departed); }
6071.221Spooka313	STD 		{ int|sys||_lwp_suspend(lwpid_t target); }
6081.221Spooka314	STD 		{ int|sys||_lwp_continue(lwpid_t target); }
6091.221Spooka315	STD 		{ int|sys||_lwp_wakeup(lwpid_t target); }
6101.221Spooka316	STD 		{ void *|sys||_lwp_getprivate(void); }
6111.221Spooka317	STD 		{ void|sys||_lwp_setprivate(void *ptr); }
6121.221Spooka318	STD 		{ int|sys||_lwp_kill(lwpid_t target, int signo); }
6131.221Spooka319	STD 		{ int|sys||_lwp_detach(lwpid_t target); }
6141.221Spooka320	COMPAT_50 MODULAR { int|sys||_lwp_park(const struct timespec50 *ts, \
6151.175Sad				lwpid_t unpark, const void *hint, \
6161.175Sad				const void *unparkhint); }
6171.221Spooka321	STD 		{ int|sys||_lwp_unpark(lwpid_t target, const void *hint); }
6181.221Spooka322	STD 		{ ssize_t|sys||_lwp_unpark_all(const lwpid_t *targets, \
6191.164Sad				size_t ntargets, const void *hint); }
6201.221Spooka323	STD 		{ int|sys||_lwp_setname(lwpid_t target, \
6211.178Sad				const char *name); }
6221.221Spooka324	STD 		{ int|sys||_lwp_getname(lwpid_t target, \
6231.178Sad				char *name, size_t len); }
6241.221Spooka325	STD 		{ int|sys||_lwp_ctl(int features, \
6251.180Sad				struct lwpctl **address); }
6261.180Sad; Syscalls 326-339 reserved for LWP syscalls.
6271.107Snathanw326	UNIMPL
6281.107Snathanw327	UNIMPL
6291.107Snathanw328	UNIMPL
6301.107Snathanw329	UNIMPL
6311.209Swrstuden; SA system calls.
6321.221Spooka330	STD 		{ int|sys||sa_register(sa_upcall_t new, \
6331.209Swrstuden				sa_upcall_t *old, int flags, \
6341.209Swrstuden				ssize_t stackinfo_offset); }
6351.221Spooka331	STD 		{ int|sys||sa_stacks(int num, stack_t *stacks); }
6361.221Spooka332	STD 		{ int|sys||sa_enable(void); }
6371.221Spooka333	STD 		{ int|sys||sa_setconcurrency(int concurrency); }
6381.221Spooka334	STD 		{ int|sys||sa_yield(void); }
6391.221Spooka335	STD 		{ int|sys||sa_preempt(int sa_id); }
6401.209Swrstuden336	OBSOL 		sys_sa_unblockyield
6411.209Swrstuden;
6421.209Swrstuden; Syscalls 337-339 are reserved for other scheduler activation syscalls.
6431.209Swrstuden;
6441.107Snathanw337	UNIMPL
6451.107Snathanw338	UNIMPL
6461.107Snathanw339	UNIMPL
6471.221Spooka340	STD 		{ int|sys||__sigaction_sigtramp(int signum, \
6481.112Sthorpej			    const struct sigaction *nsa, \
6491.112Sthorpej			    struct sigaction *osa, \
6501.132Smatt			    const void *tramp, int vers); }
6511.221Spooka341	STD		{ int|sys||pmc_get_info(int ctr, int op, void *args); }
6521.221Spooka342	STD		{ int|sys||pmc_control(int ctr, int op, void *args); }
6531.221Spooka343	STD 		{ int|sys||rasctl(void *addr, size_t len, int op); }
6541.221Spooka344	STD 		{ int|sys||kqueue(void); }
6551.221Spooka345	COMPAT_50 MODULAR { int|sys||kevent(int fd, \
6561.116Sjdolecek			    const struct kevent *changelist, size_t nchanges, \
6571.116Sjdolecek			    struct kevent *eventlist, size_t nevents, \
6581.219Schristos			    const struct timespec50 *timeout); }
6591.184Srmind
6601.184Srmind; Scheduling system calls.
6611.221Spooka346	STD 		{ int|sys||_sched_setparam(pid_t pid, lwpid_t lid, \
6621.188Syamt			    int policy, const struct sched_param *params); }
6631.221Spooka347	STD 		{ int|sys||_sched_getparam(pid_t pid, lwpid_t lid, \
6641.188Syamt			    int *policy, struct sched_param *params); }
6651.221Spooka348	STD 		{ int|sys||_sched_setaffinity(pid_t pid, lwpid_t lid, \
6661.202Schristos			    size_t size, const cpuset_t *cpuset); }
6671.221Spooka349	STD 		{ int|sys||_sched_getaffinity(pid_t pid, lwpid_t lid, \
6681.202Schristos			    size_t size, cpuset_t *cpuset); }
6691.221Spooka350	STD 		{ int|sys||sched_yield(void); }
6701.184Srmind351	UNIMPL
6711.184Srmind352	UNIMPL
6721.184Srmind353	UNIMPL
6731.134Sthorpej
6741.221Spooka354	STD 		{ int|sys||fsync_range(int fd, int flags, off_t start, \
6751.134Sthorpej			    off_t length); }
6761.221Spooka355	STD 		{ int|sys||uuidgen(struct uuid *store, int count); }
6771.221Spooka356	STD 		{ int|sys||getvfsstat(struct statvfs *buf, \
6781.139Schristos			    size_t bufsize, int flags); }
6791.221Spooka357	STD 	RUMP	{ int|sys||statvfs1(const char *path, \
6801.139Schristos			    struct statvfs *buf, int flags); }
6811.221Spooka358	STD 		{ int|sys||fstatvfs1(int fd, struct statvfs *buf, \
6821.139Schristos			    int flags); }
6831.221Spooka359	COMPAT_30 MODULAR { int|sys||fhstatvfs1(const struct compat_30_fhandle *fhp, \
6841.139Schristos			    struct statvfs *buf, int flags); }
6851.221Spooka360	STD 		{ int|sys||extattrctl(const char *path, int cmd, \
6861.143Sthorpej			    const char *filename, int attrnamespace, \
6871.143Sthorpej			    const char *attrname); }
6881.221Spooka361	STD 		{ int|sys||extattr_set_file(const char *path, \
6891.143Sthorpej			    int attrnamespace, const char *attrname, \
6901.143Sthorpej			    const void *data, size_t nbytes); }
6911.221Spooka362	STD 		{ ssize_t|sys||extattr_get_file(const char *path, \
6921.143Sthorpej			    int attrnamespace, const char *attrname, \
6931.143Sthorpej			    void *data, size_t nbytes); }
6941.221Spooka363	STD 		{ int|sys||extattr_delete_file(const char *path, \
6951.143Sthorpej			    int attrnamespace, const char *attrname); }
6961.221Spooka364	STD 		{ int|sys||extattr_set_fd(int fd, \
6971.143Sthorpej			    int attrnamespace, const char *attrname, \
6981.143Sthorpej			    const void *data, size_t nbytes); }
6991.221Spooka365	STD 		{ ssize_t|sys||extattr_get_fd(int fd, \
7001.143Sthorpej			    int attrnamespace, const char *attrname, \
7011.143Sthorpej			    void *data, size_t nbytes); }
7021.221Spooka366	STD 		{ int|sys||extattr_delete_fd(int fd, \
7031.143Sthorpej			    int attrnamespace, const char *attrname); }
7041.221Spooka367	STD 		{ int|sys||extattr_set_link(const char *path, \
7051.143Sthorpej			    int attrnamespace, const char *attrname, \
7061.143Sthorpej			    const void *data, size_t nbytes); }
7071.221Spooka368	STD 		{ ssize_t|sys||extattr_get_link(const char *path, \
7081.143Sthorpej			    int attrnamespace, const char *attrname, \
7091.143Sthorpej			    void *data, size_t nbytes); }
7101.221Spooka369	STD 		{ int|sys||extattr_delete_link(const char *path, \
7111.143Sthorpej			    int attrnamespace, const char *attrname); }
7121.221Spooka370	STD 		{ ssize_t|sys||extattr_list_fd(int fd, \
7131.143Sthorpej			    int attrnamespace, void *data, size_t nbytes); }
7141.221Spooka371	STD 		{ ssize_t|sys||extattr_list_file(const char *path, \
7151.143Sthorpej			    int attrnamespace, void *data, size_t nbytes); }
7161.221Spooka372	STD 		{ ssize_t|sys||extattr_list_link(const char *path, \
7171.143Sthorpej			    int attrnamespace, void *data, size_t nbytes); }
7181.221Spooka373	COMPAT_50 MODULAR { int|sys||pselect(int nd, fd_set *in, fd_set *ou, \
7191.219Schristos			    fd_set *ex, const struct timespec50 *ts, \
7201.145Smatt			    const sigset_t *mask); }
7211.221Spooka374	COMPAT_50 MODULAR { int|sys||pollts(struct pollfd *fds, u_int nfds, \
7221.219Schristos			    const struct timespec50 *ts, const sigset_t *mask); }
7231.221Spooka375	STD 		{ int|sys||setxattr(const char *path, \
7241.147Sthorpej			    const char *name, void *value, size_t size, \
7251.147Sthorpej			    int flags); }
7261.221Spooka376	STD 		{ int|sys||lsetxattr(const char *path, \
7271.147Sthorpej			    const char *name, void *value, size_t size, \
7281.147Sthorpej			    int flags); }
7291.221Spooka377	STD 		{ int|sys||fsetxattr(int fd, \
7301.147Sthorpej			    const char *name, void *value, size_t size, \
7311.147Sthorpej			    int flags); }
7321.221Spooka378	STD 		{ int|sys||getxattr(const char *path, \
7331.147Sthorpej			    const char *name, void *value, size_t size); }
7341.221Spooka379	STD 		{ int|sys||lgetxattr(const char *path, \
7351.147Sthorpej			    const char *name, void *value, size_t size); }
7361.221Spooka380	STD 		{ int|sys||fgetxattr(int fd, \
7371.147Sthorpej			    const char *name, void *value, size_t size); }
7381.221Spooka381	STD 		{ int|sys||listxattr(const char *path, \
7391.147Sthorpej			    char *list, size_t size); }
7401.221Spooka382	STD 		{ int|sys||llistxattr(const char *path, \
7411.147Sthorpej			    char *list, size_t size); }
7421.221Spooka383	STD 		{ int|sys||flistxattr(int fd, \
7431.147Sthorpej			    char *list, size_t size); }
7441.221Spooka384	STD 		{ int|sys||removexattr(const char *path, \
7451.147Sthorpej			    const char *name); }
7461.221Spooka385	STD 		{ int|sys||lremovexattr(const char *path, \
7471.147Sthorpej			    const char *name); }
7481.221Spooka386	STD 		{ int|sys||fremovexattr(int fd, \
7491.147Sthorpej			    const char *name); }
7501.221Spooka387	COMPAT_50 MODULAR { int|sys|30|stat(const char *path, struct stat30 *ub); }
7511.221Spooka388	COMPAT_50 MODULAR { int|sys|30|fstat(int fd, struct stat30 *sb); }
7521.221Spooka389	COMPAT_50 MODULAR { int|sys|30|lstat(const char *path, struct stat30 *ub); }
7531.221Spooka390	STD 		{ int|sys|30|getdents(int fd, char *buf, size_t count); }
7541.190Smartin391	IGNORED		old posix_fadvise
7551.221Spooka392	COMPAT_30 MODULAR { int|sys|30|fhstat(const struct compat_30_fhandle \
7561.219Schristos			    *fhp, struct stat30 *sb); }
7571.221Spooka393	COMPAT_50 MODULAR { int|sys|30|ntp_gettime(struct ntptimeval50 *ntvp); }
7581.221Spooka394	STD	 RUMP	{ int|sys|30|socket(int domain, int type, int protocol); }
7591.221Spooka395	STD 	 RUMP	{ int|sys|30|getfh(const char *fname, void *fhp, \
7601.156Smartin			    size_t *fh_size); }
7611.221Spooka396	STD 		{ int|sys|40|fhopen(const void *fhp, size_t fh_size,\
7621.156Smartin			    int flags); }
7631.221Spooka397	STD 		{ int|sys|40|fhstatvfs1(const void *fhp, \
7641.156Smartin			    size_t fh_size, struct statvfs *buf, int flags); }
7651.221Spooka398	COMPAT_50 MODULAR { int|sys|40|fhstat(const void *fhp, \
7661.219Schristos			    size_t fh_size, struct stat30 *sb); }
7671.169Srmind
7681.169Srmind; Asynchronous I/O system calls
7691.221Spooka399	STD MODULAR 	{ int|sys||aio_cancel(int fildes, struct aiocb *aiocbp); }
7701.221Spooka400	STD MODULAR 	{ int|sys||aio_error(const struct aiocb *aiocbp); }
7711.221Spooka401	STD MODULAR 	{ int|sys||aio_fsync(int op, struct aiocb *aiocbp); }
7721.221Spooka402	STD MODULAR 	{ int|sys||aio_read(struct aiocb *aiocbp); }
7731.221Spooka403	STD MODULAR 	{ int|sys||aio_return(struct aiocb *aiocbp); }
7741.221Spooka404	COMPAT_50 MODULAR { int|sys||aio_suspend(const struct aiocb *const *list, \
7751.219Schristos			    int nent, const struct timespec50 *timeout); }
7761.221Spooka405	STD MODULAR 	{ int|sys||aio_write(struct aiocb *aiocbp); }
7771.221Spooka406	STD MODULAR 	{ int|sys||lio_listio(int mode, struct aiocb *const *list, \
7781.169Srmind			    int nent, struct sigevent *sig); }
7791.171Sjoerg
7801.170Sdsl407	UNIMPL
7811.170Sdsl408	UNIMPL
7821.170Sdsl409	UNIMPL
7831.170Sdsl
7841.221Spooka410	STD 		{ int|sys|50|mount(const char *type, \
7851.170Sdsl			    const char *path, int flags, void *data, \
7861.170Sdsl			    size_t data_len); }
7871.221Spooka411	STD 		{ void *|sys||mremap(void *old_address, size_t old_size, \
7881.171Sjoerg			    void *new_address, size_t new_size, int flags); }
7891.184Srmind
7901.184Srmind; Processor-sets system calls
7911.221Spooka412	STD 		{ int|sys||pset_create(psetid_t *psid); }
7921.221Spooka413	STD 		{ int|sys||pset_destroy(psetid_t psid); }
7931.221Spooka414	STD 		{ int|sys||pset_assign(psetid_t psid, cpuid_t cpuid, \
7941.184Srmind			    psetid_t *opsid); }
7951.221Spooka415	STD 		{ int|sys||_pset_bind(idtype_t idtype, id_t first_id, \
7961.184Srmind			    id_t second_id, psetid_t psid, psetid_t *opsid); }
7971.221Spooka416	STD 		{ int|sys|50|posix_fadvise(int fd, int pad, \
7981.187Smartin			    off_t offset, off_t len, int advice); }
7991.221Spooka417	STD 		{ int|sys|50|select(int nd, fd_set *in, fd_set *ou, \
8001.219Schristos			    fd_set *ex, struct timeval *tv); }
8011.221Spooka418	STD 		{ int|sys|50|gettimeofday(struct timeval *tp, \
8021.219Schristos			    void *tzp); }
8031.221Spooka419	STD 		{ int|sys|50|settimeofday(const struct timeval *tv, \
8041.219Schristos			    const void *tzp); }
8051.221Spooka420	STD  RUMP	{ int|sys|50|utimes(const char *path, \
8061.219Schristos			    const struct timeval *tptr); }
8071.221Spooka421	STD		{ int|sys|50|adjtime(const struct timeval *delta, \
8081.219Schristos			    struct timeval *olddelta); }
8091.219Schristos#if defined(LFS) || !defined(_KERNEL)
8101.221Spooka422	STD		{ int|sys|50|lfs_segwait(fsid_t *fsidp, \
8111.219Schristos			    struct timeval *tv); }
8121.219Schristos#else
8131.219Schristos422	EXCL		__lfs_segwait50
8141.219Schristos#endif
8151.221Spooka423	STD 		{ int|sys|50|futimes(int fd, \
8161.219Schristos			    const struct timeval *tptr); }
8171.221Spooka424	STD  RUMP 	{ int|sys|50|lutimes(const char *path, \
8181.219Schristos			    const struct timeval *tptr); }
8191.221Spooka425	STD		{ int|sys|50|setitimer(int which, \
8201.219Schristos			    const struct itimerval *itv, \
8211.219Schristos			    struct itimerval *oitv); }
8221.221Spooka426	STD		{ int|sys|50|getitimer(int which, \
8231.219Schristos			    struct itimerval *itv); }
8241.221Spooka427	STD 		{ int|sys|50|clock_gettime(clockid_t clock_id, \
8251.219Schristos			    struct timespec *tp); }
8261.221Spooka428	STD 		{ int|sys|50|clock_settime(clockid_t clock_id, \
8271.219Schristos			    const struct timespec *tp); }
8281.221Spooka429	STD 		{ int|sys|50|clock_getres(clockid_t clock_id, \
8291.219Schristos			    struct timespec *tp); }
8301.221Spooka430	STD 		{ int|sys|50|nanosleep(const struct timespec *rqtp, \
8311.219Schristos			    struct timespec *rmtp); }
8321.221Spooka431	STD 		{ int|sys|50|__sigtimedwait(const sigset_t *set, \
8331.219Schristos			    siginfo_t *info, \
8341.219Schristos			    struct timespec *timeout); }
8351.221Spooka432	STD 		{ int|sys|50|mq_timedsend(mqd_t mqdes, \
8361.219Schristos			    const char *msg_ptr, size_t msg_len, \
8371.219Schristos			    unsigned msg_prio, \
8381.219Schristos			    const struct timespec *abs_timeout); }
8391.221Spooka433	STD 		{ ssize_t|sys|50|mq_timedreceive(mqd_t mqdes, \
8401.219Schristos			    char *msg_ptr, size_t msg_len, unsigned *msg_prio, \
8411.219Schristos			    const struct timespec *abs_timeout); }
8421.221Spooka434	STD 		{ int|sys|50|_lwp_park(const struct timespec *ts, \
8431.219Schristos				lwpid_t unpark, const void *hint, \
8441.219Schristos				const void *unparkhint); }
8451.221Spooka435	STD 		{ int|sys|50|kevent(int fd, \
8461.219Schristos			    const struct kevent *changelist, size_t nchanges, \
8471.219Schristos			    struct kevent *eventlist, size_t nevents, \
8481.219Schristos			    const struct timespec *timeout); }
8491.221Spooka436	STD 		{ int|sys|50|pselect(int nd, fd_set *in, fd_set *ou, \
8501.219Schristos			    fd_set *ex, const struct timespec *ts, \
8511.219Schristos			    const sigset_t *mask); }
8521.221Spooka437	STD 		{ int|sys|50|pollts(struct pollfd *fds, u_int nfds, \
8531.219Schristos			    const struct timespec *ts, const sigset_t *mask); }
8541.221Spooka438	STD MODULAR	{ int|sys|50|aio_suspend( \
8551.219Schristos			    const struct aiocb *const *list, \
8561.219Schristos			    int nent, const struct timespec *timeout); }
8571.221Spooka439	STD  RUMP	{ int|sys|50|stat(const char *path, struct stat *ub); }
8581.221Spooka440	STD 		{ int|sys|50|fstat(int fd, struct stat *sb); }
8591.221Spooka441	STD  RUMP	{ int|sys|50|lstat(const char *path, struct stat *ub); }
8601.219Schristos#if defined(SYSVSEM) || !defined(_KERNEL_OPT)
8611.221Spooka442	STD 		{ int|sys|50|__semctl(int semid, int semnum, int cmd, \
8621.219Schristos			    ... union __semun *arg); }
8631.219Schristos#else
8641.219Schristos442	EXCL		____semctl50
8651.219Schristos#endif
8661.219Schristos#if defined(SYSVSHM) || !defined(_KERNEL_OPT)
8671.221Spooka443	STD 		{ int|sys|50|shmctl(int shmid, int cmd, \
8681.219Schristos			    struct shmid_ds *buf); }
8691.219Schristos#else
8701.219Schristos443	EXCL 		____shmctl50
8711.219Schristos#endif
8721.219Schristos#if defined(SYSVMSG) || !defined(_KERNEL_OPT)
8731.221Spooka444	STD 		{ int|sys|50|msgctl(int msqid, int cmd, \
8741.219Schristos			    struct msqid_ds *buf); }
8751.219Schristos#else
8761.219Schristos444	EXCL 		____msgctl50
8771.219Schristos#endif
8781.221Spooka445	STD 		{ int|sys|50|getrusage(int who, struct rusage *rusage); }
8791.221Spooka446	STD		{ int|sys|50|timer_settime(timer_t timerid, \
8801.219Schristos			    int flags, const struct itimerspec *value, \
8811.219Schristos			    struct itimerspec *ovalue); }
8821.221Spooka447	STD		{ int|sys|50|timer_gettime(timer_t timerid, struct \
8831.219Schristos			    itimerspec *value); }
8841.219Schristos#if defined(NTP) || !defined(_KERNEL_OPT)
8851.221Spooka448	STD		{ int|sys|50|ntp_gettime(struct ntptimeval *ntvp); }
8861.219Schristos#else
8871.219Schristos448	EXCL		___ntp_gettime50
8881.219Schristos#endif
8891.221Spooka449	STD 		{ int|sys|50|wait4(int pid, int *status, \
8901.219Schristos				    int options, struct rusage *rusage); }
8911.221Spooka450	STD  RUMP	{ int|sys|50|mknod(const char *path, mode_t mode, \
8921.219Schristos			    dev_t dev); }
8931.221Spooka451	STD	 	{ int|sys|50|fhstat(const void *fhp, \
8941.219Schristos			    size_t fh_size, struct stat *sb); }
895