syscalls.master revision 1.187
11.187Smartin	$NetBSD: syscalls.master,v 1.187 2008/01/27 16:13:39 martin 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.23Scgd;	type	one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
111.24Smycroft;		the compatibility options defined in syscalls.conf.
121.23Scgd;
131.108Sthorpej; An optional field, MPSAFE, after the type field, indicates that
141.108Sthorpej; the system call is MP-safe.
151.108Sthorpej;
161.1Sglass; types:
171.1Sglass;	STD	always included
181.23Scgd;	OBSOL	obsolete, not included in system
191.24Smycroft;	UNIMPL	unimplemented, not included in system
201.92Schristos;	EXCL	implemented, but not included in system
211.23Scgd;	NODEF	included, but don't define the syscall number
221.23Scgd;	NOARGS	included, but don't define the syscall args structure
231.43Scgd;	INDIR	included, but don't define the syscall args structure,
241.43Scgd;		and allow it to be "really" varargs.
251.23Scgd;
261.23Scgd; The compat options are defined in the syscalls.conf file, and the
271.23Scgd; compat option name is prefixed to the syscall name.  Other than
281.23Scgd; that, they're like NODEF (for 'compat' options), or STD (for
291.23Scgd; 'libcompat' options).
301.23Scgd;
311.23Scgd; The type-dependent arguments are as follows:
321.23Scgd; For STD, NODEF, NOARGS, and compat syscalls:
331.23Scgd;	{ pseudo-proto } [alias]
341.23Scgd; For other syscalls:
351.23Scgd;	[comment]
361.23Scgd;
371.23Scgd; #ifdef's, etc. may be included, and are copied to the output files.
381.70Sthorpej; #include's are copied to the syscall names and switch definition files only.
391.77Sthorpej
401.78Sthorpej#include "opt_nfsserver.h"
411.102Sbjh21#include "opt_ntp.h"
421.81Sjonathan#include "opt_compat_netbsd.h"
431.85Stron#include "opt_sysv.h"
441.87Schristos#include "opt_compat_43.h"
451.119Schristos#include "opt_posix.h"
461.70Sthorpej
471.70Sthorpej#include "fs_lfs.h"
481.70Sthorpej#include "fs_nfs.h"
491.1Sglass
501.23Scgd#include <sys/param.h>
511.23Scgd#include <sys/systm.h>
521.23Scgd#include <sys/signal.h>
531.23Scgd#include <sys/mount.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.179Sdsl0	INDIR		{ int sys_syscall(int code, \
651.179Sdsl			    ... register_t args[SYS_MAXSYSARGS]); }
661.182Sad1	STD MPSAFE	{ void sys_exit(int rval); }
671.182Sad2	STD MPSAFE	{ int sys_fork(void); }
681.182Sad3	STD MPSAFE	{ ssize_t sys_read(int fd, void *buf, size_t nbyte); }
691.182Sad4	STD MPSAFE	{ ssize_t sys_write(int fd, const void *buf, \
701.46Scgd			    size_t nbyte); }
711.182Sad5	STD MPSAFE	{ int sys_open(const char *path, \
721.60Schristos			    int flags, ... mode_t mode); }
731.182Sad6	STD MPSAFE	{ int sys_close(int fd); }
741.182Sad7	STD MPSAFE	{ int sys_wait4(int pid, int *status, int options, \
751.23Scgd			    struct rusage *rusage); }
761.182Sad8	COMPAT_43 MPSAFE	{ int sys_creat(const char *path, mode_t mode); } ocreat
771.182Sad9	STD MPSAFE	{ int sys_link(const char *path, const char *link); }
781.182Sad10	STD MPSAFE	{ int sys_unlink(const char *path); }
791.23Scgd11	OBSOL		execv
801.182Sad12	STD MPSAFE	{ int sys_chdir(const char *path); }
811.182Sad13	STD MPSAFE	{ int sys_fchdir(int fd); }
821.182Sad14	STD MPSAFE	{ int sys_mknod(const char *path, mode_t mode, \
831.60Schristos			    dev_t dev); }
841.182Sad15	STD MPSAFE	{ int sys_chmod(const char *path, mode_t mode); }
851.182Sad16	STD MPSAFE	{ int sys_chown(const char *path, uid_t uid, \
861.46Scgd			    gid_t gid); }
871.182Sad17	STD MPSAFE	{ int sys_obreak(char *nsize); } break
881.183Sad18	COMPAT_20 MPSAFE	{ int sys_getfsstat(struct statfs12 *buf, \
891.139Schristos			    long bufsize, int flags); }
901.182Sad19	COMPAT_43 MPSAFE	{ long sys_lseek(int fd, long offset, int whence); } \
911.29Smycroft			    olseek
921.104Smycroft#ifdef COMPAT_43
931.163Sad20	STD MPSAFE	{ pid_t sys_getpid_with_ppid(void); } getpid
941.104Smycroft#else
951.108Sthorpej20	STD MPSAFE	{ pid_t sys_getpid(void); }
961.104Smycroft#endif
971.170Sdsl21	COMPAT_40	{ int sys_mount(const char *type, const char *path, \
981.46Scgd			    int flags, void *data); }
991.46Scgd22	STD		{ int sys_unmount(const char *path, int flags); }
1001.183Sad23	STD MPSAFE	{ int sys_setuid(uid_t uid); }
1011.104Smycroft#ifdef COMPAT_43
1021.183Sad24	STD MPSAFE	{ uid_t sys_getuid_with_euid(void); } getuid
1031.104Smycroft#else
1041.163Sad24	STD MPSAFE	{ uid_t sys_getuid(void); }
1051.104Smycroft#endif
1061.163Sad25	STD MPSAFE	{ uid_t sys_geteuid(void); }
1071.183Sad26	STD MPSAFE	{ int sys_ptrace(int req, pid_t pid, void *addr, \
1081.23Scgd			    int data); }
1091.182Sad27	STD 		{ ssize_t sys_recvmsg(int s, struct msghdr *msg, \
1101.28Smycroft			    int flags); }
1111.182Sad28	STD 		{ ssize_t sys_sendmsg(int s, \
1121.46Scgd			    const struct msghdr *msg, int flags); }
1131.182Sad29	STD 		{ ssize_t sys_recvfrom(int s, void *buf, size_t len, \
1141.46Scgd			    int flags, struct sockaddr *from, \
1151.88Skleink			    unsigned int *fromlenaddr); }
1161.46Scgd30	STD		{ int sys_accept(int s, struct sockaddr *name, \
1171.88Skleink			    unsigned int *anamelen); }
1181.46Scgd31	STD		{ int sys_getpeername(int fdes, struct sockaddr *asa, \
1191.88Skleink			    unsigned int *alen); }
1201.46Scgd32	STD		{ int sys_getsockname(int fdes, struct sockaddr *asa, \
1211.88Skleink			    unsigned int *alen); }
1221.182Sad33	STD MPSAFE	{ int sys_access(const char *path, int flags); }
1231.182Sad34	STD MPSAFE	{ int sys_chflags(const char *path, u_long flags); }
1241.182Sad35	STD MPSAFE	{ int sys_fchflags(int fd, u_long flags); }
1251.182Sad36	STD MPSAFE	{ void sys_sync(void); }
1261.182Sad37	STD MPSAFE	{ int sys_kill(int pid, int signum); }
1271.182Sad38	COMPAT_43 MPSAFE	{ int sys_stat(const char *path, struct stat43 *ub); } \
1281.60Schristos			    stat43
1291.163Sad39	STD MPSAFE	{ pid_t sys_getppid(void); }
1301.182Sad40	COMPAT_43 MPSAFE	{ int sys_lstat(const char *path, \
1311.60Schristos			    struct stat43 *ub); } lstat43
1321.182Sad41	STD MPSAFE	{ int sys_dup(int fd); }
1331.182Sad42	STD MPSAFE	{ int sys_pipe(void); }
1341.163Sad43	STD MPSAFE	{ gid_t sys_getegid(void); }
1351.168Sdrochner44	STD MPSAFE	{ int sys_profil(char *samples, size_t size, \
1361.30Scgd			    u_long offset, u_int scale); }
1371.182Sad45	STD MPSAFE	{ int sys_ktrace(const char *fname, int ops, \
1381.46Scgd			    int facs, int pid); }
1391.163Sad46	COMPAT_13 MPSAFE	{ int sys_sigaction(int signum, \
1401.82Smycroft			    const struct sigaction13 *nsa, \
1411.82Smycroft			    struct sigaction13 *osa); } sigaction13
1421.104Smycroft#ifdef COMPAT_43
1431.163Sad47	STD MPSAFE	{ gid_t sys_getgid_with_egid(void); } getgid
1441.104Smycroft#else
1451.163Sad47	STD MPSAFE	{ gid_t sys_getgid(void); }
1461.104Smycroft#endif
1471.163Sad48	COMPAT_13 MPSAFE	{ int sys_sigprocmask(int how, \
1481.82Smycroft			    int mask); } sigprocmask13
1491.163Sad49	STD MPSAFE	{ int sys___getlogin(char *namebuf, size_t namelen); }
1501.183Sad50	STD MPSAFE 	{ int sys___setlogin(const char *namebuf); }
1511.183Sad51	STD MPSAFE	{ int sys_acct(const char *path); }
1521.163Sad52	COMPAT_13 MPSAFE	{ int sys_sigpending(void); } sigpending13
1531.163Sad53	COMPAT_13 MPSAFE	{ int sys_sigaltstack( \
1541.82Smycroft			    const struct sigaltstack13 *nss, \
1551.82Smycroft			    struct sigaltstack13 *oss); } sigaltstack13
1561.182Sad54	STD MPSAFE	{ int sys_ioctl(int fd, \
1571.61Schristos			    u_long com, ... void *data); }
1581.34Smrg55	COMPAT_12	{ int sys_reboot(int opt); } oreboot
1591.182Sad56	STD MPSAFE	{ int sys_revoke(const char *path); }
1601.182Sad57	STD MPSAFE	{ int sys_symlink(const char *path, \
1611.46Scgd			    const char *link); }
1621.182Sad58	STD MPSAFE	{ ssize_t sys_readlink(const char *path, char *buf, \
1631.72Skleink			    size_t count); }
1641.182Sad59	STD MPSAFE	{ int sys_execve(const char *path, \
1651.46Scgd			    char * const *argp, char * const *envp); }
1661.182Sad60	STD MPSAFE	{ mode_t sys_umask(mode_t newmask); }
1671.183Sad61	STD MPSAFE	{ int sys_chroot(const char *path); }
1681.183Sad62	COMPAT_43 MPSAFE	{ int sys_fstat(int fd, struct stat43 *sb); } fstat43
1691.183Sad63	COMPAT_43 MPSAFE	{ int sys_getkerninfo(int op, char *where, int *size, \
1701.29Smycroft			    int arg); } ogetkerninfo
1711.183Sad64	COMPAT_43 MPSAFE { int sys_getpagesize(void); } ogetpagesize
1721.183Sad65	COMPAT_12 MPSAFE { int sys_msync(void *addr, size_t len); }
1731.67Sthorpej; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)?
1741.182Sad66	STD MPSAFE	{ int sys_vfork(void); }
1751.23Scgd67	OBSOL		vread
1761.23Scgd68	OBSOL		vwrite
1771.182Sad69	STD MPSAFE	{ int sys_sbrk(intptr_t incr); }
1781.182Sad70	STD MPSAFE	{ int sys_sstk(int incr); }
1791.183Sad71	COMPAT_43 MPSAFE	{ int sys_mmap(void *addr, size_t len, int prot, \
1801.29Smycroft			    int flags, int fd, long pos); } ommap
1811.182Sad72	STD MPSAFE	{ int sys_ovadvise(int anom); } vadvise
1821.182Sad73	STD MPSAFE	{ int sys_munmap(void *addr, size_t len); }
1831.182Sad74	STD MPSAFE	{ int sys_mprotect(void *addr, size_t len, \
1841.28Smycroft			    int prot); }
1851.182Sad75	STD MPSAFE	{ int sys_madvise(void *addr, size_t len, \
1861.28Smycroft			    int behav); }
1871.23Scgd76	OBSOL		vhangup
1881.23Scgd77	OBSOL		vlimit
1891.182Sad78	STD MPSAFE	{ int sys_mincore(void *addr, size_t len, \
1901.28Smycroft			    char *vec); }
1911.163Sad79	STD MPSAFE	{ int sys_getgroups(int gidsetsize, \
1921.59Smycroft			    gid_t *gidset); }
1931.183Sad80	STD MPSAFE	{ int sys_setgroups(int gidsetsize, \
1941.46Scgd			    const gid_t *gidset); }
1951.163Sad81	STD MPSAFE 	{ int sys_getpgrp(void); }
1961.183Sad82	STD MPSAFE	{ int sys_setpgid(int pid, int pgid); }
1971.58Smycroft83	STD		{ int sys_setitimer(int which, \
1981.46Scgd			    const struct itimerval *itv, \
1991.46Scgd			    struct itimerval *oitv); }
2001.182Sad84	COMPAT_43 MPSAFE	{ int sys_wait(void); } owait
2011.183Sad85	COMPAT_12 MPSAFE	{ int sys_swapon(const char *name); } oswapon
2021.58Smycroft86	STD		{ int sys_getitimer(int which, \
2031.28Smycroft			    struct itimerval *itv); }
2041.183Sad87	COMPAT_43 MPSAFE	{ int sys_gethostname(char *hostname, u_int len); } \
2051.29Smycroft			    ogethostname
2061.183Sad88	COMPAT_43 MPSAFE	{ int sys_sethostname(char *hostname, u_int len); } \
2071.29Smycroft			    osethostname
2081.182Sad89	COMPAT_43 MPSAFE	{ int sys_getdtablesize(void); } ogetdtablesize
2091.182Sad90	STD MPSAFE	{ int sys_dup2(int from, int to); }
2101.23Scgd91	UNIMPL		getdopt
2111.182Sad92	STD MPSAFE	{ int sys_fcntl(int fd, int cmd, ... void *arg); }
2121.182Sad93	STD MPSAFE	{ int sys_select(int nd, fd_set *in, fd_set *ou, \
2131.23Scgd			    fd_set *ex, struct timeval *tv); }
2141.23Scgd94	UNIMPL		setdopt
2151.182Sad95	STD MPSAFE	{ int sys_fsync(int fd); }
2161.176Sad96	STD MPSAFE	{ int sys_setpriority(int which, id_t who, int prio); }
2171.154Smrg97	COMPAT_30	{ int sys_socket(int domain, int type, int protocol); }
2181.46Scgd98	STD		{ int sys_connect(int s, const struct sockaddr *name, \
2191.88Skleink			    unsigned int namelen); }
2201.167Schristos99	COMPAT_43	{ int sys_accept(int s, void *name, \
2211.46Scgd			    int *anamelen); } oaccept
2221.163Sad100	STD MPSAFE	{ int sys_getpriority(int which, id_t who); }
2231.167Schristos101	COMPAT_43	{ int sys_send(int s, void *buf, int len, \
2241.29Smycroft			    int flags); } osend
2251.167Schristos102	COMPAT_43	{ int sys_recv(int s, void *buf, int len, \
2261.29Smycroft			    int flags); } orecv
2271.163Sad103	COMPAT_13 MPSAFE	{ int sys_sigreturn(struct sigcontext13 *sigcntxp); } \
2281.83Smycroft			    sigreturn13
2291.46Scgd104	STD		{ int sys_bind(int s, const struct sockaddr *name, \
2301.88Skleink			    unsigned int namelen); }
2311.28Smycroft105	STD		{ int sys_setsockopt(int s, int level, int name, \
2321.88Skleink			    const void *val, unsigned int valsize); }
2331.28Smycroft106	STD		{ int sys_listen(int s, int backlog); }
2341.23Scgd107	OBSOL		vtimes
2351.163Sad108	COMPAT_43 MPSAFE	{ int sys_sigvec(int signum, struct sigvec *nsv, \
2361.29Smycroft			    struct sigvec *osv); } osigvec
2371.163Sad109	COMPAT_43 MPSAFE	{ int sys_sigblock(int mask); } osigblock
2381.163Sad110	COMPAT_43 MPSAFE	{ int sys_sigsetmask(int mask); } osigsetmask
2391.163Sad111	COMPAT_13 MPSAFE	{ int sys_sigsuspend(int mask); } sigsuspend13
2401.163Sad112	COMPAT_43 MPSAFE	{ int sys_sigstack(struct sigstack *nss, \
2411.29Smycroft			    struct sigstack *oss); } osigstack
2421.28Smycroft113	COMPAT_43	{ int sys_recvmsg(int s, struct omsghdr *msg, \
2431.29Smycroft			    int flags); } orecvmsg
2441.167Schristos114	COMPAT_43	{ int sys_sendmsg(int s, void *msg, int flags); } \
2451.29Smycroft			    osendmsg
2461.23Scgd115	OBSOL		vtrace
2471.173Sad116	STD MPSAFE	{ int sys_gettimeofday(struct timeval *tp, \
2481.141Skleink			    void *tzp); }
2491.176Sad117	STD MPSAFE	{ int sys_getrusage(int who, struct rusage *rusage); }
2501.28Smycroft118	STD		{ int sys_getsockopt(int s, int level, int name, \
2511.88Skleink			    void *val, unsigned int *avalsize); }
2521.26Scgd119	OBSOL		resuba
2531.182Sad120	STD MPSAFE	{ ssize_t sys_readv(int fd, \
2541.58Smycroft			    const struct iovec *iovp, int iovcnt); }
2551.182Sad121	STD MPSAFE	{ ssize_t sys_writev(int fd, \
2561.58Smycroft			    const struct iovec *iovp, int iovcnt); }
2571.183Sad122	STD MPSAFE	{ int sys_settimeofday(const struct timeval *tv, \
2581.141Skleink			    const void *tzp); }
2591.182Sad123	STD MPSAFE	{ int sys_fchown(int fd, uid_t uid, gid_t gid); }
2601.182Sad124	STD MPSAFE	{ int sys_fchmod(int fd, mode_t mode); }
2611.167Schristos125	COMPAT_43	{ int sys_recvfrom(int s, void *buf, size_t len, \
2621.167Schristos			    int flags, void *from, int *fromlenaddr); } \
2631.29Smycroft			    orecvfrom
2641.183Sad126	STD MPSAFE	{ int sys_setreuid(uid_t ruid, uid_t euid); }
2651.183Sad127	STD MPSAFE	{ int sys_setregid(gid_t rgid, gid_t egid); }
2661.182Sad128	STD MPSAFE	{ int sys_rename(const char *from, const char *to); }
2671.182Sad129	COMPAT_43 MPSAFE	{ int sys_truncate(const char *path, long length); } \
2681.29Smycroft			    otruncate
2691.182Sad130	COMPAT_43 MPSAFE	{ int sys_ftruncate(int fd, long length); } oftruncate
2701.182Sad131	STD MPSAFE	{ int sys_flock(int fd, int how); }
2711.182Sad132	STD MPSAFE	{ int sys_mkfifo(const char *path, mode_t mode); }
2721.182Sad133	STD 		{ ssize_t sys_sendto(int s, const void *buf, \
2731.46Scgd			    size_t len, int flags, const struct sockaddr *to, \
2741.88Skleink			    unsigned int tolen); }
2751.28Smycroft134	STD		{ int sys_shutdown(int s, int how); }
2761.28Smycroft135	STD		{ int sys_socketpair(int domain, int type, \
2771.28Smycroft			    int protocol, int *rsv); }
2781.182Sad136	STD MPSAFE	{ int sys_mkdir(const char *path, mode_t mode); }
2791.182Sad137	STD MPSAFE	{ int sys_rmdir(const char *path); }
2801.182Sad138	STD MPSAFE	{ int sys_utimes(const char *path, \
2811.46Scgd			    const struct timeval *tptr); }
2821.23Scgd139	OBSOL		4.2 sigreturn
2831.46Scgd140	STD		{ int sys_adjtime(const struct timeval *delta, \
2841.23Scgd			    struct timeval *olddelta); }
2851.167Schristos141	COMPAT_43	{ int sys_getpeername(int fdes, void *asa, \
2861.29Smycroft			    int *alen); } ogetpeername
2871.182Sad142	COMPAT_43 MPSAFE	{ int32_t sys_gethostid(void); } ogethostid
2881.182Sad143	COMPAT_43 MPSAFE	{ int sys_sethostid(int32_t hostid); } osethostid
2891.176Sad144	COMPAT_43 MPSAFE	{ int sys_getrlimit(int which, \
2901.58Smycroft			    struct orlimit *rlp); } ogetrlimit
2911.183Sad145	COMPAT_43 MPSAFE	{ int sys_setrlimit(int which, \
2921.58Smycroft			    const struct orlimit *rlp); } osetrlimit
2931.182Sad146	COMPAT_43 MPSAFE	{ int sys_killpg(int pgid, int signum); } okillpg
2941.183Sad147	STD MPSAFE 	{ int sys_setsid(void); }
2951.183Sad148	STD MPSAFE	{ int sys_quotactl(const char *path, int cmd, \
2961.167Schristos			    int uid, void *arg); }
2971.183Sad149	COMPAT_43 MPSAFE	{ int sys_quota(void); } oquota
2981.167Schristos150	COMPAT_43	{ int sys_getsockname(int fdec, void *asa, \
2991.29Smycroft			    int *alen); } ogetsockname
3001.1Sglass
3011.1Sglass; Syscalls 151-180 inclusive are reserved for vendor-specific
3021.1Sglass; system calls.  (This includes various calls added for compatibity
3031.1Sglass; with other Unix variants.)
3041.1Sglass; Some of these calls are now supported by BSD...
3051.23Scgd151	UNIMPL
3061.23Scgd152	UNIMPL
3071.23Scgd153	UNIMPL
3081.23Scgd154	UNIMPL
3091.92Schristos#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL)
3101.46Scgd155	STD		{ int sys_nfssvc(int flag, void *argp); }
3111.1Sglass#else
3121.92Schristos155	EXCL		nfssvc
3131.1Sglass#endif
3141.183Sad156	COMPAT_43 MPSAFE { int sys_getdirentries(int fd, char *buf, \
3151.29Smycroft			    u_int count, long *basep); } ogetdirentries
3161.183Sad157	COMPAT_20 MPSAFE	{ int sys_statfs(const char *path, \
3171.139Schristos			    struct statfs12 *buf); }
3181.183Sad158	COMPAT_20 MPSAFE	{ int sys_fstatfs(int fd, struct statfs12 *buf); }
3191.23Scgd159	UNIMPL
3201.23Scgd160	UNIMPL
3211.183Sad161	COMPAT_30 MPSAFE { int sys_getfh(const char *fname, \
3221.155Smartin			    struct compat_30_fhandle *fhp); }
3231.183Sad162	COMPAT_09 MPSAFE { int sys_getdomainname(char *domainname, int len); } \
3241.29Smycroft			    ogetdomainname
3251.183Sad163	COMPAT_09 MPSAFE { int sys_setdomainname(char *domainname, int len); } \
3261.29Smycroft			    osetdomainname
3271.182Sad164	COMPAT_09 MPSAFE	{ int sys_uname(struct outsname *name); } ouname
3281.71Sperry165	STD		{ int sys_sysarch(int op, void *parms); }
3291.23Scgd166	UNIMPL
3301.23Scgd167	UNIMPL
3311.23Scgd168	UNIMPL
3321.23Scgd; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
3331.111Seeh#if (defined(SYSVSEM) || !defined(_KERNEL)) && !defined(_LP64)
3341.172Sad169	COMPAT_10 MPSAFE	{ int sys_semsys(int which, int a2, int a3, int a4, \
3351.29Smycroft			    int a5); } osemsys
3361.9Scgd#else
3371.92Schristos169	EXCL		1.0 semsys
3381.9Scgd#endif
3391.23Scgd; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
3401.111Seeh#if (defined(SYSVMSG) || !defined(_KERNEL)) && !defined(_LP64)
3411.182Sad170	COMPAT_10 MPSAFE	{ int sys_msgsys(int which, int a2, int a3, int a4, \
3421.29Smycroft			    int a5, int a6); } omsgsys
3431.9Scgd#else
3441.92Schristos170	EXCL		1.0 msgsys
3451.9Scgd#endif
3461.23Scgd; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
3471.111Seeh#if (defined(SYSVSHM) || !defined(_KERNEL)) && !defined(_LP64)
3481.182Sad171	COMPAT_10 MPSAFE	{ int sys_shmsys(int which, int a2, int a3, int a4); } \
3491.29Smycroft			    oshmsys
3501.1Sglass#else
3511.92Schristos171	EXCL		1.0 shmsys
3521.1Sglass#endif
3531.23Scgd172	UNIMPL
3541.182Sad173	STD MPSAFE	{ ssize_t sys_pread(int fd, void *buf, \
3551.80Sthorpej			    size_t nbyte, int pad, off_t offset); }
3561.182Sad174	STD MPSAFE	{ ssize_t sys_pwrite(int fd, const void *buf, \
3571.80Sthorpej			    size_t nbyte, int pad, off_t offset); }
3581.102Sbjh21; For some reason, ntp_gettime doesn't want to raise SIGSYS when it's excluded.
3591.153Sdrochner175	COMPAT_30	{ int sys_ntp_gettime(struct ntptimeval30 *ntvp); }
3601.102Sbjh21#if defined(NTP) || !defined(_KERNEL)
3611.38Sthorpej176	STD		{ int sys_ntp_adjtime(struct timex *tp); }
3621.102Sbjh21#else
3631.102Sbjh21176	EXCL		ntp_adjtime
3641.102Sbjh21#endif
3651.23Scgd177	UNIMPL
3661.23Scgd178	UNIMPL
3671.23Scgd179	UNIMPL
3681.23Scgd180	UNIMPL
3691.1Sglass
3701.1Sglass; Syscalls 180-199 are used by/reserved for BSD
3711.183Sad181	STD MPSAFE	{ int sys_setgid(gid_t gid); }
3721.183Sad182	STD MPSAFE	{ int sys_setegid(gid_t egid); }
3731.183Sad183	STD MPSAFE	{ int sys_seteuid(uid_t euid); }
3741.92Schristos#if defined(LFS) || !defined(_KERNEL)
3751.92Schristos184	STD		{ int sys_lfs_bmapv(fsid_t *fsidp, \
3761.23Scgd			    struct block_info *blkiov, int blkcnt); }
3771.92Schristos185	STD		{ int sys_lfs_markv(fsid_t *fsidp, \
3781.23Scgd			    struct block_info *blkiov, int blkcnt); }
3791.92Schristos186	STD		{ int sys_lfs_segclean(fsid_t *fsidp, u_long segment); }
3801.92Schristos187	STD		{ int sys_lfs_segwait(fsid_t *fsidp, \
3811.92Schristos			    struct timeval *tv); }
3821.92Schristos#else
3831.92Schristos184	EXCL		lfs_bmapv
3841.92Schristos185	EXCL		lfs_markv
3851.92Schristos186	EXCL		lfs_segclean
3861.92Schristos187	EXCL		lfs_segwait
3871.23Scgd#endif
3881.182Sad188	COMPAT_12 MPSAFE	{ int sys_stat(const char *path, struct stat12 *ub); } \
3891.60Schristos			    stat12
3901.182Sad189	COMPAT_12 MPSAFE	{ int sys_fstat(int fd, struct stat12 *sb); } fstat12
3911.182Sad190	COMPAT_12 MPSAFE	{ int sys_lstat(const char *path, \
3921.60Schristos			    struct stat12 *ub); } lstat12
3931.182Sad191	STD MPSAFE	{ long sys_pathconf(const char *path, int name); }
3941.182Sad192	STD MPSAFE	{ long sys_fpathconf(int fd, int name); }
3951.23Scgd193	UNIMPL
3961.182Sad194	STD MPSAFE	{ int sys_getrlimit(int which, \
3971.58Smycroft			    struct rlimit *rlp); }
3981.183Sad195	STD MPSAFE	{ int sys_setrlimit(int which, \
3991.46Scgd			    const struct rlimit *rlp); }
4001.183Sad196	COMPAT_12 MPSAFE	{ int sys_getdirentries(int fd, char *buf, \
4011.28Smycroft			    u_int count, long *basep); }
4021.182Sad197	STD MPSAFE	{ void *sys_mmap(void *addr, size_t len, int prot, \
4031.23Scgd			    int flags, int fd, long pad, off_t pos); }
4041.179Sdsl198	INDIR		{ quad_t sys___syscall(quad_t code, \
4051.179Sdsl			    ... register_t args[SYS_MAXSYSARGS]); }
4061.182Sad199	STD MPSAFE	{ off_t sys_lseek(int fd, int pad, off_t offset, \
4071.23Scgd			    int whence); }
4081.182Sad200	STD MPSAFE	{ int sys_truncate(const char *path, int pad, \
4091.46Scgd			    off_t length); }
4101.182Sad201	STD MPSAFE	{ int sys_ftruncate(int fd, int pad, off_t length); }
4111.182Sad202	STD MPSAFE	{ int sys___sysctl(const int *name, u_int namelen, \
4121.151Sdrochner			    void *old, size_t *oldlenp, const void *new, \
4131.28Smycroft			    size_t newlen); }
4141.182Sad203	STD MPSAFE	{ int sys_mlock(const void *addr, size_t len); }
4151.182Sad204	STD MPSAFE	{ int sys_munlock(const void *addr, size_t len); }
4161.182Sad205	STD MPSAFE	{ int sys_undelete(const char *path); }
4171.182Sad206	STD MPSAFE	{ int sys_futimes(int fd, \
4181.46Scgd			    const struct timeval *tptr); }
4191.163Sad207	STD MPSAFE	{ pid_t sys_getpgid(pid_t pid); }
4201.34Smrg208	STD		{ int sys_reboot(int opt, char *bootstr); }
4211.182Sad209	STD MPSAFE	{ int sys_poll(struct pollfd *fds, u_int nfds, \
4221.35Smycroft			    int timeout); }
4231.11Scgd;
4241.11Scgd; Syscalls 210-219 are reserved for dynamically loaded syscalls
4251.11Scgd;
4261.92Schristos#if defined(LKM) || !defined(_KERNEL)
4271.28Smycroft210	NODEF		{ int sys_lkmnosys(void); }
4281.28Smycroft211	NODEF		{ int sys_lkmnosys(void); }
4291.28Smycroft212	NODEF		{ int sys_lkmnosys(void); }
4301.28Smycroft213	NODEF		{ int sys_lkmnosys(void); }
4311.28Smycroft214	NODEF		{ int sys_lkmnosys(void); }
4321.28Smycroft215	NODEF		{ int sys_lkmnosys(void); }
4331.28Smycroft216	NODEF		{ int sys_lkmnosys(void); }
4341.28Smycroft217	NODEF		{ int sys_lkmnosys(void); }
4351.28Smycroft218	NODEF		{ int sys_lkmnosys(void); }
4361.28Smycroft219	NODEF		{ int sys_lkmnosys(void); }
4371.11Scgd#else	/* !LKM */
4381.92Schristos210	EXCL		lkmnosys
4391.92Schristos211	EXCL		lkmnosys
4401.92Schristos212	EXCL		lkmnosys
4411.92Schristos213	EXCL		lkmnosys
4421.92Schristos214	EXCL		lkmnosys
4431.92Schristos215	EXCL		lkmnosys
4441.92Schristos216	EXCL		lkmnosys
4451.92Schristos217	EXCL		lkmnosys
4461.92Schristos218	EXCL		lkmnosys
4471.92Schristos219	EXCL		lkmnosys
4481.6Scgd#endif	/* !LKM */
4491.49Skleink; System calls 220-300 are reserved for use by NetBSD
4501.92Schristos#if defined(SYSVSEM) || !defined(_KERNEL)
4511.172Sad220	COMPAT_14 MPSAFE	{ int sys___semctl(int semid, int semnum, int cmd, \
4521.97Sthorpej			    union __semun *arg); }
4531.172Sad221	STD MPSAFE	{ int sys_semget(key_t key, int nsems, int semflg); }
4541.172Sad222	STD MPSAFE	{ int sys_semop(int semid, struct sembuf *sops, \
4551.74Skleink			    size_t nsops); }
4561.172Sad223	STD MPSAFE	{ int sys_semconfig(int flag); }
4571.23Scgd#else
4581.97Sthorpej220	EXCL		compat_14_semctl
4591.92Schristos221	EXCL		semget
4601.92Schristos222	EXCL		semop
4611.92Schristos223	EXCL		semconfig
4621.23Scgd#endif
4631.92Schristos#if defined(SYSVMSG) || !defined(_KERNEL)
4641.163Sad224	COMPAT_14 MPSAFE { int sys_msgctl(int msqid, int cmd, \
4651.97Sthorpej			    struct msqid_ds14 *buf); }
4661.163Sad225	STD MPSAFE	{ int sys_msgget(key_t key, int msgflg); }
4671.163Sad226	STD MPSAFE	{ int sys_msgsnd(int msqid, const void *msgp, \
4681.74Skleink			    size_t msgsz, int msgflg); }
4691.163Sad227	STD MPSAFE	{ ssize_t sys_msgrcv(int msqid, void *msgp, \
4701.74Skleink			    size_t msgsz, long msgtyp, int msgflg); }
4711.23Scgd#else
4721.163Sad224	EXCL 		compat_14_msgctl
4731.163Sad225	EXCL 		msgget
4741.163Sad226	EXCL 		msgsnd
4751.163Sad227	EXCL 		msgrcv
4761.23Scgd#endif
4771.92Schristos#if defined(SYSVSHM) || !defined(_KERNEL)
4781.182Sad228	STD MPSAFE	{ void *sys_shmat(int shmid, const void *shmaddr, \
4791.44Scgd			    int shmflg); }
4801.182Sad229	COMPAT_14 MPSAFE { int sys_shmctl(int shmid, int cmd, \
4811.97Sthorpej			    struct shmid_ds14 *buf); }
4821.182Sad230	STD MPSAFE	{ int sys_shmdt(const void *shmaddr); }
4831.182Sad231	STD MPSAFE	{ int sys_shmget(key_t key, size_t size, int shmflg); }
4841.23Scgd#else
4851.92Schristos228	EXCL		shmat
4861.97Sthorpej229	EXCL		compat_14_shmctl
4871.92Schristos230	EXCL		shmdt
4881.92Schristos231	EXCL		shmget
4891.23Scgd#endif
4901.175Sad232	STD MPSAFE	{ int sys_clock_gettime(clockid_t clock_id, \
4911.49Skleink			    struct timespec *tp); }
4921.183Sad233	STD MPSAFE	{ int sys_clock_settime(clockid_t clock_id, \
4931.49Skleink			    const struct timespec *tp); }
4941.175Sad234	STD MPSAFE	{ int sys_clock_getres(clockid_t clock_id, \
4951.49Skleink			    struct timespec *tp); }
4961.118Sthorpej235	STD		{ int sys_timer_create(clockid_t clock_id, \
4971.118Sthorpej			    struct sigevent *evp, timer_t *timerid); }
4981.118Sthorpej236	STD		{ int sys_timer_delete(timer_t timerid); }
4991.118Sthorpej237	STD		{ int sys_timer_settime(timer_t timerid, int flags, \
5001.118Sthorpej			    const struct itimerspec *value, \
5011.118Sthorpej			    struct itimerspec *ovalue); }
5021.118Sthorpej238	STD		{ int sys_timer_gettime(timer_t timerid, struct \
5031.118Sthorpej			    itimerspec *value); }
5041.118Sthorpej239	STD		{ int sys_timer_getoverrun(timer_t timerid); }
5051.54Sveego;
5061.54Sveego; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls
5071.54Sveego;
5081.163Sad240	STD MPSAFE	{ int sys_nanosleep(const struct timespec *rqtp, \
5091.49Skleink			    struct timespec *rmtp); }
5101.182Sad241	STD MPSAFE	{ int sys_fdatasync(int fd); }
5111.182Sad242	STD MPSAFE	{ int sys_mlockall(int flags); }
5121.182Sad243	STD MPSAFE	{ int sys_munlockall(void); }
5131.163Sad244	STD MPSAFE	{ int sys___sigtimedwait(const sigset_t *set, \
5141.127Sjdolecek			    siginfo_t *info, \
5151.127Sjdolecek			    struct timespec *timeout); }
5161.127Sjdolecek245	UNIMPL		sys_sigqueue
5171.185Sad246	STD MPSAFE	{ int sys_modctl(int cmd, void *arg); }
5181.133Schristos#if defined(P1003_1B_SEMAPHORE) || (!defined(_KERNEL) && defined(_LIBC))
5191.182Sad247	STD MPSAFE	{ int sys__ksem_init(unsigned int value, semid_t *idp); }
5201.182Sad248	STD MPSAFE	{ int sys__ksem_open(const char *name, int oflag, \
5211.119Schristos			    mode_t mode, unsigned int value, semid_t *idp); }
5221.182Sad249	STD MPSAFE	{ int sys__ksem_unlink(const char *name); }
5231.182Sad250	STD MPSAFE	{ int sys__ksem_close(semid_t id); }
5241.182Sad251	STD MPSAFE	{ int sys__ksem_post(semid_t id); }
5251.182Sad252	STD MPSAFE	{ int sys__ksem_wait(semid_t id); }
5261.182Sad253	STD MPSAFE	{ int sys__ksem_trywait(semid_t id); }
5271.182Sad254	STD MPSAFE	{ int sys__ksem_getvalue(semid_t id, \
5281.119Schristos			    unsigned int *value); }
5291.182Sad255	STD MPSAFE	{ int sys__ksem_destroy(semid_t id); }
5301.124Sthorpej256	UNIMPL		sys__ksem_timedwait
5311.119Schristos#else
5321.122Schristos247	EXCL		sys__ksem_init
5331.122Schristos248	EXCL		sys__ksem_open
5341.122Schristos249	EXCL 		sys__ksem_unlink
5351.122Schristos250	EXCL		sys__ksem_close
5361.122Schristos251	EXCL		sys__ksem_post
5371.122Schristos252	EXCL		sys__ksem_wait
5381.122Schristos253	EXCL		sys__ksem_trywait
5391.122Schristos254	EXCL		sys__ksem_getvalue
5401.122Schristos255	EXCL		sys__ksem_destroy
5411.124Sthorpej256	UNIMPL		sys__ksem_timedwait
5421.119Schristos#endif
5431.182Sad257	STD MPSAFE	{ mqd_t sys_mq_open(const char * name, int oflag, \
5441.177Srmind			    mode_t mode, struct mq_attr *attr); }
5451.182Sad258	STD MPSAFE	{ int sys_mq_close(mqd_t mqdes); }
5461.182Sad259	STD MPSAFE	{ int sys_mq_unlink(const char *name); }
5471.182Sad260	STD MPSAFE	{ int sys_mq_getattr(mqd_t mqdes, \
5481.177Srmind			    struct mq_attr *mqstat); }
5491.182Sad261	STD MPSAFE	{ int sys_mq_setattr(mqd_t mqdes, \
5501.177Srmind			    const struct mq_attr *mqstat, \
5511.177Srmind			    struct mq_attr *omqstat); }
5521.182Sad262	STD MPSAFE	{ int sys_mq_notify(mqd_t mqdes, \
5531.177Srmind			    const struct sigevent *notification); }
5541.182Sad263	STD MPSAFE	{ int sys_mq_send(mqd_t mqdes, const char *msg_ptr, \
5551.177Srmind			    size_t msg_len, unsigned msg_prio); }
5561.182Sad264	STD MPSAFE	{ ssize_t sys_mq_receive(mqd_t mqdes, char *msg_ptr, \
5571.177Srmind			    size_t msg_len, unsigned *msg_prio); }
5581.182Sad265	STD MPSAFE	{ int sys_mq_timedsend(mqd_t mqdes, \
5591.177Srmind			    const char *msg_ptr, size_t msg_len, \
5601.177Srmind			    unsigned msg_prio, \
5611.177Srmind			    const struct timespec *abs_timeout); }
5621.182Sad266	STD MPSAFE	{ ssize_t sys_mq_timedreceive(mqd_t mqdes, \
5631.177Srmind			    char *msg_ptr, size_t msg_len, unsigned *msg_prio, \
5641.177Srmind			    const struct timespec *abs_timeout); }
5651.49Skleink267	UNIMPL
5661.49Skleink268	UNIMPL
5671.49Skleink269	UNIMPL
5681.182Sad270	STD MPSAFE	{ int sys___posix_rename(const char *from, \
5691.49Skleink			    const char *to); }
5701.182Sad271	STD MPSAFE	{ int sys_swapctl(int cmd, void *arg, int misc); }
5711.182Sad272	COMPAT_30 MPSAFE	{ int sys_getdents(int fd, char *buf, size_t count); }
5721.182Sad273	STD MPSAFE	{ int sys_minherit(void *addr, size_t len, \
5731.54Sveego			    int inherit); }
5741.182Sad274	STD MPSAFE	{ int sys_lchmod(const char *path, mode_t mode); }
5751.182Sad275	STD MPSAFE	{ int sys_lchown(const char *path, uid_t uid, \
5761.56Senami			    gid_t gid); }
5771.182Sad276	STD MPSAFE	{ int sys_lutimes(const char *path, \
5781.56Senami			    const struct timeval *tptr); }
5791.182Sad277	STD MPSAFE	{ int sys___msync13(void *addr, size_t len, int flags); }
5801.182Sad278	COMPAT_30 MPSAFE	{ int sys___stat13(const char *path, struct stat13 *ub); }
5811.182Sad279	COMPAT_30 MPSAFE	{ int sys___fstat13(int fd, struct stat13 *sb); }
5821.182Sad280	COMPAT_30 MPSAFE	{ int sys___lstat13(const char *path, struct stat13 *ub); }
5831.163Sad281	STD MPSAFE	{ int sys___sigaltstack14( \
5841.82Smycroft			    const struct sigaltstack *nss, \
5851.82Smycroft			    struct sigaltstack *oss); }
5861.182Sad282	STD MPSAFE	{ int sys___vfork14(void); }
5871.182Sad283	STD MPSAFE	{ int sys___posix_chown(const char *path, uid_t uid, \
5881.69Skleink			    gid_t gid); }
5891.182Sad284	STD MPSAFE	{ int sys___posix_fchown(int fd, uid_t uid, \
5901.69Skleink			    gid_t gid); }
5911.182Sad285	STD MPSAFE	{ int sys___posix_lchown(const char *path, uid_t uid, \
5921.69Skleink			    gid_t gid); }
5931.163Sad286	STD MPSAFE	{ pid_t sys_getsid(pid_t pid); }
5941.182Sad287	STD MPSAFE	{ pid_t sys___clone(int flags, void *stack); }
5951.182Sad288	STD MPSAFE	{ int sys_fktrace(int fd, int ops, \
5961.73Schristos			    int facs, int pid); }
5971.182Sad289	STD MPSAFE	{ ssize_t sys_preadv(int fd, \
5981.79Sthorpej			    const struct iovec *iovp, int iovcnt, \
5991.80Sthorpej			    int pad, off_t offset); }
6001.182Sad290	STD MPSAFE	{ ssize_t sys_pwritev(int fd, \
6011.79Sthorpej			    const struct iovec *iovp, int iovcnt, \
6021.80Sthorpej			    int pad, off_t offset); }
6031.163Sad291	COMPAT_16 MPSAFE	{ int sys___sigaction14(int signum, \
6041.82Smycroft			    const struct sigaction *nsa, \
6051.82Smycroft			    struct sigaction *osa); }
6061.163Sad292	STD MPSAFE	{ int sys___sigpending14(sigset_t *set); }
6071.163Sad293	STD MPSAFE	{ int sys___sigprocmask14(int how, \
6081.82Smycroft			    const sigset_t *set, \
6091.82Smycroft			    sigset_t *oset); }
6101.163Sad294	STD MPSAFE	{ int sys___sigsuspend14(const sigset_t *set); }
6111.163Sad295	COMPAT_16 MPSAFE { int sys___sigreturn14(struct sigcontext *sigcntxp); }
6121.182Sad296	STD MPSAFE	{ int sys___getcwd(char *bufp, size_t length); }
6131.182Sad297	STD MPSAFE	{ int sys_fchroot(int fd); }
6141.183Sad298	COMPAT_30 MPSAFE	{ int sys_fhopen(const struct compat_30_fhandle *fhp, int flags); }
6151.183Sad299	COMPAT_30 MPSAFE	{ int sys_fhstat(const struct compat_30_fhandle *fhp, \
6161.152Schristos			    struct stat13 *sb); }
6171.183Sad300	COMPAT_20 MPSAFE	{ int sys_fhstatfs(const struct compat_30_fhandle *fhp, \
6181.139Schristos			    struct statfs12 *buf); }
6191.97Sthorpej#if defined(SYSVSEM) || !defined(_KERNEL)
6201.172Sad301	STD MPSAFE	{ int sys_____semctl13(int semid, int semnum, int cmd, \
6211.99Schristos			    ... union __semun *arg); }
6221.97Sthorpej#else
6231.99Schristos301	EXCL		____semctl13
6241.97Sthorpej#endif
6251.97Sthorpej#if defined(SYSVMSG) || !defined(_KERNEL)
6261.163Sad302	STD MPSAFE	{ int sys___msgctl13(int msqid, int cmd, \
6271.97Sthorpej			    struct msqid_ds *buf); }
6281.97Sthorpej#else
6291.97Sthorpej302	EXCL		__msgctl13
6301.97Sthorpej#endif
6311.97Sthorpej#if defined(SYSVSHM) || !defined(_KERNEL)
6321.182Sad303	STD MPSAFE	{ int sys___shmctl13(int shmid, int cmd, \
6331.97Sthorpej			    struct shmid_ds *buf); }
6341.97Sthorpej#else
6351.97Sthorpej303	EXCL		__shmctl13
6361.97Sthorpej#endif
6371.182Sad304	STD MPSAFE	{ int sys_lchflags(const char *path, u_long flags); }
6381.163Sad305	STD MPSAFE	{ int sys_issetugid(void); }
6391.163Sad306	STD MPSAFE	{ int sys_utrace(const char *label, void *addr, \
6401.118Sthorpej				size_t len); }
6411.176Sad307	STD MPSAFE	{ int sys_getcontext(struct __ucontext *ucp); }
6421.176Sad308	STD MPSAFE	{ int sys_setcontext(const struct __ucontext *ucp); }
6431.182Sad309	STD MPSAFE	{ int sys__lwp_create(const struct __ucontext *ucp, \
6441.118Sthorpej				u_long flags, lwpid_t *new_lwp); }
6451.182Sad310	STD MPSAFE	{ int sys__lwp_exit(void); }
6461.163Sad311	STD MPSAFE	{ lwpid_t sys__lwp_self(void); }
6471.163Sad312	STD MPSAFE	{ int sys__lwp_wait(lwpid_t wait_for, \
6481.118Sthorpej				lwpid_t *departed); }
6491.163Sad313	STD MPSAFE	{ int sys__lwp_suspend(lwpid_t target); }
6501.163Sad314	STD MPSAFE	{ int sys__lwp_continue(lwpid_t target); }
6511.163Sad315	STD MPSAFE	{ int sys__lwp_wakeup(lwpid_t target); }
6521.163Sad316	STD MPSAFE	{ void *sys__lwp_getprivate(void); }
6531.163Sad317	STD MPSAFE	{ void sys__lwp_setprivate(void *ptr); }
6541.182Sad318	STD MPSAFE	{ int sys__lwp_kill(lwpid_t target, int signo); }
6551.163Sad319	STD MPSAFE	{ int sys__lwp_detach(lwpid_t target); }
6561.163Sad320	STD MPSAFE	{ int sys__lwp_park(const struct timespec *ts, \
6571.175Sad				lwpid_t unpark, const void *hint, \
6581.175Sad				const void *unparkhint); }
6591.164Sad321	STD MPSAFE	{ int sys__lwp_unpark(lwpid_t target, const void *hint); }
6601.166Sdrochner322	STD MPSAFE	{ ssize_t sys__lwp_unpark_all(const lwpid_t *targets, \
6611.164Sad				size_t ntargets, const void *hint); }
6621.182Sad323	STD MPSAFE	{ int sys__lwp_setname(lwpid_t target, \
6631.178Sad				const char *name); }
6641.182Sad324	STD MPSAFE	{ int sys__lwp_getname(lwpid_t target, \
6651.178Sad				char *name, size_t len); }
6661.182Sad325	STD MPSAFE	{ int sys__lwp_ctl(int features, \
6671.180Sad				struct lwpctl **address); }
6681.180Sad; Syscalls 326-339 reserved for LWP syscalls.
6691.107Snathanw326	UNIMPL
6701.107Snathanw327	UNIMPL
6711.107Snathanw328	UNIMPL
6721.107Snathanw329	UNIMPL
6731.165Sad; Obsolete SA system calls.  Must remain until libc's major version is bumped.
6741.165Sad330	STD MPSAFE	{ int sys_sa_register(void); }
6751.165Sad331	STD MPSAFE	{ int sys_sa_stacks(void); }
6761.165Sad332	STD MPSAFE	{ int sys_sa_enable(void); }
6771.165Sad333	STD MPSAFE	{ int sys_sa_setconcurrency(void); }
6781.165Sad334	STD MPSAFE	{ int sys_sa_yield(void); }
6791.165Sad335	STD MPSAFE	{ int sys_sa_preempt(void); }
6801.165Sad336	STD MPSAFE	{ int sys_sa_unblockyield(void); }
6811.107Snathanw337	UNIMPL
6821.107Snathanw338	UNIMPL
6831.107Snathanw339	UNIMPL
6841.163Sad340	STD MPSAFE	{ int sys___sigaction_sigtramp(int signum, \
6851.112Sthorpej			    const struct sigaction *nsa, \
6861.112Sthorpej			    struct sigaction *osa, \
6871.132Smatt			    const void *tramp, int vers); }
6881.113Sbriggs341	STD		{ int sys_pmc_get_info(int ctr, int op, void *args); }
6891.113Sbriggs342	STD		{ int sys_pmc_control(int ctr, int op, void *args); }
6901.182Sad343	STD MPSAFE	{ int sys_rasctl(void *addr, size_t len, int op); }
6911.116Sjdolecek344	STD		{ int sys_kqueue(void); }
6921.116Sjdolecek345	STD		{ int sys_kevent(int fd, \
6931.116Sjdolecek			    const struct kevent *changelist, size_t nchanges, \
6941.116Sjdolecek			    struct kevent *eventlist, size_t nevents, \
6951.116Sjdolecek			    const struct timespec *timeout); }
6961.184Srmind
6971.184Srmind; Scheduling system calls.
6981.184Srmind346	STD MPSAFE	{ int sys__sched_setparam(pid_t pid, lwpid_t lid, \
6991.184Srmind			    const struct sched_param *params); }
7001.184Srmind347	STD MPSAFE	{ int sys__sched_getparam(pid_t pid, lwpid_t lid, \
7011.184Srmind			    struct sched_param *params); }
7021.184Srmind348	STD MPSAFE	{ int sys__sched_setaffinity(pid_t pid, lwpid_t lid, \
7031.184Srmind			    size_t size, void *cpuset); }
7041.184Srmind349	STD MPSAFE	{ int sys__sched_getaffinity(pid_t pid, lwpid_t lid, \
7051.184Srmind			    size_t size, void *cpuset); }
7061.163Sad350	STD MPSAFE	{ int sys_sched_yield(void); }
7071.184Srmind351	UNIMPL
7081.184Srmind352	UNIMPL
7091.184Srmind353	UNIMPL
7101.134Sthorpej
7111.182Sad354	STD MPSAFE	{ int sys_fsync_range(int fd, int flags, off_t start, \
7121.134Sthorpej			    off_t length); }
7131.183Sad355	STD MPSAFE	{ int sys_uuidgen(struct uuid *store, int count); }
7141.183Sad356	STD MPSAFE	{ int sys_getvfsstat(struct statvfs *buf, \
7151.139Schristos			    size_t bufsize, int flags); }
7161.183Sad357	STD MPSAFE	{ int sys_statvfs1(const char *path, \
7171.139Schristos			    struct statvfs *buf, int flags); }
7181.183Sad358	STD MPSAFE	{ int sys_fstatvfs1(int fd, struct statvfs *buf, \
7191.139Schristos			    int flags); }
7201.183Sad359	COMPAT_30 MPSAFE	{ int sys_fhstatvfs1(const struct compat_30_fhandle *fhp, \
7211.139Schristos			    struct statvfs *buf, int flags); }
7221.186Sad360	STD MPSAFE	{ int sys_extattrctl(const char *path, int cmd, \
7231.143Sthorpej			    const char *filename, int attrnamespace, \
7241.143Sthorpej			    const char *attrname); }
7251.186Sad361	STD MPSAFE	{ int sys_extattr_set_file(const char *path, \
7261.143Sthorpej			    int attrnamespace, const char *attrname, \
7271.143Sthorpej			    const void *data, size_t nbytes); }
7281.186Sad362	STD MPSAFE	{ ssize_t sys_extattr_get_file(const char *path, \
7291.143Sthorpej			    int attrnamespace, const char *attrname, \
7301.143Sthorpej			    void *data, size_t nbytes); }
7311.186Sad363	STD MPSAFE	{ int sys_extattr_delete_file(const char *path, \
7321.143Sthorpej			    int attrnamespace, const char *attrname); }
7331.186Sad364	STD MPSAFE	{ int sys_extattr_set_fd(int fd, \
7341.143Sthorpej			    int attrnamespace, const char *attrname, \
7351.143Sthorpej			    const void *data, size_t nbytes); }
7361.186Sad365	STD MPSAFE	{ ssize_t sys_extattr_get_fd(int fd, \
7371.143Sthorpej			    int attrnamespace, const char *attrname, \
7381.143Sthorpej			    void *data, size_t nbytes); }
7391.186Sad366	STD MPSAFE	{ int sys_extattr_delete_fd(int fd, \
7401.143Sthorpej			    int attrnamespace, const char *attrname); }
7411.186Sad367	STD MPSAFE	{ int sys_extattr_set_link(const char *path, \
7421.143Sthorpej			    int attrnamespace, const char *attrname, \
7431.143Sthorpej			    const void *data, size_t nbytes); }
7441.186Sad368	STD MPSAFE	{ ssize_t sys_extattr_get_link(const char *path, \
7451.143Sthorpej			    int attrnamespace, const char *attrname, \
7461.143Sthorpej			    void *data, size_t nbytes); }
7471.186Sad369	STD MPSAFE	{ int sys_extattr_delete_link(const char *path, \
7481.143Sthorpej			    int attrnamespace, const char *attrname); }
7491.186Sad370	STD MPSAFE	{ ssize_t sys_extattr_list_fd(int fd, \
7501.143Sthorpej			    int attrnamespace, void *data, size_t nbytes); }
7511.186Sad371	STD MPSAFE	{ ssize_t sys_extattr_list_file(const char *path, \
7521.143Sthorpej			    int attrnamespace, void *data, size_t nbytes); }
7531.186Sad372	STD MPSAFE	{ ssize_t sys_extattr_list_link(const char *path, \
7541.143Sthorpej			    int attrnamespace, void *data, size_t nbytes); }
7551.182Sad373	STD MPSAFE	{ int sys_pselect(int nd, fd_set *in, fd_set *ou, \
7561.145Smatt			    fd_set *ex, const struct timespec *ts, \
7571.145Smatt			    const sigset_t *mask); }
7581.182Sad374	STD MPSAFE	{ int sys_pollts(struct pollfd *fds, u_int nfds, \
7591.145Smatt			    const struct timespec *ts, const sigset_t *mask); }
7601.186Sad375	STD MPSAFE	{ int sys_setxattr(const char *path, \
7611.147Sthorpej			    const char *name, void *value, size_t size, \
7621.147Sthorpej			    int flags); }
7631.186Sad376	STD MPSAFE	{ int sys_lsetxattr(const char *path, \
7641.147Sthorpej			    const char *name, void *value, size_t size, \
7651.147Sthorpej			    int flags); }
7661.186Sad377	STD MPSAFE	{ int sys_fsetxattr(int fd, \
7671.147Sthorpej			    const char *name, void *value, size_t size, \
7681.147Sthorpej			    int flags); }
7691.186Sad378	STD MPSAFE	{ int sys_getxattr(const char *path, \
7701.147Sthorpej			    const char *name, void *value, size_t size); }
7711.186Sad379	STD MPSAFE	{ int sys_lgetxattr(const char *path, \
7721.147Sthorpej			    const char *name, void *value, size_t size); }
7731.186Sad380	STD MPSAFE	{ int sys_fgetxattr(int fd, \
7741.147Sthorpej			    const char *name, void *value, size_t size); }
7751.186Sad381	STD MPSAFE	{ int sys_listxattr(const char *path, \
7761.147Sthorpej			    char *list, size_t size); }
7771.186Sad382	STD MPSAFE	{ int sys_llistxattr(const char *path, \
7781.147Sthorpej			    char *list, size_t size); }
7791.186Sad383	STD MPSAFE	{ int sys_flistxattr(int fd, \
7801.147Sthorpej			    char *list, size_t size); }
7811.186Sad384	STD MPSAFE	{ int sys_removexattr(const char *path, \
7821.147Sthorpej			    const char *name); }
7831.186Sad385	STD MPSAFE	{ int sys_lremovexattr(const char *path, \
7841.147Sthorpej			    const char *name); }
7851.186Sad386	STD MPSAFE	{ int sys_fremovexattr(int fd, \
7861.147Sthorpej			    const char *name); }
7871.182Sad387	STD MPSAFE	{ int sys___stat30(const char *path, struct stat *ub); }
7881.182Sad388	STD MPSAFE	{ int sys___fstat30(int fd, struct stat *sb); }
7891.182Sad389	STD MPSAFE	{ int sys___lstat30(const char *path, struct stat *ub); }
7901.182Sad390	STD MPSAFE	{ int sys___getdents30(int fd, char *buf, size_t count); }
7911.187Smartin391	COMPAT_40 MPSAFE	{ int sys_posix_fadvise(int fd, off_t offset, \
7921.150Syamt			    off_t len, int advice); }
7931.183Sad392	COMPAT_30 MPSAFE	{ int sys___fhstat30(const struct compat_30_fhandle \
7941.156Smartin			    *fhp, struct stat *sb); }
7951.153Sdrochner393	STD		{ int sys___ntp_gettime30(struct ntptimeval *ntvp); }
7961.154Smrg394	STD		{ int sys___socket30(int domain, int type, int protocol); }
7971.183Sad395	STD MPSAFE	{ int sys___getfh30(const char *fname, void *fhp, \
7981.156Smartin			    size_t *fh_size); }
7991.183Sad396	STD MPSAFE	{ int sys___fhopen40(const void *fhp, size_t fh_size,\
8001.156Smartin			    int flags); }
8011.183Sad397	STD MPSAFE	{ int sys___fhstatvfs140(const void *fhp, \
8021.156Smartin			    size_t fh_size, struct statvfs *buf, int flags); }
8031.183Sad398	STD MPSAFE	{ int sys___fhstat40(const void *fhp, \
8041.156Smartin			    size_t fh_size, struct stat *sb); }
8051.169Srmind
8061.169Srmind; Asynchronous I/O system calls
8071.182Sad399	STD MPSAFE	{ int sys_aio_cancel(int fildes, struct aiocb *aiocbp); }
8081.176Sad400	STD MPSAFE	{ int sys_aio_error(const struct aiocb *aiocbp); }
8091.182Sad401	STD MPSAFE	{ int sys_aio_fsync(int op, struct aiocb *aiocbp); }
8101.182Sad402	STD MPSAFE	{ int sys_aio_read(struct aiocb *aiocbp); }
8111.176Sad403	STD MPSAFE	{ int sys_aio_return(struct aiocb *aiocbp); }
8121.182Sad404	STD MPSAFE	{ int sys_aio_suspend(const struct aiocb *const *list, \
8131.169Srmind			    int nent, const struct timespec *timeout); }
8141.182Sad405	STD MPSAFE	{ int sys_aio_write(struct aiocb *aiocbp); }
8151.182Sad406	STD MPSAFE	{ int sys_lio_listio(int mode, struct aiocb *const *list, \
8161.169Srmind			    int nent, struct sigevent *sig); }
8171.171Sjoerg
8181.170Sdsl407	UNIMPL
8191.170Sdsl408	UNIMPL
8201.170Sdsl409	UNIMPL
8211.170Sdsl
8221.170Sdsl410	STD		{ int sys___mount50(const char *type, \
8231.170Sdsl			    const char *path, int flags, void *data, \
8241.170Sdsl			    size_t data_len); }
8251.182Sad411	STD MPSAFE	{ void *sys_mremap(void *old_address, size_t old_size, \
8261.171Sjoerg			    void *new_address, size_t new_size, int flags); }
8271.184Srmind
8281.184Srmind; Processor-sets system calls
8291.184Srmind412	STD MPSAFE	{ int sys_pset_create(psetid_t *psid); }
8301.184Srmind413	STD MPSAFE	{ int sys_pset_destroy(psetid_t psid); }
8311.184Srmind414	STD MPSAFE	{ int sys_pset_assign(psetid_t psid, cpuid_t cpuid, \
8321.184Srmind			    psetid_t *opsid); }
8331.184Srmind415	STD MPSAFE	{ int sys__pset_bind(idtype_t idtype, id_t first_id, \
8341.184Srmind			    id_t second_id, psetid_t psid, psetid_t *opsid); }
8351.187Smartin416	STD MPSAFE	{ int sys___posix_fadvise50(int fd, int pad, \
8361.187Smartin			    off_t offset, off_t len, int advice); }
837