xref: /netbsd-src/sys/kern/syscalls.master (revision e5548b402ae4c44fb816de42c7bba9581ce23ef5)
1	$NetBSD: syscalls.master,v 1.150 2005/11/29 22:52:02 yamt 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	STD		{ 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, caddr_t 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	STD		{ int sys_getfh(const char *fname, fhandle_t *fhp); }
327162	COMPAT_09	{ int sys_getdomainname(char *domainname, int len); } \
328			    ogetdomainname
329163	COMPAT_09	{ int sys_setdomainname(char *domainname, int len); } \
330			    osetdomainname
331164	COMPAT_09	{ int sys_uname(struct outsname *name); } ouname
332165	STD		{ int sys_sysarch(int op, void *parms); }
333166	UNIMPL
334167	UNIMPL
335168	UNIMPL
336; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
337#if (defined(SYSVSEM) || !defined(_KERNEL)) && !defined(_LP64)
338169	COMPAT_10	{ int sys_semsys(int which, int a2, int a3, int a4, \
339			    int a5); } osemsys
340#else
341169	EXCL		1.0 semsys
342#endif
343; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
344#if (defined(SYSVMSG) || !defined(_KERNEL)) && !defined(_LP64)
345170	COMPAT_10	{ int sys_msgsys(int which, int a2, int a3, int a4, \
346			    int a5, int a6); } omsgsys
347#else
348170	EXCL		1.0 msgsys
349#endif
350; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
351#if (defined(SYSVSHM) || !defined(_KERNEL)) && !defined(_LP64)
352171	COMPAT_10	{ int sys_shmsys(int which, int a2, int a3, int a4); } \
353			    oshmsys
354#else
355171	EXCL		1.0 shmsys
356#endif
357172	UNIMPL
358173	STD		{ ssize_t sys_pread(int fd, void *buf, \
359			    size_t nbyte, int pad, off_t offset); }
360174	STD		{ ssize_t sys_pwrite(int fd, const void *buf, \
361			    size_t nbyte, int pad, off_t offset); }
362; For some reason, ntp_gettime doesn't want to raise SIGSYS when it's excluded.
363175	STD		{ int sys_ntp_gettime(struct ntptimeval *ntvp); }
364#if defined(NTP) || !defined(_KERNEL)
365176	STD		{ int sys_ntp_adjtime(struct timex *tp); }
366#else
367176	EXCL		ntp_adjtime
368#endif
369177	UNIMPL
370178	UNIMPL
371179	UNIMPL
372180	UNIMPL
373
374; Syscalls 180-199 are used by/reserved for BSD
375181	STD		{ int sys_setgid(gid_t gid); }
376182	STD		{ int sys_setegid(gid_t egid); }
377183	STD		{ int sys_seteuid(uid_t euid); }
378#if defined(LFS) || !defined(_KERNEL)
379184	STD		{ int sys_lfs_bmapv(fsid_t *fsidp, \
380			    struct block_info *blkiov, int blkcnt); }
381185	STD		{ int sys_lfs_markv(fsid_t *fsidp, \
382			    struct block_info *blkiov, int blkcnt); }
383186	STD		{ int sys_lfs_segclean(fsid_t *fsidp, u_long segment); }
384187	STD		{ int sys_lfs_segwait(fsid_t *fsidp, \
385			    struct timeval *tv); }
386#else
387184	EXCL		lfs_bmapv
388185	EXCL		lfs_markv
389186	EXCL		lfs_segclean
390187	EXCL		lfs_segwait
391#endif
392188	COMPAT_12	{ int sys_stat(const char *path, struct stat12 *ub); } \
393			    stat12
394189	COMPAT_12	{ int sys_fstat(int fd, struct stat12 *sb); } fstat12
395190	COMPAT_12	{ int sys_lstat(const char *path, \
396			    struct stat12 *ub); } lstat12
397191	STD		{ long sys_pathconf(const char *path, int name); }
398192	STD		{ long sys_fpathconf(int fd, int name); }
399193	UNIMPL
400194	STD		{ int sys_getrlimit(int which, \
401			    struct rlimit *rlp); }
402195	STD		{ int sys_setrlimit(int which, \
403			    const struct rlimit *rlp); }
404196	COMPAT_12	{ int sys_getdirentries(int fd, char *buf, \
405			    u_int count, long *basep); }
406197	STD		{ void *sys_mmap(void *addr, size_t len, int prot, \
407			    int flags, int fd, long pad, off_t pos); }
408198	INDIR		{ quad_t sys___syscall(quad_t num, ...); }
409199	STD		{ off_t sys_lseek(int fd, int pad, off_t offset, \
410			    int whence); }
411200	STD		{ 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		{ int sys___sysctl(int *name, u_int namelen, \
415			    void *old, size_t *oldlenp, 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;
429#if defined(LKM) || !defined(_KERNEL)
430210	NODEF		{ int sys_lkmnosys(void); }
431211	NODEF		{ int sys_lkmnosys(void); }
432212	NODEF		{ int sys_lkmnosys(void); }
433213	NODEF		{ int sys_lkmnosys(void); }
434214	NODEF		{ int sys_lkmnosys(void); }
435215	NODEF		{ int sys_lkmnosys(void); }
436216	NODEF		{ int sys_lkmnosys(void); }
437217	NODEF		{ int sys_lkmnosys(void); }
438218	NODEF		{ int sys_lkmnosys(void); }
439219	NODEF		{ int sys_lkmnosys(void); }
440#else	/* !LKM */
441210	EXCL		lkmnosys
442211	EXCL		lkmnosys
443212	EXCL		lkmnosys
444213	EXCL		lkmnosys
445214	EXCL		lkmnosys
446215	EXCL		lkmnosys
447216	EXCL		lkmnosys
448217	EXCL		lkmnosys
449218	EXCL		lkmnosys
450219	EXCL		lkmnosys
451#endif	/* !LKM */
452; System calls 220-300 are reserved for use by NetBSD
453#if defined(SYSVSEM) || !defined(_KERNEL)
454220	COMPAT_14	{ int sys___semctl(int semid, int semnum, int cmd, \
455			    union __semun *arg); }
456221	STD		{ int sys_semget(key_t key, int nsems, int semflg); }
457222	STD		{ int sys_semop(int semid, struct sembuf *sops, \
458			    size_t nsops); }
459223	STD		{ int sys_semconfig(int flag); }
460#else
461220	EXCL		compat_14_semctl
462221	EXCL		semget
463222	EXCL		semop
464223	EXCL		semconfig
465#endif
466#if defined(SYSVMSG) || !defined(_KERNEL)
467224	COMPAT_14	{ int sys_msgctl(int msqid, int cmd, \
468			    struct msqid_ds14 *buf); }
469225	STD		{ int sys_msgget(key_t key, int msgflg); }
470226	STD		{ int sys_msgsnd(int msqid, const void *msgp, \
471			    size_t msgsz, int msgflg); }
472227	STD		{ ssize_t sys_msgrcv(int msqid, void *msgp, \
473			    size_t msgsz, long msgtyp, int msgflg); }
474#else
475224	EXCL		compat_14_msgctl
476225	EXCL		msgget
477226	EXCL		msgsnd
478227	EXCL		msgrcv
479#endif
480#if defined(SYSVSHM) || !defined(_KERNEL)
481228	STD		{ void *sys_shmat(int shmid, const void *shmaddr, \
482			    int shmflg); }
483229	COMPAT_14	{ int sys_shmctl(int shmid, int cmd, \
484			    struct shmid_ds14 *buf); }
485230	STD		{ int sys_shmdt(const void *shmaddr); }
486231	STD		{ int sys_shmget(key_t key, size_t size, int shmflg); }
487#else
488228	EXCL		shmat
489229	EXCL		compat_14_shmctl
490230	EXCL		shmdt
491231	EXCL		shmget
492#endif
493232	STD		{ int sys_clock_gettime(clockid_t clock_id, \
494			    struct timespec *tp); }
495233	STD		{ int sys_clock_settime(clockid_t clock_id, \
496			    const struct timespec *tp); }
497234	STD		{ int sys_clock_getres(clockid_t clock_id, \
498			    struct timespec *tp); }
499235	STD		{ int sys_timer_create(clockid_t clock_id, \
500			    struct sigevent *evp, timer_t *timerid); }
501236	STD		{ int sys_timer_delete(timer_t timerid); }
502237	STD		{ int sys_timer_settime(timer_t timerid, int flags, \
503			    const struct itimerspec *value, \
504			    struct itimerspec *ovalue); }
505238	STD		{ int sys_timer_gettime(timer_t timerid, struct \
506			    itimerspec *value); }
507239	STD		{ int sys_timer_getoverrun(timer_t timerid); }
508;
509; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls
510;
511240	STD		{ int sys_nanosleep(const struct timespec *rqtp, \
512			    struct timespec *rmtp); }
513241	STD		{ int sys_fdatasync(int fd); }
514242	STD		{ int sys_mlockall(int flags); }
515243	STD		{ int sys_munlockall(void); }
516244	STD		{ int sys___sigtimedwait(const sigset_t *set, \
517			    siginfo_t *info, \
518			    struct timespec *timeout); }
519245	UNIMPL		sys_sigqueue
520;
521; Syscall 246 is free for any use
522;
523246	UNIMPL
524#if defined(P1003_1B_SEMAPHORE) || (!defined(_KERNEL) && defined(_LIBC))
525247	STD		{ int sys__ksem_init(unsigned int value, semid_t *idp); }
526248	STD		{ int sys__ksem_open(const char *name, int oflag, \
527			    mode_t mode, unsigned int value, semid_t *idp); }
528249	STD 		{ int sys__ksem_unlink(const char *name); }
529250	STD		{ int sys__ksem_close(semid_t id); }
530251	STD		{ int sys__ksem_post(semid_t id); }
531252	STD		{ int sys__ksem_wait(semid_t id); }
532253	STD		{ int sys__ksem_trywait(semid_t id); }
533254	STD		{ int sys__ksem_getvalue(semid_t id, \
534			    unsigned int *value); }
535255	STD		{ int sys__ksem_destroy(semid_t id); }
536256	UNIMPL		sys__ksem_timedwait
537#else
538247	EXCL		sys__ksem_init
539248	EXCL		sys__ksem_open
540249	EXCL 		sys__ksem_unlink
541250	EXCL		sys__ksem_close
542251	EXCL		sys__ksem_post
543252	EXCL		sys__ksem_wait
544253	EXCL		sys__ksem_trywait
545254	EXCL		sys__ksem_getvalue
546255	EXCL		sys__ksem_destroy
547256	UNIMPL		sys__ksem_timedwait
548#endif
549257	UNIMPL		sys_mq_open
550258	UNIMPL		sys_mq_close
551259	UNIMPL		sys_mq_unlink
552260	UNIMPL		sys_mq_getattr
553261	UNIMPL		sys_mq_setattr
554262	UNIMPL		sys_mq_notify
555263	UNIMPL		sys_mq_send
556264	UNIMPL		sys_mq_receive
557265	UNIMPL		sys_mq_timedsend
558266	UNIMPL		sys_mq_timedreceive
559267	UNIMPL
560268	UNIMPL
561269	UNIMPL
562270	STD		{ int sys___posix_rename(const char *from, \
563			    const char *to); }
564271	STD		{ int sys_swapctl(int cmd, void *arg, int misc); }
565272	COMPAT_30	{ int sys_getdents(int fd, char *buf, size_t count); }
566273	STD		{ int sys_minherit(void *addr, size_t len, \
567			    int inherit); }
568274	STD		{ int sys_lchmod(const char *path, mode_t mode); }
569275	STD		{ int sys_lchown(const char *path, uid_t uid, \
570			    gid_t gid); }
571276	STD		{ int sys_lutimes(const char *path, \
572			    const struct timeval *tptr); }
573277	STD		{ int sys___msync13(void *addr, size_t len, int flags); }
574278	COMPAT_30	{ int sys___stat13(const char *path, struct stat30 *ub); }
575279	COMPAT_30	{ int sys___fstat13(int fd, struct stat30 *sb); }
576280	COMPAT_30	{ int sys___lstat13(const char *path, struct stat30 *ub); }
577281	STD		{ int sys___sigaltstack14( \
578			    const struct sigaltstack *nss, \
579			    struct sigaltstack *oss); }
580282	STD		{ int sys___vfork14(void); }
581283	STD		{ int sys___posix_chown(const char *path, uid_t uid, \
582			    gid_t gid); }
583284	STD		{ int sys___posix_fchown(int fd, uid_t uid, \
584			    gid_t gid); }
585285	STD		{ int sys___posix_lchown(const char *path, uid_t uid, \
586			    gid_t gid); }
587286	STD		{ pid_t sys_getsid(pid_t pid); }
588287	STD		{ pid_t sys___clone(int flags, void *stack); }
589#if defined(KTRACE) || !defined(_KERNEL)
590288	STD		{ int sys_fktrace(const int fd, int ops, \
591			    int facs, int pid); }
592#else
593288	EXCL		ktrace
594#endif
595289	STD		{ ssize_t sys_preadv(int fd, \
596			    const struct iovec *iovp, int iovcnt, \
597			    int pad, off_t offset); }
598290	STD		{ ssize_t sys_pwritev(int fd, \
599			    const struct iovec *iovp, int iovcnt, \
600			    int pad, off_t offset); }
601291	COMPAT_16	{ int sys___sigaction14(int signum, \
602			    const struct sigaction *nsa, \
603			    struct sigaction *osa); }
604292	STD		{ int sys___sigpending14(sigset_t *set); }
605293	STD		{ int sys___sigprocmask14(int how, \
606			    const sigset_t *set, \
607			    sigset_t *oset); }
608294	STD		{ int sys___sigsuspend14(const sigset_t *set); }
609295	COMPAT_16	{ int sys___sigreturn14(struct sigcontext *sigcntxp); }
610296	STD		{ int sys___getcwd(char *bufp, size_t length); }
611297	STD		{ int sys_fchroot(int fd); }
612298	STD		{ int sys_fhopen(const fhandle_t *fhp, int flags); }
613299	STD		{ int sys_fhstat(const fhandle_t *fhp, \
614			    struct stat *sb); }
615300	COMPAT_20	{ int sys_fhstatfs(const fhandle_t *fhp, \
616			    struct statfs12 *buf); }
617#if defined(SYSVSEM) || !defined(_KERNEL)
618301	STD		{ int sys_____semctl13(int semid, int semnum, int cmd, \
619			    ... union __semun *arg); }
620#else
621301	EXCL		____semctl13
622#endif
623#if defined(SYSVMSG) || !defined(_KERNEL)
624302	STD		{ int sys___msgctl13(int msqid, int cmd, \
625			    struct msqid_ds *buf); }
626#else
627302	EXCL		__msgctl13
628#endif
629#if defined(SYSVSHM) || !defined(_KERNEL)
630303	STD		{ int sys___shmctl13(int shmid, int cmd, \
631			    struct shmid_ds *buf); }
632#else
633303	EXCL		__shmctl13
634#endif
635304	STD		{ int sys_lchflags(const char *path, u_long flags); }
636305	STD		{ int sys_issetugid(void); }
637306	STD		{ int sys_utrace(const char *label, void *addr, \
638				size_t len); }
639307	STD		{ int sys_getcontext(struct __ucontext *ucp); }
640308	STD		{ int sys_setcontext(const struct __ucontext *ucp); }
641309	STD		{ int sys__lwp_create(const struct __ucontext *ucp, \
642				u_long flags, lwpid_t *new_lwp); }
643310	STD		{ int sys__lwp_exit(void); }
644311	STD		{ lwpid_t sys__lwp_self(void); }
645312	STD		{ int sys__lwp_wait(lwpid_t wait_for, \
646				lwpid_t *departed); }
647313	STD		{ int sys__lwp_suspend(lwpid_t target); }
648314	STD		{ int sys__lwp_continue(lwpid_t target); }
649315	STD		{ int sys__lwp_wakeup(lwpid_t target); }
650316	STD		{ void *sys__lwp_getprivate(void); }
651317	STD		{ void sys__lwp_setprivate(void *ptr); }
652; Syscalls 318-329 reserved for remaining Solaris-compatible LWP calls.
653318	UNIMPL
654319	UNIMPL
655320	UNIMPL
656321	UNIMPL
657322	UNIMPL
658323	UNIMPL
659324	UNIMPL
660325	UNIMPL
661326	UNIMPL
662327	UNIMPL
663328	UNIMPL
664329	UNIMPL
665; Scheduler activation syscalls
666330	STD		{ int sys_sa_register(sa_upcall_t new, \
667				sa_upcall_t *old, int flags, \
668				ssize_t stackinfo_offset); }
669331	STD		{ int sys_sa_stacks(int num, stack_t *stacks); }
670332	STD		{ int sys_sa_enable(void); }
671333	STD		{ int sys_sa_setconcurrency(int concurrency); }
672334	STD		{ int sys_sa_yield(void); }
673335	STD		{ int sys_sa_preempt(int sa_id); }
674336	OBSOL		sys_sa_unblockyield
675;
676; Syscalls 337-339 are reserved for other scheduler activation syscalls.
677;
678337	UNIMPL
679338	UNIMPL
680339	UNIMPL
681340	STD		{ int sys___sigaction_sigtramp(int signum, \
682			    const struct sigaction *nsa, \
683			    struct sigaction *osa, \
684			    const void *tramp, int vers); }
685341	STD		{ int sys_pmc_get_info(int ctr, int op, void *args); }
686342	STD		{ int sys_pmc_control(int ctr, int op, void *args); }
687343	STD		{ int sys_rasctl(caddr_t addr, size_t len, int op); }
688344	STD		{ int sys_kqueue(void); }
689345	STD		{ int sys_kevent(int fd, \
690			    const struct kevent *changelist, size_t nchanges, \
691			    struct kevent *eventlist, size_t nevents, \
692			    const struct timespec *timeout); }
693;
694; Syscalls 346-353 are reserved for the IEEE Std1003.1b scheduling syscalls
695;
696346	UNIMPL		sys_sched_setparam
697347	UNIMPL		sys_sched_getparam
698348	UNIMPL		sys_sched_setscheduler
699349	UNIMPL		sys_sched_getscheduler
700350	UNIMPL		sys_sched_yield
701351	UNIMPL		sys_sched_get_priority_max
702352	UNIMPL		sys_sched_get_priority_min
703353	UNIMPL		sys_sched_rr_get_interval
704
705354	STD		{ int sys_fsync_range(int fd, int flags, off_t start, \
706			    off_t length); }
707355	STD		{ int sys_uuidgen(struct uuid *store, int count); }
708356	STD		{ int sys_getvfsstat(struct statvfs *buf, \
709			    size_t bufsize, int flags); }
710357	STD		{ int sys_statvfs1(const char *path, \
711			    struct statvfs *buf, int flags); }
712358	STD		{ int sys_fstatvfs1(int fd, struct statvfs *buf, \
713			    int flags); }
714359	STD		{ int sys_fhstatvfs1(const fhandle_t *fhp, \
715			    struct statvfs *buf, int flags); }
716360	STD		{ int sys_extattrctl(const char *path, int cmd, \
717			    const char *filename, int attrnamespace, \
718			    const char *attrname); }
719361	STD		{ int sys_extattr_set_file(const char *path, \
720			    int attrnamespace, const char *attrname, \
721			    const void *data, size_t nbytes); }
722362	STD		{ ssize_t sys_extattr_get_file(const char *path, \
723			    int attrnamespace, const char *attrname, \
724			    void *data, size_t nbytes); }
725363	STD		{ int sys_extattr_delete_file(const char *path, \
726			    int attrnamespace, const char *attrname); }
727364	STD		{ int sys_extattr_set_fd(int fd, \
728			    int attrnamespace, const char *attrname, \
729			    const void *data, size_t nbytes); }
730365	STD		{ ssize_t sys_extattr_get_fd(int fd, \
731			    int attrnamespace, const char *attrname, \
732			    void *data, size_t nbytes); }
733366	STD		{ int sys_extattr_delete_fd(int fd, \
734			    int attrnamespace, const char *attrname); }
735367	STD		{ int sys_extattr_set_link(const char *path, \
736			    int attrnamespace, const char *attrname, \
737			    const void *data, size_t nbytes); }
738368	STD		{ ssize_t sys_extattr_get_link(const char *path, \
739			    int attrnamespace, const char *attrname, \
740			    void *data, size_t nbytes); }
741369	STD		{ int sys_extattr_delete_link(const char *path, \
742			    int attrnamespace, const char *attrname); }
743370	STD		{ ssize_t sys_extattr_list_fd(int fd, \
744			    int attrnamespace, void *data, size_t nbytes); }
745371	STD		{ ssize_t sys_extattr_list_file(const char *path, \
746			    int attrnamespace, void *data, size_t nbytes); }
747372	STD		{ ssize_t sys_extattr_list_link(const char *path, \
748			    int attrnamespace, void *data, size_t nbytes); }
749373	STD		{ int sys_pselect(int nd, fd_set *in, fd_set *ou, \
750			    fd_set *ex, const struct timespec *ts, \
751			    const sigset_t *mask); }
752374	STD		{ int sys_pollts(struct pollfd *fds, u_int nfds, \
753			    const struct timespec *ts, const sigset_t *mask); }
754375	STD		{ int sys_setxattr(const char *path, \
755			    const char *name, void *value, size_t size, \
756			    int flags); }
757376	STD		{ int sys_lsetxattr(const char *path, \
758			    const char *name, void *value, size_t size, \
759			    int flags); }
760377	STD		{ int sys_fsetxattr(int fd, \
761			    const char *name, void *value, size_t size, \
762			    int flags); }
763378	STD		{ int sys_getxattr(const char *path, \
764			    const char *name, void *value, size_t size); }
765379	STD		{ int sys_lgetxattr(const char *path, \
766			    const char *name, void *value, size_t size); }
767380	STD		{ int sys_fgetxattr(int fd, \
768			    const char *name, void *value, size_t size); }
769381	STD		{ int sys_listxattr(const char *path, \
770			    char *list, size_t size); }
771382	STD		{ int sys_llistxattr(const char *path, \
772			    char *list, size_t size); }
773383	STD		{ int sys_flistxattr(int fd, \
774			    char *list, size_t size); }
775384	STD		{ int sys_removexattr(const char *path, \
776			    const char *name); }
777385	STD		{ int sys_lremovexattr(const char *path, \
778			    const char *name); }
779386	STD		{ int sys_fremovexattr(int fd, \
780			    const char *name); }
781387	STD		{ int sys___stat30(const char *path, struct stat *ub); }
782388	STD		{ int sys___fstat30(int fd, struct stat *sb); }
783389	STD		{ int sys___lstat30(const char *path, struct stat *ub); }
784390	STD		{ int sys___getdents30(int fd, char *buf, size_t count); }
785391	STD		{ int sys_posix_fadvise(int fd, off_t offset, \
786			    off_t len, int advice); }
787