syscalls.master revision 1.213
1	$NetBSD: syscalls.master,v 1.213 2008/11/12 14:32:34 ad Exp $
2
3;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94
4
5; NetBSD system call name/number "master" file.
6; (See syscalls.conf to see what it is processed into.)
7;
8; Fields: number type [type-dependent ...]
9;	number	system call number, must be in order
10;	type	one of STD, OBSOL, UNIMPL, IGNORED, NODEF, NOARGS, or one of
11;		the compatibility options defined in syscalls.conf.
12;
13; Optional fields are specified after the type field
14; (NOTE! they must be specified in this order):
15;     RUMP:	the system call can be called directly from rumps
16;
17; types:
18;	STD	always included
19;	OBSOL	obsolete, not included in system
20;	IGNORED	syscall is a null op, but always succeeds
21;	UNIMPL	unimplemented, not included in system
22;	EXCL	implemented, but not included in system
23;	NODEF	included, but don't define the syscall number
24;	NOARGS	included, but don't define the syscall args structure
25;	INDIR	included, but don't define the syscall args structure,
26;		and allow it to be "really" varargs.
27;
28; The compat options are defined in the syscalls.conf file, and the
29; compat option name is prefixed to the syscall name.  Other than
30; that, they're like NODEF (for 'compat' options), or STD (for
31; 'libcompat' options).
32;
33; The type-dependent arguments are as follows:
34; For STD, NODEF, NOARGS, and compat syscalls:
35;	{ pseudo-proto } [alias]
36; For other syscalls:
37;	[comment]
38;
39; #ifdef's, etc. may be included, and are copied to the output files.
40; #include's are copied to the syscall names and switch definition files only.
41
42#include "opt_nfsserver.h"
43#include "opt_ntp.h"
44#include "opt_compat_netbsd.h"
45#include "opt_sysv.h"
46#include "opt_compat_43.h"
47
48#include "fs_lfs.h"
49#include "fs_nfs.h"
50
51#include <sys/param.h>
52#include <sys/systm.h>
53#include <sys/signal.h>
54#include <sys/mount.h>
55#include <sys/sched.h>
56#include <sys/syscallargs.h>
57
58%%
59
60; Reserved/unimplemented system calls in the range 0-150 inclusive
61; are reserved for use in future Berkeley releases.
62; Additional system calls implemented in vendor and other
63; redistributions should be placed in the reserved range at the end
64; of the current calls.
65
660	INDIR		{ int sys_syscall(int code, \
67			    ... register_t args[SYS_MAXSYSARGS]); }
681	STD 		{ void sys_exit(int rval); }
692	STD 		{ int sys_fork(void); }
703	STD 	 RUMP	{ ssize_t sys_read(int fd, void *buf, size_t nbyte); }
714	STD 	 RUMP	{ ssize_t sys_write(int fd, const void *buf, \
72			    size_t nbyte); }
735	STD 	 RUMP	{ int sys_open(const char *path, \
74			    int flags, ... mode_t mode); }
756	STD 	 RUMP	{ int sys_close(int fd); }
767	STD 		{ int sys_wait4(int pid, int *status, int options, \
77			    struct rusage *rusage); }
788	COMPAT_43 	{ int sys_creat(const char *path, mode_t mode); } ocreat
799	STD 	 RUMP	{ int sys_link(const char *path, const char *link); }
8010	STD 	 RUMP	{ int sys_unlink(const char *path); }
8111	OBSOL		execv
8212	STD 	 RUMP	{ int sys_chdir(const char *path); }
8313	STD 	 RUMP	{ int sys_fchdir(int fd); }
8414	STD 	 RUMP	{ int sys_mknod(const char *path, mode_t mode, \
85			    dev_t dev); }
8615	STD 	 RUMP	{ int sys_chmod(const char *path, mode_t mode); }
8716	STD 	 RUMP	{ int sys_chown(const char *path, uid_t uid, \
88			    gid_t gid); }
8917	STD 		{ int sys_obreak(char *nsize); } break
9018	COMPAT_20 	{ int sys_getfsstat(struct statfs12 *buf, \
91			    long bufsize, int flags); }
9219	COMPAT_43 	{ long sys_lseek(int fd, long offset, int whence); } \
93			    olseek
94#ifdef COMPAT_43
9520	STD 		{ pid_t sys_getpid_with_ppid(void); } getpid
96#else
9720	STD 		{ pid_t sys_getpid(void); }
98#endif
9921	COMPAT_40 	{ int sys_mount(const char *type, const char *path, \
100			    int flags, void *data); }
10122	STD 	 RUMP	{ int sys_unmount(const char *path, int flags); }
10223	STD 		{ int sys_setuid(uid_t uid); }
103#ifdef COMPAT_43
10424	STD 		{ uid_t sys_getuid_with_euid(void); } getuid
105#else
10624	STD 		{ uid_t sys_getuid(void); }
107#endif
10825	STD 		{ uid_t sys_geteuid(void); }
10926	STD 		{ int sys_ptrace(int req, pid_t pid, void *addr, \
110			    int data); }
11127	STD 		{ ssize_t sys_recvmsg(int s, struct msghdr *msg, \
112			    int flags); }
11328	STD 		{ ssize_t sys_sendmsg(int s, \
114			    const struct msghdr *msg, int flags); }
11529	STD 		{ ssize_t sys_recvfrom(int s, void *buf, size_t len, \
116			    int flags, struct sockaddr *from, \
117			    unsigned int *fromlenaddr); }
11830	STD		{ int sys_accept(int s, struct sockaddr *name, \
119			    unsigned int *anamelen); }
12031	STD		{ int sys_getpeername(int fdes, struct sockaddr *asa, \
121			    unsigned int *alen); }
12232	STD		{ int sys_getsockname(int fdes, struct sockaddr *asa, \
123			    unsigned int *alen); }
12433	STD 		{ int sys_access(const char *path, int flags); }
12534	STD 	 RUMP	{ int sys_chflags(const char *path, u_long flags); }
12635	STD 		{ int sys_fchflags(int fd, u_long flags); }
12736	STD 	 RUMP	{ void sys_sync(void); }
12837	STD 		{ int sys_kill(int pid, int signum); }
12938	COMPAT_43 	{ int sys_stat(const char *path, struct stat43 *ub); } \
130			    stat43
13139	STD 		{ pid_t sys_getppid(void); }
13240	COMPAT_43 	{ int sys_lstat(const char *path, \
133			    struct stat43 *ub); } lstat43
13441	STD 		{ int sys_dup(int fd); }
13542	STD 		{ int sys_pipe(void); }
13643	STD 		{ gid_t sys_getegid(void); }
13744	STD 		{ int sys_profil(char *samples, size_t size, \
138			    u_long offset, u_int scale); }
13945	STD 		{ int sys_ktrace(const char *fname, int ops, \
140			    int facs, int pid); }
14146	COMPAT_13 	{ int sys_sigaction(int signum, \
142			    const struct sigaction13 *nsa, \
143			    struct sigaction13 *osa); } sigaction13
144#ifdef COMPAT_43
14547	STD 		{ gid_t sys_getgid_with_egid(void); } getgid
146#else
14747	STD 		{ gid_t sys_getgid(void); }
148#endif
14948	COMPAT_13 	{ int sys_sigprocmask(int how, \
150			    int mask); } sigprocmask13
15149	STD 		{ int sys___getlogin(char *namebuf, size_t namelen); }
15250	STD 	 	{ int sys___setlogin(const char *namebuf); }
15351	STD 		{ int sys_acct(const char *path); }
15452	COMPAT_13 	{ int sys_sigpending(void); } sigpending13
15553	COMPAT_13 	{ int sys_sigaltstack( \
156			    const struct sigaltstack13 *nss, \
157			    struct sigaltstack13 *oss); } sigaltstack13
15854	STD	RUMP	{ int sys_ioctl(int fd, \
159			    u_long com, ... void *data); }
16055	COMPAT_12 	{ int sys_reboot(int opt); } oreboot
16156	STD 		{ int sys_revoke(const char *path); }
16257	STD 	 RUMP	{ int sys_symlink(const char *path, \
163			    const char *link); }
16458	STD 	 RUMP	{ ssize_t sys_readlink(const char *path, char *buf, \
165			    size_t count); }
16659	STD 		{ int sys_execve(const char *path, \
167			    char * const *argp, char * const *envp); }
16860	STD 		{ mode_t sys_umask(mode_t newmask); }
16961	STD 		{ int sys_chroot(const char *path); }
17062	COMPAT_43 	{ int sys_fstat(int fd, struct stat43 *sb); } fstat43
17163	COMPAT_43 	{ int sys_getkerninfo(int op, char *where, int *size, \
172			    int arg); } ogetkerninfo
17364	COMPAT_43 	 { int sys_getpagesize(void); } ogetpagesize
17465	COMPAT_12 	 { int sys_msync(void *addr, size_t len); }
175; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)?
17666	STD 		{ int sys_vfork(void); }
17767	OBSOL		vread
17868	OBSOL		vwrite
17969	STD 		{ int sys_sbrk(intptr_t incr); }
18070	STD 		{ int sys_sstk(int incr); }
18171	COMPAT_43 	{ int sys_mmap(void *addr, size_t len, int prot, \
182			    int flags, int fd, long pos); } ommap
18372	STD 		{ int sys_ovadvise(int anom); } vadvise
18473	STD 		{ int sys_munmap(void *addr, size_t len); }
18574	STD 		{ int sys_mprotect(void *addr, size_t len, \
186			    int prot); }
18775	STD 		{ int sys_madvise(void *addr, size_t len, \
188			    int behav); }
18976	OBSOL		vhangup
19077	OBSOL		vlimit
19178	STD 		{ int sys_mincore(void *addr, size_t len, \
192			    char *vec); }
19379	STD 		{ int sys_getgroups(int gidsetsize, \
194			    gid_t *gidset); }
19580	STD 		{ int sys_setgroups(int gidsetsize, \
196			    const gid_t *gidset); }
19781	STD 	 	{ int sys_getpgrp(void); }
19882	STD 		{ int sys_setpgid(int pid, int pgid); }
19983	STD 		{ int sys_setitimer(int which, \
200			    const struct itimerval *itv, \
201			    struct itimerval *oitv); }
20284	COMPAT_43 	{ int sys_wait(void); } owait
20385	COMPAT_12 	{ int sys_swapon(const char *name); } oswapon
20486	STD 		{ int sys_getitimer(int which, \
205			    struct itimerval *itv); }
20687	COMPAT_43 	{ int sys_gethostname(char *hostname, u_int len); } \
207			    ogethostname
20888	COMPAT_43 	{ int sys_sethostname(char *hostname, u_int len); } \
209			    osethostname
21089	COMPAT_43 	{ int sys_getdtablesize(void); } ogetdtablesize
21190	STD 		{ int sys_dup2(int from, int to); }
21291	UNIMPL		getdopt
21392	STD 		{ int sys_fcntl(int fd, int cmd, ... void *arg); }
21493	STD 		{ int sys_select(int nd, fd_set *in, fd_set *ou, \
215			    fd_set *ex, struct timeval *tv); }
21694	UNIMPL		setdopt
21795	STD	RUMP 	{ int sys_fsync(int fd); }
21896	STD 		{ int sys_setpriority(int which, id_t who, int prio); }
21997	COMPAT_30	{ int sys_socket(int domain, int type, int protocol); }
22098	STD	RUMP	{ int sys_connect(int s, const struct sockaddr *name, \
221			    unsigned int namelen); }
22299	COMPAT_43	{ int sys_accept(int s, void *name, \
223			    int *anamelen); } oaccept
224100	STD 		{ int sys_getpriority(int which, id_t who); }
225101	COMPAT_43 	{ int sys_send(int s, void *buf, int len, \
226			    int flags); } osend
227102	COMPAT_43 	{ int sys_recv(int s, void *buf, int len, \
228			    int flags); } orecv
229103	COMPAT_13 	{ int sys_sigreturn(struct sigcontext13 *sigcntxp); } \
230			    sigreturn13
231104	STD		{ int sys_bind(int s, const struct sockaddr *name, \
232			    unsigned int namelen); }
233105	STD	RUMP	{ int sys_setsockopt(int s, int level, int name, \
234			    const void *val, unsigned int valsize); }
235106	STD		{ int sys_listen(int s, int backlog); }
236107	OBSOL		vtimes
237108	COMPAT_43 	{ int sys_sigvec(int signum, struct sigvec *nsv, \
238			    struct sigvec *osv); } osigvec
239109	COMPAT_43 	{ int sys_sigblock(int mask); } osigblock
240110	COMPAT_43 	{ int sys_sigsetmask(int mask); } osigsetmask
241111	COMPAT_13 	{ int sys_sigsuspend(int mask); } sigsuspend13
242112	COMPAT_43 	{ int sys_sigstack(struct sigstack *nss, \
243			    struct sigstack *oss); } osigstack
244113	COMPAT_43 	{ int sys_recvmsg(int s, struct omsghdr *msg, \
245			    int flags); } orecvmsg
246114	COMPAT_43 	{ int sys_sendmsg(int s, void *msg, int flags); } \
247			    osendmsg
248115	OBSOL		vtrace
249116	STD 		{ int sys_gettimeofday(struct timeval *tp, \
250			    void *tzp); }
251117	STD 		{ int sys_getrusage(int who, struct rusage *rusage); }
252118	STD	RUMP	{ int sys_getsockopt(int s, int level, int name, \
253			    void *val, unsigned int *avalsize); }
254119	OBSOL		resuba
255120	STD 		{ ssize_t sys_readv(int fd, \
256			    const struct iovec *iovp, int iovcnt); }
257121	STD 		{ ssize_t sys_writev(int fd, \
258			    const struct iovec *iovp, int iovcnt); }
259122	STD 		{ int sys_settimeofday(const struct timeval *tv, \
260			    const void *tzp); }
261123	STD 		{ int sys_fchown(int fd, uid_t uid, gid_t gid); }
262124	STD 		{ int sys_fchmod(int fd, mode_t mode); }
263125	COMPAT_43 	{ int sys_recvfrom(int s, void *buf, size_t len, \
264			    int flags, void *from, int *fromlenaddr); } \
265			    orecvfrom
266126	STD 		{ int sys_setreuid(uid_t ruid, uid_t euid); }
267127	STD 		{ int sys_setregid(gid_t rgid, gid_t egid); }
268128	STD 	 RUMP	{ int sys_rename(const char *from, const char *to); }
269129	COMPAT_43 	{ int sys_truncate(const char *path, long length); } \
270			    otruncate
271130	COMPAT_43 	{ int sys_ftruncate(int fd, long length); } oftruncate
272131	STD 		{ int sys_flock(int fd, int how); }
273132	STD 	 RUMP	{ int sys_mkfifo(const char *path, mode_t mode); }
274133	STD 		{ ssize_t sys_sendto(int s, const void *buf, \
275			    size_t len, int flags, const struct sockaddr *to, \
276			    unsigned int tolen); }
277134	STD		{ int sys_shutdown(int s, int how); }
278135	STD		{ int sys_socketpair(int domain, int type, \
279			    int protocol, int *rsv); }
280136	STD 	 RUMP	{ int sys_mkdir(const char *path, mode_t mode); }
281137	STD 	 RUMP	{ int sys_rmdir(const char *path); }
282138	STD 	 RUMP	{ int sys_utimes(const char *path, \
283			    const struct timeval *tptr); }
284139	OBSOL		4.2 sigreturn
285140	STD 		{ int sys_adjtime(const struct timeval *delta, \
286			    struct timeval *olddelta); }
287141	COMPAT_43	{ int sys_getpeername(int fdes, void *asa, \
288			    int *alen); } ogetpeername
289142	COMPAT_43 	{ int32_t sys_gethostid(void); } ogethostid
290143	COMPAT_43 	{ int sys_sethostid(int32_t hostid); } osethostid
291144	COMPAT_43 	{ int sys_getrlimit(int which, \
292			    struct orlimit *rlp); } ogetrlimit
293145	COMPAT_43 	{ int sys_setrlimit(int which, \
294			    const struct orlimit *rlp); } osetrlimit
295146	COMPAT_43 	{ int sys_killpg(int pgid, int signum); } okillpg
296147	STD 	 	{ int sys_setsid(void); }
297148	STD 		{ int sys_quotactl(const char *path, int cmd, \
298			    int uid, void *arg); }
299149	COMPAT_43 	{ int sys_quota(void); } oquota
300150	COMPAT_43	{ int sys_getsockname(int fdec, void *asa, \
301			    int *alen); } ogetsockname
302
303; Syscalls 151-180 inclusive are reserved for vendor-specific
304; system calls.  (This includes various calls added for compatibity
305; with other Unix variants.)
306; Some of these calls are now supported by BSD...
307151	UNIMPL
308152	UNIMPL
309153	UNIMPL
310154	UNIMPL
311#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL)
312155	STD 		{ int sys_nfssvc(int flag, void *argp); }
313#else
314155	EXCL		nfssvc
315#endif
316156	COMPAT_43 	 { int sys_getdirentries(int fd, char *buf, \
317			    u_int count, long *basep); } ogetdirentries
318157	COMPAT_20 	{ int sys_statfs(const char *path, \
319			    struct statfs12 *buf); }
320158	COMPAT_20 	{ int sys_fstatfs(int fd, struct statfs12 *buf); }
321159	UNIMPL
322160	UNIMPL
323161	COMPAT_30 	 { int sys_getfh(const char *fname, \
324			    struct compat_30_fhandle *fhp); }
325162	COMPAT_09 	 { int sys_getdomainname(char *domainname, int len); } \
326			    ogetdomainname
327163	COMPAT_09 	 { int sys_setdomainname(char *domainname, int len); } \
328			    osetdomainname
329164	COMPAT_09 		{ int sys_uname(struct outsname *name); } ouname
330165	STD 		{ int sys_sysarch(int op, void *parms); }
331166	UNIMPL
332167	UNIMPL
333168	UNIMPL
334; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
335#if (defined(SYSVSEM) || !defined(_KERNEL)) && !defined(_LP64)
336169	COMPAT_10 	{ int sys_semsys(int which, int a2, int a3, int a4, \
337			    int a5); } osemsys
338#else
339169	EXCL		1.0 semsys
340#endif
341; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
342#if (defined(SYSVMSG) || !defined(_KERNEL)) && !defined(_LP64)
343170	COMPAT_10 	{ int sys_msgsys(int which, int a2, int a3, int a4, \
344			    int a5, int a6); } omsgsys
345#else
346170	EXCL		1.0 msgsys
347#endif
348; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
349#if (defined(SYSVSHM) || !defined(_KERNEL)) && !defined(_LP64)
350171	COMPAT_10 		{ int sys_shmsys(int which, int a2, int a3, int a4); } \
351			    oshmsys
352#else
353171	EXCL		1.0 shmsys
354#endif
355172	UNIMPL
356173	STD 	 RUMP	{ ssize_t sys_pread(int fd, void *buf, \
357			    size_t nbyte, int pad, off_t offset); }
358174	STD 	 RUMP	{ ssize_t sys_pwrite(int fd, const void *buf, \
359			    size_t nbyte, int pad, off_t offset); }
360; For some reason, ntp_gettime doesn't want to raise SIGSYS when it's excluded.
361175	COMPAT_30 	 { int sys_ntp_gettime(struct ntptimeval30 *ntvp); }
362#if defined(NTP) || !defined(_KERNEL)
363176	STD 		{ int sys_ntp_adjtime(struct timex *tp); }
364#else
365176	EXCL		ntp_adjtime
366#endif
367177	UNIMPL
368178	UNIMPL
369179	UNIMPL
370180	UNIMPL
371
372; Syscalls 180-199 are used by/reserved for BSD
373181	STD 		{ int sys_setgid(gid_t gid); }
374182	STD 		{ int sys_setegid(gid_t egid); }
375183	STD 		{ int sys_seteuid(uid_t euid); }
376#if defined(LFS) || !defined(_KERNEL)
377184	STD 		{ int sys_lfs_bmapv(fsid_t *fsidp, \
378			    struct block_info *blkiov, int blkcnt); }
379185	STD 		{ int sys_lfs_markv(fsid_t *fsidp, \
380			    struct block_info *blkiov, int blkcnt); }
381186	STD 		{ int sys_lfs_segclean(fsid_t *fsidp, u_long segment); }
382187	STD 		{ int sys_lfs_segwait(fsid_t *fsidp, \
383			    struct timeval *tv); }
384#else
385184	EXCL		lfs_bmapv
386185	EXCL		lfs_markv
387186	EXCL		lfs_segclean
388187	EXCL		lfs_segwait
389#endif
390188	COMPAT_12 	{ int sys_stat(const char *path, struct stat12 *ub); } \
391			    stat12
392189	COMPAT_12 	{ int sys_fstat(int fd, struct stat12 *sb); } fstat12
393190	COMPAT_12 	{ int sys_lstat(const char *path, \
394			    struct stat12 *ub); } lstat12
395191	STD 		{ long sys_pathconf(const char *path, int name); }
396192	STD 		{ long sys_fpathconf(int fd, int name); }
397193	UNIMPL
398194	STD 		{ int sys_getrlimit(int which, \
399			    struct rlimit *rlp); }
400195	STD 		{ int sys_setrlimit(int which, \
401			    const struct rlimit *rlp); }
402196	COMPAT_12 	{ int sys_getdirentries(int fd, char *buf, \
403			    u_int count, long *basep); }
404197	STD 		{ void *sys_mmap(void *addr, size_t len, int prot, \
405			    int flags, int fd, long pad, off_t pos); }
406198	INDIR		{ quad_t sys___syscall(quad_t code, \
407			    ... register_t args[SYS_MAXSYSARGS]); }
408199	STD 		{ off_t sys_lseek(int fd, int pad, off_t offset, \
409			    int whence); }
410200	STD 	 RUMP	{ int sys_truncate(const char *path, int pad, \
411			    off_t length); }
412201	STD 		{ int sys_ftruncate(int fd, int pad, off_t length); }
413202	STD	 RUMP 	{ int sys___sysctl(const int *name, u_int namelen, \
414			    void *old, size_t *oldlenp, const void *new, \
415			    size_t newlen); }
416203	STD 		{ int sys_mlock(const void *addr, size_t len); }
417204	STD 		{ int sys_munlock(const void *addr, size_t len); }
418205	STD 		{ int sys_undelete(const char *path); }
419206	STD 		{ int sys_futimes(int fd, \
420			    const struct timeval *tptr); }
421207	STD 		{ pid_t sys_getpgid(pid_t pid); }
422208	STD 		{ int sys_reboot(int opt, char *bootstr); }
423209	STD 		{ int sys_poll(struct pollfd *fds, u_int nfds, \
424			    int timeout); }
425;
426; Syscalls 210-219 are reserved for dynamically loaded syscalls
427;
428210	UNIMPL
429211	UNIMPL
430212	UNIMPL
431213	UNIMPL
432214	UNIMPL
433215	UNIMPL
434216	UNIMPL
435217	UNIMPL
436218	UNIMPL
437219	UNIMPL
438; System calls 220-300 are reserved for use by NetBSD
439#if defined(SYSVSEM) || !defined(_KERNEL)
440220	COMPAT_14 	{ int sys___semctl(int semid, int semnum, int cmd, \
441			    union __semun *arg); }
442221	STD 		{ int sys_semget(key_t key, int nsems, int semflg); }
443222	STD 		{ int sys_semop(int semid, struct sembuf *sops, \
444			    size_t nsops); }
445223	STD 		{ int sys_semconfig(int flag); }
446#else
447220	EXCL		compat_14_semctl
448221	EXCL		semget
449222	EXCL		semop
450223	EXCL		semconfig
451#endif
452#if defined(SYSVMSG) || !defined(_KERNEL)
453224	COMPAT_14 	{ int sys_msgctl(int msqid, int cmd, \
454			    struct msqid_ds14 *buf); }
455225	STD 		{ int sys_msgget(key_t key, int msgflg); }
456226	STD 		{ int sys_msgsnd(int msqid, const void *msgp, \
457			    size_t msgsz, int msgflg); }
458227	STD 		{ ssize_t sys_msgrcv(int msqid, void *msgp, \
459			    size_t msgsz, long msgtyp, int msgflg); }
460#else
461224	EXCL 		compat_14_msgctl
462225	EXCL 		msgget
463226	EXCL 		msgsnd
464227	EXCL 		msgrcv
465#endif
466#if defined(SYSVSHM) || !defined(_KERNEL)
467228	STD 		{ void *sys_shmat(int shmid, const void *shmaddr, \
468			    int shmflg); }
469229	COMPAT_14 	{ int sys_shmctl(int shmid, int cmd, \
470			    struct shmid_ds14 *buf); }
471230	STD 		{ int sys_shmdt(const void *shmaddr); }
472231	STD 		{ int sys_shmget(key_t key, size_t size, int shmflg); }
473#else
474228	EXCL		shmat
475229	EXCL		compat_14_shmctl
476230	EXCL		shmdt
477231	EXCL		shmget
478#endif
479232	STD 		{ int sys_clock_gettime(clockid_t clock_id, \
480			    struct timespec *tp); }
481233	STD 		{ int sys_clock_settime(clockid_t clock_id, \
482			    const struct timespec *tp); }
483234	STD 		{ int sys_clock_getres(clockid_t clock_id, \
484			    struct timespec *tp); }
485235	STD 		{ int sys_timer_create(clockid_t clock_id, \
486			    struct sigevent *evp, timer_t *timerid); }
487236	STD 		{ int sys_timer_delete(timer_t timerid); }
488237	STD 		{ int sys_timer_settime(timer_t timerid, int flags, \
489			    const struct itimerspec *value, \
490			    struct itimerspec *ovalue); }
491238	STD 		{ int sys_timer_gettime(timer_t timerid, struct \
492			    itimerspec *value); }
493239	STD 		{ int sys_timer_getoverrun(timer_t timerid); }
494;
495; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls
496;
497240	STD 		{ int sys_nanosleep(const struct timespec *rqtp, \
498			    struct timespec *rmtp); }
499241	STD 		{ int sys_fdatasync(int fd); }
500242	STD 		{ int sys_mlockall(int flags); }
501243	STD 		{ int sys_munlockall(void); }
502244	STD 		{ int sys___sigtimedwait(const sigset_t *set, \
503			    siginfo_t *info, \
504			    struct timespec *timeout); }
505245	UNIMPL		sys_sigqueue
506246	STD 	 	{ int sys_modctl(int cmd, void *arg); }
507247	STD MODULAR 	{ int sys__ksem_init(unsigned int value, semid_t *idp); }
508248	STD MODULAR 	{ int sys__ksem_open(const char *name, int oflag, \
509			    mode_t mode, unsigned int value, semid_t *idp); }
510249	STD MODULAR 	{ int sys__ksem_unlink(const char *name); }
511250	STD MODULAR 	{ int sys__ksem_close(semid_t id); }
512251	STD MODULAR 	{ int sys__ksem_post(semid_t id); }
513252	STD MODULAR 	{ int sys__ksem_wait(semid_t id); }
514253	STD MODULAR 	{ int sys__ksem_trywait(semid_t id); }
515254	STD MODULAR 	{ int sys__ksem_getvalue(semid_t id, \
516			    unsigned int *value); }
517255	STD MODULAR 	{ int sys__ksem_destroy(semid_t id); }
518256	UNIMPL		sys__ksem_timedwait
519257	STD 		{ mqd_t sys_mq_open(const char * name, int oflag, \
520			    mode_t mode, struct mq_attr *attr); }
521258	STD 		{ int sys_mq_close(mqd_t mqdes); }
522259	STD 		{ int sys_mq_unlink(const char *name); }
523260	STD 		{ int sys_mq_getattr(mqd_t mqdes, \
524			    struct mq_attr *mqstat); }
525261	STD 		{ int sys_mq_setattr(mqd_t mqdes, \
526			    const struct mq_attr *mqstat, \
527			    struct mq_attr *omqstat); }
528262	STD 		{ int sys_mq_notify(mqd_t mqdes, \
529			    const struct sigevent *notification); }
530263	STD 		{ int sys_mq_send(mqd_t mqdes, const char *msg_ptr, \
531			    size_t msg_len, unsigned msg_prio); }
532264	STD 		{ ssize_t sys_mq_receive(mqd_t mqdes, char *msg_ptr, \
533			    size_t msg_len, unsigned *msg_prio); }
534265	STD 		{ int sys_mq_timedsend(mqd_t mqdes, \
535			    const char *msg_ptr, size_t msg_len, \
536			    unsigned msg_prio, \
537			    const struct timespec *abs_timeout); }
538266	STD 		{ ssize_t sys_mq_timedreceive(mqd_t mqdes, \
539			    char *msg_ptr, size_t msg_len, unsigned *msg_prio, \
540			    const struct timespec *abs_timeout); }
541267	UNIMPL
542268	UNIMPL
543269	UNIMPL
544270	STD 		{ int sys___posix_rename(const char *from, \
545			    const char *to); }
546271	STD 		{ int sys_swapctl(int cmd, void *arg, int misc); }
547272	COMPAT_30 		{ int sys_getdents(int fd, char *buf, size_t count); }
548273	STD 		{ int sys_minherit(void *addr, size_t len, \
549			    int inherit); }
550274	STD 	 RUMP	{ int sys_lchmod(const char *path, mode_t mode); }
551275	STD 	 RUMP	{ int sys_lchown(const char *path, uid_t uid, \
552			    gid_t gid); }
553276	STD 	 RUMP	{ int sys_lutimes(const char *path, \
554			    const struct timeval *tptr); }
555277	STD 		{ int sys___msync13(void *addr, size_t len, int flags); }
556278	COMPAT_30 	{ int sys___stat13(const char *path, struct stat13 *ub); }
557279	COMPAT_30 	{ int sys___fstat13(int fd, struct stat13 *sb); }
558280	COMPAT_30 	{ int sys___lstat13(const char *path, struct stat13 *ub); }
559281	STD 		{ int sys___sigaltstack14( \
560			    const struct sigaltstack *nss, \
561			    struct sigaltstack *oss); }
562282	STD 		{ int sys___vfork14(void); }
563283	STD 		{ int sys___posix_chown(const char *path, uid_t uid, \
564			    gid_t gid); }
565284	STD 		{ int sys___posix_fchown(int fd, uid_t uid, \
566			    gid_t gid); }
567285	STD 		{ int sys___posix_lchown(const char *path, uid_t uid, \
568			    gid_t gid); }
569286	STD 		{ pid_t sys_getsid(pid_t pid); }
570287	STD 		{ pid_t sys___clone(int flags, void *stack); }
571288	STD 		{ int sys_fktrace(int fd, int ops, \
572			    int facs, int pid); }
573289	STD 		{ ssize_t sys_preadv(int fd, \
574			    const struct iovec *iovp, int iovcnt, \
575			    int pad, off_t offset); }
576290	STD 		{ ssize_t sys_pwritev(int fd, \
577			    const struct iovec *iovp, int iovcnt, \
578			    int pad, off_t offset); }
579291	COMPAT_16 	{ int sys___sigaction14(int signum, \
580			    const struct sigaction *nsa, \
581			    struct sigaction *osa); }
582292	STD 		{ int sys___sigpending14(sigset_t *set); }
583293	STD 		{ int sys___sigprocmask14(int how, \
584			    const sigset_t *set, \
585			    sigset_t *oset); }
586294	STD 		{ int sys___sigsuspend14(const sigset_t *set); }
587295	COMPAT_16 	{ int sys___sigreturn14(struct sigcontext *sigcntxp); }
588296	STD 		{ int sys___getcwd(char *bufp, size_t length); }
589297	STD 		{ int sys_fchroot(int fd); }
590298	COMPAT_30 	{ int sys_fhopen(const struct compat_30_fhandle *fhp, int flags); }
591299	COMPAT_30 	{ int sys_fhstat(const struct compat_30_fhandle *fhp, \
592			    struct stat13 *sb); }
593300	COMPAT_20 	{ int sys_fhstatfs(const struct compat_30_fhandle *fhp, \
594			    struct statfs12 *buf); }
595#if defined(SYSVSEM) || !defined(_KERNEL)
596301	STD 		{ int sys_____semctl13(int semid, int semnum, int cmd, \
597			    ... union __semun *arg); }
598#else
599301	EXCL		____semctl13
600#endif
601#if defined(SYSVMSG) || !defined(_KERNEL)
602302	STD 		{ int sys___msgctl13(int msqid, int cmd, \
603			    struct msqid_ds *buf); }
604#else
605302	EXCL		__msgctl13
606#endif
607#if defined(SYSVSHM) || !defined(_KERNEL)
608303	STD 		{ int sys___shmctl13(int shmid, int cmd, \
609			    struct shmid_ds *buf); }
610#else
611303	EXCL		__shmctl13
612#endif
613304	STD 	 RUMP	{ int sys_lchflags(const char *path, u_long flags); }
614305	STD 		{ int sys_issetugid(void); }
615306	STD 		{ int sys_utrace(const char *label, void *addr, \
616				size_t len); }
617307	STD 		{ int sys_getcontext(struct __ucontext *ucp); }
618308	STD 		{ int sys_setcontext(const struct __ucontext *ucp); }
619309	STD 		{ int sys__lwp_create(const struct __ucontext *ucp, \
620				u_long flags, lwpid_t *new_lwp); }
621310	STD 		{ int sys__lwp_exit(void); }
622311	STD 		{ lwpid_t sys__lwp_self(void); }
623312	STD 		{ int sys__lwp_wait(lwpid_t wait_for, \
624				lwpid_t *departed); }
625313	STD 		{ int sys__lwp_suspend(lwpid_t target); }
626314	STD 		{ int sys__lwp_continue(lwpid_t target); }
627315	STD 		{ int sys__lwp_wakeup(lwpid_t target); }
628316	STD 		{ void *sys__lwp_getprivate(void); }
629317	STD 		{ void sys__lwp_setprivate(void *ptr); }
630318	STD 		{ int sys__lwp_kill(lwpid_t target, int signo); }
631319	STD 		{ int sys__lwp_detach(lwpid_t target); }
632320	STD 		{ int sys__lwp_park(const struct timespec *ts, \
633				lwpid_t unpark, const void *hint, \
634				const void *unparkhint); }
635321	STD 		{ int sys__lwp_unpark(lwpid_t target, const void *hint); }
636322	STD 		{ ssize_t sys__lwp_unpark_all(const lwpid_t *targets, \
637				size_t ntargets, const void *hint); }
638323	STD 		{ int sys__lwp_setname(lwpid_t target, \
639				const char *name); }
640324	STD 		{ int sys__lwp_getname(lwpid_t target, \
641				char *name, size_t len); }
642325	STD 		{ int sys__lwp_ctl(int features, \
643				struct lwpctl **address); }
644; Syscalls 326-339 reserved for LWP syscalls.
645326	UNIMPL
646327	UNIMPL
647328	UNIMPL
648329	UNIMPL
649; SA system calls.
650330	STD 		{ int sys_sa_register(sa_upcall_t new, \
651				sa_upcall_t *old, int flags, \
652				ssize_t stackinfo_offset); }
653331	STD 		{ int sys_sa_stacks(int num, stack_t *stacks); }
654332	STD 		{ int sys_sa_enable(void); }
655333	STD 		{ int sys_sa_setconcurrency(int concurrency); }
656334	STD 		{ int sys_sa_yield(void); }
657335	STD 		{ int sys_sa_preempt(int sa_id); }
658336	OBSOL 		sys_sa_unblockyield
659;
660; Syscalls 337-339 are reserved for other scheduler activation syscalls.
661;
662337	UNIMPL
663338	UNIMPL
664339	UNIMPL
665340	STD 		{ int sys___sigaction_sigtramp(int signum, \
666			    const struct sigaction *nsa, \
667			    struct sigaction *osa, \
668			    const void *tramp, int vers); }
669341	STD 		{ int sys_pmc_get_info(int ctr, int op, void *args); }
670342	STD 		{ int sys_pmc_control(int ctr, int op, void *args); }
671343	STD 		{ int sys_rasctl(void *addr, size_t len, int op); }
672344	STD 		{ int sys_kqueue(void); }
673345	STD 		{ int sys_kevent(int fd, \
674			    const struct kevent *changelist, size_t nchanges, \
675			    struct kevent *eventlist, size_t nevents, \
676			    const struct timespec *timeout); }
677
678; Scheduling system calls.
679346	STD 		{ int sys__sched_setparam(pid_t pid, lwpid_t lid, \
680			    int policy, const struct sched_param *params); }
681347	STD 		{ int sys__sched_getparam(pid_t pid, lwpid_t lid, \
682			    int *policy, struct sched_param *params); }
683348	STD 		{ int sys__sched_setaffinity(pid_t pid, lwpid_t lid, \
684			    size_t size, const cpuset_t *cpuset); }
685349	STD 		{ int sys__sched_getaffinity(pid_t pid, lwpid_t lid, \
686			    size_t size, cpuset_t *cpuset); }
687350	STD 		{ int sys_sched_yield(void); }
688351	UNIMPL
689352	UNIMPL
690353	UNIMPL
691
692354	STD 		{ int sys_fsync_range(int fd, int flags, off_t start, \
693			    off_t length); }
694355	STD 		{ int sys_uuidgen(struct uuid *store, int count); }
695356	STD 		{ int sys_getvfsstat(struct statvfs *buf, \
696			    size_t bufsize, int flags); }
697357	STD 		{ int sys_statvfs1(const char *path, \
698			    struct statvfs *buf, int flags); }
699358	STD 		{ int sys_fstatvfs1(int fd, struct statvfs *buf, \
700			    int flags); }
701359	COMPAT_30 		{ int sys_fhstatvfs1(const struct compat_30_fhandle *fhp, \
702			    struct statvfs *buf, int flags); }
703360	STD 		{ int sys_extattrctl(const char *path, int cmd, \
704			    const char *filename, int attrnamespace, \
705			    const char *attrname); }
706361	STD 		{ int sys_extattr_set_file(const char *path, \
707			    int attrnamespace, const char *attrname, \
708			    const void *data, size_t nbytes); }
709362	STD 		{ ssize_t sys_extattr_get_file(const char *path, \
710			    int attrnamespace, const char *attrname, \
711			    void *data, size_t nbytes); }
712363	STD 		{ int sys_extattr_delete_file(const char *path, \
713			    int attrnamespace, const char *attrname); }
714364	STD 		{ int sys_extattr_set_fd(int fd, \
715			    int attrnamespace, const char *attrname, \
716			    const void *data, size_t nbytes); }
717365	STD 		{ ssize_t sys_extattr_get_fd(int fd, \
718			    int attrnamespace, const char *attrname, \
719			    void *data, size_t nbytes); }
720366	STD 		{ int sys_extattr_delete_fd(int fd, \
721			    int attrnamespace, const char *attrname); }
722367	STD 		{ int sys_extattr_set_link(const char *path, \
723			    int attrnamespace, const char *attrname, \
724			    const void *data, size_t nbytes); }
725368	STD 		{ ssize_t sys_extattr_get_link(const char *path, \
726			    int attrnamespace, const char *attrname, \
727			    void *data, size_t nbytes); }
728369	STD 		{ int sys_extattr_delete_link(const char *path, \
729			    int attrnamespace, const char *attrname); }
730370	STD 		{ ssize_t sys_extattr_list_fd(int fd, \
731			    int attrnamespace, void *data, size_t nbytes); }
732371	STD 		{ ssize_t sys_extattr_list_file(const char *path, \
733			    int attrnamespace, void *data, size_t nbytes); }
734372	STD 		{ ssize_t sys_extattr_list_link(const char *path, \
735			    int attrnamespace, void *data, size_t nbytes); }
736373	STD 		{ int sys_pselect(int nd, fd_set *in, fd_set *ou, \
737			    fd_set *ex, const struct timespec *ts, \
738			    const sigset_t *mask); }
739374	STD 		{ int sys_pollts(struct pollfd *fds, u_int nfds, \
740			    const struct timespec *ts, const sigset_t *mask); }
741375	STD 		{ int sys_setxattr(const char *path, \
742			    const char *name, void *value, size_t size, \
743			    int flags); }
744376	STD 		{ int sys_lsetxattr(const char *path, \
745			    const char *name, void *value, size_t size, \
746			    int flags); }
747377	STD 		{ int sys_fsetxattr(int fd, \
748			    const char *name, void *value, size_t size, \
749			    int flags); }
750378	STD 		{ int sys_getxattr(const char *path, \
751			    const char *name, void *value, size_t size); }
752379	STD 		{ int sys_lgetxattr(const char *path, \
753			    const char *name, void *value, size_t size); }
754380	STD 		{ int sys_fgetxattr(int fd, \
755			    const char *name, void *value, size_t size); }
756381	STD 		{ int sys_listxattr(const char *path, \
757			    char *list, size_t size); }
758382	STD 		{ int sys_llistxattr(const char *path, \
759			    char *list, size_t size); }
760383	STD 		{ int sys_flistxattr(int fd, \
761			    char *list, size_t size); }
762384	STD 		{ int sys_removexattr(const char *path, \
763			    const char *name); }
764385	STD 		{ int sys_lremovexattr(const char *path, \
765			    const char *name); }
766386	STD 		{ int sys_fremovexattr(int fd, \
767			    const char *name); }
768387	STD 	 RUMP	{ int sys___stat30(const char *path, struct stat *ub); }
769388	STD 		{ int sys___fstat30(int fd, struct stat *sb); }
770389	STD 	 RUMP	{ int sys___lstat30(const char *path, struct stat *ub); }
771390	STD 		{ int sys___getdents30(int fd, char *buf, size_t count); }
772391	IGNORED		old posix_fadvise
773392	COMPAT_30 	{ int sys___fhstat30(const struct compat_30_fhandle \
774			    *fhp, struct stat *sb); }
775393	STD 		{ int sys___ntp_gettime30(struct ntptimeval *ntvp); }
776394	STD	 RUMP	{ int sys___socket30(int domain, int type, int protocol); }
777395	STD 		{ int sys___getfh30(const char *fname, void *fhp, \
778			    size_t *fh_size); }
779396	STD 		{ int sys___fhopen40(const void *fhp, size_t fh_size,\
780			    int flags); }
781397	STD 		{ int sys___fhstatvfs140(const void *fhp, \
782			    size_t fh_size, struct statvfs *buf, int flags); }
783398	STD 		{ int sys___fhstat40(const void *fhp, \
784			    size_t fh_size, struct stat *sb); }
785
786; Asynchronous I/O system calls
787399	STD 		{ int sys_aio_cancel(int fildes, struct aiocb *aiocbp); }
788400	STD 		{ int sys_aio_error(const struct aiocb *aiocbp); }
789401	STD 		{ int sys_aio_fsync(int op, struct aiocb *aiocbp); }
790402	STD 		{ int sys_aio_read(struct aiocb *aiocbp); }
791403	STD 		{ int sys_aio_return(struct aiocb *aiocbp); }
792404	STD 		{ int sys_aio_suspend(const struct aiocb *const *list, \
793			    int nent, const struct timespec *timeout); }
794405	STD 		{ int sys_aio_write(struct aiocb *aiocbp); }
795406	STD 		{ int sys_lio_listio(int mode, struct aiocb *const *list, \
796			    int nent, struct sigevent *sig); }
797
798407	UNIMPL
799408	UNIMPL
800409	UNIMPL
801
802410	STD 		{ int sys___mount50(const char *type, \
803			    const char *path, int flags, void *data, \
804			    size_t data_len); }
805411	STD 		{ void *sys_mremap(void *old_address, size_t old_size, \
806			    void *new_address, size_t new_size, int flags); }
807
808; Processor-sets system calls
809412	STD 		{ int sys_pset_create(psetid_t *psid); }
810413	STD 		{ int sys_pset_destroy(psetid_t psid); }
811414	STD 		{ int sys_pset_assign(psetid_t psid, cpuid_t cpuid, \
812			    psetid_t *opsid); }
813415	STD 		{ int sys__pset_bind(idtype_t idtype, id_t first_id, \
814			    id_t second_id, psetid_t psid, psetid_t *opsid); }
815416	STD 		{ int sys___posix_fadvise50(int fd, int pad, \
816			    off_t offset, off_t len, int advice); }
817