syscalls.master revision 1.158
1	$NetBSD: syscalls.master,v 1.158 2006/08/30 11:34:26 matt 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); }
108#if defined(PTRACE) || !defined(_KERNEL)
10926	STD		{ int sys_ptrace(int req, pid_t pid, caddr_t addr, \
110			    int data); }
111#else
11226	EXCL		ktrace
113#endif
11427	STD		{ ssize_t sys_recvmsg(int s, struct msghdr *msg, \
115			    int flags); }
11628	STD		{ ssize_t sys_sendmsg(int s, \
117			    const struct msghdr *msg, int flags); }
11829	STD		{ ssize_t sys_recvfrom(int s, void *buf, size_t len, \
119			    int flags, struct sockaddr *from, \
120			    unsigned int *fromlenaddr); }
12130	STD		{ int sys_accept(int s, struct sockaddr *name, \
122			    unsigned int *anamelen); }
12331	STD		{ int sys_getpeername(int fdes, struct sockaddr *asa, \
124			    unsigned int *alen); }
12532	STD		{ int sys_getsockname(int fdes, struct sockaddr *asa, \
126			    unsigned int *alen); }
12733	STD		{ int sys_access(const char *path, int flags); }
12834	STD		{ int sys_chflags(const char *path, u_long flags); }
12935	STD		{ int sys_fchflags(int fd, u_long flags); }
13036	STD		{ void sys_sync(void); }
13137	STD		{ int sys_kill(int pid, int signum); }
13238	COMPAT_43	{ int sys_stat(const char *path, struct stat43 *ub); } \
133			    stat43
13439	STD		{ pid_t sys_getppid(void); }
13540	COMPAT_43	{ int sys_lstat(const char *path, \
136			    struct stat43 *ub); } lstat43
13741	STD		{ int sys_dup(int fd); }
13842	STD		{ int sys_pipe(void); }
13943	STD		{ gid_t sys_getegid(void); }
14044	STD		{ int sys_profil(caddr_t samples, size_t size, \
141			    u_long offset, u_int scale); }
142#if defined(KTRACE) || !defined(_KERNEL)
14345	STD		{ int sys_ktrace(const char *fname, int ops, \
144			    int facs, int pid); }
145#else
14645	EXCL		ktrace
147#endif
14846	COMPAT_13	{ int sys_sigaction(int signum, \
149			    const struct sigaction13 *nsa, \
150			    struct sigaction13 *osa); } sigaction13
151#ifdef COMPAT_43
15247	STD		{ gid_t sys_getgid_with_egid(void); } getgid
153#else
15447	STD		{ gid_t sys_getgid(void); }
155#endif
15648	COMPAT_13	{ int sys_sigprocmask(int how, \
157			    int mask); } sigprocmask13
15849	STD		{ int sys___getlogin(char *namebuf, size_t namelen); }
15950	STD		{ int sys___setlogin(const char *namebuf); }
16051	STD		{ int sys_acct(const char *path); }
16152	COMPAT_13	{ int sys_sigpending(void); } sigpending13
16253	COMPAT_13	{ int sys_sigaltstack( \
163			    const struct sigaltstack13 *nss, \
164			    struct sigaltstack13 *oss); } sigaltstack13
16554	STD		{ int sys_ioctl(int fd, \
166			    u_long com, ... void *data); }
16755	COMPAT_12	{ int sys_reboot(int opt); } oreboot
16856	STD		{ int sys_revoke(const char *path); }
16957	STD		{ int sys_symlink(const char *path, \
170			    const char *link); }
17158	STD		{ ssize_t sys_readlink(const char *path, char *buf, \
172			    size_t count); }
17359	STD		{ int sys_execve(const char *path, \
174			    char * const *argp, char * const *envp); }
17560	STD		{ mode_t sys_umask(mode_t newmask); }
17661	STD		{ int sys_chroot(const char *path); }
17762	COMPAT_43	{ int sys_fstat(int fd, struct stat43 *sb); } fstat43
17863	COMPAT_43	{ int sys_getkerninfo(int op, char *where, int *size, \
179			    int arg); } ogetkerninfo
18064	COMPAT_43	{ int sys_getpagesize(void); } ogetpagesize
18165	COMPAT_12	{ int sys_msync(caddr_t addr, size_t len); }
182; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)?
18366	STD		{ int sys_vfork(void); }
18467	OBSOL		vread
18568	OBSOL		vwrite
18669	STD		{ int sys_sbrk(intptr_t incr); }
18770	STD		{ int sys_sstk(int incr); }
18871	COMPAT_43	{ int sys_mmap(caddr_t addr, size_t len, int prot, \
189			    int flags, int fd, long pos); } ommap
19072	STD		{ int sys_ovadvise(int anom); } vadvise
19173	STD		{ int sys_munmap(void *addr, size_t len); }
19274	STD		{ int sys_mprotect(void *addr, size_t len, \
193			    int prot); }
19475	STD		{ int sys_madvise(void *addr, size_t len, \
195			    int behav); }
19676	OBSOL		vhangup
19777	OBSOL		vlimit
19878	STD		{ int sys_mincore(void *addr, size_t len, \
199			    char *vec); }
20079	STD		{ int sys_getgroups(int gidsetsize, \
201			    gid_t *gidset); }
20280	STD		{ int sys_setgroups(int gidsetsize, \
203			    const gid_t *gidset); }
20481	STD		{ int sys_getpgrp(void); }
20582	STD		{ int sys_setpgid(int pid, int pgid); }
20683	STD		{ int sys_setitimer(int which, \
207			    const struct itimerval *itv, \
208			    struct itimerval *oitv); }
20984	COMPAT_43	{ int sys_wait(void); } owait
21085	COMPAT_12	{ int sys_swapon(const char *name); } oswapon
21186	STD		{ int sys_getitimer(int which, \
212			    struct itimerval *itv); }
21387	COMPAT_43	{ int sys_gethostname(char *hostname, u_int len); } \
214			    ogethostname
21588	COMPAT_43	{ int sys_sethostname(char *hostname, u_int len); } \
216			    osethostname
21789	COMPAT_43	{ int sys_getdtablesize(void); } ogetdtablesize
21890	STD		{ int sys_dup2(int from, int to); }
21991	UNIMPL		getdopt
22092	STD		{ int sys_fcntl(int fd, int cmd, ... void *arg); }
22193	STD		{ int sys_select(int nd, fd_set *in, fd_set *ou, \
222			    fd_set *ex, struct timeval *tv); }
22394	UNIMPL		setdopt
22495	STD		{ int sys_fsync(int fd); }
22596	STD		{ int sys_setpriority(int which, id_t who, int prio); }
22697	COMPAT_30	{ int sys_socket(int domain, int type, int protocol); }
22798	STD		{ int sys_connect(int s, const struct sockaddr *name, \
228			    unsigned int namelen); }
22999	COMPAT_43	{ int sys_accept(int s, caddr_t name, \
230			    int *anamelen); } oaccept
231100	STD		{ int sys_getpriority(int which, id_t who); }
232101	COMPAT_43	{ int sys_send(int s, caddr_t buf, int len, \
233			    int flags); } osend
234102	COMPAT_43	{ int sys_recv(int s, caddr_t buf, int len, \
235			    int flags); } orecv
236103	COMPAT_13	{ int sys_sigreturn(struct sigcontext13 *sigcntxp); } \
237			    sigreturn13
238104	STD		{ int sys_bind(int s, const struct sockaddr *name, \
239			    unsigned int namelen); }
240105	STD		{ int sys_setsockopt(int s, int level, int name, \
241			    const void *val, unsigned int valsize); }
242106	STD		{ int sys_listen(int s, int backlog); }
243107	OBSOL		vtimes
244108	COMPAT_43	{ int sys_sigvec(int signum, struct sigvec *nsv, \
245			    struct sigvec *osv); } osigvec
246109	COMPAT_43	{ int sys_sigblock(int mask); } osigblock
247110	COMPAT_43	{ int sys_sigsetmask(int mask); } osigsetmask
248111	COMPAT_13	{ int sys_sigsuspend(int mask); } sigsuspend13
249112	COMPAT_43	{ int sys_sigstack(struct sigstack *nss, \
250			    struct sigstack *oss); } osigstack
251113	COMPAT_43	{ int sys_recvmsg(int s, struct omsghdr *msg, \
252			    int flags); } orecvmsg
253114	COMPAT_43	{ int sys_sendmsg(int s, caddr_t msg, int flags); } \
254			    osendmsg
255115	OBSOL		vtrace
256116	STD		{ int sys_gettimeofday(struct timeval *tp, \
257			    void *tzp); }
258117	STD		{ int sys_getrusage(int who, struct rusage *rusage); }
259118	STD		{ int sys_getsockopt(int s, int level, int name, \
260			    void *val, unsigned int *avalsize); }
261119	OBSOL		resuba
262120	STD		{ ssize_t sys_readv(int fd, \
263			    const struct iovec *iovp, int iovcnt); }
264121	STD		{ ssize_t sys_writev(int fd, \
265			    const struct iovec *iovp, int iovcnt); }
266122	STD		{ int sys_settimeofday(const struct timeval *tv, \
267			    const void *tzp); }
268123	STD		{ int sys_fchown(int fd, uid_t uid, gid_t gid); }
269124	STD		{ int sys_fchmod(int fd, mode_t mode); }
270125	COMPAT_43	{ int sys_recvfrom(int s, caddr_t buf, size_t len, \
271			    int flags, caddr_t from, int *fromlenaddr); } \
272			    orecvfrom
273126	STD		{ int sys_setreuid(uid_t ruid, uid_t euid); }
274127	STD		{ int sys_setregid(gid_t rgid, gid_t egid); }
275128	STD		{ int sys_rename(const char *from, const char *to); }
276129	COMPAT_43	{ int sys_truncate(const char *path, long length); } \
277			    otruncate
278130	COMPAT_43	{ int sys_ftruncate(int fd, long length); } oftruncate
279131	STD		{ int sys_flock(int fd, int how); }
280132	STD		{ int sys_mkfifo(const char *path, mode_t mode); }
281133	STD		{ ssize_t sys_sendto(int s, const void *buf, \
282			    size_t len, int flags, const struct sockaddr *to, \
283			    unsigned int tolen); }
284134	STD		{ int sys_shutdown(int s, int how); }
285135	STD		{ int sys_socketpair(int domain, int type, \
286			    int protocol, int *rsv); }
287136	STD		{ int sys_mkdir(const char *path, mode_t mode); }
288137	STD		{ int sys_rmdir(const char *path); }
289138	STD		{ int sys_utimes(const char *path, \
290			    const struct timeval *tptr); }
291139	OBSOL		4.2 sigreturn
292140	STD		{ int sys_adjtime(const struct timeval *delta, \
293			    struct timeval *olddelta); }
294141	COMPAT_43	{ int sys_getpeername(int fdes, caddr_t asa, \
295			    int *alen); } ogetpeername
296142	COMPAT_43	{ int32_t sys_gethostid(void); } ogethostid
297143	COMPAT_43	{ int sys_sethostid(int32_t hostid); } osethostid
298144	COMPAT_43	{ int sys_getrlimit(int which, \
299			    struct orlimit *rlp); } ogetrlimit
300145	COMPAT_43	{ int sys_setrlimit(int which, \
301			    const struct orlimit *rlp); } osetrlimit
302146	COMPAT_43	{ int sys_killpg(int pgid, int signum); } okillpg
303147	STD		{ int sys_setsid(void); }
304148	STD		{ int sys_quotactl(const char *path, int cmd, \
305			    int uid, caddr_t arg); }
306149	COMPAT_43	{ int sys_quota(void); } oquota
307150	COMPAT_43	{ int sys_getsockname(int fdec, caddr_t asa, \
308			    int *alen); } ogetsockname
309
310; Syscalls 151-180 inclusive are reserved for vendor-specific
311; system calls.  (This includes various calls added for compatibity
312; with other Unix variants.)
313; Some of these calls are now supported by BSD...
314151	UNIMPL
315152	UNIMPL
316153	UNIMPL
317154	UNIMPL
318#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL)
319155	STD		{ int sys_nfssvc(int flag, void *argp); }
320#else
321155	EXCL		nfssvc
322#endif
323156	COMPAT_43	{ int sys_getdirentries(int fd, char *buf, \
324			    u_int count, long *basep); } ogetdirentries
325157	COMPAT_20	{ int sys_statfs(const char *path, \
326			    struct statfs12 *buf); }
327158	COMPAT_20	{ int sys_fstatfs(int fd, struct statfs12 *buf); }
328159	UNIMPL
329160	UNIMPL
330161	COMPAT_30	{ int sys_getfh(const char *fname, \
331			    struct compat_30_fhandle *fhp); }
332162	COMPAT_09	{ int sys_getdomainname(char *domainname, int len); } \
333			    ogetdomainname
334163	COMPAT_09	{ int sys_setdomainname(char *domainname, int len); } \
335			    osetdomainname
336164	COMPAT_09	{ int sys_uname(struct outsname *name); } ouname
337165	STD		{ int sys_sysarch(int op, void *parms); }
338166	UNIMPL
339167	UNIMPL
340168	UNIMPL
341; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
342#if (defined(SYSVSEM) || !defined(_KERNEL)) && !defined(_LP64)
343169	COMPAT_10	{ int sys_semsys(int which, int a2, int a3, int a4, \
344			    int a5); } osemsys
345#else
346169	EXCL		1.0 semsys
347#endif
348; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
349#if (defined(SYSVMSG) || !defined(_KERNEL)) && !defined(_LP64)
350170	COMPAT_10	{ int sys_msgsys(int which, int a2, int a3, int a4, \
351			    int a5, int a6); } omsgsys
352#else
353170	EXCL		1.0 msgsys
354#endif
355; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
356#if (defined(SYSVSHM) || !defined(_KERNEL)) && !defined(_LP64)
357171	COMPAT_10	{ int sys_shmsys(int which, int a2, int a3, int a4); } \
358			    oshmsys
359#else
360171	EXCL		1.0 shmsys
361#endif
362172	UNIMPL
363173	STD		{ ssize_t sys_pread(int fd, void *buf, \
364			    size_t nbyte, int pad, off_t offset); }
365174	STD		{ ssize_t sys_pwrite(int fd, const void *buf, \
366			    size_t nbyte, int pad, off_t offset); }
367; For some reason, ntp_gettime doesn't want to raise SIGSYS when it's excluded.
368175	COMPAT_30	{ int sys_ntp_gettime(struct ntptimeval30 *ntvp); }
369#if defined(NTP) || !defined(_KERNEL)
370176	STD		{ int sys_ntp_adjtime(struct timex *tp); }
371#else
372176	EXCL		ntp_adjtime
373#endif
374177	UNIMPL
375178	UNIMPL
376179	UNIMPL
377180	UNIMPL
378
379; Syscalls 180-199 are used by/reserved for BSD
380181	STD		{ int sys_setgid(gid_t gid); }
381182	STD		{ int sys_setegid(gid_t egid); }
382183	STD		{ int sys_seteuid(uid_t euid); }
383#if defined(LFS) || !defined(_KERNEL)
384184	STD		{ int sys_lfs_bmapv(fsid_t *fsidp, \
385			    struct block_info *blkiov, int blkcnt); }
386185	STD		{ int sys_lfs_markv(fsid_t *fsidp, \
387			    struct block_info *blkiov, int blkcnt); }
388186	STD		{ int sys_lfs_segclean(fsid_t *fsidp, u_long segment); }
389187	STD		{ int sys_lfs_segwait(fsid_t *fsidp, \
390			    struct timeval *tv); }
391#else
392184	EXCL		lfs_bmapv
393185	EXCL		lfs_markv
394186	EXCL		lfs_segclean
395187	EXCL		lfs_segwait
396#endif
397188	COMPAT_12	{ int sys_stat(const char *path, struct stat12 *ub); } \
398			    stat12
399189	COMPAT_12	{ int sys_fstat(int fd, struct stat12 *sb); } fstat12
400190	COMPAT_12	{ int sys_lstat(const char *path, \
401			    struct stat12 *ub); } lstat12
402191	STD		{ long sys_pathconf(const char *path, int name); }
403192	STD		{ long sys_fpathconf(int fd, int name); }
404193	UNIMPL
405194	STD		{ int sys_getrlimit(int which, \
406			    struct rlimit *rlp); }
407195	STD		{ int sys_setrlimit(int which, \
408			    const struct rlimit *rlp); }
409196	COMPAT_12	{ int sys_getdirentries(int fd, char *buf, \
410			    u_int count, long *basep); }
411197	STD		{ void *sys_mmap(void *addr, size_t len, int prot, \
412			    int flags, int fd, long pad, off_t pos); }
413198	INDIR		{ quad_t sys___syscall(quad_t num, ...); }
414199	STD		{ off_t sys_lseek(int fd, int pad, off_t offset, \
415			    int whence); }
416200	STD		{ int sys_truncate(const char *path, int pad, \
417			    off_t length); }
418201	STD		{ int sys_ftruncate(int fd, int pad, off_t length); }
419202	STD		{ int sys___sysctl(const int *name, u_int namelen, \
420			    void *old, size_t *oldlenp, const void *new, \
421			    size_t newlen); }
422203	STD		{ int sys_mlock(const void *addr, size_t len); }
423204	STD		{ int sys_munlock(const void *addr, size_t len); }
424205	STD		{ int sys_undelete(const char *path); }
425206	STD		{ int sys_futimes(int fd, \
426			    const struct timeval *tptr); }
427207	STD		{ pid_t sys_getpgid(pid_t pid); }
428208	STD		{ int sys_reboot(int opt, char *bootstr); }
429209	STD		{ int sys_poll(struct pollfd *fds, u_int nfds, \
430			    int timeout); }
431;
432; Syscalls 210-219 are reserved for dynamically loaded syscalls
433;
434#if defined(LKM) || !defined(_KERNEL)
435210	NODEF		{ int sys_lkmnosys(void); }
436211	NODEF		{ int sys_lkmnosys(void); }
437212	NODEF		{ int sys_lkmnosys(void); }
438213	NODEF		{ int sys_lkmnosys(void); }
439214	NODEF		{ int sys_lkmnosys(void); }
440215	NODEF		{ int sys_lkmnosys(void); }
441216	NODEF		{ int sys_lkmnosys(void); }
442217	NODEF		{ int sys_lkmnosys(void); }
443218	NODEF		{ int sys_lkmnosys(void); }
444219	NODEF		{ int sys_lkmnosys(void); }
445#else	/* !LKM */
446210	EXCL		lkmnosys
447211	EXCL		lkmnosys
448212	EXCL		lkmnosys
449213	EXCL		lkmnosys
450214	EXCL		lkmnosys
451215	EXCL		lkmnosys
452216	EXCL		lkmnosys
453217	EXCL		lkmnosys
454218	EXCL		lkmnosys
455219	EXCL		lkmnosys
456#endif	/* !LKM */
457; System calls 220-300 are reserved for use by NetBSD
458#if defined(SYSVSEM) || !defined(_KERNEL)
459220	COMPAT_14	{ int sys___semctl(int semid, int semnum, int cmd, \
460			    union __semun *arg); }
461221	STD		{ int sys_semget(key_t key, int nsems, int semflg); }
462222	STD		{ int sys_semop(int semid, struct sembuf *sops, \
463			    size_t nsops); }
464223	STD		{ int sys_semconfig(int flag); }
465#else
466220	EXCL		compat_14_semctl
467221	EXCL		semget
468222	EXCL		semop
469223	EXCL		semconfig
470#endif
471#if defined(SYSVMSG) || !defined(_KERNEL)
472224	COMPAT_14	{ int sys_msgctl(int msqid, int cmd, \
473			    struct msqid_ds14 *buf); }
474225	STD		{ int sys_msgget(key_t key, int msgflg); }
475226	STD		{ int sys_msgsnd(int msqid, const void *msgp, \
476			    size_t msgsz, int msgflg); }
477227	STD		{ ssize_t sys_msgrcv(int msqid, void *msgp, \
478			    size_t msgsz, long msgtyp, int msgflg); }
479#else
480224	EXCL		compat_14_msgctl
481225	EXCL		msgget
482226	EXCL		msgsnd
483227	EXCL		msgrcv
484#endif
485#if defined(SYSVSHM) || !defined(_KERNEL)
486228	STD		{ void *sys_shmat(int shmid, const void *shmaddr, \
487			    int shmflg); }
488229	COMPAT_14	{ int sys_shmctl(int shmid, int cmd, \
489			    struct shmid_ds14 *buf); }
490230	STD		{ int sys_shmdt(const void *shmaddr); }
491231	STD		{ int sys_shmget(key_t key, size_t size, int shmflg); }
492#else
493228	EXCL		shmat
494229	EXCL		compat_14_shmctl
495230	EXCL		shmdt
496231	EXCL		shmget
497#endif
498232	STD		{ int sys_clock_gettime(clockid_t clock_id, \
499			    struct timespec *tp); }
500233	STD		{ int sys_clock_settime(clockid_t clock_id, \
501			    const struct timespec *tp); }
502234	STD		{ int sys_clock_getres(clockid_t clock_id, \
503			    struct timespec *tp); }
504235	STD		{ int sys_timer_create(clockid_t clock_id, \
505			    struct sigevent *evp, timer_t *timerid); }
506236	STD		{ int sys_timer_delete(timer_t timerid); }
507237	STD		{ int sys_timer_settime(timer_t timerid, int flags, \
508			    const struct itimerspec *value, \
509			    struct itimerspec *ovalue); }
510238	STD		{ int sys_timer_gettime(timer_t timerid, struct \
511			    itimerspec *value); }
512239	STD		{ int sys_timer_getoverrun(timer_t timerid); }
513;
514; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls
515;
516240	STD		{ int sys_nanosleep(const struct timespec *rqtp, \
517			    struct timespec *rmtp); }
518241	STD		{ int sys_fdatasync(int fd); }
519242	STD		{ int sys_mlockall(int flags); }
520243	STD		{ int sys_munlockall(void); }
521244	STD		{ int sys___sigtimedwait(const sigset_t *set, \
522			    siginfo_t *info, \
523			    struct timespec *timeout); }
524245	UNIMPL		sys_sigqueue
525;
526; Syscall 246 is free for any use
527;
528246	UNIMPL
529#if defined(P1003_1B_SEMAPHORE) || (!defined(_KERNEL) && defined(_LIBC))
530247	STD		{ int sys__ksem_init(unsigned int value, semid_t *idp); }
531248	STD		{ int sys__ksem_open(const char *name, int oflag, \
532			    mode_t mode, unsigned int value, semid_t *idp); }
533249	STD 		{ int sys__ksem_unlink(const char *name); }
534250	STD		{ int sys__ksem_close(semid_t id); }
535251	STD		{ int sys__ksem_post(semid_t id); }
536252	STD		{ int sys__ksem_wait(semid_t id); }
537253	STD		{ int sys__ksem_trywait(semid_t id); }
538254	STD		{ int sys__ksem_getvalue(semid_t id, \
539			    unsigned int *value); }
540255	STD		{ int sys__ksem_destroy(semid_t id); }
541256	UNIMPL		sys__ksem_timedwait
542#else
543247	EXCL		sys__ksem_init
544248	EXCL		sys__ksem_open
545249	EXCL 		sys__ksem_unlink
546250	EXCL		sys__ksem_close
547251	EXCL		sys__ksem_post
548252	EXCL		sys__ksem_wait
549253	EXCL		sys__ksem_trywait
550254	EXCL		sys__ksem_getvalue
551255	EXCL		sys__ksem_destroy
552256	UNIMPL		sys__ksem_timedwait
553#endif
554257	UNIMPL		sys_mq_open
555258	UNIMPL		sys_mq_close
556259	UNIMPL		sys_mq_unlink
557260	UNIMPL		sys_mq_getattr
558261	UNIMPL		sys_mq_setattr
559262	UNIMPL		sys_mq_notify
560263	UNIMPL		sys_mq_send
561264	UNIMPL		sys_mq_receive
562265	UNIMPL		sys_mq_timedsend
563266	UNIMPL		sys_mq_timedreceive
564267	UNIMPL
565268	UNIMPL
566269	UNIMPL
567270	STD		{ int sys___posix_rename(const char *from, \
568			    const char *to); }
569271	STD		{ int sys_swapctl(int cmd, void *arg, int misc); }
570272	COMPAT_30	{ int sys_getdents(int fd, char *buf, size_t count); }
571273	STD		{ int sys_minherit(void *addr, size_t len, \
572			    int inherit); }
573274	STD		{ int sys_lchmod(const char *path, mode_t mode); }
574275	STD		{ int sys_lchown(const char *path, uid_t uid, \
575			    gid_t gid); }
576276	STD		{ int sys_lutimes(const char *path, \
577			    const struct timeval *tptr); }
578277	STD		{ int sys___msync13(void *addr, size_t len, int flags); }
579278	COMPAT_30	{ int sys___stat13(const char *path, struct stat13 *ub); }
580279	COMPAT_30	{ int sys___fstat13(int fd, struct stat13 *sb); }
581280	COMPAT_30	{ int sys___lstat13(const char *path, struct stat13 *ub); }
582281	STD		{ int sys___sigaltstack14( \
583			    const struct sigaltstack *nss, \
584			    struct sigaltstack *oss); }
585282	STD		{ int sys___vfork14(void); }
586283	STD		{ int sys___posix_chown(const char *path, uid_t uid, \
587			    gid_t gid); }
588284	STD		{ int sys___posix_fchown(int fd, uid_t uid, \
589			    gid_t gid); }
590285	STD		{ int sys___posix_lchown(const char *path, uid_t uid, \
591			    gid_t gid); }
592286	STD		{ pid_t sys_getsid(pid_t pid); }
593287	STD		{ pid_t sys___clone(int flags, void *stack); }
594#if defined(KTRACE) || !defined(_KERNEL)
595288	STD		{ int sys_fktrace(const int fd, int ops, \
596			    int facs, int pid); }
597#else
598288	EXCL		ktrace
599#endif
600289	STD		{ ssize_t sys_preadv(int fd, \
601			    const struct iovec *iovp, int iovcnt, \
602			    int pad, off_t offset); }
603290	STD		{ ssize_t sys_pwritev(int fd, \
604			    const struct iovec *iovp, int iovcnt, \
605			    int pad, off_t offset); }
606291	COMPAT_16	{ int sys___sigaction14(int signum, \
607			    const struct sigaction *nsa, \
608			    struct sigaction *osa); }
609292	STD		{ int sys___sigpending14(sigset_t *set); }
610293	STD		{ int sys___sigprocmask14(int how, \
611			    const sigset_t *set, \
612			    sigset_t *oset); }
613294	STD		{ int sys___sigsuspend14(const sigset_t *set); }
614295	COMPAT_16	{ int sys___sigreturn14(struct sigcontext *sigcntxp); }
615296	STD		{ int sys___getcwd(char *bufp, size_t length); }
616297	STD		{ int sys_fchroot(int fd); }
617298	COMPAT_30	{ int sys_fhopen(const struct compat_30_fhandle *fhp, int flags); }
618299	COMPAT_30	{ int sys_fhstat(const struct compat_30_fhandle *fhp, \
619			    struct stat13 *sb); }
620300	COMPAT_20	{ int sys_fhstatfs(const struct compat_30_fhandle *fhp, \
621			    struct statfs12 *buf); }
622#if defined(SYSVSEM) || !defined(_KERNEL)
623301	STD		{ int sys_____semctl13(int semid, int semnum, int cmd, \
624			    ... union __semun *arg); }
625#else
626301	EXCL		____semctl13
627#endif
628#if defined(SYSVMSG) || !defined(_KERNEL)
629302	STD		{ int sys___msgctl13(int msqid, int cmd, \
630			    struct msqid_ds *buf); }
631#else
632302	EXCL		__msgctl13
633#endif
634#if defined(SYSVSHM) || !defined(_KERNEL)
635303	STD		{ int sys___shmctl13(int shmid, int cmd, \
636			    struct shmid_ds *buf); }
637#else
638303	EXCL		__shmctl13
639#endif
640304	STD		{ int sys_lchflags(const char *path, u_long flags); }
641305	STD		{ int sys_issetugid(void); }
642306	STD		{ int sys_utrace(const char *label, void *addr, \
643				size_t len); }
644307	STD		{ int sys_getcontext(struct __ucontext *ucp); }
645308	STD		{ int sys_setcontext(const struct __ucontext *ucp); }
646309	STD		{ int sys__lwp_create(const struct __ucontext *ucp, \
647				u_long flags, lwpid_t *new_lwp); }
648310	STD		{ int sys__lwp_exit(void); }
649311	STD		{ lwpid_t sys__lwp_self(void); }
650312	STD		{ int sys__lwp_wait(lwpid_t wait_for, \
651				lwpid_t *departed); }
652313	STD		{ int sys__lwp_suspend(lwpid_t target); }
653314	STD		{ int sys__lwp_continue(lwpid_t target); }
654315	STD		{ int sys__lwp_wakeup(lwpid_t target); }
655316	STD		{ void *sys__lwp_getprivate(void); }
656317	STD		{ void sys__lwp_setprivate(void *ptr); }
657; Syscalls 318-329 reserved for remaining Solaris-compatible LWP calls.
658318	UNIMPL
659319	UNIMPL
660320	UNIMPL
661321	UNIMPL
662322	UNIMPL
663323	UNIMPL
664324	UNIMPL
665325	UNIMPL
666326	UNIMPL
667327	UNIMPL
668328	UNIMPL
669329	UNIMPL
670; Scheduler activation syscalls
671330	STD		{ int sys_sa_register(sa_upcall_t new, \
672				sa_upcall_t *old, int flags, \
673				ssize_t stackinfo_offset); }
674331	STD		{ int sys_sa_stacks(int num, stack_t *stacks); }
675332	STD		{ int sys_sa_enable(void); }
676333	STD		{ int sys_sa_setconcurrency(int concurrency); }
677334	STD		{ int sys_sa_yield(void); }
678335	STD		{ int sys_sa_preempt(int sa_id); }
679336	OBSOL		sys_sa_unblockyield
680;
681; Syscalls 337-339 are reserved for other scheduler activation syscalls.
682;
683337	UNIMPL
684338	UNIMPL
685339	UNIMPL
686340	STD		{ int sys___sigaction_sigtramp(int signum, \
687			    const struct sigaction *nsa, \
688			    struct sigaction *osa, \
689			    const void *tramp, int vers); }
690341	STD		{ int sys_pmc_get_info(int ctr, int op, void *args); }
691342	STD		{ int sys_pmc_control(int ctr, int op, void *args); }
692343	STD		{ int sys_rasctl(caddr_t addr, size_t len, int op); }
693344	STD		{ int sys_kqueue(void); }
694345	STD		{ int sys_kevent(int fd, \
695			    const struct kevent *changelist, size_t nchanges, \
696			    struct kevent *eventlist, size_t nevents, \
697			    const struct timespec *timeout); }
698;
699; Syscalls 346-353 are reserved for the IEEE Std1003.1b scheduling syscalls
700;
701346	UNIMPL		sys_sched_setparam
702347	UNIMPL		sys_sched_getparam
703348	UNIMPL		sys_sched_setscheduler
704349	UNIMPL		sys_sched_getscheduler
705350	UNIMPL		sys_sched_yield
706351	UNIMPL		sys_sched_get_priority_max
707352	UNIMPL		sys_sched_get_priority_min
708353	UNIMPL		sys_sched_rr_get_interval
709
710354	STD		{ int sys_fsync_range(int fd, int flags, off_t start, \
711			    off_t length); }
712355	STD		{ int sys_uuidgen(struct uuid *store, int count); }
713356	STD		{ int sys_getvfsstat(struct statvfs *buf, \
714			    size_t bufsize, int flags); }
715357	STD		{ int sys_statvfs1(const char *path, \
716			    struct statvfs *buf, int flags); }
717358	STD		{ int sys_fstatvfs1(int fd, struct statvfs *buf, \
718			    int flags); }
719359	COMPAT_30	{ int sys_fhstatvfs1(const struct compat_30_fhandle *fhp, \
720			    struct statvfs *buf, int flags); }
721360	STD		{ int sys_extattrctl(const char *path, int cmd, \
722			    const char *filename, int attrnamespace, \
723			    const char *attrname); }
724361	STD		{ int sys_extattr_set_file(const char *path, \
725			    int attrnamespace, const char *attrname, \
726			    const void *data, size_t nbytes); }
727362	STD		{ ssize_t sys_extattr_get_file(const char *path, \
728			    int attrnamespace, const char *attrname, \
729			    void *data, size_t nbytes); }
730363	STD		{ int sys_extattr_delete_file(const char *path, \
731			    int attrnamespace, const char *attrname); }
732364	STD		{ int sys_extattr_set_fd(int fd, \
733			    int attrnamespace, const char *attrname, \
734			    const void *data, size_t nbytes); }
735365	STD		{ ssize_t sys_extattr_get_fd(int fd, \
736			    int attrnamespace, const char *attrname, \
737			    void *data, size_t nbytes); }
738366	STD		{ int sys_extattr_delete_fd(int fd, \
739			    int attrnamespace, const char *attrname); }
740367	STD		{ int sys_extattr_set_link(const char *path, \
741			    int attrnamespace, const char *attrname, \
742			    const void *data, size_t nbytes); }
743368	STD		{ ssize_t sys_extattr_get_link(const char *path, \
744			    int attrnamespace, const char *attrname, \
745			    void *data, size_t nbytes); }
746369	STD		{ int sys_extattr_delete_link(const char *path, \
747			    int attrnamespace, const char *attrname); }
748370	STD		{ ssize_t sys_extattr_list_fd(int fd, \
749			    int attrnamespace, void *data, size_t nbytes); }
750371	STD		{ ssize_t sys_extattr_list_file(const char *path, \
751			    int attrnamespace, void *data, size_t nbytes); }
752372	STD		{ ssize_t sys_extattr_list_link(const char *path, \
753			    int attrnamespace, void *data, size_t nbytes); }
754373	STD		{ int sys_pselect(int nd, fd_set *in, fd_set *ou, \
755			    fd_set *ex, const struct timespec *ts, \
756			    const sigset_t *mask); }
757374	STD		{ int sys_pollts(struct pollfd *fds, u_int nfds, \
758			    const struct timespec *ts, const sigset_t *mask); }
759375	STD		{ int sys_setxattr(const char *path, \
760			    const char *name, void *value, size_t size, \
761			    int flags); }
762376	STD		{ int sys_lsetxattr(const char *path, \
763			    const char *name, void *value, size_t size, \
764			    int flags); }
765377	STD		{ int sys_fsetxattr(int fd, \
766			    const char *name, void *value, size_t size, \
767			    int flags); }
768378	STD		{ int sys_getxattr(const char *path, \
769			    const char *name, void *value, size_t size); }
770379	STD		{ int sys_lgetxattr(const char *path, \
771			    const char *name, void *value, size_t size); }
772380	STD		{ int sys_fgetxattr(int fd, \
773			    const char *name, void *value, size_t size); }
774381	STD		{ int sys_listxattr(const char *path, \
775			    char *list, size_t size); }
776382	STD		{ int sys_llistxattr(const char *path, \
777			    char *list, size_t size); }
778383	STD		{ int sys_flistxattr(int fd, \
779			    char *list, size_t size); }
780384	STD		{ int sys_removexattr(const char *path, \
781			    const char *name); }
782385	STD		{ int sys_lremovexattr(const char *path, \
783			    const char *name); }
784386	STD		{ int sys_fremovexattr(int fd, \
785			    const char *name); }
786387	STD		{ int sys___stat30(const char *path, struct stat *ub); }
787388	STD		{ int sys___fstat30(int fd, struct stat *sb); }
788389	STD		{ int sys___lstat30(const char *path, struct stat *ub); }
789390	STD		{ int sys___getdents30(int fd, char *buf, size_t count); }
790391	STD		{ int sys_posix_fadvise(int fd, off_t offset, \
791			    off_t len, int advice); }
792392	COMPAT_30	{ int sys___fhstat30(const struct compat_30_fhandle \
793			    *fhp, struct stat *sb); }
794393	STD		{ int sys___ntp_gettime30(struct ntptimeval *ntvp); }
795394	STD		{ int sys___socket30(int domain, int type, int protocol); }
796395	STD		{ int sys___getfh30(const char *fname, void *fhp, \
797			    size_t *fh_size); }
798396	STD		{ int sys___fhopen40(const void *fhp, size_t fh_size,\
799			    int flags); }
800397	STD		{ int sys___fhstatvfs140(const void *fhp, \
801			    size_t fh_size, struct statvfs *buf, int flags); }
802398	STD		{ int sys___fhstat40(const void *fhp, \
803			    size_t fh_size, struct stat *sb); }
804