syscalls.master revision 1.119
1	$NetBSD: syscalls.master,v 1.119 2003/01/20 20:02:57 christos 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/semaphore.h>
57#include <sys/syscallargs.h>
58
59%%
60
61; Reserved/unimplemented system calls in the range 0-150 inclusive
62; are reserved for use in future Berkeley releases.
63; Additional system calls implemented in vendor and other
64; redistributions should be placed in the reserved range at the end
65; of the current calls.
66
670	INDIR		{ int sys_syscall(int number, ...); }
681	STD		{ void sys_exit(int rval); }
692	STD		{ int sys_fork(void); }
703	STD		{ ssize_t sys_read(int fd, void *buf, size_t nbyte); }
714	STD		{ ssize_t sys_write(int fd, const void *buf, \
72			    size_t nbyte); }
735	STD		{ int sys_open(const char *path, \
74			    int flags, ... mode_t mode); }
756	STD		{ int sys_close(int fd); }
767	STD		{ int sys_wait4(int pid, int *status, int options, \
77			    struct rusage *rusage); }
788	COMPAT_43	{ int sys_creat(const char *path, mode_t mode); } ocreat
799	STD		{ int sys_link(const char *path, const char *link); }
8010	STD		{ int sys_unlink(const char *path); }
8111	OBSOL		execv
8212	STD		{ int sys_chdir(const char *path); }
8313	STD		{ int sys_fchdir(int fd); }
8414	STD		{ int sys_mknod(const char *path, mode_t mode, \
85			    dev_t dev); }
8615	STD		{ int sys_chmod(const char *path, mode_t mode); }
8716	STD		{ int sys_chown(const char *path, uid_t uid, \
88			    gid_t gid); }
8917	STD		{ int sys_obreak(char *nsize); } break
9018	STD		{ int sys_getfsstat(struct statfs *buf, long bufsize, \
91			    int flags); }
9219	COMPAT_43	{ long sys_lseek(int fd, long offset, int whence); } \
93			    olseek
94#ifdef COMPAT_43
9520	STD 		{ pid_t sys_getpid_with_ppid(void); } getpid
96#else
9720	STD MPSAFE	{ pid_t sys_getpid(void); }
98#endif
9921	STD		{ int sys_mount(const char *type, const char *path, \
100			    int flags, void *data); }
10122	STD		{ int sys_unmount(const char *path, int flags); }
10223	STD		{ int sys_setuid(uid_t uid); }
103#ifdef COMPAT_43
10424	STD		{ uid_t sys_getuid_with_euid(void); } getuid
105#else
10624	STD		{ uid_t sys_getuid(void); }
107#endif
10825	STD		{ uid_t sys_geteuid(void); }
10926	STD		{ int sys_ptrace(int req, pid_t pid, caddr_t addr, \
110			    int data); }
11127	STD		{ ssize_t sys_recvmsg(int s, struct msghdr *msg, \
112			    int flags); }
11328	STD		{ ssize_t sys_sendmsg(int s, \
114			    const struct msghdr *msg, int flags); }
11529	STD		{ ssize_t sys_recvfrom(int s, void *buf, size_t len, \
116			    int flags, struct sockaddr *from, \
117			    unsigned int *fromlenaddr); }
11830	STD		{ int sys_accept(int s, struct sockaddr *name, \
119			    unsigned int *anamelen); }
12031	STD		{ int sys_getpeername(int fdes, struct sockaddr *asa, \
121			    unsigned int *alen); }
12232	STD		{ int sys_getsockname(int fdes, struct sockaddr *asa, \
123			    unsigned int *alen); }
12433	STD		{ int sys_access(const char *path, int flags); }
12534	STD		{ int sys_chflags(const char *path, u_long flags); }
12635	STD		{ int sys_fchflags(int fd, u_long flags); }
12736	STD		{ void sys_sync(void); }
12837	STD		{ int sys_kill(int pid, int signum); }
12938	COMPAT_43	{ int sys_stat(const char *path, struct stat43 *ub); } \
130			    stat43
13139	STD		{ pid_t sys_getppid(void); }
13240	COMPAT_43	{ int sys_lstat(const char *path, \
133			    struct stat43 *ub); } lstat43
13441	STD		{ int sys_dup(int fd); }
13542	STD		{ int sys_pipe(void); }
13643	STD		{ gid_t sys_getegid(void); }
13744	STD		{ int sys_profil(caddr_t samples, size_t size, \
138			    u_long offset, u_int scale); }
139#if defined(KTRACE) || !defined(_KERNEL)
14045	STD		{ int sys_ktrace(const char *fname, int ops, \
141			    int facs, int pid); }
142#else
14345	EXCL		ktrace
144#endif
14546	COMPAT_13	{ int sys_sigaction(int signum, \
146			    const struct sigaction13 *nsa, \
147			    struct sigaction13 *osa); } sigaction13
148#ifdef COMPAT_43
14947	STD		{ gid_t sys_getgid_with_egid(void); } getgid
150#else
15147	STD		{ gid_t sys_getgid(void); }
152#endif
15348	COMPAT_13	{ int sys_sigprocmask(int how, \
154			    int mask); } sigprocmask13
15549	STD		{ int sys___getlogin(char *namebuf, size_t namelen); }
15650	STD		{ int sys___setlogin(const char *namebuf); }
15751	STD		{ int sys_acct(const char *path); }
15852	COMPAT_13	{ int sys_sigpending(void); } sigpending13
15953	COMPAT_13	{ int sys_sigaltstack( \
160			    const struct sigaltstack13 *nss, \
161			    struct sigaltstack13 *oss); } sigaltstack13
16254	STD		{ int sys_ioctl(int fd, \
163			    u_long com, ... void *data); }
16455	COMPAT_12	{ int sys_reboot(int opt); } oreboot
16556	STD		{ int sys_revoke(const char *path); }
16657	STD		{ int sys_symlink(const char *path, \
167			    const char *link); }
16858	STD		{ int sys_readlink(const char *path, char *buf, \
169			    size_t count); }
17059	STD		{ int sys_execve(const char *path, \
171			    char * const *argp, char * const *envp); }
17260	STD		{ mode_t sys_umask(mode_t newmask); }
17361	STD		{ int sys_chroot(const char *path); }
17462	COMPAT_43	{ int sys_fstat(int fd, struct stat43 *sb); } fstat43
17563	COMPAT_43	{ int sys_getkerninfo(int op, char *where, int *size, \
176			    int arg); } ogetkerninfo
17764	COMPAT_43	{ int sys_getpagesize(void); } ogetpagesize
17865	COMPAT_12	{ int sys_msync(caddr_t addr, size_t len); }
179; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)?
18066	STD		{ int sys_vfork(void); }
18167	OBSOL		vread
18268	OBSOL		vwrite
18369	STD		{ int sys_sbrk(intptr_t incr); }
18470	STD		{ int sys_sstk(int incr); }
18571	COMPAT_43	{ int sys_mmap(caddr_t addr, size_t len, int prot, \
186			    int flags, int fd, long pos); } ommap
18772	STD		{ int sys_ovadvise(int anom); } vadvise
18873	STD		{ int sys_munmap(void *addr, size_t len); }
18974	STD		{ int sys_mprotect(void *addr, size_t len, \
190			    int prot); }
19175	STD		{ int sys_madvise(void *addr, size_t len, \
192			    int behav); }
19376	OBSOL		vhangup
19477	OBSOL		vlimit
19578	STD		{ int sys_mincore(void *addr, size_t len, \
196			    char *vec); }
19779	STD		{ int sys_getgroups(int gidsetsize, \
198			    gid_t *gidset); }
19980	STD		{ int sys_setgroups(int gidsetsize, \
200			    const gid_t *gidset); }
20181	STD		{ int sys_getpgrp(void); }
20282	STD		{ int sys_setpgid(int pid, int pgid); }
20383	STD		{ int sys_setitimer(int which, \
204			    const struct itimerval *itv, \
205			    struct itimerval *oitv); }
20684	COMPAT_43	{ int sys_wait(void); } owait
20785	COMPAT_12	{ int sys_swapon(const char *name); } oswapon
20886	STD		{ int sys_getitimer(int which, \
209			    struct itimerval *itv); }
21087	COMPAT_43	{ int sys_gethostname(char *hostname, u_int len); } \
211			    ogethostname
21288	COMPAT_43	{ int sys_sethostname(char *hostname, u_int len); } \
213			    osethostname
21489	COMPAT_43	{ int sys_getdtablesize(void); } ogetdtablesize
21590	STD		{ int sys_dup2(int from, int to); }
21691	UNIMPL		getdopt
21792	STD		{ int sys_fcntl(int fd, int cmd, ... void *arg); }
21893	STD		{ int sys_select(int nd, fd_set *in, fd_set *ou, \
219			    fd_set *ex, struct timeval *tv); }
22094	UNIMPL		setdopt
22195	STD		{ int sys_fsync(int fd); }
22296	STD		{ int sys_setpriority(int which, int who, int prio); }
22397	STD		{ int sys_socket(int domain, int type, int protocol); }
22498	STD		{ int sys_connect(int s, const struct sockaddr *name, \
225			    unsigned int namelen); }
22699	COMPAT_43	{ int sys_accept(int s, caddr_t name, \
227			    int *anamelen); } oaccept
228100	STD		{ int sys_getpriority(int which, int who); }
229101	COMPAT_43	{ int sys_send(int s, caddr_t buf, int len, \
230			    int flags); } osend
231102	COMPAT_43	{ int sys_recv(int s, caddr_t buf, int len, \
232			    int flags); } orecv
233103	COMPAT_13	{ int sys_sigreturn(struct sigcontext13 *sigcntxp); } \
234			    sigreturn13
235104	STD		{ int sys_bind(int s, const struct sockaddr *name, \
236			    unsigned int namelen); }
237105	STD		{ int sys_setsockopt(int s, int level, int name, \
238			    const void *val, unsigned int valsize); }
239106	STD		{ int sys_listen(int s, int backlog); }
240107	OBSOL		vtimes
241108	COMPAT_43	{ int sys_sigvec(int signum, struct sigvec *nsv, \
242			    struct sigvec *osv); } osigvec
243109	COMPAT_43	{ int sys_sigblock(int mask); } osigblock
244110	COMPAT_43	{ int sys_sigsetmask(int mask); } osigsetmask
245111	COMPAT_13	{ int sys_sigsuspend(int mask); } sigsuspend13
246112	COMPAT_43	{ int sys_sigstack(struct sigstack *nss, \
247			    struct sigstack *oss); } osigstack
248113	COMPAT_43	{ int sys_recvmsg(int s, struct omsghdr *msg, \
249			    int flags); } orecvmsg
250114	COMPAT_43	{ int sys_sendmsg(int s, caddr_t msg, int flags); } \
251			    osendmsg
252115	OBSOL		vtrace
253116	STD		{ int sys_gettimeofday(struct timeval *tp, \
254			    struct timezone *tzp); }
255117	STD		{ int sys_getrusage(int who, struct rusage *rusage); }
256118	STD		{ int sys_getsockopt(int s, int level, int name, \
257			    void *val, unsigned int *avalsize); }
258119	OBSOL		resuba
259120	STD		{ ssize_t sys_readv(int fd, \
260			    const struct iovec *iovp, int iovcnt); }
261121	STD		{ ssize_t sys_writev(int fd, \
262			    const struct iovec *iovp, int iovcnt); }
263122	STD		{ int sys_settimeofday(const struct timeval *tv, \
264			    const struct timezone *tzp); }
265123	STD		{ int sys_fchown(int fd, uid_t uid, gid_t gid); }
266124	STD		{ int sys_fchmod(int fd, mode_t mode); }
267125	COMPAT_43	{ int sys_recvfrom(int s, caddr_t buf, size_t len, \
268			    int flags, caddr_t from, int *fromlenaddr); } \
269			    orecvfrom
270126	STD		{ int sys_setreuid(uid_t ruid, uid_t euid); }
271127	STD		{ int sys_setregid(gid_t rgid, gid_t egid); }
272128	STD		{ int sys_rename(const char *from, const char *to); }
273129	COMPAT_43	{ int sys_truncate(const char *path, long length); } \
274			    otruncate
275130	COMPAT_43	{ int sys_ftruncate(int fd, long length); } oftruncate
276131	STD		{ int sys_flock(int fd, int how); }
277132	STD		{ int sys_mkfifo(const char *path, mode_t mode); }
278133	STD		{ ssize_t sys_sendto(int s, const void *buf, \
279			    size_t len, int flags, const struct sockaddr *to, \
280			    unsigned int tolen); }
281134	STD		{ int sys_shutdown(int s, int how); }
282135	STD		{ int sys_socketpair(int domain, int type, \
283			    int protocol, int *rsv); }
284136	STD		{ int sys_mkdir(const char *path, mode_t mode); }
285137	STD		{ int sys_rmdir(const char *path); }
286138	STD		{ int sys_utimes(const char *path, \
287			    const struct timeval *tptr); }
288139	OBSOL		4.2 sigreturn
289140	STD		{ int sys_adjtime(const struct timeval *delta, \
290			    struct timeval *olddelta); }
291141	COMPAT_43	{ int sys_getpeername(int fdes, caddr_t asa, \
292			    int *alen); } ogetpeername
293142	COMPAT_43	{ int32_t sys_gethostid(void); } ogethostid
294143	COMPAT_43	{ int sys_sethostid(int32_t hostid); } osethostid
295144	COMPAT_43	{ int sys_getrlimit(int which, \
296			    struct orlimit *rlp); } ogetrlimit
297145	COMPAT_43	{ int sys_setrlimit(int which, \
298			    const struct orlimit *rlp); } osetrlimit
299146	COMPAT_43	{ int sys_killpg(int pgid, int signum); } okillpg
300147	STD		{ int sys_setsid(void); }
301148	STD		{ int sys_quotactl(const char *path, int cmd, \
302			    int uid, caddr_t arg); }
303149	COMPAT_43	{ int sys_quota(void); } oquota
304150	COMPAT_43	{ int sys_getsockname(int fdec, caddr_t asa, \
305			    int *alen); } ogetsockname
306
307; Syscalls 151-180 inclusive are reserved for vendor-specific
308; system calls.  (This includes various calls added for compatibity
309; with other Unix variants.)
310; Some of these calls are now supported by BSD...
311151	UNIMPL
312152	UNIMPL
313153	UNIMPL
314154	UNIMPL
315#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL)
316155	STD		{ int sys_nfssvc(int flag, void *argp); }
317#else
318155	EXCL		nfssvc
319#endif
320156	COMPAT_43	{ int sys_getdirentries(int fd, char *buf, \
321			    u_int count, long *basep); } ogetdirentries
322157	STD		{ int sys_statfs(const char *path, \
323			    struct statfs *buf); }
324158	STD		{ int sys_fstatfs(int fd, struct statfs *buf); }
325159	UNIMPL
326160	UNIMPL
327161	STD		{ int sys_getfh(const char *fname, fhandle_t *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	STD		{ int sys_ntp_gettime(struct ntptimeval *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(int *name, u_int namelen, \
416			    void *old, size_t *oldlenp, 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	UNIMPL		sys_sigwaitinfo
518245	UNIMPL		sys_sigtimedwait
519246	UNIMPL		sys_sigqueue
520#ifdef P1003_1B_SEMAPHORE
521247	STD		{ int sys_ksem_init(unsigned int value, semid_t *idp); }
522248	STD		{ int sys_ksem_open(const char *name, int oflag, \
523			    mode_t mode, unsigned int value, semid_t *idp); }
524249	STD 		{ int sys_ksem_unlink(const char *name); }
525250	STD		{ int sys_ksem_close(semid_t id); }
526251	STD		{ int sys_ksem_post(semid_t id); }
527252	STD		{ int sys_ksem_wait(semid_t id); }
528253	STD		{ int sys_ksem_trywait(semid_t id); }
529254	STD		{ int sys_ksem_getvalue(semid_t id, \
530			    unsigned int *value); }
531255	STD		{ int sys_ksem_destroy(semid_t id); }
532#else
533247	EXCL		sys_ksem_init
534248	EXCL		sys_ksem_open
535249	EXCL 		sys_ksem_unlink
536250	EXCL		sys_ksem_close
537251	EXCL		sys_ksem_post
538252	EXCL		sys_ksem_wait
539253	EXCL		sys_ksem_trywait
540254	EXCL		sys_ksem_getvalue
541255	EXCL		sys_ksem_destroy
542#endif
543256	UNIMPL
544257	UNIMPL
545258	UNIMPL
546259	UNIMPL
547260	UNIMPL
548261	UNIMPL
549262	UNIMPL
550263	UNIMPL
551264	UNIMPL
552265	UNIMPL
553266	UNIMPL
554267	UNIMPL
555268	UNIMPL
556269	UNIMPL
557270	STD		{ int sys___posix_rename(const char *from, \
558			    const char *to); }
559271	STD		{ int sys_swapctl(int cmd, const void *arg, int misc); }
560272	STD		{ int sys_getdents(int fd, char *buf, size_t count); }
561273	STD		{ int sys_minherit(void *addr, size_t len, \
562			    int inherit); }
563274	STD		{ int sys_lchmod(const char *path, mode_t mode); }
564275	STD		{ int sys_lchown(const char *path, uid_t uid, \
565			    gid_t gid); }
566276	STD		{ int sys_lutimes(const char *path, \
567			    const struct timeval *tptr); }
568277	STD		{ int sys___msync13(void *addr, size_t len, int flags); }
569278	STD		{ int sys___stat13(const char *path, struct stat *ub); }
570279	STD		{ int sys___fstat13(int fd, struct stat *sb); }
571280	STD		{ int sys___lstat13(const char *path, struct stat *ub); }
572281	STD		{ int sys___sigaltstack14( \
573			    const struct sigaltstack *nss, \
574			    struct sigaltstack *oss); }
575282	STD		{ int sys___vfork14(void); }
576283	STD		{ int sys___posix_chown(const char *path, uid_t uid, \
577			    gid_t gid); }
578284	STD		{ int sys___posix_fchown(int fd, uid_t uid, \
579			    gid_t gid); }
580285	STD		{ int sys___posix_lchown(const char *path, uid_t uid, \
581			    gid_t gid); }
582286	STD		{ pid_t sys_getsid(pid_t pid); }
583287	STD		{ pid_t sys___clone(int flags, void *stack); }
584#if defined(KTRACE) || !defined(_KERNEL)
585288	STD		{ int sys_fktrace(const int fd, int ops, \
586			    int facs, int pid); }
587#else
588288	EXCL		ktrace
589#endif
590289	STD		{ ssize_t sys_preadv(int fd, \
591			    const struct iovec *iovp, int iovcnt, \
592			    int pad, off_t offset); }
593290	STD		{ ssize_t sys_pwritev(int fd, \
594			    const struct iovec *iovp, int iovcnt, \
595			    int pad, off_t offset); }
596291	STD		{ int sys___sigaction14(int signum, \
597			    const struct sigaction *nsa, \
598			    struct sigaction *osa); }
599292	STD		{ int sys___sigpending14(sigset_t *set); }
600293	STD		{ int sys___sigprocmask14(int how, \
601			    const sigset_t *set, \
602			    sigset_t *oset); }
603294	STD		{ int sys___sigsuspend14(const sigset_t *set); }
604295	STD		{ int sys___sigreturn14(struct sigcontext *sigcntxp); }
605296	STD		{ int sys___getcwd(char *bufp, size_t length); }
606297	STD		{ int sys_fchroot(int fd); }
607298	STD		{ int sys_fhopen(const fhandle_t *fhp, int flags); }
608299	STD		{ int sys_fhstat(const fhandle_t *fhp, \
609			    struct stat *sb); }
610300	STD		{ int sys_fhstatfs(const fhandle_t *fhp, \
611			    struct statfs *buf); }
612#if defined(SYSVSEM) || !defined(_KERNEL)
613301	STD		{ int sys_____semctl13(int semid, int semnum, int cmd, \
614			    ... union __semun *arg); }
615#else
616301	EXCL		____semctl13
617#endif
618#if defined(SYSVMSG) || !defined(_KERNEL)
619302	STD		{ int sys___msgctl13(int msqid, int cmd, \
620			    struct msqid_ds *buf); }
621#else
622302	EXCL		__msgctl13
623#endif
624#if defined(SYSVSHM) || !defined(_KERNEL)
625303	STD		{ int sys___shmctl13(int shmid, int cmd, \
626			    struct shmid_ds *buf); }
627#else
628303	EXCL		__shmctl13
629#endif
630304	STD		{ int sys_lchflags(const char *path, u_long flags); }
631305	STD		{ int sys_issetugid(void); }
632306	STD		{ int sys_utrace(const char *label, void *addr, \
633				size_t len); }
634307	STD		{ int sys_getcontext(struct __ucontext *ucp); }
635308	STD		{ int sys_setcontext(const struct __ucontext *ucp); }
636309	STD		{ int sys__lwp_create(const struct __ucontext *ucp, \
637				u_long flags, lwpid_t *new_lwp); }
638310	STD		{ int sys__lwp_exit(void); }
639311	STD		{ lwpid_t sys__lwp_self(void); }
640312	STD		{ int sys__lwp_wait(lwpid_t wait_for, \
641				lwpid_t *departed); }
642313	STD		{ int sys__lwp_suspend(lwpid_t target); }
643314	STD		{ int sys__lwp_continue(lwpid_t target); }
644315	STD		{ int sys__lwp_wakeup(lwpid_t target); }
645316	STD		{ void *sys__lwp_getprivate(void); }
646317	STD		{ int sys__lwp_setprivate(void *ptr); }
647; Syscalls 318-329 reserved for remaining Solaris-compatible LWP calls.
648318	UNIMPL
649319	UNIMPL
650320	UNIMPL
651321	UNIMPL
652322	UNIMPL
653323	UNIMPL
654324	UNIMPL
655325	UNIMPL
656326	UNIMPL
657327	UNIMPL
658328	UNIMPL
659329	UNIMPL
660; Scheduler activation syscalls
661330	STD		{ int sys_sa_register(sa_upcall_t new, \
662				sa_upcall_t *old, int flags); }
663331	STD		{ int sys_sa_stacks(int num, stack_t *stacks); }
664332	STD		{ int sys_sa_enable(void); }
665333	STD		{ int sys_sa_setconcurrency(int concurrency); }
666334	STD		{ int sys_sa_yield(void); }
667335	STD		{ int sys_sa_preempt(int sa_id); }
668;
669; Syscalls 336-339 are reserved for other scheduler activation syscalls.
670;
671336	UNIMPL
672337	UNIMPL
673338	UNIMPL
674339	UNIMPL
675340	STD		{ int sys___sigaction_sigtramp(int signum, \
676			    const struct sigaction *nsa, \
677			    struct sigaction *osa, \
678			    void *tramp, int vers); }
679341	STD		{ int sys_pmc_get_info(int ctr, int op, void *args); }
680342	STD		{ int sys_pmc_control(int ctr, int op, void *args); }
681343	STD		{ int sys_rasctl(caddr_t addr, size_t len, int op); }
682344	STD		{ int sys_kqueue(void); }
683345	STD		{ int sys_kevent(int fd, \
684			    const struct kevent *changelist, size_t nchanges, \
685			    struct kevent *eventlist, size_t nevents, \
686			    const struct timespec *timeout); }
687