syscalls.master revision 1.201
11.201Spooka	$NetBSD: syscalls.master,v 1.201 2008/05/29 12:01:37 pooka 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.191Spooka; (NOTE! they must be specified in this order):
151.191Spooka;     RUMP:	the system call can be called directly from rumps
161.108Sthorpej;
171.1Sglass; types:
181.1Sglass;	STD	always included
191.23Scgd;	OBSOL	obsolete, not included in system
201.190Smartin;	IGNORED	syscall is a null op, but always succeeds
211.24Smycroft;	UNIMPL	unimplemented, not included in system
221.92Schristos;	EXCL	implemented, but not included in system
231.23Scgd;	NODEF	included, but don't define the syscall number
241.23Scgd;	NOARGS	included, but don't define the syscall args structure
251.43Scgd;	INDIR	included, but don't define the syscall args structure,
261.43Scgd;		and allow it to be "really" varargs.
271.23Scgd;
281.23Scgd; The compat options are defined in the syscalls.conf file, and the
291.23Scgd; compat option name is prefixed to the syscall name.  Other than
301.23Scgd; that, they're like NODEF (for 'compat' options), or STD (for
311.23Scgd; 'libcompat' options).
321.23Scgd;
331.23Scgd; The type-dependent arguments are as follows:
341.23Scgd; For STD, NODEF, NOARGS, and compat syscalls:
351.23Scgd;	{ pseudo-proto } [alias]
361.23Scgd; For other syscalls:
371.23Scgd;	[comment]
381.23Scgd;
391.23Scgd; #ifdef's, etc. may be included, and are copied to the output files.
401.70Sthorpej; #include's are copied to the syscall names and switch definition files only.
411.77Sthorpej
421.78Sthorpej#include "opt_nfsserver.h"
431.102Sbjh21#include "opt_ntp.h"
441.81Sjonathan#include "opt_compat_netbsd.h"
451.85Stron#include "opt_sysv.h"
461.87Schristos#include "opt_compat_43.h"
471.119Schristos#include "opt_posix.h"
481.70Sthorpej
491.70Sthorpej#include "fs_lfs.h"
501.70Sthorpej#include "fs_nfs.h"
511.1Sglass
521.23Scgd#include <sys/param.h>
531.23Scgd#include <sys/systm.h>
541.23Scgd#include <sys/signal.h>
551.23Scgd#include <sys/mount.h>
561.23Scgd#include <sys/syscallargs.h>
571.103Smycroft
581.103Smycroft%%
591.1Sglass
601.1Sglass; Reserved/unimplemented system calls in the range 0-150 inclusive
611.1Sglass; are reserved for use in future Berkeley releases.
621.1Sglass; Additional system calls implemented in vendor and other
631.1Sglass; redistributions should be placed in the reserved range at the end
641.1Sglass; of the current calls.
651.1Sglass
661.179Sdsl0	INDIR		{ int sys_syscall(int code, \
671.179Sdsl			    ... register_t args[SYS_MAXSYSARGS]); }
681.200Sad1	STD 		{ void sys_exit(int rval); }
691.200Sad2	STD 		{ int sys_fork(void); }
701.200Sad3	STD 	 RUMP	{ ssize_t sys_read(int fd, void *buf, size_t nbyte); }
711.200Sad4	STD 	 RUMP	{ ssize_t sys_write(int fd, const void *buf, \
721.46Scgd			    size_t nbyte); }
731.200Sad5	STD 	 RUMP	{ int sys_open(const char *path, \
741.60Schristos			    int flags, ... mode_t mode); }
751.200Sad6	STD 	 RUMP	{ int sys_close(int fd); }
761.200Sad7	STD 		{ int sys_wait4(int pid, int *status, int options, \
771.23Scgd			    struct rusage *rusage); }
781.200Sad8	COMPAT_43 	{ int sys_creat(const char *path, mode_t mode); } ocreat
791.200Sad9	STD 	 RUMP	{ int sys_link(const char *path, const char *link); }
801.200Sad10	STD 	 RUMP	{ int sys_unlink(const char *path); }
811.23Scgd11	OBSOL		execv
821.200Sad12	STD 	 RUMP	{ int sys_chdir(const char *path); }
831.200Sad13	STD 	 RUMP	{ int sys_fchdir(int fd); }
841.200Sad14	STD 	 RUMP	{ int sys_mknod(const char *path, mode_t mode, \
851.60Schristos			    dev_t dev); }
861.200Sad15	STD 	 RUMP	{ int sys_chmod(const char *path, mode_t mode); }
871.200Sad16	STD 	 RUMP	{ int sys_chown(const char *path, uid_t uid, \
881.46Scgd			    gid_t gid); }
891.200Sad17	STD 		{ int sys_obreak(char *nsize); } break
901.200Sad18	COMPAT_20 	{ int sys_getfsstat(struct statfs12 *buf, \
911.139Schristos			    long bufsize, int flags); }
921.200Sad19	COMPAT_43 	{ long sys_lseek(int fd, long offset, int whence); } \
931.29Smycroft			    olseek
941.104Smycroft#ifdef COMPAT_43
951.200Sad20	STD 		{ pid_t sys_getpid_with_ppid(void); } getpid
961.104Smycroft#else
971.200Sad20	STD 		{ pid_t sys_getpid(void); }
981.104Smycroft#endif
991.200Sad21	COMPAT_40 	{ int sys_mount(const char *type, const char *path, \
1001.46Scgd			    int flags, void *data); }
1011.200Sad22	STD 	 RUMP	{ int sys_unmount(const char *path, int flags); }
1021.200Sad23	STD 		{ int sys_setuid(uid_t uid); }
1031.104Smycroft#ifdef COMPAT_43
1041.200Sad24	STD 		{ uid_t sys_getuid_with_euid(void); } getuid
1051.104Smycroft#else
1061.200Sad24	STD 		{ uid_t sys_getuid(void); }
1071.104Smycroft#endif
1081.200Sad25	STD 		{ uid_t sys_geteuid(void); }
1091.200Sad26	STD 		{ int sys_ptrace(int req, pid_t pid, void *addr, \
1101.23Scgd			    int data); }
1111.200Sad27	STD 		{ ssize_t sys_recvmsg(int s, struct msghdr *msg, \
1121.28Smycroft			    int flags); }
1131.200Sad28	STD 		{ ssize_t sys_sendmsg(int s, \
1141.46Scgd			    const struct msghdr *msg, int flags); }
1151.200Sad29	STD 		{ ssize_t sys_recvfrom(int s, void *buf, size_t len, \
1161.46Scgd			    int flags, struct sockaddr *from, \
1171.88Skleink			    unsigned int *fromlenaddr); }
1181.46Scgd30	STD		{ int sys_accept(int s, struct sockaddr *name, \
1191.88Skleink			    unsigned int *anamelen); }
1201.46Scgd31	STD		{ int sys_getpeername(int fdes, struct sockaddr *asa, \
1211.88Skleink			    unsigned int *alen); }
1221.46Scgd32	STD		{ int sys_getsockname(int fdes, struct sockaddr *asa, \
1231.88Skleink			    unsigned int *alen); }
1241.200Sad33	STD 	 RUMP	{ int sys_access(const char *path, int flags); }
1251.200Sad34	STD 	 RUMP	{ int sys_chflags(const char *path, u_long flags); }
1261.200Sad35	STD 	 RUMP	{ int sys_fchflags(int fd, u_long flags); }
1271.200Sad36	STD 	 RUMP	{ void sys_sync(void); }
1281.200Sad37	STD 		{ int sys_kill(int pid, int signum); }
1291.200Sad38	COMPAT_43 	{ int sys_stat(const char *path, struct stat43 *ub); } \
1301.60Schristos			    stat43
1311.200Sad39	STD 		{ pid_t sys_getppid(void); }
1321.200Sad40	COMPAT_43 	{ int sys_lstat(const char *path, \
1331.60Schristos			    struct stat43 *ub); } lstat43
1341.200Sad41	STD 		{ int sys_dup(int fd); }
1351.200Sad42	STD 		{ int sys_pipe(void); }
1361.200Sad43	STD 		{ gid_t sys_getegid(void); }
1371.200Sad44	STD 		{ int sys_profil(char *samples, size_t size, \
1381.30Scgd			    u_long offset, u_int scale); }
1391.200Sad45	STD 		{ int sys_ktrace(const char *fname, int ops, \
1401.46Scgd			    int facs, int pid); }
1411.200Sad46	COMPAT_13 	{ int sys_sigaction(int signum, \
1421.82Smycroft			    const struct sigaction13 *nsa, \
1431.82Smycroft			    struct sigaction13 *osa); } sigaction13
1441.104Smycroft#ifdef COMPAT_43
1451.200Sad47	STD 		{ gid_t sys_getgid_with_egid(void); } getgid
1461.104Smycroft#else
1471.200Sad47	STD 		{ gid_t sys_getgid(void); }
1481.104Smycroft#endif
1491.200Sad48	COMPAT_13 	{ int sys_sigprocmask(int how, \
1501.82Smycroft			    int mask); } sigprocmask13
1511.200Sad49	STD 		{ int sys___getlogin(char *namebuf, size_t namelen); }
1521.200Sad50	STD 	 	{ int sys___setlogin(const char *namebuf); }
1531.200Sad51	STD 		{ int sys_acct(const char *path); }
1541.200Sad52	COMPAT_13 	{ int sys_sigpending(void); } sigpending13
1551.200Sad53	COMPAT_13 	{ int sys_sigaltstack( \
1561.82Smycroft			    const struct sigaltstack13 *nss, \
1571.82Smycroft			    struct sigaltstack13 *oss); } sigaltstack13
1581.200Sad54	STD 		{ int sys_ioctl(int fd, \
1591.61Schristos			    u_long com, ... void *data); }
1601.200Sad55	COMPAT_12 	{ int sys_reboot(int opt); } oreboot
1611.200Sad56	STD 		{ int sys_revoke(const char *path); }
1621.200Sad57	STD 	 RUMP	{ int sys_symlink(const char *path, \
1631.46Scgd			    const char *link); }
1641.200Sad58	STD 	 RUMP	{ ssize_t sys_readlink(const char *path, char *buf, \
1651.72Skleink			    size_t count); }
1661.200Sad59	STD 		{ int sys_execve(const char *path, \
1671.46Scgd			    char * const *argp, char * const *envp); }
1681.200Sad60	STD 		{ mode_t sys_umask(mode_t newmask); }
1691.200Sad61	STD 		{ int sys_chroot(const char *path); }
1701.200Sad62	COMPAT_43 	{ int sys_fstat(int fd, struct stat43 *sb); } fstat43
1711.200Sad63	COMPAT_43 	{ int sys_getkerninfo(int op, char *where, int *size, \
1721.29Smycroft			    int arg); } ogetkerninfo
1731.200Sad64	COMPAT_43 	 { int sys_getpagesize(void); } ogetpagesize
1741.200Sad65	COMPAT_12 	 { int sys_msync(void *addr, size_t len); }
1751.67Sthorpej; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)?
1761.200Sad66	STD 		{ int sys_vfork(void); }
1771.23Scgd67	OBSOL		vread
1781.23Scgd68	OBSOL		vwrite
1791.200Sad69	STD 		{ int sys_sbrk(intptr_t incr); }
1801.200Sad70	STD 		{ int sys_sstk(int incr); }
1811.200Sad71	COMPAT_43 	{ int sys_mmap(void *addr, size_t len, int prot, \
1821.29Smycroft			    int flags, int fd, long pos); } ommap
1831.200Sad72	STD 		{ int sys_ovadvise(int anom); } vadvise
1841.200Sad73	STD 		{ int sys_munmap(void *addr, size_t len); }
1851.200Sad74	STD 		{ int sys_mprotect(void *addr, size_t len, \
1861.28Smycroft			    int prot); }
1871.200Sad75	STD 		{ int sys_madvise(void *addr, size_t len, \
1881.28Smycroft			    int behav); }
1891.23Scgd76	OBSOL		vhangup
1901.23Scgd77	OBSOL		vlimit
1911.200Sad78	STD 		{ int sys_mincore(void *addr, size_t len, \
1921.28Smycroft			    char *vec); }
1931.200Sad79	STD 		{ int sys_getgroups(int gidsetsize, \
1941.59Smycroft			    gid_t *gidset); }
1951.200Sad80	STD 		{ int sys_setgroups(int gidsetsize, \
1961.46Scgd			    const gid_t *gidset); }
1971.200Sad81	STD 	 	{ int sys_getpgrp(void); }
1981.200Sad82	STD 		{ int sys_setpgid(int pid, int pgid); }
1991.200Sad83	STD 		{ int sys_setitimer(int which, \
2001.46Scgd			    const struct itimerval *itv, \
2011.46Scgd			    struct itimerval *oitv); }
2021.200Sad84	COMPAT_43 	{ int sys_wait(void); } owait
2031.200Sad85	COMPAT_12 	{ int sys_swapon(const char *name); } oswapon
2041.200Sad86	STD 		{ int sys_getitimer(int which, \
2051.28Smycroft			    struct itimerval *itv); }
2061.200Sad87	COMPAT_43 	{ int sys_gethostname(char *hostname, u_int len); } \
2071.29Smycroft			    ogethostname
2081.200Sad88	COMPAT_43 	{ int sys_sethostname(char *hostname, u_int len); } \
2091.29Smycroft			    osethostname
2101.200Sad89	COMPAT_43 	{ int sys_getdtablesize(void); } ogetdtablesize
2111.200Sad90	STD 		{ int sys_dup2(int from, int to); }
2121.23Scgd91	UNIMPL		getdopt
2131.200Sad92	STD 		{ int sys_fcntl(int fd, int cmd, ... void *arg); }
2141.200Sad93	STD 		{ int sys_select(int nd, fd_set *in, fd_set *ou, \
2151.23Scgd			    fd_set *ex, struct timeval *tv); }
2161.23Scgd94	UNIMPL		setdopt
2171.200Sad95	STD 		{ int sys_fsync(int fd); }
2181.200Sad96	STD 		{ int sys_setpriority(int which, id_t who, int prio); }
2191.154Smrg97	COMPAT_30	{ int sys_socket(int domain, int type, int protocol); }
2201.46Scgd98	STD		{ int sys_connect(int s, const struct sockaddr *name, \
2211.88Skleink			    unsigned int namelen); }
2221.167Schristos99	COMPAT_43	{ int sys_accept(int s, void *name, \
2231.46Scgd			    int *anamelen); } oaccept
2241.200Sad100	STD 		{ int sys_getpriority(int which, id_t who); }
2251.200Sad101	COMPAT_43 	{ int sys_send(int s, void *buf, int len, \
2261.29Smycroft			    int flags); } osend
2271.200Sad102	COMPAT_43 	{ int sys_recv(int s, void *buf, int len, \
2281.29Smycroft			    int flags); } orecv
2291.200Sad103	COMPAT_13 	{ int sys_sigreturn(struct sigcontext13 *sigcntxp); } \
2301.83Smycroft			    sigreturn13
2311.46Scgd104	STD		{ int sys_bind(int s, const struct sockaddr *name, \
2321.88Skleink			    unsigned int namelen); }
2331.28Smycroft105	STD		{ int sys_setsockopt(int s, int level, int name, \
2341.88Skleink			    const void *val, unsigned int valsize); }
2351.28Smycroft106	STD		{ int sys_listen(int s, int backlog); }
2361.23Scgd107	OBSOL		vtimes
2371.200Sad108	COMPAT_43 	{ int sys_sigvec(int signum, struct sigvec *nsv, \
2381.29Smycroft			    struct sigvec *osv); } osigvec
2391.200Sad109	COMPAT_43 	{ int sys_sigblock(int mask); } osigblock
2401.200Sad110	COMPAT_43 	{ int sys_sigsetmask(int mask); } osigsetmask
2411.200Sad111	COMPAT_13 	{ int sys_sigsuspend(int mask); } sigsuspend13
2421.200Sad112	COMPAT_43 	{ int sys_sigstack(struct sigstack *nss, \
2431.29Smycroft			    struct sigstack *oss); } osigstack
2441.200Sad113	COMPAT_43 	{ int sys_recvmsg(int s, struct omsghdr *msg, \
2451.29Smycroft			    int flags); } orecvmsg
2461.200Sad114	COMPAT_43 	{ int sys_sendmsg(int s, void *msg, int flags); } \
2471.29Smycroft			    osendmsg
2481.23Scgd115	OBSOL		vtrace
2491.200Sad116	STD 		{ int sys_gettimeofday(struct timeval *tp, \
2501.141Skleink			    void *tzp); }
2511.200Sad117	STD 		{ int sys_getrusage(int who, struct rusage *rusage); }
2521.28Smycroft118	STD		{ int sys_getsockopt(int s, int level, int name, \
2531.88Skleink			    void *val, unsigned int *avalsize); }
2541.26Scgd119	OBSOL		resuba
2551.200Sad120	STD 		{ ssize_t sys_readv(int fd, \
2561.58Smycroft			    const struct iovec *iovp, int iovcnt); }
2571.200Sad121	STD 		{ ssize_t sys_writev(int fd, \
2581.58Smycroft			    const struct iovec *iovp, int iovcnt); }
2591.200Sad122	STD 		{ int sys_settimeofday(const struct timeval *tv, \
2601.141Skleink			    const void *tzp); }
2611.200Sad123	STD 		{ int sys_fchown(int fd, uid_t uid, gid_t gid); }
2621.200Sad124	STD 		{ int sys_fchmod(int fd, mode_t mode); }
2631.200Sad125	COMPAT_43 	{ int sys_recvfrom(int s, void *buf, size_t len, \
2641.167Schristos			    int flags, void *from, int *fromlenaddr); } \
2651.29Smycroft			    orecvfrom
2661.200Sad126	STD 		{ int sys_setreuid(uid_t ruid, uid_t euid); }
2671.200Sad127	STD 		{ int sys_setregid(gid_t rgid, gid_t egid); }
2681.200Sad128	STD 	 RUMP	{ int sys_rename(const char *from, const char *to); }
2691.200Sad129	COMPAT_43 	{ int sys_truncate(const char *path, long length); } \
2701.29Smycroft			    otruncate
2711.200Sad130	COMPAT_43 	{ int sys_ftruncate(int fd, long length); } oftruncate
2721.200Sad131	STD 		{ int sys_flock(int fd, int how); }
2731.200Sad132	STD 		{ int sys_mkfifo(const char *path, mode_t mode); }
2741.200Sad133	STD 		{ ssize_t sys_sendto(int s, const void *buf, \
2751.46Scgd			    size_t len, int flags, const struct sockaddr *to, \
2761.88Skleink			    unsigned int tolen); }
2771.28Smycroft134	STD		{ int sys_shutdown(int s, int how); }
2781.28Smycroft135	STD		{ int sys_socketpair(int domain, int type, \
2791.28Smycroft			    int protocol, int *rsv); }
2801.200Sad136	STD 	 RUMP	{ int sys_mkdir(const char *path, mode_t mode); }
2811.200Sad137	STD 	 RUMP	{ int sys_rmdir(const char *path); }
2821.200Sad138	STD 		{ int sys_utimes(const char *path, \
2831.46Scgd			    const struct timeval *tptr); }
2841.23Scgd139	OBSOL		4.2 sigreturn
2851.200Sad140	STD 		{ int sys_adjtime(const struct timeval *delta, \
2861.23Scgd			    struct timeval *olddelta); }
2871.167Schristos141	COMPAT_43	{ int sys_getpeername(int fdes, void *asa, \
2881.29Smycroft			    int *alen); } ogetpeername
2891.200Sad142	COMPAT_43 	{ int32_t sys_gethostid(void); } ogethostid
2901.200Sad143	COMPAT_43 	{ int sys_sethostid(int32_t hostid); } osethostid
2911.200Sad144	COMPAT_43 	{ int sys_getrlimit(int which, \
2921.58Smycroft			    struct orlimit *rlp); } ogetrlimit
2931.200Sad145	COMPAT_43 	{ int sys_setrlimit(int which, \
2941.58Smycroft			    const struct orlimit *rlp); } osetrlimit
2951.200Sad146	COMPAT_43 	{ int sys_killpg(int pgid, int signum); } okillpg
2961.200Sad147	STD 	 	{ int sys_setsid(void); }
2971.200Sad148	STD 		{ int sys_quotactl(const char *path, int cmd, \
2981.167Schristos			    int uid, void *arg); }
2991.200Sad149	COMPAT_43 	{ int sys_quota(void); } oquota
3001.167Schristos150	COMPAT_43	{ int sys_getsockname(int fdec, void *asa, \
3011.29Smycroft			    int *alen); } ogetsockname
3021.1Sglass
3031.1Sglass; Syscalls 151-180 inclusive are reserved for vendor-specific
3041.1Sglass; system calls.  (This includes various calls added for compatibity
3051.1Sglass; with other Unix variants.)
3061.1Sglass; Some of these calls are now supported by BSD...
3071.23Scgd151	UNIMPL
3081.23Scgd152	UNIMPL
3091.23Scgd153	UNIMPL
3101.23Scgd154	UNIMPL
3111.92Schristos#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL)
3121.200Sad155	STD 		{ int sys_nfssvc(int flag, void *argp); }
3131.1Sglass#else
3141.92Schristos155	EXCL		nfssvc
3151.1Sglass#endif
3161.200Sad156	COMPAT_43 	 { int sys_getdirentries(int fd, char *buf, \
3171.29Smycroft			    u_int count, long *basep); } ogetdirentries
3181.200Sad157	COMPAT_20 	{ int sys_statfs(const char *path, \
3191.139Schristos			    struct statfs12 *buf); }
3201.200Sad158	COMPAT_20 	{ int sys_fstatfs(int fd, struct statfs12 *buf); }
3211.23Scgd159	UNIMPL
3221.23Scgd160	UNIMPL
3231.200Sad161	COMPAT_30 	 { int sys_getfh(const char *fname, \
3241.155Smartin			    struct compat_30_fhandle *fhp); }
3251.200Sad162	COMPAT_09 	 { int sys_getdomainname(char *domainname, int len); } \
3261.29Smycroft			    ogetdomainname
3271.200Sad163	COMPAT_09 	 { int sys_setdomainname(char *domainname, int len); } \
3281.29Smycroft			    osetdomainname
3291.200Sad164	COMPAT_09 		{ int sys_uname(struct outsname *name); } ouname
3301.200Sad165	STD 		{ int sys_sysarch(int op, void *parms); }
3311.23Scgd166	UNIMPL
3321.23Scgd167	UNIMPL
3331.23Scgd168	UNIMPL
3341.23Scgd; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
3351.111Seeh#if (defined(SYSVSEM) || !defined(_KERNEL)) && !defined(_LP64)
3361.200Sad169	COMPAT_10 	{ int sys_semsys(int which, int a2, int a3, int a4, \
3371.29Smycroft			    int a5); } osemsys
3381.9Scgd#else
3391.92Schristos169	EXCL		1.0 semsys
3401.9Scgd#endif
3411.23Scgd; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
3421.111Seeh#if (defined(SYSVMSG) || !defined(_KERNEL)) && !defined(_LP64)
3431.200Sad170	COMPAT_10 	{ int sys_msgsys(int which, int a2, int a3, int a4, \
3441.29Smycroft			    int a5, int a6); } omsgsys
3451.9Scgd#else
3461.92Schristos170	EXCL		1.0 msgsys
3471.9Scgd#endif
3481.23Scgd; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
3491.111Seeh#if (defined(SYSVSHM) || !defined(_KERNEL)) && !defined(_LP64)
3501.200Sad171	COMPAT_10 		{ int sys_shmsys(int which, int a2, int a3, int a4); } \
3511.29Smycroft			    oshmsys
3521.1Sglass#else
3531.92Schristos171	EXCL		1.0 shmsys
3541.1Sglass#endif
3551.23Scgd172	UNIMPL
3561.201Spooka173	STD 	 RUMP	{ ssize_t sys_pread(int fd, void *buf, \
3571.80Sthorpej			    size_t nbyte, int pad, off_t offset); }
3581.201Spooka174	STD 	 RUMP	{ ssize_t sys_pwrite(int fd, const void *buf, \
3591.80Sthorpej			    size_t nbyte, int pad, off_t offset); }
3601.102Sbjh21; For some reason, ntp_gettime doesn't want to raise SIGSYS when it's excluded.
3611.200Sad175	COMPAT_30 	 { int sys_ntp_gettime(struct ntptimeval30 *ntvp); }
3621.102Sbjh21#if defined(NTP) || !defined(_KERNEL)
3631.200Sad176	STD 		{ int sys_ntp_adjtime(struct timex *tp); }
3641.102Sbjh21#else
3651.102Sbjh21176	EXCL		ntp_adjtime
3661.102Sbjh21#endif
3671.23Scgd177	UNIMPL
3681.23Scgd178	UNIMPL
3691.23Scgd179	UNIMPL
3701.23Scgd180	UNIMPL
3711.1Sglass
3721.1Sglass; Syscalls 180-199 are used by/reserved for BSD
3731.200Sad181	STD 		{ int sys_setgid(gid_t gid); }
3741.200Sad182	STD 		{ int sys_setegid(gid_t egid); }
3751.200Sad183	STD 		{ int sys_seteuid(uid_t euid); }
3761.92Schristos#if defined(LFS) || !defined(_KERNEL)
3771.200Sad184	STD 		{ int sys_lfs_bmapv(fsid_t *fsidp, \
3781.23Scgd			    struct block_info *blkiov, int blkcnt); }
3791.200Sad185	STD 		{ int sys_lfs_markv(fsid_t *fsidp, \
3801.23Scgd			    struct block_info *blkiov, int blkcnt); }
3811.200Sad186	STD 		{ int sys_lfs_segclean(fsid_t *fsidp, u_long segment); }
3821.200Sad187	STD 		{ int sys_lfs_segwait(fsid_t *fsidp, \
3831.92Schristos			    struct timeval *tv); }
3841.92Schristos#else
3851.92Schristos184	EXCL		lfs_bmapv
3861.92Schristos185	EXCL		lfs_markv
3871.92Schristos186	EXCL		lfs_segclean
3881.92Schristos187	EXCL		lfs_segwait
3891.23Scgd#endif
3901.200Sad188	COMPAT_12 	{ int sys_stat(const char *path, struct stat12 *ub); } \
3911.60Schristos			    stat12
3921.200Sad189	COMPAT_12 	{ int sys_fstat(int fd, struct stat12 *sb); } fstat12
3931.200Sad190	COMPAT_12 	{ int sys_lstat(const char *path, \
3941.60Schristos			    struct stat12 *ub); } lstat12
3951.200Sad191	STD 		{ long sys_pathconf(const char *path, int name); }
3961.200Sad192	STD 		{ long sys_fpathconf(int fd, int name); }
3971.23Scgd193	UNIMPL
3981.200Sad194	STD 		{ int sys_getrlimit(int which, \
3991.58Smycroft			    struct rlimit *rlp); }
4001.200Sad195	STD 		{ int sys_setrlimit(int which, \
4011.46Scgd			    const struct rlimit *rlp); }
4021.200Sad196	COMPAT_12 	{ int sys_getdirentries(int fd, char *buf, \
4031.28Smycroft			    u_int count, long *basep); }
4041.200Sad197	STD 		{ void *sys_mmap(void *addr, size_t len, int prot, \
4051.23Scgd			    int flags, int fd, long pad, off_t pos); }
4061.179Sdsl198	INDIR		{ quad_t sys___syscall(quad_t code, \
4071.179Sdsl			    ... register_t args[SYS_MAXSYSARGS]); }
4081.200Sad199	STD 		{ off_t sys_lseek(int fd, int pad, off_t offset, \
4091.23Scgd			    int whence); }
4101.200Sad200	STD 	 RUMP	{ int sys_truncate(const char *path, int pad, \
4111.46Scgd			    off_t length); }
4121.200Sad201	STD 		{ int sys_ftruncate(int fd, int pad, off_t length); }
4131.200Sad202	STD 		{ int sys___sysctl(const int *name, u_int namelen, \
4141.151Sdrochner			    void *old, size_t *oldlenp, const void *new, \
4151.28Smycroft			    size_t newlen); }
4161.200Sad203	STD 		{ int sys_mlock(const void *addr, size_t len); }
4171.200Sad204	STD 		{ int sys_munlock(const void *addr, size_t len); }
4181.200Sad205	STD 		{ int sys_undelete(const char *path); }
4191.200Sad206	STD 		{ int sys_futimes(int fd, \
4201.46Scgd			    const struct timeval *tptr); }
4211.200Sad207	STD 		{ pid_t sys_getpgid(pid_t pid); }
4221.200Sad208	STD 		{ int sys_reboot(int opt, char *bootstr); }
4231.200Sad209	STD 		{ int sys_poll(struct pollfd *fds, u_int nfds, \
4241.35Smycroft			    int timeout); }
4251.11Scgd;
4261.11Scgd; Syscalls 210-219 are reserved for dynamically loaded syscalls
4271.11Scgd;
4281.92Schristos#if defined(LKM) || !defined(_KERNEL)
4291.28Smycroft210	NODEF		{ int sys_lkmnosys(void); }
4301.28Smycroft211	NODEF		{ int sys_lkmnosys(void); }
4311.28Smycroft212	NODEF		{ int sys_lkmnosys(void); }
4321.28Smycroft213	NODEF		{ int sys_lkmnosys(void); }
4331.28Smycroft214	NODEF		{ int sys_lkmnosys(void); }
4341.28Smycroft215	NODEF		{ int sys_lkmnosys(void); }
4351.28Smycroft216	NODEF		{ int sys_lkmnosys(void); }
4361.28Smycroft217	NODEF		{ int sys_lkmnosys(void); }
4371.28Smycroft218	NODEF		{ int sys_lkmnosys(void); }
4381.28Smycroft219	NODEF		{ int sys_lkmnosys(void); }
4391.11Scgd#else	/* !LKM */
4401.92Schristos210	EXCL		lkmnosys
4411.92Schristos211	EXCL		lkmnosys
4421.92Schristos212	EXCL		lkmnosys
4431.92Schristos213	EXCL		lkmnosys
4441.92Schristos214	EXCL		lkmnosys
4451.92Schristos215	EXCL		lkmnosys
4461.92Schristos216	EXCL		lkmnosys
4471.92Schristos217	EXCL		lkmnosys
4481.92Schristos218	EXCL		lkmnosys
4491.92Schristos219	EXCL		lkmnosys
4501.6Scgd#endif	/* !LKM */
4511.49Skleink; System calls 220-300 are reserved for use by NetBSD
4521.92Schristos#if defined(SYSVSEM) || !defined(_KERNEL)
4531.200Sad220	COMPAT_14 	{ int sys___semctl(int semid, int semnum, int cmd, \
4541.97Sthorpej			    union __semun *arg); }
4551.200Sad221	STD 		{ int sys_semget(key_t key, int nsems, int semflg); }
4561.200Sad222	STD 		{ int sys_semop(int semid, struct sembuf *sops, \
4571.74Skleink			    size_t nsops); }
4581.200Sad223	STD 		{ int sys_semconfig(int flag); }
4591.23Scgd#else
4601.97Sthorpej220	EXCL		compat_14_semctl
4611.92Schristos221	EXCL		semget
4621.92Schristos222	EXCL		semop
4631.92Schristos223	EXCL		semconfig
4641.23Scgd#endif
4651.92Schristos#if defined(SYSVMSG) || !defined(_KERNEL)
4661.200Sad224	COMPAT_14 	{ int sys_msgctl(int msqid, int cmd, \
4671.97Sthorpej			    struct msqid_ds14 *buf); }
4681.200Sad225	STD 		{ int sys_msgget(key_t key, int msgflg); }
4691.200Sad226	STD 		{ int sys_msgsnd(int msqid, const void *msgp, \
4701.74Skleink			    size_t msgsz, int msgflg); }
4711.200Sad227	STD 		{ ssize_t sys_msgrcv(int msqid, void *msgp, \
4721.74Skleink			    size_t msgsz, long msgtyp, int msgflg); }
4731.23Scgd#else
4741.163Sad224	EXCL 		compat_14_msgctl
4751.163Sad225	EXCL 		msgget
4761.163Sad226	EXCL 		msgsnd
4771.163Sad227	EXCL 		msgrcv
4781.23Scgd#endif
4791.92Schristos#if defined(SYSVSHM) || !defined(_KERNEL)
4801.200Sad228	STD 		{ void *sys_shmat(int shmid, const void *shmaddr, \
4811.44Scgd			    int shmflg); }
4821.200Sad229	COMPAT_14 	{ int sys_shmctl(int shmid, int cmd, \
4831.97Sthorpej			    struct shmid_ds14 *buf); }
4841.200Sad230	STD 		{ int sys_shmdt(const void *shmaddr); }
4851.200Sad231	STD 		{ int sys_shmget(key_t key, size_t size, int shmflg); }
4861.23Scgd#else
4871.92Schristos228	EXCL		shmat
4881.97Sthorpej229	EXCL		compat_14_shmctl
4891.92Schristos230	EXCL		shmdt
4901.92Schristos231	EXCL		shmget
4911.23Scgd#endif
4921.200Sad232	STD 		{ int sys_clock_gettime(clockid_t clock_id, \
4931.49Skleink			    struct timespec *tp); }
4941.200Sad233	STD 		{ int sys_clock_settime(clockid_t clock_id, \
4951.49Skleink			    const struct timespec *tp); }
4961.200Sad234	STD 		{ int sys_clock_getres(clockid_t clock_id, \
4971.49Skleink			    struct timespec *tp); }
4981.200Sad235	STD 		{ int sys_timer_create(clockid_t clock_id, \
4991.118Sthorpej			    struct sigevent *evp, timer_t *timerid); }
5001.200Sad236	STD 		{ int sys_timer_delete(timer_t timerid); }
5011.200Sad237	STD 		{ int sys_timer_settime(timer_t timerid, int flags, \
5021.118Sthorpej			    const struct itimerspec *value, \
5031.118Sthorpej			    struct itimerspec *ovalue); }
5041.200Sad238	STD 		{ int sys_timer_gettime(timer_t timerid, struct \
5051.118Sthorpej			    itimerspec *value); }
5061.200Sad239	STD 		{ int sys_timer_getoverrun(timer_t timerid); }
5071.54Sveego;
5081.54Sveego; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls
5091.54Sveego;
5101.200Sad240	STD 		{ int sys_nanosleep(const struct timespec *rqtp, \
5111.49Skleink			    struct timespec *rmtp); }
5121.200Sad241	STD 		{ int sys_fdatasync(int fd); }
5131.200Sad242	STD 		{ int sys_mlockall(int flags); }
5141.200Sad243	STD 		{ int sys_munlockall(void); }
5151.200Sad244	STD 		{ int sys___sigtimedwait(const sigset_t *set, \
5161.127Sjdolecek			    siginfo_t *info, \
5171.127Sjdolecek			    struct timespec *timeout); }
5181.127Sjdolecek245	UNIMPL		sys_sigqueue
5191.200Sad246	STD 		{ int sys_modctl(int cmd, void *arg); }
5201.133Schristos#if defined(P1003_1B_SEMAPHORE) || (!defined(_KERNEL) && defined(_LIBC))
5211.200Sad247	STD 		{ int sys__ksem_init(unsigned int value, semid_t *idp); }
5221.200Sad248	STD 		{ int sys__ksem_open(const char *name, int oflag, \
5231.119Schristos			    mode_t mode, unsigned int value, semid_t *idp); }
5241.200Sad249	STD 		{ int sys__ksem_unlink(const char *name); }
5251.200Sad250	STD 		{ int sys__ksem_close(semid_t id); }
5261.200Sad251	STD 		{ int sys__ksem_post(semid_t id); }
5271.200Sad252	STD 		{ int sys__ksem_wait(semid_t id); }
5281.200Sad253	STD 		{ int sys__ksem_trywait(semid_t id); }
5291.200Sad254	STD 		{ int sys__ksem_getvalue(semid_t id, \
5301.119Schristos			    unsigned int *value); }
5311.200Sad255	STD 		{ int sys__ksem_destroy(semid_t id); }
5321.124Sthorpej256	UNIMPL		sys__ksem_timedwait
5331.119Schristos#else
5341.122Schristos247	EXCL		sys__ksem_init
5351.122Schristos248	EXCL		sys__ksem_open
5361.122Schristos249	EXCL 		sys__ksem_unlink
5371.122Schristos250	EXCL		sys__ksem_close
5381.122Schristos251	EXCL		sys__ksem_post
5391.122Schristos252	EXCL		sys__ksem_wait
5401.122Schristos253	EXCL		sys__ksem_trywait
5411.122Schristos254	EXCL		sys__ksem_getvalue
5421.122Schristos255	EXCL		sys__ksem_destroy
5431.124Sthorpej256	UNIMPL		sys__ksem_timedwait
5441.119Schristos#endif
5451.200Sad257	STD 		{ mqd_t sys_mq_open(const char * name, int oflag, \
5461.177Srmind			    mode_t mode, struct mq_attr *attr); }
5471.200Sad258	STD 		{ int sys_mq_close(mqd_t mqdes); }
5481.200Sad259	STD 		{ int sys_mq_unlink(const char *name); }
5491.200Sad260	STD 		{ int sys_mq_getattr(mqd_t mqdes, \
5501.177Srmind			    struct mq_attr *mqstat); }
5511.200Sad261	STD 		{ int sys_mq_setattr(mqd_t mqdes, \
5521.177Srmind			    const struct mq_attr *mqstat, \
5531.177Srmind			    struct mq_attr *omqstat); }
5541.200Sad262	STD 		{ int sys_mq_notify(mqd_t mqdes, \
5551.177Srmind			    const struct sigevent *notification); }
5561.200Sad263	STD 		{ int sys_mq_send(mqd_t mqdes, const char *msg_ptr, \
5571.177Srmind			    size_t msg_len, unsigned msg_prio); }
5581.200Sad264	STD 		{ ssize_t sys_mq_receive(mqd_t mqdes, char *msg_ptr, \
5591.177Srmind			    size_t msg_len, unsigned *msg_prio); }
5601.200Sad265	STD 		{ int sys_mq_timedsend(mqd_t mqdes, \
5611.177Srmind			    const char *msg_ptr, size_t msg_len, \
5621.177Srmind			    unsigned msg_prio, \
5631.177Srmind			    const struct timespec *abs_timeout); }
5641.200Sad266	STD 		{ ssize_t sys_mq_timedreceive(mqd_t mqdes, \
5651.177Srmind			    char *msg_ptr, size_t msg_len, unsigned *msg_prio, \
5661.177Srmind			    const struct timespec *abs_timeout); }
5671.49Skleink267	UNIMPL
5681.49Skleink268	UNIMPL
5691.49Skleink269	UNIMPL
5701.200Sad270	STD 		{ int sys___posix_rename(const char *from, \
5711.49Skleink			    const char *to); }
5721.200Sad271	STD 		{ int sys_swapctl(int cmd, void *arg, int misc); }
5731.200Sad272	COMPAT_30 		{ int sys_getdents(int fd, char *buf, size_t count); }
5741.200Sad273	STD 		{ int sys_minherit(void *addr, size_t len, \
5751.54Sveego			    int inherit); }
5761.200Sad274	STD 	 RUMP	{ int sys_lchmod(const char *path, mode_t mode); }
5771.200Sad275	STD 	 RUMP	{ int sys_lchown(const char *path, uid_t uid, \
5781.56Senami			    gid_t gid); }
5791.200Sad276	STD 		{ int sys_lutimes(const char *path, \
5801.56Senami			    const struct timeval *tptr); }
5811.200Sad277	STD 		{ int sys___msync13(void *addr, size_t len, int flags); }
5821.200Sad278	COMPAT_30 	{ int sys___stat13(const char *path, struct stat13 *ub); }
5831.200Sad279	COMPAT_30 	{ int sys___fstat13(int fd, struct stat13 *sb); }
5841.200Sad280	COMPAT_30 	{ int sys___lstat13(const char *path, struct stat13 *ub); }
5851.200Sad281	STD 		{ int sys___sigaltstack14( \
5861.82Smycroft			    const struct sigaltstack *nss, \
5871.82Smycroft			    struct sigaltstack *oss); }
5881.200Sad282	STD 		{ int sys___vfork14(void); }
5891.200Sad283	STD 		{ int sys___posix_chown(const char *path, uid_t uid, \
5901.69Skleink			    gid_t gid); }
5911.200Sad284	STD 		{ int sys___posix_fchown(int fd, uid_t uid, \
5921.69Skleink			    gid_t gid); }
5931.200Sad285	STD 		{ int sys___posix_lchown(const char *path, uid_t uid, \
5941.69Skleink			    gid_t gid); }
5951.200Sad286	STD 		{ pid_t sys_getsid(pid_t pid); }
5961.200Sad287	STD 		{ pid_t sys___clone(int flags, void *stack); }
5971.200Sad288	STD 		{ int sys_fktrace(int fd, int ops, \
5981.73Schristos			    int facs, int pid); }
5991.200Sad289	STD 		{ ssize_t sys_preadv(int fd, \
6001.79Sthorpej			    const struct iovec *iovp, int iovcnt, \
6011.80Sthorpej			    int pad, off_t offset); }
6021.200Sad290	STD 		{ ssize_t sys_pwritev(int fd, \
6031.79Sthorpej			    const struct iovec *iovp, int iovcnt, \
6041.80Sthorpej			    int pad, off_t offset); }
6051.200Sad291	COMPAT_16 	{ int sys___sigaction14(int signum, \
6061.82Smycroft			    const struct sigaction *nsa, \
6071.82Smycroft			    struct sigaction *osa); }
6081.200Sad292	STD 		{ int sys___sigpending14(sigset_t *set); }
6091.200Sad293	STD 		{ int sys___sigprocmask14(int how, \
6101.82Smycroft			    const sigset_t *set, \
6111.82Smycroft			    sigset_t *oset); }
6121.200Sad294	STD 		{ int sys___sigsuspend14(const sigset_t *set); }
6131.200Sad295	COMPAT_16 	{ int sys___sigreturn14(struct sigcontext *sigcntxp); }
6141.200Sad296	STD 		{ int sys___getcwd(char *bufp, size_t length); }
6151.200Sad297	STD 		{ int sys_fchroot(int fd); }
6161.200Sad298	COMPAT_30 	{ int sys_fhopen(const struct compat_30_fhandle *fhp, int flags); }
6171.200Sad299	COMPAT_30 	{ int sys_fhstat(const struct compat_30_fhandle *fhp, \
6181.152Schristos			    struct stat13 *sb); }
6191.200Sad300	COMPAT_20 	{ int sys_fhstatfs(const struct compat_30_fhandle *fhp, \
6201.139Schristos			    struct statfs12 *buf); }
6211.97Sthorpej#if defined(SYSVSEM) || !defined(_KERNEL)
6221.200Sad301	STD 		{ int sys_____semctl13(int semid, int semnum, int cmd, \
6231.99Schristos			    ... union __semun *arg); }
6241.97Sthorpej#else
6251.99Schristos301	EXCL		____semctl13
6261.97Sthorpej#endif
6271.97Sthorpej#if defined(SYSVMSG) || !defined(_KERNEL)
6281.200Sad302	STD 		{ int sys___msgctl13(int msqid, int cmd, \
6291.97Sthorpej			    struct msqid_ds *buf); }
6301.97Sthorpej#else
6311.97Sthorpej302	EXCL		__msgctl13
6321.97Sthorpej#endif
6331.97Sthorpej#if defined(SYSVSHM) || !defined(_KERNEL)
6341.200Sad303	STD 		{ int sys___shmctl13(int shmid, int cmd, \
6351.97Sthorpej			    struct shmid_ds *buf); }
6361.97Sthorpej#else
6371.97Sthorpej303	EXCL		__shmctl13
6381.97Sthorpej#endif
6391.200Sad304	STD 		{ int sys_lchflags(const char *path, u_long flags); }
6401.200Sad305	STD 		{ int sys_issetugid(void); }
6411.200Sad306	STD 		{ int sys_utrace(const char *label, void *addr, \
6421.118Sthorpej				size_t len); }
6431.200Sad307	STD 		{ int sys_getcontext(struct __ucontext *ucp); }
6441.200Sad308	STD 		{ int sys_setcontext(const struct __ucontext *ucp); }
6451.200Sad309	STD 		{ int sys__lwp_create(const struct __ucontext *ucp, \
6461.118Sthorpej				u_long flags, lwpid_t *new_lwp); }
6471.200Sad310	STD 		{ int sys__lwp_exit(void); }
6481.200Sad311	STD 		{ lwpid_t sys__lwp_self(void); }
6491.200Sad312	STD 		{ int sys__lwp_wait(lwpid_t wait_for, \
6501.118Sthorpej				lwpid_t *departed); }
6511.200Sad313	STD 		{ int sys__lwp_suspend(lwpid_t target); }
6521.200Sad314	STD 		{ int sys__lwp_continue(lwpid_t target); }
6531.200Sad315	STD 		{ int sys__lwp_wakeup(lwpid_t target); }
6541.200Sad316	STD 		{ void *sys__lwp_getprivate(void); }
6551.200Sad317	STD 		{ void sys__lwp_setprivate(void *ptr); }
6561.200Sad318	STD 		{ int sys__lwp_kill(lwpid_t target, int signo); }
6571.200Sad319	STD 		{ int sys__lwp_detach(lwpid_t target); }
6581.200Sad320	STD 		{ int sys__lwp_park(const struct timespec *ts, \
6591.175Sad				lwpid_t unpark, const void *hint, \
6601.175Sad				const void *unparkhint); }
6611.200Sad321	STD 		{ int sys__lwp_unpark(lwpid_t target, const void *hint); }
6621.200Sad322	STD 		{ ssize_t sys__lwp_unpark_all(const lwpid_t *targets, \
6631.164Sad				size_t ntargets, const void *hint); }
6641.200Sad323	STD 		{ int sys__lwp_setname(lwpid_t target, \
6651.178Sad				const char *name); }
6661.200Sad324	STD 		{ int sys__lwp_getname(lwpid_t target, \
6671.178Sad				char *name, size_t len); }
6681.200Sad325	STD 		{ int sys__lwp_ctl(int features, \
6691.180Sad				struct lwpctl **address); }
6701.180Sad; Syscalls 326-339 reserved for LWP syscalls.
6711.107Snathanw326	UNIMPL
6721.107Snathanw327	UNIMPL
6731.107Snathanw328	UNIMPL
6741.107Snathanw329	UNIMPL
6751.165Sad; Obsolete SA system calls.  Must remain until libc's major version is bumped.
6761.200Sad330	STD 		{ int sys_sa_register(void); }
6771.200Sad331	STD 		{ int sys_sa_stacks(void); }
6781.200Sad332	STD 		{ int sys_sa_enable(void); }
6791.200Sad333	STD 		{ int sys_sa_setconcurrency(void); }
6801.200Sad334	STD 		{ int sys_sa_yield(void); }
6811.200Sad335	STD 		{ int sys_sa_preempt(void); }
6821.200Sad336	STD 		{ int sys_sa_unblockyield(void); }
6831.107Snathanw337	UNIMPL
6841.107Snathanw338	UNIMPL
6851.107Snathanw339	UNIMPL
6861.200Sad340	STD 		{ int sys___sigaction_sigtramp(int signum, \
6871.112Sthorpej			    const struct sigaction *nsa, \
6881.112Sthorpej			    struct sigaction *osa, \
6891.132Smatt			    const void *tramp, int vers); }
6901.200Sad341	STD 		{ int sys_pmc_get_info(int ctr, int op, void *args); }
6911.200Sad342	STD 		{ int sys_pmc_control(int ctr, int op, void *args); }
6921.200Sad343	STD 		{ int sys_rasctl(void *addr, size_t len, int op); }
6931.200Sad344	STD 		{ int sys_kqueue(void); }
6941.200Sad345	STD 		{ int sys_kevent(int fd, \
6951.116Sjdolecek			    const struct kevent *changelist, size_t nchanges, \
6961.116Sjdolecek			    struct kevent *eventlist, size_t nevents, \
6971.116Sjdolecek			    const struct timespec *timeout); }
6981.184Srmind
6991.184Srmind; Scheduling system calls.
7001.200Sad346	STD 		{ int sys__sched_setparam(pid_t pid, lwpid_t lid, \
7011.188Syamt			    int policy, const struct sched_param *params); }
7021.200Sad347	STD 		{ int sys__sched_getparam(pid_t pid, lwpid_t lid, \
7031.188Syamt			    int *policy, struct sched_param *params); }
7041.200Sad348	STD 		{ int sys__sched_setaffinity(pid_t pid, lwpid_t lid, \
7051.184Srmind			    size_t size, void *cpuset); }
7061.200Sad349	STD 		{ int sys__sched_getaffinity(pid_t pid, lwpid_t lid, \
7071.184Srmind			    size_t size, void *cpuset); }
7081.200Sad350	STD 		{ int sys_sched_yield(void); }
7091.184Srmind351	UNIMPL
7101.184Srmind352	UNIMPL
7111.184Srmind353	UNIMPL
7121.134Sthorpej
7131.200Sad354	STD 		{ int sys_fsync_range(int fd, int flags, off_t start, \
7141.134Sthorpej			    off_t length); }
7151.200Sad355	STD 		{ int sys_uuidgen(struct uuid *store, int count); }
7161.200Sad356	STD 		{ int sys_getvfsstat(struct statvfs *buf, \
7171.139Schristos			    size_t bufsize, int flags); }
7181.200Sad357	STD 		{ int sys_statvfs1(const char *path, \
7191.139Schristos			    struct statvfs *buf, int flags); }
7201.200Sad358	STD 		{ int sys_fstatvfs1(int fd, struct statvfs *buf, \
7211.139Schristos			    int flags); }
7221.200Sad359	COMPAT_30 		{ int sys_fhstatvfs1(const struct compat_30_fhandle *fhp, \
7231.139Schristos			    struct statvfs *buf, int flags); }
7241.200Sad360	STD 		{ int sys_extattrctl(const char *path, int cmd, \
7251.143Sthorpej			    const char *filename, int attrnamespace, \
7261.143Sthorpej			    const char *attrname); }
7271.200Sad361	STD 		{ int sys_extattr_set_file(const char *path, \
7281.143Sthorpej			    int attrnamespace, const char *attrname, \
7291.143Sthorpej			    const void *data, size_t nbytes); }
7301.200Sad362	STD 		{ ssize_t sys_extattr_get_file(const char *path, \
7311.143Sthorpej			    int attrnamespace, const char *attrname, \
7321.143Sthorpej			    void *data, size_t nbytes); }
7331.200Sad363	STD 		{ int sys_extattr_delete_file(const char *path, \
7341.143Sthorpej			    int attrnamespace, const char *attrname); }
7351.200Sad364	STD 		{ int sys_extattr_set_fd(int fd, \
7361.143Sthorpej			    int attrnamespace, const char *attrname, \
7371.143Sthorpej			    const void *data, size_t nbytes); }
7381.200Sad365	STD 		{ ssize_t sys_extattr_get_fd(int fd, \
7391.143Sthorpej			    int attrnamespace, const char *attrname, \
7401.143Sthorpej			    void *data, size_t nbytes); }
7411.200Sad366	STD 		{ int sys_extattr_delete_fd(int fd, \
7421.143Sthorpej			    int attrnamespace, const char *attrname); }
7431.200Sad367	STD 		{ int sys_extattr_set_link(const char *path, \
7441.143Sthorpej			    int attrnamespace, const char *attrname, \
7451.143Sthorpej			    const void *data, size_t nbytes); }
7461.200Sad368	STD 		{ ssize_t sys_extattr_get_link(const char *path, \
7471.143Sthorpej			    int attrnamespace, const char *attrname, \
7481.143Sthorpej			    void *data, size_t nbytes); }
7491.200Sad369	STD 		{ int sys_extattr_delete_link(const char *path, \
7501.143Sthorpej			    int attrnamespace, const char *attrname); }
7511.200Sad370	STD 		{ ssize_t sys_extattr_list_fd(int fd, \
7521.143Sthorpej			    int attrnamespace, void *data, size_t nbytes); }
7531.200Sad371	STD 		{ ssize_t sys_extattr_list_file(const char *path, \
7541.143Sthorpej			    int attrnamespace, void *data, size_t nbytes); }
7551.200Sad372	STD 		{ ssize_t sys_extattr_list_link(const char *path, \
7561.143Sthorpej			    int attrnamespace, void *data, size_t nbytes); }
7571.200Sad373	STD 		{ int sys_pselect(int nd, fd_set *in, fd_set *ou, \
7581.145Smatt			    fd_set *ex, const struct timespec *ts, \
7591.145Smatt			    const sigset_t *mask); }
7601.200Sad374	STD 		{ int sys_pollts(struct pollfd *fds, u_int nfds, \
7611.145Smatt			    const struct timespec *ts, const sigset_t *mask); }
7621.200Sad375	STD 		{ int sys_setxattr(const char *path, \
7631.147Sthorpej			    const char *name, void *value, size_t size, \
7641.147Sthorpej			    int flags); }
7651.200Sad376	STD 		{ int sys_lsetxattr(const char *path, \
7661.147Sthorpej			    const char *name, void *value, size_t size, \
7671.147Sthorpej			    int flags); }
7681.200Sad377	STD 		{ int sys_fsetxattr(int fd, \
7691.147Sthorpej			    const char *name, void *value, size_t size, \
7701.147Sthorpej			    int flags); }
7711.200Sad378	STD 		{ int sys_getxattr(const char *path, \
7721.147Sthorpej			    const char *name, void *value, size_t size); }
7731.200Sad379	STD 		{ int sys_lgetxattr(const char *path, \
7741.147Sthorpej			    const char *name, void *value, size_t size); }
7751.200Sad380	STD 		{ int sys_fgetxattr(int fd, \
7761.147Sthorpej			    const char *name, void *value, size_t size); }
7771.200Sad381	STD 		{ int sys_listxattr(const char *path, \
7781.147Sthorpej			    char *list, size_t size); }
7791.200Sad382	STD 		{ int sys_llistxattr(const char *path, \
7801.147Sthorpej			    char *list, size_t size); }
7811.200Sad383	STD 		{ int sys_flistxattr(int fd, \
7821.147Sthorpej			    char *list, size_t size); }
7831.200Sad384	STD 		{ int sys_removexattr(const char *path, \
7841.147Sthorpej			    const char *name); }
7851.200Sad385	STD 		{ int sys_lremovexattr(const char *path, \
7861.147Sthorpej			    const char *name); }
7871.200Sad386	STD 		{ int sys_fremovexattr(int fd, \
7881.147Sthorpej			    const char *name); }
7891.200Sad387	STD 		{ int sys___stat30(const char *path, struct stat *ub); }
7901.200Sad388	STD 		{ int sys___fstat30(int fd, struct stat *sb); }
7911.200Sad389	STD 		{ int sys___lstat30(const char *path, struct stat *ub); }
7921.200Sad390	STD 		{ int sys___getdents30(int fd, char *buf, size_t count); }
7931.190Smartin391	IGNORED		old posix_fadvise
7941.200Sad392	COMPAT_30 	{ int sys___fhstat30(const struct compat_30_fhandle \
7951.156Smartin			    *fhp, struct stat *sb); }
7961.200Sad393	STD 		{ int sys___ntp_gettime30(struct ntptimeval *ntvp); }
7971.154Smrg394	STD		{ int sys___socket30(int domain, int type, int protocol); }
7981.200Sad395	STD 		{ int sys___getfh30(const char *fname, void *fhp, \
7991.156Smartin			    size_t *fh_size); }
8001.200Sad396	STD 		{ int sys___fhopen40(const void *fhp, size_t fh_size,\
8011.156Smartin			    int flags); }
8021.200Sad397	STD 		{ int sys___fhstatvfs140(const void *fhp, \
8031.156Smartin			    size_t fh_size, struct statvfs *buf, int flags); }
8041.200Sad398	STD 		{ int sys___fhstat40(const void *fhp, \
8051.156Smartin			    size_t fh_size, struct stat *sb); }
8061.169Srmind
8071.169Srmind; Asynchronous I/O system calls
8081.200Sad399	STD 		{ int sys_aio_cancel(int fildes, struct aiocb *aiocbp); }
8091.200Sad400	STD 		{ int sys_aio_error(const struct aiocb *aiocbp); }
8101.200Sad401	STD 		{ int sys_aio_fsync(int op, struct aiocb *aiocbp); }
8111.200Sad402	STD 		{ int sys_aio_read(struct aiocb *aiocbp); }
8121.200Sad403	STD 		{ int sys_aio_return(struct aiocb *aiocbp); }
8131.200Sad404	STD 		{ int sys_aio_suspend(const struct aiocb *const *list, \
8141.169Srmind			    int nent, const struct timespec *timeout); }
8151.200Sad405	STD 		{ int sys_aio_write(struct aiocb *aiocbp); }
8161.200Sad406	STD 		{ int sys_lio_listio(int mode, struct aiocb *const *list, \
8171.169Srmind			    int nent, struct sigevent *sig); }
8181.171Sjoerg
8191.170Sdsl407	UNIMPL
8201.170Sdsl408	UNIMPL
8211.170Sdsl409	UNIMPL
8221.170Sdsl
8231.200Sad410	STD 		{ int sys___mount50(const char *type, \
8241.170Sdsl			    const char *path, int flags, void *data, \
8251.170Sdsl			    size_t data_len); }
8261.200Sad411	STD 		{ void *sys_mremap(void *old_address, size_t old_size, \
8271.171Sjoerg			    void *new_address, size_t new_size, int flags); }
8281.184Srmind
8291.184Srmind; Processor-sets system calls
8301.200Sad412	STD 		{ int sys_pset_create(psetid_t *psid); }
8311.200Sad413	STD 		{ int sys_pset_destroy(psetid_t psid); }
8321.200Sad414	STD 		{ int sys_pset_assign(psetid_t psid, cpuid_t cpuid, \
8331.184Srmind			    psetid_t *opsid); }
8341.200Sad415	STD 		{ int sys__pset_bind(idtype_t idtype, id_t first_id, \
8351.184Srmind			    id_t second_id, psetid_t psid, psetid_t *opsid); }
8361.200Sad416	STD 		{ int sys___posix_fadvise50(int fd, int pad, \
8371.187Smartin			    off_t offset, off_t len, int advice); }
838