syscalls.master revision 1.162
1	$NetBSD: syscalls.master,v 1.162 2007/01/16 05:28:45 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, NODEF, NOARGS, or one of
11;		the compatibility options defined in syscalls.conf.
12;
13; An optional field, MPSAFE, after the type field, indicates that
14; the system call is MP-safe.
15;
16; types:
17;	STD	always included
18;	OBSOL	obsolete, not included in system
19;	UNIMPL	unimplemented, not included in system
20;	EXCL	implemented, but not included in system
21;	NODEF	included, but don't define the syscall number
22;	NOARGS	included, but don't define the syscall args structure
23;	INDIR	included, but don't define the syscall args structure,
24;		and allow it to be "really" varargs.
25;
26; The compat options are defined in the syscalls.conf file, and the
27; compat option name is prefixed to the syscall name.  Other than
28; that, they're like NODEF (for 'compat' options), or STD (for
29; 'libcompat' options).
30;
31; The type-dependent arguments are as follows:
32; For STD, NODEF, NOARGS, and compat syscalls:
33;	{ pseudo-proto } [alias]
34; For other syscalls:
35;	[comment]
36;
37; #ifdef's, etc. may be included, and are copied to the output files.
38; #include's are copied to the syscall names and switch definition files only.
39
40#include "opt_ktrace.h"
41#include "opt_nfsserver.h"
42#include "opt_ntp.h"
43#include "opt_compat_netbsd.h"
44#include "opt_sysv.h"
45#include "opt_compat_43.h"
46#include "opt_posix.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/sa.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 number, ...); }
671	STD		{ void sys_exit(int rval); }
682	STD		{ int sys_fork(void); }
693	STD		{ ssize_t sys_read(int fd, void *buf, size_t nbyte); }
704	STD		{ ssize_t sys_write(int fd, const void *buf, \
71			    size_t nbyte); }
725	STD		{ int sys_open(const char *path, \
73			    int flags, ... mode_t mode); }
746	STD		{ int sys_close(int fd); }
757	STD		{ int sys_wait4(int pid, int *status, int options, \
76			    struct rusage *rusage); }
778	COMPAT_43	{ int sys_creat(const char *path, mode_t mode); } ocreat
789	STD		{ int sys_link(const char *path, const char *link); }
7910	STD		{ int sys_unlink(const char *path); }
8011	OBSOL		execv
8112	STD		{ int sys_chdir(const char *path); }
8213	STD		{ int sys_fchdir(int fd); }
8314	STD		{ int sys_mknod(const char *path, mode_t mode, \
84			    dev_t dev); }
8515	STD		{ int sys_chmod(const char *path, mode_t mode); }
8616	STD		{ int sys_chown(const char *path, uid_t uid, \
87			    gid_t gid); }
8817	STD		{ int sys_obreak(char *nsize); } break
8918	COMPAT_20	{ int sys_getfsstat(struct statfs12 *buf, \
90			    long bufsize, int flags); }
9119	COMPAT_43	{ long sys_lseek(int fd, long offset, int whence); } \
92			    olseek
93#ifdef COMPAT_43
9420	STD 		{ pid_t sys_getpid_with_ppid(void); } getpid
95#else
9620	STD MPSAFE	{ pid_t sys_getpid(void); }
97#endif
9821	STD		{ int sys_mount(const char *type, const char *path, \
99			    int flags, void *data); }
10022	STD		{ int sys_unmount(const char *path, int flags); }
10123	STD		{ int sys_setuid(uid_t uid); }
102#ifdef COMPAT_43
10324	STD		{ uid_t sys_getuid_with_euid(void); } getuid
104#else
10524	STD		{ uid_t sys_getuid(void); }
106#endif
10725	STD		{ uid_t sys_geteuid(void); }
10826	STD		{ int sys_ptrace(int req, pid_t pid, caddr_t addr, \
109			    int data); }
11027	STD		{ ssize_t sys_recvmsg(int s, struct msghdr *msg, \
111			    int flags); }
11228	STD		{ ssize_t sys_sendmsg(int s, \
113			    const struct msghdr *msg, int flags); }
11429	STD		{ ssize_t sys_recvfrom(int s, void *buf, size_t len, \
115			    int flags, struct sockaddr *from, \
116			    unsigned int *fromlenaddr); }
11730	STD		{ int sys_accept(int s, struct sockaddr *name, \
118			    unsigned int *anamelen); }
11931	STD		{ int sys_getpeername(int fdes, struct sockaddr *asa, \
120			    unsigned int *alen); }
12132	STD		{ int sys_getsockname(int fdes, struct sockaddr *asa, \
122			    unsigned int *alen); }
12333	STD		{ int sys_access(const char *path, int flags); }
12434	STD		{ int sys_chflags(const char *path, u_long flags); }
12535	STD		{ int sys_fchflags(int fd, u_long flags); }
12636	STD		{ void sys_sync(void); }
12737	STD		{ int sys_kill(int pid, int signum); }
12838	COMPAT_43	{ int sys_stat(const char *path, struct stat43 *ub); } \
129			    stat43
13039	STD		{ pid_t sys_getppid(void); }
13140	COMPAT_43	{ int sys_lstat(const char *path, \
132			    struct stat43 *ub); } lstat43
13341	STD		{ int sys_dup(int fd); }
13442	STD		{ int sys_pipe(void); }
13543	STD		{ gid_t sys_getegid(void); }
13644	STD		{ int sys_profil(caddr_t samples, size_t size, \
137			    u_long offset, u_int scale); }
138#if defined(KTRACE) || !defined(_KERNEL)
13945	STD		{ int sys_ktrace(const char *fname, int ops, \
140			    int facs, int pid); }
141#else
14245	EXCL		ktrace
143#endif
14446	COMPAT_13	{ int sys_sigaction(int signum, \
145			    const struct sigaction13 *nsa, \
146			    struct sigaction13 *osa); } sigaction13
147#ifdef COMPAT_43
14847	STD		{ gid_t sys_getgid_with_egid(void); } getgid
149#else
15047	STD		{ gid_t sys_getgid(void); }
151#endif
15248	COMPAT_13	{ int sys_sigprocmask(int how, \
153			    int mask); } sigprocmask13
15449	STD		{ int sys___getlogin(char *namebuf, size_t namelen); }
15550	STD		{ int sys___setlogin(const char *namebuf); }
15651	STD		{ int sys_acct(const char *path); }
15752	COMPAT_13	{ int sys_sigpending(void); } sigpending13
15853	COMPAT_13	{ int sys_sigaltstack( \
159			    const struct sigaltstack13 *nss, \
160			    struct sigaltstack13 *oss); } sigaltstack13
16154	STD		{ int sys_ioctl(int fd, \
162			    u_long com, ... void *data); }
16355	COMPAT_12	{ int sys_reboot(int opt); } oreboot
16456	STD		{ int sys_revoke(const char *path); }
16557	STD		{ int sys_symlink(const char *path, \
166			    const char *link); }
16758	STD		{ ssize_t sys_readlink(const char *path, char *buf, \
168			    size_t count); }
16959	STD		{ int sys_execve(const char *path, \
170			    char * const *argp, char * const *envp); }
17160	STD		{ mode_t sys_umask(mode_t newmask); }
17261	STD		{ int sys_chroot(const char *path); }
17362	COMPAT_43	{ int sys_fstat(int fd, struct stat43 *sb); } fstat43
17463	COMPAT_43	{ int sys_getkerninfo(int op, char *where, int *size, \
175			    int arg); } ogetkerninfo
17664	COMPAT_43	{ int sys_getpagesize(void); } ogetpagesize
17765	COMPAT_12	{ int sys_msync(caddr_t addr, size_t len); }
178; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)?
17966	STD		{ int sys_vfork(void); }
18067	OBSOL		vread
18168	OBSOL		vwrite
18269	STD		{ int sys_sbrk(intptr_t incr); }
18370	STD		{ int sys_sstk(int incr); }
18471	COMPAT_43	{ int sys_mmap(caddr_t addr, size_t len, int prot, \
185			    int flags, int fd, long pos); } ommap
18672	STD		{ int sys_ovadvise(int anom); } vadvise
18773	STD		{ int sys_munmap(void *addr, size_t len); }
18874	STD		{ int sys_mprotect(void *addr, size_t len, \
189			    int prot); }
19075	STD		{ int sys_madvise(void *addr, size_t len, \
191			    int behav); }
19276	OBSOL		vhangup
19377	OBSOL		vlimit
19478	STD		{ int sys_mincore(void *addr, size_t len, \
195			    char *vec); }
19679	STD		{ int sys_getgroups(int gidsetsize, \
197			    gid_t *gidset); }
19880	STD		{ int sys_setgroups(int gidsetsize, \
199			    const gid_t *gidset); }
20081	STD		{ int sys_getpgrp(void); }
20182	STD		{ int sys_setpgid(int pid, int pgid); }
20283	STD		{ int sys_setitimer(int which, \
203			    const struct itimerval *itv, \
204			    struct itimerval *oitv); }
20584	COMPAT_43	{ int sys_wait(void); } owait
20685	COMPAT_12	{ int sys_swapon(const char *name); } oswapon
20786	STD		{ int sys_getitimer(int which, \
208			    struct itimerval *itv); }
20987	COMPAT_43	{ int sys_gethostname(char *hostname, u_int len); } \
210			    ogethostname
21188	COMPAT_43	{ int sys_sethostname(char *hostname, u_int len); } \
212			    osethostname
21389	COMPAT_43	{ int sys_getdtablesize(void); } ogetdtablesize
21490	STD		{ int sys_dup2(int from, int to); }
21591	UNIMPL		getdopt
21692	STD		{ int sys_fcntl(int fd, int cmd, ... void *arg); }
21793	STD		{ int sys_select(int nd, fd_set *in, fd_set *ou, \
218			    fd_set *ex, struct timeval *tv); }
21994	UNIMPL		setdopt
22095	STD		{ int sys_fsync(int fd); }
22196	STD		{ int sys_setpriority(int which, id_t who, int prio); }
22297	COMPAT_30	{ int sys_socket(int domain, int type, int protocol); }
22398	STD		{ int sys_connect(int s, const struct sockaddr *name, \
224			    unsigned int namelen); }
22599	COMPAT_43	{ int sys_accept(int s, caddr_t name, \
226			    int *anamelen); } oaccept
227100	STD		{ int sys_getpriority(int which, id_t who); }
228101	COMPAT_43	{ int sys_send(int s, caddr_t buf, int len, \
229			    int flags); } osend
230102	COMPAT_43	{ int sys_recv(int s, caddr_t buf, int len, \
231			    int flags); } orecv
232103	COMPAT_13	{ int sys_sigreturn(struct sigcontext13 *sigcntxp); } \
233			    sigreturn13
234104	STD		{ int sys_bind(int s, const struct sockaddr *name, \
235			    unsigned int namelen); }
236105	STD		{ int sys_setsockopt(int s, int level, int name, \
237			    const void *val, unsigned int valsize); }
238106	STD		{ int sys_listen(int s, int backlog); }
239107	OBSOL		vtimes
240108	COMPAT_43	{ int sys_sigvec(int signum, struct sigvec *nsv, \
241			    struct sigvec *osv); } osigvec
242109	COMPAT_43	{ int sys_sigblock(int mask); } osigblock
243110	COMPAT_43	{ int sys_sigsetmask(int mask); } osigsetmask
244111	COMPAT_13	{ int sys_sigsuspend(int mask); } sigsuspend13
245112	COMPAT_43	{ int sys_sigstack(struct sigstack *nss, \
246			    struct sigstack *oss); } osigstack
247113	COMPAT_43	{ int sys_recvmsg(int s, struct omsghdr *msg, \
248			    int flags); } orecvmsg
249114	COMPAT_43	{ int sys_sendmsg(int s, caddr_t msg, int flags); } \
250			    osendmsg
251115	OBSOL		vtrace
252116	STD		{ int sys_gettimeofday(struct timeval *tp, \
253			    void *tzp); }
254117	STD		{ int sys_getrusage(int who, struct rusage *rusage); }
255118	STD		{ int sys_getsockopt(int s, int level, int name, \
256			    void *val, unsigned int *avalsize); }
257119	OBSOL		resuba
258120	STD		{ ssize_t sys_readv(int fd, \
259			    const struct iovec *iovp, int iovcnt); }
260121	STD		{ ssize_t sys_writev(int fd, \
261			    const struct iovec *iovp, int iovcnt); }
262122	STD		{ int sys_settimeofday(const struct timeval *tv, \
263			    const void *tzp); }
264123	STD		{ int sys_fchown(int fd, uid_t uid, gid_t gid); }
265124	STD		{ int sys_fchmod(int fd, mode_t mode); }
266125	COMPAT_43	{ int sys_recvfrom(int s, caddr_t buf, size_t len, \
267			    int flags, caddr_t from, int *fromlenaddr); } \
268			    orecvfrom
269126	STD		{ int sys_setreuid(uid_t ruid, uid_t euid); }
270127	STD		{ int sys_setregid(gid_t rgid, gid_t egid); }
271128	STD		{ int sys_rename(const char *from, const char *to); }
272129	COMPAT_43	{ int sys_truncate(const char *path, long length); } \
273			    otruncate
274130	COMPAT_43	{ int sys_ftruncate(int fd, long length); } oftruncate
275131	STD		{ int sys_flock(int fd, int how); }
276132	STD		{ int sys_mkfifo(const char *path, mode_t mode); }
277133	STD		{ ssize_t sys_sendto(int s, const void *buf, \
278			    size_t len, int flags, const struct sockaddr *to, \
279			    unsigned int tolen); }
280134	STD		{ int sys_shutdown(int s, int how); }
281135	STD		{ int sys_socketpair(int domain, int type, \
282			    int protocol, int *rsv); }
283136	STD		{ int sys_mkdir(const char *path, mode_t mode); }
284137	STD		{ int sys_rmdir(const char *path); }
285138	STD		{ int sys_utimes(const char *path, \
286			    const struct timeval *tptr); }
287139	OBSOL		4.2 sigreturn
288140	STD		{ int sys_adjtime(const struct timeval *delta, \
289			    struct timeval *olddelta); }
290141	COMPAT_43	{ int sys_getpeername(int fdes, caddr_t asa, \
291			    int *alen); } ogetpeername
292142	COMPAT_43	{ int32_t sys_gethostid(void); } ogethostid
293143	COMPAT_43	{ int sys_sethostid(int32_t hostid); } osethostid
294144	COMPAT_43	{ int sys_getrlimit(int which, \
295			    struct orlimit *rlp); } ogetrlimit
296145	COMPAT_43	{ int sys_setrlimit(int which, \
297			    const struct orlimit *rlp); } osetrlimit
298146	COMPAT_43	{ int sys_killpg(int pgid, int signum); } okillpg
299147	STD		{ int sys_setsid(void); }
300148	STD		{ int sys_quotactl(const char *path, int cmd, \
301			    int uid, void *arg); }
302149	COMPAT_43	{ int sys_quota(void); } oquota
303150	COMPAT_43	{ int sys_getsockname(int fdec, caddr_t asa, \
304			    int *alen); } ogetsockname
305
306; Syscalls 151-180 inclusive are reserved for vendor-specific
307; system calls.  (This includes various calls added for compatibity
308; with other Unix variants.)
309; Some of these calls are now supported by BSD...
310151	UNIMPL
311152	UNIMPL
312153	UNIMPL
313154	UNIMPL
314#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL)
315155	STD		{ int sys_nfssvc(int flag, void *argp); }
316#else
317155	EXCL		nfssvc
318#endif
319156	COMPAT_43	{ int sys_getdirentries(int fd, char *buf, \
320			    u_int count, long *basep); } ogetdirentries
321157	COMPAT_20	{ int sys_statfs(const char *path, \
322			    struct statfs12 *buf); }
323158	COMPAT_20	{ int sys_fstatfs(int fd, struct statfs12 *buf); }
324159	UNIMPL
325160	UNIMPL
326161	COMPAT_30	{ int sys_getfh(const char *fname, \
327			    struct compat_30_fhandle *fhp); }
328162	COMPAT_09	{ int sys_getdomainname(char *domainname, int len); } \
329			    ogetdomainname
330163	COMPAT_09	{ int sys_setdomainname(char *domainname, int len); } \
331			    osetdomainname
332164	COMPAT_09	{ int sys_uname(struct outsname *name); } ouname
333165	STD		{ int sys_sysarch(int op, void *parms); }
334166	UNIMPL
335167	UNIMPL
336168	UNIMPL
337; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
338#if (defined(SYSVSEM) || !defined(_KERNEL)) && !defined(_LP64)
339169	COMPAT_10	{ int sys_semsys(int which, int a2, int a3, int a4, \
340			    int a5); } osemsys
341#else
342169	EXCL		1.0 semsys
343#endif
344; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
345#if (defined(SYSVMSG) || !defined(_KERNEL)) && !defined(_LP64)
346170	COMPAT_10	{ int sys_msgsys(int which, int a2, int a3, int a4, \
347			    int a5, int a6); } omsgsys
348#else
349170	EXCL		1.0 msgsys
350#endif
351; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
352#if (defined(SYSVSHM) || !defined(_KERNEL)) && !defined(_LP64)
353171	COMPAT_10	{ int sys_shmsys(int which, int a2, int a3, int a4); } \
354			    oshmsys
355#else
356171	EXCL		1.0 shmsys
357#endif
358172	UNIMPL
359173	STD		{ ssize_t sys_pread(int fd, void *buf, \
360			    size_t nbyte, int pad, off_t offset); }
361174	STD		{ ssize_t sys_pwrite(int fd, const void *buf, \
362			    size_t nbyte, int pad, off_t offset); }
363; For some reason, ntp_gettime doesn't want to raise SIGSYS when it's excluded.
364175	COMPAT_30	{ int sys_ntp_gettime(struct ntptimeval30 *ntvp); }
365#if defined(NTP) || !defined(_KERNEL)
366176	STD		{ int sys_ntp_adjtime(struct timex *tp); }
367#else
368176	EXCL		ntp_adjtime
369#endif
370177	UNIMPL
371178	UNIMPL
372179	UNIMPL
373180	UNIMPL
374
375; Syscalls 180-199 are used by/reserved for BSD
376181	STD		{ int sys_setgid(gid_t gid); }
377182	STD		{ int sys_setegid(gid_t egid); }
378183	STD		{ int sys_seteuid(uid_t euid); }
379#if defined(LFS) || !defined(_KERNEL)
380184	STD		{ int sys_lfs_bmapv(fsid_t *fsidp, \
381			    struct block_info *blkiov, int blkcnt); }
382185	STD		{ int sys_lfs_markv(fsid_t *fsidp, \
383			    struct block_info *blkiov, int blkcnt); }
384186	STD		{ int sys_lfs_segclean(fsid_t *fsidp, u_long segment); }
385187	STD		{ int sys_lfs_segwait(fsid_t *fsidp, \
386			    struct timeval *tv); }
387#else
388184	EXCL		lfs_bmapv
389185	EXCL		lfs_markv
390186	EXCL		lfs_segclean
391187	EXCL		lfs_segwait
392#endif
393188	COMPAT_12	{ int sys_stat(const char *path, struct stat12 *ub); } \
394			    stat12
395189	COMPAT_12	{ int sys_fstat(int fd, struct stat12 *sb); } fstat12
396190	COMPAT_12	{ int sys_lstat(const char *path, \
397			    struct stat12 *ub); } lstat12
398191	STD		{ long sys_pathconf(const char *path, int name); }
399192	STD		{ long sys_fpathconf(int fd, int name); }
400193	UNIMPL
401194	STD		{ int sys_getrlimit(int which, \
402			    struct rlimit *rlp); }
403195	STD		{ int sys_setrlimit(int which, \
404			    const struct rlimit *rlp); }
405196	COMPAT_12	{ int sys_getdirentries(int fd, char *buf, \
406			    u_int count, long *basep); }
407197	STD		{ void *sys_mmap(void *addr, size_t len, int prot, \
408			    int flags, int fd, long pad, off_t pos); }
409198	INDIR		{ quad_t sys___syscall(quad_t num, ...); }
410199	STD		{ off_t sys_lseek(int fd, int pad, off_t offset, \
411			    int whence); }
412200	STD		{ int sys_truncate(const char *path, int pad, \
413			    off_t length); }
414201	STD		{ int sys_ftruncate(int fd, int pad, off_t length); }
415202	STD		{ int sys___sysctl(const int *name, u_int namelen, \
416			    void *old, size_t *oldlenp, const void *new, \
417			    size_t newlen); }
418203	STD		{ int sys_mlock(const void *addr, size_t len); }
419204	STD		{ int sys_munlock(const void *addr, size_t len); }
420205	STD		{ int sys_undelete(const char *path); }
421206	STD		{ int sys_futimes(int fd, \
422			    const struct timeval *tptr); }
423207	STD		{ pid_t sys_getpgid(pid_t pid); }
424208	STD		{ int sys_reboot(int opt, char *bootstr); }
425209	STD		{ int sys_poll(struct pollfd *fds, u_int nfds, \
426			    int timeout); }
427;
428; Syscalls 210-219 are reserved for dynamically loaded syscalls
429;
430#if defined(LKM) || !defined(_KERNEL)
431210	NODEF		{ int sys_lkmnosys(void); }
432211	NODEF		{ int sys_lkmnosys(void); }
433212	NODEF		{ int sys_lkmnosys(void); }
434213	NODEF		{ int sys_lkmnosys(void); }
435214	NODEF		{ int sys_lkmnosys(void); }
436215	NODEF		{ int sys_lkmnosys(void); }
437216	NODEF		{ int sys_lkmnosys(void); }
438217	NODEF		{ int sys_lkmnosys(void); }
439218	NODEF		{ int sys_lkmnosys(void); }
440219	NODEF		{ int sys_lkmnosys(void); }
441#else	/* !LKM */
442210	EXCL		lkmnosys
443211	EXCL		lkmnosys
444212	EXCL		lkmnosys
445213	EXCL		lkmnosys
446214	EXCL		lkmnosys
447215	EXCL		lkmnosys
448216	EXCL		lkmnosys
449217	EXCL		lkmnosys
450218	EXCL		lkmnosys
451219	EXCL		lkmnosys
452#endif	/* !LKM */
453; System calls 220-300 are reserved for use by NetBSD
454#if defined(SYSVSEM) || !defined(_KERNEL)
455220	COMPAT_14	{ int sys___semctl(int semid, int semnum, int cmd, \
456			    union __semun *arg); }
457221	STD		{ int sys_semget(key_t key, int nsems, int semflg); }
458222	STD		{ int sys_semop(int semid, struct sembuf *sops, \
459			    size_t nsops); }
460223	STD		{ int sys_semconfig(int flag); }
461#else
462220	EXCL		compat_14_semctl
463221	EXCL		semget
464222	EXCL		semop
465223	EXCL		semconfig
466#endif
467#if defined(SYSVMSG) || !defined(_KERNEL)
468224	COMPAT_14	{ int sys_msgctl(int msqid, int cmd, \
469			    struct msqid_ds14 *buf); }
470225	STD		{ int sys_msgget(key_t key, int msgflg); }
471226	STD		{ int sys_msgsnd(int msqid, const void *msgp, \
472			    size_t msgsz, int msgflg); }
473227	STD		{ ssize_t sys_msgrcv(int msqid, void *msgp, \
474			    size_t msgsz, long msgtyp, int msgflg); }
475#else
476224	EXCL		compat_14_msgctl
477225	EXCL		msgget
478226	EXCL		msgsnd
479227	EXCL		msgrcv
480#endif
481#if defined(SYSVSHM) || !defined(_KERNEL)
482228	STD		{ void *sys_shmat(int shmid, const void *shmaddr, \
483			    int shmflg); }
484229	COMPAT_14	{ int sys_shmctl(int shmid, int cmd, \
485			    struct shmid_ds14 *buf); }
486230	STD		{ int sys_shmdt(const void *shmaddr); }
487231	STD		{ int sys_shmget(key_t key, size_t size, int shmflg); }
488#else
489228	EXCL		shmat
490229	EXCL		compat_14_shmctl
491230	EXCL		shmdt
492231	EXCL		shmget
493#endif
494232	STD		{ int sys_clock_gettime(clockid_t clock_id, \
495			    struct timespec *tp); }
496233	STD		{ int sys_clock_settime(clockid_t clock_id, \
497			    const struct timespec *tp); }
498234	STD		{ int sys_clock_getres(clockid_t clock_id, \
499			    struct timespec *tp); }
500235	STD		{ int sys_timer_create(clockid_t clock_id, \
501			    struct sigevent *evp, timer_t *timerid); }
502236	STD		{ int sys_timer_delete(timer_t timerid); }
503237	STD		{ int sys_timer_settime(timer_t timerid, int flags, \
504			    const struct itimerspec *value, \
505			    struct itimerspec *ovalue); }
506238	STD		{ int sys_timer_gettime(timer_t timerid, struct \
507			    itimerspec *value); }
508239	STD		{ int sys_timer_getoverrun(timer_t timerid); }
509;
510; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls
511;
512240	STD		{ int sys_nanosleep(const struct timespec *rqtp, \
513			    struct timespec *rmtp); }
514241	STD		{ int sys_fdatasync(int fd); }
515242	STD		{ int sys_mlockall(int flags); }
516243	STD		{ int sys_munlockall(void); }
517244	STD		{ int sys___sigtimedwait(const sigset_t *set, \
518			    siginfo_t *info, \
519			    struct timespec *timeout); }
520245	UNIMPL		sys_sigqueue
521;
522; Syscall 246 is free for any use
523;
524246	UNIMPL
525#if defined(P1003_1B_SEMAPHORE) || (!defined(_KERNEL) && defined(_LIBC))
526247	STD		{ int sys__ksem_init(unsigned int value, semid_t *idp); }
527248	STD		{ int sys__ksem_open(const char *name, int oflag, \
528			    mode_t mode, unsigned int value, semid_t *idp); }
529249	STD 		{ int sys__ksem_unlink(const char *name); }
530250	STD		{ int sys__ksem_close(semid_t id); }
531251	STD		{ int sys__ksem_post(semid_t id); }
532252	STD		{ int sys__ksem_wait(semid_t id); }
533253	STD		{ int sys__ksem_trywait(semid_t id); }
534254	STD		{ int sys__ksem_getvalue(semid_t id, \
535			    unsigned int *value); }
536255	STD		{ int sys__ksem_destroy(semid_t id); }
537256	UNIMPL		sys__ksem_timedwait
538#else
539247	EXCL		sys__ksem_init
540248	EXCL		sys__ksem_open
541249	EXCL 		sys__ksem_unlink
542250	EXCL		sys__ksem_close
543251	EXCL		sys__ksem_post
544252	EXCL		sys__ksem_wait
545253	EXCL		sys__ksem_trywait
546254	EXCL		sys__ksem_getvalue
547255	EXCL		sys__ksem_destroy
548256	UNIMPL		sys__ksem_timedwait
549#endif
550257	UNIMPL		sys_mq_open
551258	UNIMPL		sys_mq_close
552259	UNIMPL		sys_mq_unlink
553260	UNIMPL		sys_mq_getattr
554261	UNIMPL		sys_mq_setattr
555262	UNIMPL		sys_mq_notify
556263	UNIMPL		sys_mq_send
557264	UNIMPL		sys_mq_receive
558265	UNIMPL		sys_mq_timedsend
559266	UNIMPL		sys_mq_timedreceive
560267	UNIMPL
561268	UNIMPL
562269	UNIMPL
563270	STD		{ int sys___posix_rename(const char *from, \
564			    const char *to); }
565271	STD		{ int sys_swapctl(int cmd, void *arg, int misc); }
566272	COMPAT_30	{ int sys_getdents(int fd, char *buf, size_t count); }
567273	STD		{ int sys_minherit(void *addr, size_t len, \
568			    int inherit); }
569274	STD		{ int sys_lchmod(const char *path, mode_t mode); }
570275	STD		{ int sys_lchown(const char *path, uid_t uid, \
571			    gid_t gid); }
572276	STD		{ int sys_lutimes(const char *path, \
573			    const struct timeval *tptr); }
574277	STD		{ int sys___msync13(void *addr, size_t len, int flags); }
575278	COMPAT_30	{ int sys___stat13(const char *path, struct stat13 *ub); }
576279	COMPAT_30	{ int sys___fstat13(int fd, struct stat13 *sb); }
577280	COMPAT_30	{ int sys___lstat13(const char *path, struct stat13 *ub); }
578281	STD		{ int sys___sigaltstack14( \
579			    const struct sigaltstack *nss, \
580			    struct sigaltstack *oss); }
581282	STD		{ int sys___vfork14(void); }
582283	STD		{ int sys___posix_chown(const char *path, uid_t uid, \
583			    gid_t gid); }
584284	STD		{ int sys___posix_fchown(int fd, uid_t uid, \
585			    gid_t gid); }
586285	STD		{ int sys___posix_lchown(const char *path, uid_t uid, \
587			    gid_t gid); }
588286	STD		{ pid_t sys_getsid(pid_t pid); }
589287	STD		{ pid_t sys___clone(int flags, void *stack); }
590#if defined(KTRACE) || !defined(_KERNEL)
591288	STD		{ int sys_fktrace(const int fd, int ops, \
592			    int facs, int pid); }
593#else
594288	EXCL		ktrace
595#endif
596289	STD		{ ssize_t sys_preadv(int fd, \
597			    const struct iovec *iovp, int iovcnt, \
598			    int pad, off_t offset); }
599290	STD		{ ssize_t sys_pwritev(int fd, \
600			    const struct iovec *iovp, int iovcnt, \
601			    int pad, off_t offset); }
602291	COMPAT_16	{ int sys___sigaction14(int signum, \
603			    const struct sigaction *nsa, \
604			    struct sigaction *osa); }
605292	STD		{ int sys___sigpending14(sigset_t *set); }
606293	STD		{ int sys___sigprocmask14(int how, \
607			    const sigset_t *set, \
608			    sigset_t *oset); }
609294	STD		{ int sys___sigsuspend14(const sigset_t *set); }
610295	COMPAT_16	{ int sys___sigreturn14(struct sigcontext *sigcntxp); }
611296	STD		{ int sys___getcwd(char *bufp, size_t length); }
612297	STD		{ int sys_fchroot(int fd); }
613298	COMPAT_30	{ int sys_fhopen(const struct compat_30_fhandle *fhp, int flags); }
614299	COMPAT_30	{ int sys_fhstat(const struct compat_30_fhandle *fhp, \
615			    struct stat13 *sb); }
616300	COMPAT_20	{ int sys_fhstatfs(const struct compat_30_fhandle *fhp, \
617			    struct statfs12 *buf); }
618#if defined(SYSVSEM) || !defined(_KERNEL)
619301	STD		{ int sys_____semctl13(int semid, int semnum, int cmd, \
620			    ... union __semun *arg); }
621#else
622301	EXCL		____semctl13
623#endif
624#if defined(SYSVMSG) || !defined(_KERNEL)
625302	STD		{ int sys___msgctl13(int msqid, int cmd, \
626			    struct msqid_ds *buf); }
627#else
628302	EXCL		__msgctl13
629#endif
630#if defined(SYSVSHM) || !defined(_KERNEL)
631303	STD		{ int sys___shmctl13(int shmid, int cmd, \
632			    struct shmid_ds *buf); }
633#else
634303	EXCL		__shmctl13
635#endif
636304	STD		{ int sys_lchflags(const char *path, u_long flags); }
637305	STD		{ int sys_issetugid(void); }
638306	STD		{ int sys_utrace(const char *label, void *addr, \
639				size_t len); }
640307	STD		{ int sys_getcontext(struct __ucontext *ucp); }
641308	STD		{ int sys_setcontext(const struct __ucontext *ucp); }
642309	STD		{ int sys__lwp_create(const struct __ucontext *ucp, \
643				u_long flags, lwpid_t *new_lwp); }
644310	STD		{ int sys__lwp_exit(void); }
645311	STD		{ lwpid_t sys__lwp_self(void); }
646312	STD		{ int sys__lwp_wait(lwpid_t wait_for, \
647				lwpid_t *departed); }
648313	STD		{ int sys__lwp_suspend(lwpid_t target); }
649314	STD		{ int sys__lwp_continue(lwpid_t target); }
650315	STD		{ int sys__lwp_wakeup(lwpid_t target); }
651316	STD		{ void *sys__lwp_getprivate(void); }
652317	STD		{ void sys__lwp_setprivate(void *ptr); }
653#if !defined(_KERNEL)
654318	STD		{ int sys__lwp_kill(lwpid_t target, int signo); }
655319	STD		{ int sys__lwp_detach(lwpid_t target); }
656320	STD		{ int sys__lwp_park(const struct timespec *ts, \
657				struct __ucontext *ucp, const void *hint); }
658321	STD 		{ int sys__lwp_unpark(lwpid_t target, const void *hint); }
659322	STD 		{ int sys__lwp_unpark_all(const lwpid_t *targets, \
660				size_t ntargets, const void *hint); }
661#else
662318	EXCL		sys__lwp_kill
663319	EXCL		sys__lwp_detach
664320	EXCL		sys__lwp_park
665321	EXCL		sys__lwp_unpark
666322	EXCL		sys__lwp_unpark_all
667#endif
668; Syscalls 323-329 reserved for remaining Solaris-compatible LWP calls.
669323	UNIMPL
670324	UNIMPL
671325	UNIMPL
672326	UNIMPL
673327	UNIMPL
674328	UNIMPL
675329	UNIMPL
676; Scheduler activation syscalls
677330	STD		{ int sys_sa_register(sa_upcall_t new, \
678				sa_upcall_t *old, int flags, \
679				ssize_t stackinfo_offset); }
680331	STD		{ int sys_sa_stacks(int num, stack_t *stacks); }
681332	STD		{ int sys_sa_enable(void); }
682333	STD		{ int sys_sa_setconcurrency(int concurrency); }
683334	STD		{ int sys_sa_yield(void); }
684335	STD		{ int sys_sa_preempt(int sa_id); }
685336	OBSOL		sys_sa_unblockyield
686;
687; Syscalls 337-339 are reserved for other scheduler activation syscalls.
688;
689337	UNIMPL
690338	UNIMPL
691339	UNIMPL
692340	STD		{ int sys___sigaction_sigtramp(int signum, \
693			    const struct sigaction *nsa, \
694			    struct sigaction *osa, \
695			    const void *tramp, int vers); }
696341	STD		{ int sys_pmc_get_info(int ctr, int op, void *args); }
697342	STD		{ int sys_pmc_control(int ctr, int op, void *args); }
698343	STD		{ int sys_rasctl(caddr_t addr, size_t len, int op); }
699344	STD		{ int sys_kqueue(void); }
700345	STD		{ int sys_kevent(int fd, \
701			    const struct kevent *changelist, size_t nchanges, \
702			    struct kevent *eventlist, size_t nevents, \
703			    const struct timespec *timeout); }
704;
705; Syscalls 346-353 are reserved for the IEEE Std1003.1b scheduling syscalls
706;
707346	UNIMPL		sys_sched_setparam
708347	UNIMPL		sys_sched_getparam
709348	UNIMPL		sys_sched_setscheduler
710349	UNIMPL		sys_sched_getscheduler
711350	STD		{ int sys_sched_yield(void); }
712351	UNIMPL		sys_sched_get_priority_max
713352	UNIMPL		sys_sched_get_priority_min
714353	UNIMPL		sys_sched_rr_get_interval
715
716354	STD		{ int sys_fsync_range(int fd, int flags, off_t start, \
717			    off_t length); }
718355	STD		{ int sys_uuidgen(struct uuid *store, int count); }
719356	STD		{ int sys_getvfsstat(struct statvfs *buf, \
720			    size_t bufsize, int flags); }
721357	STD		{ int sys_statvfs1(const char *path, \
722			    struct statvfs *buf, int flags); }
723358	STD		{ int sys_fstatvfs1(int fd, struct statvfs *buf, \
724			    int flags); }
725359	COMPAT_30	{ int sys_fhstatvfs1(const struct compat_30_fhandle *fhp, \
726			    struct statvfs *buf, int flags); }
727360	STD		{ int sys_extattrctl(const char *path, int cmd, \
728			    const char *filename, int attrnamespace, \
729			    const char *attrname); }
730361	STD		{ int sys_extattr_set_file(const char *path, \
731			    int attrnamespace, const char *attrname, \
732			    const void *data, size_t nbytes); }
733362	STD		{ ssize_t sys_extattr_get_file(const char *path, \
734			    int attrnamespace, const char *attrname, \
735			    void *data, size_t nbytes); }
736363	STD		{ int sys_extattr_delete_file(const char *path, \
737			    int attrnamespace, const char *attrname); }
738364	STD		{ int sys_extattr_set_fd(int fd, \
739			    int attrnamespace, const char *attrname, \
740			    const void *data, size_t nbytes); }
741365	STD		{ ssize_t sys_extattr_get_fd(int fd, \
742			    int attrnamespace, const char *attrname, \
743			    void *data, size_t nbytes); }
744366	STD		{ int sys_extattr_delete_fd(int fd, \
745			    int attrnamespace, const char *attrname); }
746367	STD		{ int sys_extattr_set_link(const char *path, \
747			    int attrnamespace, const char *attrname, \
748			    const void *data, size_t nbytes); }
749368	STD		{ ssize_t sys_extattr_get_link(const char *path, \
750			    int attrnamespace, const char *attrname, \
751			    void *data, size_t nbytes); }
752369	STD		{ int sys_extattr_delete_link(const char *path, \
753			    int attrnamespace, const char *attrname); }
754370	STD		{ ssize_t sys_extattr_list_fd(int fd, \
755			    int attrnamespace, void *data, size_t nbytes); }
756371	STD		{ ssize_t sys_extattr_list_file(const char *path, \
757			    int attrnamespace, void *data, size_t nbytes); }
758372	STD		{ ssize_t sys_extattr_list_link(const char *path, \
759			    int attrnamespace, void *data, size_t nbytes); }
760373	STD		{ int sys_pselect(int nd, fd_set *in, fd_set *ou, \
761			    fd_set *ex, const struct timespec *ts, \
762			    const sigset_t *mask); }
763374	STD		{ int sys_pollts(struct pollfd *fds, u_int nfds, \
764			    const struct timespec *ts, const sigset_t *mask); }
765375	STD		{ int sys_setxattr(const char *path, \
766			    const char *name, void *value, size_t size, \
767			    int flags); }
768376	STD		{ int sys_lsetxattr(const char *path, \
769			    const char *name, void *value, size_t size, \
770			    int flags); }
771377	STD		{ int sys_fsetxattr(int fd, \
772			    const char *name, void *value, size_t size, \
773			    int flags); }
774378	STD		{ int sys_getxattr(const char *path, \
775			    const char *name, void *value, size_t size); }
776379	STD		{ int sys_lgetxattr(const char *path, \
777			    const char *name, void *value, size_t size); }
778380	STD		{ int sys_fgetxattr(int fd, \
779			    const char *name, void *value, size_t size); }
780381	STD		{ int sys_listxattr(const char *path, \
781			    char *list, size_t size); }
782382	STD		{ int sys_llistxattr(const char *path, \
783			    char *list, size_t size); }
784383	STD		{ int sys_flistxattr(int fd, \
785			    char *list, size_t size); }
786384	STD		{ int sys_removexattr(const char *path, \
787			    const char *name); }
788385	STD		{ int sys_lremovexattr(const char *path, \
789			    const char *name); }
790386	STD		{ int sys_fremovexattr(int fd, \
791			    const char *name); }
792387	STD		{ int sys___stat30(const char *path, struct stat *ub); }
793388	STD		{ int sys___fstat30(int fd, struct stat *sb); }
794389	STD		{ int sys___lstat30(const char *path, struct stat *ub); }
795390	STD		{ int sys___getdents30(int fd, char *buf, size_t count); }
796391	STD		{ int sys_posix_fadvise(int fd, off_t offset, \
797			    off_t len, int advice); }
798392	COMPAT_30	{ int sys___fhstat30(const struct compat_30_fhandle \
799			    *fhp, struct stat *sb); }
800393	STD		{ int sys___ntp_gettime30(struct ntptimeval *ntvp); }
801394	STD		{ int sys___socket30(int domain, int type, int protocol); }
802395	STD		{ int sys___getfh30(const char *fname, void *fhp, \
803			    size_t *fh_size); }
804396	STD		{ int sys___fhopen40(const void *fhp, size_t fh_size,\
805			    int flags); }
806397	STD		{ int sys___fhstatvfs140(const void *fhp, \
807			    size_t fh_size, struct statvfs *buf, int flags); }
808398	STD		{ int sys___fhstat40(const void *fhp, \
809			    size_t fh_size, struct stat *sb); }
810