syscalls.master revision 1.212
1	$NetBSD: syscalls.master,v 1.212 2008/11/12 12:36:16 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#include "opt_posix.h"
48
49#include "fs_lfs.h"
50#include "fs_nfs.h"
51
52#include <sys/param.h>
53#include <sys/systm.h>
54#include <sys/signal.h>
55#include <sys/mount.h>
56#include <sys/sched.h>
57#include <sys/syscallargs.h>
58
59%%
60
61; Reserved/unimplemented system calls in the range 0-150 inclusive
62; are reserved for use in future Berkeley releases.
63; Additional system calls implemented in vendor and other
64; redistributions should be placed in the reserved range at the end
65; of the current calls.
66
670	INDIR		{ int sys_syscall(int code, \
68			    ... register_t args[SYS_MAXSYSARGS]); }
691	STD 		{ void sys_exit(int rval); }
702	STD 		{ int sys_fork(void); }
713	STD 	 RUMP	{ ssize_t sys_read(int fd, void *buf, size_t nbyte); }
724	STD 	 RUMP	{ ssize_t sys_write(int fd, const void *buf, \
73			    size_t nbyte); }
745	STD 	 RUMP	{ int sys_open(const char *path, \
75			    int flags, ... mode_t mode); }
766	STD 	 RUMP	{ int sys_close(int fd); }
777	STD 		{ int sys_wait4(int pid, int *status, int options, \
78			    struct rusage *rusage); }
798	COMPAT_43 	{ int sys_creat(const char *path, mode_t mode); } ocreat
809	STD 	 RUMP	{ int sys_link(const char *path, const char *link); }
8110	STD 	 RUMP	{ int sys_unlink(const char *path); }
8211	OBSOL		execv
8312	STD 	 RUMP	{ int sys_chdir(const char *path); }
8413	STD 	 RUMP	{ int sys_fchdir(int fd); }
8514	STD 	 RUMP	{ int sys_mknod(const char *path, mode_t mode, \
86			    dev_t dev); }
8715	STD 	 RUMP	{ int sys_chmod(const char *path, mode_t mode); }
8816	STD 	 RUMP	{ int sys_chown(const char *path, uid_t uid, \
89			    gid_t gid); }
9017	STD 		{ int sys_obreak(char *nsize); } break
9118	COMPAT_20 	{ int sys_getfsstat(struct statfs12 *buf, \
92			    long bufsize, int flags); }
9319	COMPAT_43 	{ long sys_lseek(int fd, long offset, int whence); } \
94			    olseek
95#ifdef COMPAT_43
9620	STD 		{ pid_t sys_getpid_with_ppid(void); } getpid
97#else
9820	STD 		{ pid_t sys_getpid(void); }
99#endif
10021	COMPAT_40 	{ int sys_mount(const char *type, const char *path, \
101			    int flags, void *data); }
10222	STD 	 RUMP	{ int sys_unmount(const char *path, int flags); }
10323	STD 		{ int sys_setuid(uid_t uid); }
104#ifdef COMPAT_43
10524	STD 		{ uid_t sys_getuid_with_euid(void); } getuid
106#else
10724	STD 		{ uid_t sys_getuid(void); }
108#endif
10925	STD 		{ uid_t sys_geteuid(void); }
11026	STD 		{ int sys_ptrace(int req, pid_t pid, void *addr, \
111			    int data); }
11227	STD 		{ ssize_t sys_recvmsg(int s, struct msghdr *msg, \
113			    int flags); }
11428	STD 		{ ssize_t sys_sendmsg(int s, \
115			    const struct msghdr *msg, int flags); }
11629	STD 		{ ssize_t sys_recvfrom(int s, void *buf, size_t len, \
117			    int flags, struct sockaddr *from, \
118			    unsigned int *fromlenaddr); }
11930	STD		{ int sys_accept(int s, struct sockaddr *name, \
120			    unsigned int *anamelen); }
12131	STD		{ int sys_getpeername(int fdes, struct sockaddr *asa, \
122			    unsigned int *alen); }
12332	STD		{ int sys_getsockname(int fdes, struct sockaddr *asa, \
124			    unsigned int *alen); }
12533	STD 		{ int sys_access(const char *path, int flags); }
12634	STD 	 RUMP	{ int sys_chflags(const char *path, u_long flags); }
12735	STD 		{ int sys_fchflags(int fd, u_long flags); }
12836	STD 	 RUMP	{ void sys_sync(void); }
12937	STD 		{ int sys_kill(int pid, int signum); }
13038	COMPAT_43 	{ int sys_stat(const char *path, struct stat43 *ub); } \
131			    stat43
13239	STD 		{ pid_t sys_getppid(void); }
13340	COMPAT_43 	{ int sys_lstat(const char *path, \
134			    struct stat43 *ub); } lstat43
13541	STD 		{ int sys_dup(int fd); }
13642	STD 		{ int sys_pipe(void); }
13743	STD 		{ gid_t sys_getegid(void); }
13844	STD 		{ int sys_profil(char *samples, size_t size, \
139			    u_long offset, u_int scale); }
14045	STD 		{ int sys_ktrace(const char *fname, int ops, \
141			    int facs, int pid); }
14246	COMPAT_13 	{ int sys_sigaction(int signum, \
143			    const struct sigaction13 *nsa, \
144			    struct sigaction13 *osa); } sigaction13
145#ifdef COMPAT_43
14647	STD 		{ gid_t sys_getgid_with_egid(void); } getgid
147#else
14847	STD 		{ gid_t sys_getgid(void); }
149#endif
15048	COMPAT_13 	{ int sys_sigprocmask(int how, \
151			    int mask); } sigprocmask13
15249	STD 		{ int sys___getlogin(char *namebuf, size_t namelen); }
15350	STD 	 	{ int sys___setlogin(const char *namebuf); }
15451	STD 		{ int sys_acct(const char *path); }
15552	COMPAT_13 	{ int sys_sigpending(void); } sigpending13
15653	COMPAT_13 	{ int sys_sigaltstack( \
157			    const struct sigaltstack13 *nss, \
158			    struct sigaltstack13 *oss); } sigaltstack13
15954	STD	RUMP	{ int sys_ioctl(int fd, \
160			    u_long com, ... void *data); }
16155	COMPAT_12 	{ int sys_reboot(int opt); } oreboot
16256	STD 		{ int sys_revoke(const char *path); }
16357	STD 	 RUMP	{ int sys_symlink(const char *path, \
164			    const char *link); }
16558	STD 	 RUMP	{ ssize_t sys_readlink(const char *path, char *buf, \
166			    size_t count); }
16759	STD 		{ int sys_execve(const char *path, \
168			    char * const *argp, char * const *envp); }
16960	STD 		{ mode_t sys_umask(mode_t newmask); }
17061	STD 		{ int sys_chroot(const char *path); }
17162	COMPAT_43 	{ int sys_fstat(int fd, struct stat43 *sb); } fstat43
17263	COMPAT_43 	{ int sys_getkerninfo(int op, char *where, int *size, \
173			    int arg); } ogetkerninfo
17464	COMPAT_43 	 { int sys_getpagesize(void); } ogetpagesize
17565	COMPAT_12 	 { int sys_msync(void *addr, size_t len); }
176; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)?
17766	STD 		{ int sys_vfork(void); }
17867	OBSOL		vread
17968	OBSOL		vwrite
18069	STD 		{ int sys_sbrk(intptr_t incr); }
18170	STD 		{ int sys_sstk(int incr); }
18271	COMPAT_43 	{ int sys_mmap(void *addr, size_t len, int prot, \
183			    int flags, int fd, long pos); } ommap
18472	STD 		{ int sys_ovadvise(int anom); } vadvise
18573	STD 		{ int sys_munmap(void *addr, size_t len); }
18674	STD 		{ int sys_mprotect(void *addr, size_t len, \
187			    int prot); }
18875	STD 		{ int sys_madvise(void *addr, size_t len, \
189			    int behav); }
19076	OBSOL		vhangup
19177	OBSOL		vlimit
19278	STD 		{ int sys_mincore(void *addr, size_t len, \
193			    char *vec); }
19479	STD 		{ int sys_getgroups(int gidsetsize, \
195			    gid_t *gidset); }
19680	STD 		{ int sys_setgroups(int gidsetsize, \
197			    const gid_t *gidset); }
19881	STD 	 	{ int sys_getpgrp(void); }
19982	STD 		{ int sys_setpgid(int pid, int pgid); }
20083	STD 		{ int sys_setitimer(int which, \
201			    const struct itimerval *itv, \
202			    struct itimerval *oitv); }
20384	COMPAT_43 	{ int sys_wait(void); } owait
20485	COMPAT_12 	{ int sys_swapon(const char *name); } oswapon
20586	STD 		{ int sys_getitimer(int which, \
206			    struct itimerval *itv); }
20787	COMPAT_43 	{ int sys_gethostname(char *hostname, u_int len); } \
208			    ogethostname
20988	COMPAT_43 	{ int sys_sethostname(char *hostname, u_int len); } \
210			    osethostname
21189	COMPAT_43 	{ int sys_getdtablesize(void); } ogetdtablesize
21290	STD 		{ int sys_dup2(int from, int to); }
21391	UNIMPL		getdopt
21492	STD 		{ int sys_fcntl(int fd, int cmd, ... void *arg); }
21593	STD 		{ int sys_select(int nd, fd_set *in, fd_set *ou, \
216			    fd_set *ex, struct timeval *tv); }
21794	UNIMPL		setdopt
21895	STD	RUMP 	{ int sys_fsync(int fd); }
21996	STD 		{ int sys_setpriority(int which, id_t who, int prio); }
22097	COMPAT_30	{ int sys_socket(int domain, int type, int protocol); }
22198	STD	RUMP	{ int sys_connect(int s, const struct sockaddr *name, \
222			    unsigned int namelen); }
22399	COMPAT_43	{ int sys_accept(int s, void *name, \
224			    int *anamelen); } oaccept
225100	STD 		{ int sys_getpriority(int which, id_t who); }
226101	COMPAT_43 	{ int sys_send(int s, void *buf, int len, \
227			    int flags); } osend
228102	COMPAT_43 	{ int sys_recv(int s, void *buf, int len, \
229			    int flags); } orecv
230103	COMPAT_13 	{ int sys_sigreturn(struct sigcontext13 *sigcntxp); } \
231			    sigreturn13
232104	STD		{ int sys_bind(int s, const struct sockaddr *name, \
233			    unsigned int namelen); }
234105	STD	RUMP	{ int sys_setsockopt(int s, int level, int name, \
235			    const void *val, unsigned int valsize); }
236106	STD		{ int sys_listen(int s, int backlog); }
237107	OBSOL		vtimes
238108	COMPAT_43 	{ int sys_sigvec(int signum, struct sigvec *nsv, \
239			    struct sigvec *osv); } osigvec
240109	COMPAT_43 	{ int sys_sigblock(int mask); } osigblock
241110	COMPAT_43 	{ int sys_sigsetmask(int mask); } osigsetmask
242111	COMPAT_13 	{ int sys_sigsuspend(int mask); } sigsuspend13
243112	COMPAT_43 	{ int sys_sigstack(struct sigstack *nss, \
244			    struct sigstack *oss); } osigstack
245113	COMPAT_43 	{ int sys_recvmsg(int s, struct omsghdr *msg, \
246			    int flags); } orecvmsg
247114	COMPAT_43 	{ int sys_sendmsg(int s, void *msg, int flags); } \
248			    osendmsg
249115	OBSOL		vtrace
250116	STD 		{ int sys_gettimeofday(struct timeval *tp, \
251			    void *tzp); }
252117	STD 		{ int sys_getrusage(int who, struct rusage *rusage); }
253118	STD	RUMP	{ int sys_getsockopt(int s, int level, int name, \
254			    void *val, unsigned int *avalsize); }
255119	OBSOL		resuba
256120	STD 		{ ssize_t sys_readv(int fd, \
257			    const struct iovec *iovp, int iovcnt); }
258121	STD 		{ ssize_t sys_writev(int fd, \
259			    const struct iovec *iovp, int iovcnt); }
260122	STD 		{ int sys_settimeofday(const struct timeval *tv, \
261			    const void *tzp); }
262123	STD 		{ int sys_fchown(int fd, uid_t uid, gid_t gid); }
263124	STD 		{ int sys_fchmod(int fd, mode_t mode); }
264125	COMPAT_43 	{ int sys_recvfrom(int s, void *buf, size_t len, \
265			    int flags, void *from, int *fromlenaddr); } \
266			    orecvfrom
267126	STD 		{ int sys_setreuid(uid_t ruid, uid_t euid); }
268127	STD 		{ int sys_setregid(gid_t rgid, gid_t egid); }
269128	STD 	 RUMP	{ int sys_rename(const char *from, const char *to); }
270129	COMPAT_43 	{ int sys_truncate(const char *path, long length); } \
271			    otruncate
272130	COMPAT_43 	{ int sys_ftruncate(int fd, long length); } oftruncate
273131	STD 		{ int sys_flock(int fd, int how); }
274132	STD 	 RUMP	{ int sys_mkfifo(const char *path, mode_t mode); }
275133	STD 		{ ssize_t sys_sendto(int s, const void *buf, \
276			    size_t len, int flags, const struct sockaddr *to, \
277			    unsigned int tolen); }
278134	STD		{ int sys_shutdown(int s, int how); }
279135	STD		{ int sys_socketpair(int domain, int type, \
280			    int protocol, int *rsv); }
281136	STD 	 RUMP	{ int sys_mkdir(const char *path, mode_t mode); }
282137	STD 	 RUMP	{ int sys_rmdir(const char *path); }
283138	STD 	 RUMP	{ int sys_utimes(const char *path, \
284			    const struct timeval *tptr); }
285139	OBSOL		4.2 sigreturn
286140	STD 		{ int sys_adjtime(const struct timeval *delta, \
287			    struct timeval *olddelta); }
288141	COMPAT_43	{ int sys_getpeername(int fdes, void *asa, \
289			    int *alen); } ogetpeername
290142	COMPAT_43 	{ int32_t sys_gethostid(void); } ogethostid
291143	COMPAT_43 	{ int sys_sethostid(int32_t hostid); } osethostid
292144	COMPAT_43 	{ int sys_getrlimit(int which, \
293			    struct orlimit *rlp); } ogetrlimit
294145	COMPAT_43 	{ int sys_setrlimit(int which, \
295			    const struct orlimit *rlp); } osetrlimit
296146	COMPAT_43 	{ int sys_killpg(int pgid, int signum); } okillpg
297147	STD 	 	{ int sys_setsid(void); }
298148	STD 		{ int sys_quotactl(const char *path, int cmd, \
299			    int uid, void *arg); }
300149	COMPAT_43 	{ int sys_quota(void); } oquota
301150	COMPAT_43	{ int sys_getsockname(int fdec, void *asa, \
302			    int *alen); } ogetsockname
303
304; Syscalls 151-180 inclusive are reserved for vendor-specific
305; system calls.  (This includes various calls added for compatibity
306; with other Unix variants.)
307; Some of these calls are now supported by BSD...
308151	UNIMPL
309152	UNIMPL
310153	UNIMPL
311154	UNIMPL
312#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL)
313155	STD 		{ int sys_nfssvc(int flag, void *argp); }
314#else
315155	EXCL		nfssvc
316#endif
317156	COMPAT_43 	 { int sys_getdirentries(int fd, char *buf, \
318			    u_int count, long *basep); } ogetdirentries
319157	COMPAT_20 	{ int sys_statfs(const char *path, \
320			    struct statfs12 *buf); }
321158	COMPAT_20 	{ int sys_fstatfs(int fd, struct statfs12 *buf); }
322159	UNIMPL
323160	UNIMPL
324161	COMPAT_30 	 { int sys_getfh(const char *fname, \
325			    struct compat_30_fhandle *fhp); }
326162	COMPAT_09 	 { int sys_getdomainname(char *domainname, int len); } \
327			    ogetdomainname
328163	COMPAT_09 	 { int sys_setdomainname(char *domainname, int len); } \
329			    osetdomainname
330164	COMPAT_09 		{ int sys_uname(struct outsname *name); } ouname
331165	STD 		{ int sys_sysarch(int op, void *parms); }
332166	UNIMPL
333167	UNIMPL
334168	UNIMPL
335; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
336#if (defined(SYSVSEM) || !defined(_KERNEL)) && !defined(_LP64)
337169	COMPAT_10 	{ int sys_semsys(int which, int a2, int a3, int a4, \
338			    int a5); } osemsys
339#else
340169	EXCL		1.0 semsys
341#endif
342; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
343#if (defined(SYSVMSG) || !defined(_KERNEL)) && !defined(_LP64)
344170	COMPAT_10 	{ int sys_msgsys(int which, int a2, int a3, int a4, \
345			    int a5, int a6); } omsgsys
346#else
347170	EXCL		1.0 msgsys
348#endif
349; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
350#if (defined(SYSVSHM) || !defined(_KERNEL)) && !defined(_LP64)
351171	COMPAT_10 		{ int sys_shmsys(int which, int a2, int a3, int a4); } \
352			    oshmsys
353#else
354171	EXCL		1.0 shmsys
355#endif
356172	UNIMPL
357173	STD 	 RUMP	{ ssize_t sys_pread(int fd, void *buf, \
358			    size_t nbyte, int pad, off_t offset); }
359174	STD 	 RUMP	{ ssize_t sys_pwrite(int fd, const void *buf, \
360			    size_t nbyte, int pad, off_t offset); }
361; For some reason, ntp_gettime doesn't want to raise SIGSYS when it's excluded.
362175	COMPAT_30 	 { int sys_ntp_gettime(struct ntptimeval30 *ntvp); }
363#if defined(NTP) || !defined(_KERNEL)
364176	STD 		{ int sys_ntp_adjtime(struct timex *tp); }
365#else
366176	EXCL		ntp_adjtime
367#endif
368177	UNIMPL
369178	UNIMPL
370179	UNIMPL
371180	UNIMPL
372
373; Syscalls 180-199 are used by/reserved for BSD
374181	STD 		{ int sys_setgid(gid_t gid); }
375182	STD 		{ int sys_setegid(gid_t egid); }
376183	STD 		{ int sys_seteuid(uid_t euid); }
377#if defined(LFS) || !defined(_KERNEL)
378184	STD 		{ int sys_lfs_bmapv(fsid_t *fsidp, \
379			    struct block_info *blkiov, int blkcnt); }
380185	STD 		{ int sys_lfs_markv(fsid_t *fsidp, \
381			    struct block_info *blkiov, int blkcnt); }
382186	STD 		{ int sys_lfs_segclean(fsid_t *fsidp, u_long segment); }
383187	STD 		{ int sys_lfs_segwait(fsid_t *fsidp, \
384			    struct timeval *tv); }
385#else
386184	EXCL		lfs_bmapv
387185	EXCL		lfs_markv
388186	EXCL		lfs_segclean
389187	EXCL		lfs_segwait
390#endif
391188	COMPAT_12 	{ int sys_stat(const char *path, struct stat12 *ub); } \
392			    stat12
393189	COMPAT_12 	{ int sys_fstat(int fd, struct stat12 *sb); } fstat12
394190	COMPAT_12 	{ int sys_lstat(const char *path, \
395			    struct stat12 *ub); } lstat12
396191	STD 		{ long sys_pathconf(const char *path, int name); }
397192	STD 		{ long sys_fpathconf(int fd, int name); }
398193	UNIMPL
399194	STD 		{ int sys_getrlimit(int which, \
400			    struct rlimit *rlp); }
401195	STD 		{ int sys_setrlimit(int which, \
402			    const struct rlimit *rlp); }
403196	COMPAT_12 	{ int sys_getdirentries(int fd, char *buf, \
404			    u_int count, long *basep); }
405197	STD 		{ void *sys_mmap(void *addr, size_t len, int prot, \
406			    int flags, int fd, long pad, off_t pos); }
407198	INDIR		{ quad_t sys___syscall(quad_t code, \
408			    ... register_t args[SYS_MAXSYSARGS]); }
409199	STD 		{ off_t sys_lseek(int fd, int pad, off_t offset, \
410			    int whence); }
411200	STD 	 RUMP	{ int sys_truncate(const char *path, int pad, \
412			    off_t length); }
413201	STD 		{ int sys_ftruncate(int fd, int pad, off_t length); }
414202	STD	 RUMP 	{ int sys___sysctl(const int *name, u_int namelen, \
415			    void *old, size_t *oldlenp, const void *new, \
416			    size_t newlen); }
417203	STD 		{ int sys_mlock(const void *addr, size_t len); }
418204	STD 		{ int sys_munlock(const void *addr, size_t len); }
419205	STD 		{ int sys_undelete(const char *path); }
420206	STD 		{ int sys_futimes(int fd, \
421			    const struct timeval *tptr); }
422207	STD 		{ pid_t sys_getpgid(pid_t pid); }
423208	STD 		{ int sys_reboot(int opt, char *bootstr); }
424209	STD 		{ int sys_poll(struct pollfd *fds, u_int nfds, \
425			    int timeout); }
426;
427; Syscalls 210-219 are reserved for dynamically loaded syscalls
428;
429210	UNIMPL
430211	UNIMPL
431212	UNIMPL
432213	UNIMPL
433214	UNIMPL
434215	UNIMPL
435216	UNIMPL
436217	UNIMPL
437218	UNIMPL
438219	UNIMPL
439; System calls 220-300 are reserved for use by NetBSD
440#if defined(SYSVSEM) || !defined(_KERNEL)
441220	COMPAT_14 	{ int sys___semctl(int semid, int semnum, int cmd, \
442			    union __semun *arg); }
443221	STD 		{ int sys_semget(key_t key, int nsems, int semflg); }
444222	STD 		{ int sys_semop(int semid, struct sembuf *sops, \
445			    size_t nsops); }
446223	STD 		{ int sys_semconfig(int flag); }
447#else
448220	EXCL		compat_14_semctl
449221	EXCL		semget
450222	EXCL		semop
451223	EXCL		semconfig
452#endif
453#if defined(SYSVMSG) || !defined(_KERNEL)
454224	COMPAT_14 	{ int sys_msgctl(int msqid, int cmd, \
455			    struct msqid_ds14 *buf); }
456225	STD 		{ int sys_msgget(key_t key, int msgflg); }
457226	STD 		{ int sys_msgsnd(int msqid, const void *msgp, \
458			    size_t msgsz, int msgflg); }
459227	STD 		{ ssize_t sys_msgrcv(int msqid, void *msgp, \
460			    size_t msgsz, long msgtyp, int msgflg); }
461#else
462224	EXCL 		compat_14_msgctl
463225	EXCL 		msgget
464226	EXCL 		msgsnd
465227	EXCL 		msgrcv
466#endif
467#if defined(SYSVSHM) || !defined(_KERNEL)
468228	STD 		{ void *sys_shmat(int shmid, const void *shmaddr, \
469			    int shmflg); }
470229	COMPAT_14 	{ int sys_shmctl(int shmid, int cmd, \
471			    struct shmid_ds14 *buf); }
472230	STD 		{ int sys_shmdt(const void *shmaddr); }
473231	STD 		{ int sys_shmget(key_t key, size_t size, int shmflg); }
474#else
475228	EXCL		shmat
476229	EXCL		compat_14_shmctl
477230	EXCL		shmdt
478231	EXCL		shmget
479#endif
480232	STD 		{ int sys_clock_gettime(clockid_t clock_id, \
481			    struct timespec *tp); }
482233	STD 		{ int sys_clock_settime(clockid_t clock_id, \
483			    const struct timespec *tp); }
484234	STD 		{ int sys_clock_getres(clockid_t clock_id, \
485			    struct timespec *tp); }
486235	STD 		{ int sys_timer_create(clockid_t clock_id, \
487			    struct sigevent *evp, timer_t *timerid); }
488236	STD 		{ int sys_timer_delete(timer_t timerid); }
489237	STD 		{ int sys_timer_settime(timer_t timerid, int flags, \
490			    const struct itimerspec *value, \
491			    struct itimerspec *ovalue); }
492238	STD 		{ int sys_timer_gettime(timer_t timerid, struct \
493			    itimerspec *value); }
494239	STD 		{ int sys_timer_getoverrun(timer_t timerid); }
495;
496; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls
497;
498240	STD 		{ int sys_nanosleep(const struct timespec *rqtp, \
499			    struct timespec *rmtp); }
500241	STD 		{ int sys_fdatasync(int fd); }
501242	STD 		{ int sys_mlockall(int flags); }
502243	STD 		{ int sys_munlockall(void); }
503244	STD 		{ int sys___sigtimedwait(const sigset_t *set, \
504			    siginfo_t *info, \
505			    struct timespec *timeout); }
506245	UNIMPL		sys_sigqueue
507246	STD 		{ int sys_modctl(int cmd, void *arg); }
508#if defined(P1003_1B_SEMAPHORE) || (!defined(_KERNEL) && defined(_LIBC))
509247	STD 		{ int sys__ksem_init(unsigned int value, semid_t *idp); }
510248	STD 		{ int sys__ksem_open(const char *name, int oflag, \
511			    mode_t mode, unsigned int value, semid_t *idp); }
512249	STD 		{ int sys__ksem_unlink(const char *name); }
513250	STD 		{ int sys__ksem_close(semid_t id); }
514251	STD 		{ int sys__ksem_post(semid_t id); }
515252	STD 		{ int sys__ksem_wait(semid_t id); }
516253	STD 		{ int sys__ksem_trywait(semid_t id); }
517254	STD 		{ int sys__ksem_getvalue(semid_t id, \
518			    unsigned int *value); }
519255	STD 		{ int sys__ksem_destroy(semid_t id); }
520256	UNIMPL		sys__ksem_timedwait
521#else
522247	EXCL		sys__ksem_init
523248	EXCL		sys__ksem_open
524249	EXCL 		sys__ksem_unlink
525250	EXCL		sys__ksem_close
526251	EXCL		sys__ksem_post
527252	EXCL		sys__ksem_wait
528253	EXCL		sys__ksem_trywait
529254	EXCL		sys__ksem_getvalue
530255	EXCL		sys__ksem_destroy
531256	UNIMPL		sys__ksem_timedwait
532#endif
533257	STD 		{ mqd_t sys_mq_open(const char * name, int oflag, \
534			    mode_t mode, struct mq_attr *attr); }
535258	STD 		{ int sys_mq_close(mqd_t mqdes); }
536259	STD 		{ int sys_mq_unlink(const char *name); }
537260	STD 		{ int sys_mq_getattr(mqd_t mqdes, \
538			    struct mq_attr *mqstat); }
539261	STD 		{ int sys_mq_setattr(mqd_t mqdes, \
540			    const struct mq_attr *mqstat, \
541			    struct mq_attr *omqstat); }
542262	STD 		{ int sys_mq_notify(mqd_t mqdes, \
543			    const struct sigevent *notification); }
544263	STD 		{ int sys_mq_send(mqd_t mqdes, const char *msg_ptr, \
545			    size_t msg_len, unsigned msg_prio); }
546264	STD 		{ ssize_t sys_mq_receive(mqd_t mqdes, char *msg_ptr, \
547			    size_t msg_len, unsigned *msg_prio); }
548265	STD 		{ int sys_mq_timedsend(mqd_t mqdes, \
549			    const char *msg_ptr, size_t msg_len, \
550			    unsigned msg_prio, \
551			    const struct timespec *abs_timeout); }
552266	STD 		{ ssize_t sys_mq_timedreceive(mqd_t mqdes, \
553			    char *msg_ptr, size_t msg_len, unsigned *msg_prio, \
554			    const struct timespec *abs_timeout); }
555267	UNIMPL
556268	UNIMPL
557269	UNIMPL
558270	STD 		{ int sys___posix_rename(const char *from, \
559			    const char *to); }
560271	STD 		{ int sys_swapctl(int cmd, void *arg, int misc); }
561272	COMPAT_30 		{ int sys_getdents(int fd, char *buf, size_t count); }
562273	STD 		{ int sys_minherit(void *addr, size_t len, \
563			    int inherit); }
564274	STD 	 RUMP	{ int sys_lchmod(const char *path, mode_t mode); }
565275	STD 	 RUMP	{ int sys_lchown(const char *path, uid_t uid, \
566			    gid_t gid); }
567276	STD 	 RUMP	{ int sys_lutimes(const char *path, \
568			    const struct timeval *tptr); }
569277	STD 		{ int sys___msync13(void *addr, size_t len, int flags); }
570278	COMPAT_30 	{ int sys___stat13(const char *path, struct stat13 *ub); }
571279	COMPAT_30 	{ int sys___fstat13(int fd, struct stat13 *sb); }
572280	COMPAT_30 	{ int sys___lstat13(const char *path, struct stat13 *ub); }
573281	STD 		{ int sys___sigaltstack14( \
574			    const struct sigaltstack *nss, \
575			    struct sigaltstack *oss); }
576282	STD 		{ int sys___vfork14(void); }
577283	STD 		{ int sys___posix_chown(const char *path, uid_t uid, \
578			    gid_t gid); }
579284	STD 		{ int sys___posix_fchown(int fd, uid_t uid, \
580			    gid_t gid); }
581285	STD 		{ int sys___posix_lchown(const char *path, uid_t uid, \
582			    gid_t gid); }
583286	STD 		{ pid_t sys_getsid(pid_t pid); }
584287	STD 		{ pid_t sys___clone(int flags, void *stack); }
585288	STD 		{ int sys_fktrace(int fd, int ops, \
586			    int facs, int pid); }
587289	STD 		{ ssize_t sys_preadv(int fd, \
588			    const struct iovec *iovp, int iovcnt, \
589			    int pad, off_t offset); }
590290	STD 		{ ssize_t sys_pwritev(int fd, \
591			    const struct iovec *iovp, int iovcnt, \
592			    int pad, off_t offset); }
593291	COMPAT_16 	{ int sys___sigaction14(int signum, \
594			    const struct sigaction *nsa, \
595			    struct sigaction *osa); }
596292	STD 		{ int sys___sigpending14(sigset_t *set); }
597293	STD 		{ int sys___sigprocmask14(int how, \
598			    const sigset_t *set, \
599			    sigset_t *oset); }
600294	STD 		{ int sys___sigsuspend14(const sigset_t *set); }
601295	COMPAT_16 	{ int sys___sigreturn14(struct sigcontext *sigcntxp); }
602296	STD 		{ int sys___getcwd(char *bufp, size_t length); }
603297	STD 		{ int sys_fchroot(int fd); }
604298	COMPAT_30 	{ int sys_fhopen(const struct compat_30_fhandle *fhp, int flags); }
605299	COMPAT_30 	{ int sys_fhstat(const struct compat_30_fhandle *fhp, \
606			    struct stat13 *sb); }
607300	COMPAT_20 	{ int sys_fhstatfs(const struct compat_30_fhandle *fhp, \
608			    struct statfs12 *buf); }
609#if defined(SYSVSEM) || !defined(_KERNEL)
610301	STD 		{ int sys_____semctl13(int semid, int semnum, int cmd, \
611			    ... union __semun *arg); }
612#else
613301	EXCL		____semctl13
614#endif
615#if defined(SYSVMSG) || !defined(_KERNEL)
616302	STD 		{ int sys___msgctl13(int msqid, int cmd, \
617			    struct msqid_ds *buf); }
618#else
619302	EXCL		__msgctl13
620#endif
621#if defined(SYSVSHM) || !defined(_KERNEL)
622303	STD 		{ int sys___shmctl13(int shmid, int cmd, \
623			    struct shmid_ds *buf); }
624#else
625303	EXCL		__shmctl13
626#endif
627304	STD 	 RUMP	{ int sys_lchflags(const char *path, u_long flags); }
628305	STD 		{ int sys_issetugid(void); }
629306	STD 		{ int sys_utrace(const char *label, void *addr, \
630				size_t len); }
631307	STD 		{ int sys_getcontext(struct __ucontext *ucp); }
632308	STD 		{ int sys_setcontext(const struct __ucontext *ucp); }
633309	STD 		{ int sys__lwp_create(const struct __ucontext *ucp, \
634				u_long flags, lwpid_t *new_lwp); }
635310	STD 		{ int sys__lwp_exit(void); }
636311	STD 		{ lwpid_t sys__lwp_self(void); }
637312	STD 		{ int sys__lwp_wait(lwpid_t wait_for, \
638				lwpid_t *departed); }
639313	STD 		{ int sys__lwp_suspend(lwpid_t target); }
640314	STD 		{ int sys__lwp_continue(lwpid_t target); }
641315	STD 		{ int sys__lwp_wakeup(lwpid_t target); }
642316	STD 		{ void *sys__lwp_getprivate(void); }
643317	STD 		{ void sys__lwp_setprivate(void *ptr); }
644318	STD 		{ int sys__lwp_kill(lwpid_t target, int signo); }
645319	STD 		{ int sys__lwp_detach(lwpid_t target); }
646320	STD 		{ int sys__lwp_park(const struct timespec *ts, \
647				lwpid_t unpark, const void *hint, \
648				const void *unparkhint); }
649321	STD 		{ int sys__lwp_unpark(lwpid_t target, const void *hint); }
650322	STD 		{ ssize_t sys__lwp_unpark_all(const lwpid_t *targets, \
651				size_t ntargets, const void *hint); }
652323	STD 		{ int sys__lwp_setname(lwpid_t target, \
653				const char *name); }
654324	STD 		{ int sys__lwp_getname(lwpid_t target, \
655				char *name, size_t len); }
656325	STD 		{ int sys__lwp_ctl(int features, \
657				struct lwpctl **address); }
658; Syscalls 326-339 reserved for LWP syscalls.
659326	UNIMPL
660327	UNIMPL
661328	UNIMPL
662329	UNIMPL
663; SA system calls.
664330	STD 		{ int sys_sa_register(sa_upcall_t new, \
665				sa_upcall_t *old, int flags, \
666				ssize_t stackinfo_offset); }
667331	STD 		{ int sys_sa_stacks(int num, stack_t *stacks); }
668332	STD 		{ int sys_sa_enable(void); }
669333	STD 		{ int sys_sa_setconcurrency(int concurrency); }
670334	STD 		{ int sys_sa_yield(void); }
671335	STD 		{ int sys_sa_preempt(int sa_id); }
672336	OBSOL 		sys_sa_unblockyield
673;
674; Syscalls 337-339 are reserved for other scheduler activation syscalls.
675;
676337	UNIMPL
677338	UNIMPL
678339	UNIMPL
679340	STD 		{ int sys___sigaction_sigtramp(int signum, \
680			    const struct sigaction *nsa, \
681			    struct sigaction *osa, \
682			    const void *tramp, int vers); }
683341	STD 		{ int sys_pmc_get_info(int ctr, int op, void *args); }
684342	STD 		{ int sys_pmc_control(int ctr, int op, void *args); }
685343	STD 		{ int sys_rasctl(void *addr, size_t len, int op); }
686344	STD 		{ int sys_kqueue(void); }
687345	STD 		{ int sys_kevent(int fd, \
688			    const struct kevent *changelist, size_t nchanges, \
689			    struct kevent *eventlist, size_t nevents, \
690			    const struct timespec *timeout); }
691
692; Scheduling system calls.
693346	STD 		{ int sys__sched_setparam(pid_t pid, lwpid_t lid, \
694			    int policy, const struct sched_param *params); }
695347	STD 		{ int sys__sched_getparam(pid_t pid, lwpid_t lid, \
696			    int *policy, struct sched_param *params); }
697348	STD 		{ int sys__sched_setaffinity(pid_t pid, lwpid_t lid, \
698			    size_t size, const cpuset_t *cpuset); }
699349	STD 		{ int sys__sched_getaffinity(pid_t pid, lwpid_t lid, \
700			    size_t size, cpuset_t *cpuset); }
701350	STD 		{ int sys_sched_yield(void); }
702351	UNIMPL
703352	UNIMPL
704353	UNIMPL
705
706354	STD 		{ int sys_fsync_range(int fd, int flags, off_t start, \
707			    off_t length); }
708355	STD 		{ int sys_uuidgen(struct uuid *store, int count); }
709356	STD 		{ int sys_getvfsstat(struct statvfs *buf, \
710			    size_t bufsize, int flags); }
711357	STD 		{ int sys_statvfs1(const char *path, \
712			    struct statvfs *buf, int flags); }
713358	STD 		{ int sys_fstatvfs1(int fd, struct statvfs *buf, \
714			    int flags); }
715359	COMPAT_30 		{ int sys_fhstatvfs1(const struct compat_30_fhandle *fhp, \
716			    struct statvfs *buf, int flags); }
717360	STD 		{ int sys_extattrctl(const char *path, int cmd, \
718			    const char *filename, int attrnamespace, \
719			    const char *attrname); }
720361	STD 		{ int sys_extattr_set_file(const char *path, \
721			    int attrnamespace, const char *attrname, \
722			    const void *data, size_t nbytes); }
723362	STD 		{ ssize_t sys_extattr_get_file(const char *path, \
724			    int attrnamespace, const char *attrname, \
725			    void *data, size_t nbytes); }
726363	STD 		{ int sys_extattr_delete_file(const char *path, \
727			    int attrnamespace, const char *attrname); }
728364	STD 		{ int sys_extattr_set_fd(int fd, \
729			    int attrnamespace, const char *attrname, \
730			    const void *data, size_t nbytes); }
731365	STD 		{ ssize_t sys_extattr_get_fd(int fd, \
732			    int attrnamespace, const char *attrname, \
733			    void *data, size_t nbytes); }
734366	STD 		{ int sys_extattr_delete_fd(int fd, \
735			    int attrnamespace, const char *attrname); }
736367	STD 		{ int sys_extattr_set_link(const char *path, \
737			    int attrnamespace, const char *attrname, \
738			    const void *data, size_t nbytes); }
739368	STD 		{ ssize_t sys_extattr_get_link(const char *path, \
740			    int attrnamespace, const char *attrname, \
741			    void *data, size_t nbytes); }
742369	STD 		{ int sys_extattr_delete_link(const char *path, \
743			    int attrnamespace, const char *attrname); }
744370	STD 		{ ssize_t sys_extattr_list_fd(int fd, \
745			    int attrnamespace, void *data, size_t nbytes); }
746371	STD 		{ ssize_t sys_extattr_list_file(const char *path, \
747			    int attrnamespace, void *data, size_t nbytes); }
748372	STD 		{ ssize_t sys_extattr_list_link(const char *path, \
749			    int attrnamespace, void *data, size_t nbytes); }
750373	STD 		{ int sys_pselect(int nd, fd_set *in, fd_set *ou, \
751			    fd_set *ex, const struct timespec *ts, \
752			    const sigset_t *mask); }
753374	STD 		{ int sys_pollts(struct pollfd *fds, u_int nfds, \
754			    const struct timespec *ts, const sigset_t *mask); }
755375	STD 		{ int sys_setxattr(const char *path, \
756			    const char *name, void *value, size_t size, \
757			    int flags); }
758376	STD 		{ int sys_lsetxattr(const char *path, \
759			    const char *name, void *value, size_t size, \
760			    int flags); }
761377	STD 		{ int sys_fsetxattr(int fd, \
762			    const char *name, void *value, size_t size, \
763			    int flags); }
764378	STD 		{ int sys_getxattr(const char *path, \
765			    const char *name, void *value, size_t size); }
766379	STD 		{ int sys_lgetxattr(const char *path, \
767			    const char *name, void *value, size_t size); }
768380	STD 		{ int sys_fgetxattr(int fd, \
769			    const char *name, void *value, size_t size); }
770381	STD 		{ int sys_listxattr(const char *path, \
771			    char *list, size_t size); }
772382	STD 		{ int sys_llistxattr(const char *path, \
773			    char *list, size_t size); }
774383	STD 		{ int sys_flistxattr(int fd, \
775			    char *list, size_t size); }
776384	STD 		{ int sys_removexattr(const char *path, \
777			    const char *name); }
778385	STD 		{ int sys_lremovexattr(const char *path, \
779			    const char *name); }
780386	STD 		{ int sys_fremovexattr(int fd, \
781			    const char *name); }
782387	STD 	 RUMP	{ int sys___stat30(const char *path, struct stat *ub); }
783388	STD 		{ int sys___fstat30(int fd, struct stat *sb); }
784389	STD 	 RUMP	{ int sys___lstat30(const char *path, struct stat *ub); }
785390	STD 		{ int sys___getdents30(int fd, char *buf, size_t count); }
786391	IGNORED		old posix_fadvise
787392	COMPAT_30 	{ int sys___fhstat30(const struct compat_30_fhandle \
788			    *fhp, struct stat *sb); }
789393	STD 		{ int sys___ntp_gettime30(struct ntptimeval *ntvp); }
790394	STD	 RUMP	{ int sys___socket30(int domain, int type, int protocol); }
791395	STD 		{ int sys___getfh30(const char *fname, void *fhp, \
792			    size_t *fh_size); }
793396	STD 		{ int sys___fhopen40(const void *fhp, size_t fh_size,\
794			    int flags); }
795397	STD 		{ int sys___fhstatvfs140(const void *fhp, \
796			    size_t fh_size, struct statvfs *buf, int flags); }
797398	STD 		{ int sys___fhstat40(const void *fhp, \
798			    size_t fh_size, struct stat *sb); }
799
800; Asynchronous I/O system calls
801399	STD 		{ int sys_aio_cancel(int fildes, struct aiocb *aiocbp); }
802400	STD 		{ int sys_aio_error(const struct aiocb *aiocbp); }
803401	STD 		{ int sys_aio_fsync(int op, struct aiocb *aiocbp); }
804402	STD 		{ int sys_aio_read(struct aiocb *aiocbp); }
805403	STD 		{ int sys_aio_return(struct aiocb *aiocbp); }
806404	STD 		{ int sys_aio_suspend(const struct aiocb *const *list, \
807			    int nent, const struct timespec *timeout); }
808405	STD 		{ int sys_aio_write(struct aiocb *aiocbp); }
809406	STD 		{ int sys_lio_listio(int mode, struct aiocb *const *list, \
810			    int nent, struct sigevent *sig); }
811
812407	UNIMPL
813408	UNIMPL
814409	UNIMPL
815
816410	STD 		{ int sys___mount50(const char *type, \
817			    const char *path, int flags, void *data, \
818			    size_t data_len); }
819411	STD 		{ void *sys_mremap(void *old_address, size_t old_size, \
820			    void *new_address, size_t new_size, int flags); }
821
822; Processor-sets system calls
823412	STD 		{ int sys_pset_create(psetid_t *psid); }
824413	STD 		{ int sys_pset_destroy(psetid_t psid); }
825414	STD 		{ int sys_pset_assign(psetid_t psid, cpuid_t cpuid, \
826			    psetid_t *opsid); }
827415	STD 		{ int sys__pset_bind(idtype_t idtype, id_t first_id, \
828			    id_t second_id, psetid_t psid, psetid_t *opsid); }
829416	STD 		{ int sys___posix_fadvise50(int fd, int pad, \
830			    off_t offset, off_t len, int advice); }
831