xref: /openbsd-src/sys/kern/syscalls.master (revision 2b0358df1d88d06ef4139321dd05bd5e05d91eaf)
1;	$OpenBSD: syscalls.master,v 1.91 2009/03/12 06:56:13 guenther Exp $
2;	$NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $
3
4;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94
5
6; OpenBSD system call name/number "master" file.
7; (See syscalls.conf to see what it is processed into.)
8;
9; Fields: number type [type-dependent ...]
10;	number	system call number, must be in order
11;	type	one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
12;		the compatibility options defined in syscalls.conf.
13;
14; types:
15;	STD	always included
16;	OBSOL	obsolete, not included in system
17;	UNIMPL	unimplemented, not included in system
18;	NODEF	included, but don't define the syscall number
19;	NOARGS	included, but don't define the syscall args structure
20;	INDIR	included, but don't define the syscall args structure,
21;		and allow it to be "really" varargs.
22;
23; The compat options are defined in the syscalls.conf file, and the
24; compat option name is prefixed to the syscall name.  Other than
25; that, they're like NODEF (for 'compat' options), or STD (for
26; 'libcompat' options).
27;
28; The type-dependent arguments are as follows:
29; For STD, NODEF, NOARGS, and compat syscalls:
30;	{ pseudo-proto } [alias]
31; For other syscalls:
32;	[comment]
33;
34; #ifdef's, etc. may be included, and are copied to the output files.
35; #include's are copied to the syscall switch definition file only.
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/signal.h>
40#include <sys/mount.h>
41#include <sys/syscallargs.h>
42#include <sys/poll.h>
43#include <sys/event.h>
44#include <xfs/xfs_pioctl.h>
45
46; Reserved/unimplemented system calls in the range 0-150 inclusive
47; are reserved for use in future Berkeley releases.
48; Additional system calls implemented in vendor and other
49; redistributions should be placed in the reserved range at the end
50; of the current calls.
51
520	INDIR		{ int sys_syscall(int number, ...); }
531	STD		{ void sys_exit(int rval); }
542	STD		{ int sys_fork(void); }
553	STD		{ ssize_t sys_read(int fd, void *buf, size_t nbyte); }
564	STD		{ ssize_t sys_write(int fd, const void *buf, \
57			    size_t nbyte); }
585	STD		{ int sys_open(const char *path, \
59			    int flags, ... mode_t mode); }
606	STD		{ int sys_close(int fd); }
617	STD		{ pid_t sys_wait4(pid_t pid, int *status, int options, \
62			    struct rusage *rusage); }
638	COMPAT_43	{ int sys_creat(const char *path, mode_t mode); } ocreat
649	STD		{ int sys_link(const char *path, const char *link); }
6510	STD		{ int sys_unlink(const char *path); }
6611	OBSOL		execv
6712	STD		{ int sys_chdir(const char *path); }
6813	STD		{ int sys_fchdir(int fd); }
6914	STD		{ int sys_mknod(const char *path, mode_t mode, \
70			    dev_t dev); }
7115	STD		{ int sys_chmod(const char *path, mode_t mode); }
7216	STD		{ int sys_chown(const char *path, uid_t uid, \
73			    gid_t gid); }
7417	STD		{ int sys_obreak(char *nsize); } break
7518	COMPAT_25	{ int sys_getfsstat(struct statfs *buf, long bufsize, \
76			    int flags); } ogetfsstat
7719	COMPAT_43	{ long sys_lseek(int fd, long offset, int whence); } \
78			    olseek
7920	STD NOLOCK	{ pid_t sys_getpid(void); }
8021	STD		{ int sys_mount(const char *type, const char *path, \
81			    int flags, void *data); }
8222	STD		{ int sys_unmount(const char *path, int flags); }
8323	STD		{ int sys_setuid(uid_t uid); }
8424	STD		{ uid_t sys_getuid(void); }
8525	STD		{ uid_t sys_geteuid(void); }
86#ifdef PTRACE
8726	STD		{ int sys_ptrace(int req, pid_t pid, caddr_t addr, \
88			    int data); }
89#else
9026	UNIMPL		ptrace
91#endif
9227	STD		{ ssize_t sys_recvmsg(int s, struct msghdr *msg, \
93			    int flags); }
9428	STD		{ ssize_t sys_sendmsg(int s, \
95			    const struct msghdr *msg, int flags); }
9629	STD		{ ssize_t sys_recvfrom(int s, void *buf, size_t len, \
97			    int flags, struct sockaddr *from, \
98			    socklen_t *fromlenaddr); }
9930	STD		{ int sys_accept(int s, struct sockaddr *name, \
100			    socklen_t *anamelen); }
10131	STD		{ int sys_getpeername(int fdes, struct sockaddr *asa, \
102			    socklen_t *alen); }
10332	STD		{ int sys_getsockname(int fdes, struct sockaddr *asa, \
104			    socklen_t *alen); }
10533	STD		{ int sys_access(const char *path, int flags); }
10634	STD		{ int sys_chflags(const char *path, u_int flags); }
10735	STD		{ int sys_fchflags(int fd, u_int flags); }
10836	STD		{ void sys_sync(void); }
10937	STD		{ int sys_kill(int pid, int signum); }
11038	COMPAT_43	{ int sys_stat(const char *path, struct stat43 *ub); } \
111			    stat43
11239	STD		{ pid_t sys_getppid(void); }
11340	COMPAT_43	{ int sys_lstat(char *path, \
114			    struct stat43 *ub); } lstat43
11541	STD		{ int sys_dup(int fd); }
11642	STD		{ int sys_opipe(void); }
11743	STD		{ gid_t sys_getegid(void); }
11844	STD		{ int sys_profil(caddr_t samples, size_t size, \
119			    u_long offset, u_int scale); }
120#ifdef KTRACE
12145	STD		{ int sys_ktrace(const char *fname, int ops, \
122			    int facs, pid_t pid); }
123#else
12445	UNIMPL		ktrace
125#endif
12646	STD		{ int sys_sigaction(int signum, \
127			    const struct sigaction *nsa, \
128			    struct sigaction *osa); }
12947	STD		{ gid_t sys_getgid(void); }
13048	STD		{ int sys_sigprocmask(int how, sigset_t mask); }
13149	STD		{ int sys_getlogin(char *namebuf, u_int namelen); }
13250	STD		{ int sys_setlogin(const char *namebuf); }
133#ifdef ACCOUNTING
13451	STD		{ int sys_acct(const char *path); }
135#else
13651	UNIMPL		acct
137#endif
13852	STD		{ int sys_sigpending(void); }
13953	STD		{ int sys_osigaltstack(const struct osigaltstack *nss, \
140			    struct osigaltstack *oss); }
14154	STD		{ int sys_ioctl(int fd, \
142			    u_long com, ... void *data); }
14355	STD		{ int sys_reboot(int opt); }
14456	STD		{ int sys_revoke(const char *path); }
14557	STD		{ int sys_symlink(const char *path, \
146			    const char *link); }
14758	STD		{ int sys_readlink(const char *path, char *buf, \
148			    size_t count); }
14959	STD		{ int sys_execve(const char *path, \
150			    char * const *argp, char * const *envp); }
15160	STD		{ mode_t sys_umask(mode_t newmask); }
15261	STD		{ int sys_chroot(const char *path); }
15362	COMPAT_43	{ int sys_fstat(int fd, struct stat43 *sb); } fstat43
15463	COMPAT_43	{ int sys_getkerninfo(int op, char *where, int *size, \
155			    int arg); } ogetkerninfo
15664	COMPAT_43	{ int sys_getpagesize(void); } ogetpagesize
15765	COMPAT_25	{ int sys_omsync(caddr_t addr, size_t len); }
15866	STD		{ int sys_vfork(void); }
15967	OBSOL		vread
16068	OBSOL		vwrite
16169	STD		{ int sys_sbrk(int incr); }
16270	STD		{ int sys_sstk(int incr); }
16371	COMPAT_43	{ int sys_mmap(caddr_t addr, size_t len, int prot, \
164			    int flags, int fd, long pos); } ommap
16572	OBSOL		vadvise
16673	STD		{ int sys_munmap(void *addr, size_t len); }
16774	STD		{ int sys_mprotect(void *addr, size_t len, \
168			    int prot); }
16975	STD		{ int sys_madvise(void *addr, size_t len, \
170			    int behav); }
17176	OBSOL		vhangup
17277	OBSOL		vlimit
17378	STD		{ int sys_mincore(void *addr, size_t len, \
174			    char *vec); }
17579	STD		{ int sys_getgroups(int gidsetsize, \
176			    gid_t *gidset); }
17780	STD		{ int sys_setgroups(int gidsetsize, \
178			    const gid_t *gidset); }
17981	STD		{ int sys_getpgrp(void); }
18082	STD		{ int sys_setpgid(pid_t pid, int pgid); }
18183	STD		{ int sys_setitimer(int which, \
182			    const struct itimerval *itv, \
183			    struct itimerval *oitv); }
18484	COMPAT_43	{ int sys_wait(void); } owait
18585	COMPAT_25	{ int sys_swapon(const char *name); }
18686	STD		{ int sys_getitimer(int which, \
187			    struct itimerval *itv); }
18887	COMPAT_43	{ int sys_gethostname(char *hostname, u_int len); } \
189			    ogethostname
19088	COMPAT_43	{ int sys_sethostname(char *hostname, u_int len); } \
191			    osethostname
19289	COMPAT_43	{ int sys_getdtablesize(void); } ogetdtablesize
19390	STD		{ int sys_dup2(int from, int to); }
19491	UNIMPL		getdopt
19592	STD		{ int sys_fcntl(int fd, int cmd, ... void *arg); }
19693	STD		{ int sys_select(int nd, fd_set *in, fd_set *ou, \
197			    fd_set *ex, struct timeval *tv); }
19894	UNIMPL		setdopt
19995	STD		{ int sys_fsync(int fd); }
20096	STD		{ int sys_setpriority(int which, id_t who, int prio); }
20197	STD		{ int sys_socket(int domain, int type, int protocol); }
20298	STD		{ int sys_connect(int s, const struct sockaddr *name, \
203			    socklen_t namelen); }
20499	COMPAT_43	{ int sys_accept(int s, caddr_t name, \
205			    int *anamelen); } oaccept
206100	STD		{ int sys_getpriority(int which, id_t who); }
207101	COMPAT_43	{ int sys_send(int s, caddr_t buf, int len, \
208			    int flags); } osend
209102	COMPAT_43	{ int sys_recv(int s, caddr_t buf, int len, \
210			    int flags); } orecv
211103	STD		{ int sys_sigreturn(struct sigcontext *sigcntxp); }
212104	STD		{ int sys_bind(int s, const struct sockaddr *name, \
213			    socklen_t namelen); }
214105	STD		{ int sys_setsockopt(int s, int level, int name, \
215			    const void *val, socklen_t valsize); }
216106	STD		{ int sys_listen(int s, int backlog); }
217107	OBSOL		vtimes
218108	COMPAT_43	{ int sys_sigvec(int signum, struct sigvec *nsv, \
219			    struct sigvec *osv); } osigvec
220109	COMPAT_43	{ int sys_sigblock(int mask); } osigblock
221110	COMPAT_43	{ int sys_sigsetmask(int mask); } osigsetmask
222111	STD		{ int sys_sigsuspend(int mask); }
223112	COMPAT_43	{ int sys_sigstack(struct sigstack *nss, \
224			    struct sigstack *oss); } osigstack
225113	COMPAT_43	{ int sys_recvmsg(int s, struct omsghdr *msg, \
226			    int flags); } orecvmsg
227114	COMPAT_43	{ int sys_sendmsg(int s, caddr_t msg, int flags); } \
228			    osendmsg
229115	OBSOL		vtrace
230116	STD		{ int sys_gettimeofday(struct timeval *tp, \
231			    struct timezone *tzp); }
232117	STD		{ int sys_getrusage(int who, struct rusage *rusage); }
233118	STD		{ int sys_getsockopt(int s, int level, int name, \
234			    void *val, socklen_t *avalsize); }
235119	OBSOL		resuba
236120	STD		{ ssize_t sys_readv(int fd, \
237			    const struct iovec *iovp, int iovcnt); }
238121	STD		{ ssize_t sys_writev(int fd, \
239			    const struct iovec *iovp, int iovcnt); }
240122	STD		{ int sys_settimeofday(const struct timeval *tv, \
241			    const struct timezone *tzp); }
242123	STD		{ int sys_fchown(int fd, uid_t uid, gid_t gid); }
243124	STD		{ int sys_fchmod(int fd, mode_t mode); }
244125	COMPAT_43	{ int sys_recvfrom(int s, caddr_t buf, size_t len, \
245			    int flags, caddr_t from, int *fromlenaddr); } \
246			    orecvfrom
247126	STD		{ int sys_setreuid(uid_t ruid, uid_t euid); }
248127	STD		{ int sys_setregid(gid_t rgid, gid_t egid); }
249128	STD		{ int sys_rename(const char *from, const char *to); }
250129	COMPAT_43	{ int sys_truncate(const char *path, long length); } \
251			    otruncate
252130	COMPAT_43	{ int sys_ftruncate(int fd, long length); } oftruncate
253131	STD		{ int sys_flock(int fd, int how); }
254132	STD		{ int sys_mkfifo(const char *path, mode_t mode); }
255133	STD		{ ssize_t sys_sendto(int s, const void *buf, \
256			    size_t len, int flags, const struct sockaddr *to, \
257			    socklen_t tolen); }
258134	STD		{ int sys_shutdown(int s, int how); }
259135	STD		{ int sys_socketpair(int domain, int type, \
260			    int protocol, int *rsv); }
261136	STD		{ int sys_mkdir(const char *path, mode_t mode); }
262137	STD		{ int sys_rmdir(const char *path); }
263138	STD		{ int sys_utimes(const char *path, \
264			    const struct timeval *tptr); }
265139	OBSOL		4.2 sigreturn
266140	STD		{ int sys_adjtime(const struct timeval *delta, \
267			    struct timeval *olddelta); }
268141	COMPAT_43	{ int sys_getpeername(int fdes, caddr_t asa, \
269			    socklen_t *alen); } ogetpeername
270142	COMPAT_43	{ int32_t sys_gethostid(void); } ogethostid
271143	COMPAT_43	{ int sys_sethostid(int32_t hostid); } osethostid
272144	COMPAT_43	{ int sys_getrlimit(int which, \
273			    struct ogetrlimit *rlp); } ogetrlimit
274145	COMPAT_43	{ int sys_setrlimit(int which, \
275			    struct ogetrlimit *rlp); } osetrlimit
276146	COMPAT_43	{ int sys_killpg(int pgid, int signum); } okillpg
277147	STD		{ int sys_setsid(void); }
278148	STD		{ int sys_quotactl(const char *path, int cmd, \
279			    int uid, char *arg); }
280149	COMPAT_43	{ int sys_quota(void); } oquota
281150	COMPAT_43	{ int sys_getsockname(int fdec, caddr_t asa, \
282			    int *alen); } ogetsockname
283
284; Syscalls 151-180 inclusive are reserved for vendor-specific
285; system calls.  (This includes various calls added for compatibity
286; with other Unix variants.)
287; Some of these calls are now supported by BSD...
288151	UNIMPL
289152	UNIMPL
290153	UNIMPL
291154	UNIMPL
292#if defined(NFSCLIENT) || defined(NFSSERVER)
293155	STD		{ int sys_nfssvc(int flag, void *argp); }
294#else
295155	UNIMPL
296#endif
297156	COMPAT_43	{ int sys_getdirentries(int fd, char *buf, \
298			    int count, long *basep); } ogetdirentries
299157	COMPAT_25	{ int sys_statfs(const char *path, \
300			    struct ostatfs *buf); } ostatfs
301158	COMPAT_25	{ int sys_fstatfs(int fd, struct ostatfs *buf); } \
302			    ostatfs
303159	UNIMPL
304160	UNIMPL
305161	STD		{ int sys_getfh(const char *fname, fhandle_t *fhp); }
306162	COMPAT_09	{ int sys_getdomainname(char *domainname, int len); } \
307			    ogetdomainname
308163	COMPAT_09	{ int sys_setdomainname(char *domainname, int len); } \
309			    osetdomainname
310164	UNIMPL		ouname
311165	STD		{ int sys_sysarch(int op, void *parms); }
312166	UNIMPL
313167	UNIMPL
314168	UNIMPL
315#if defined(SYSVSEM) && !defined(__LP64__)
316169	COMPAT_10	{ int sys_semsys(int which, int a2, int a3, int a4, \
317			    int a5); } osemsys
318#else
319169	UNIMPL		1.0 semsys
320#endif
321#if defined(SYSVMSG) && !defined(__LP64__)
322170	COMPAT_10	{ int sys_msgsys(int which, int a2, int a3, int a4, \
323			    int a5, int a6); } omsgsys
324#else
325170	UNIMPL		1.0 msgsys
326#endif
327#if defined(SYSVSHM) && !defined(__LP64__)
328171	COMPAT_10	{ int sys_shmsys(int which, int a2, int a3, int a4); } \
329			    oshmsys
330#else
331171	UNIMPL		1.0 shmsys
332#endif
333172	UNIMPL
334173	STD		{ ssize_t sys_pread(int fd, void *buf, \
335			  size_t nbyte, int pad, off_t offset); }
336174	STD		{ ssize_t sys_pwrite(int fd, const void *buf, \
337			  size_t nbyte, int pad, off_t offset); }
338175	UNIMPL		ntp_gettime
339176	UNIMPL		ntp_adjtime
340177	UNIMPL
341178	UNIMPL
342179	UNIMPL
343180	UNIMPL
344
345; Syscalls 181-199 are used by/reserved for BSD
346181	STD		{ int sys_setgid(gid_t gid); }
347182	STD		{ int sys_setegid(gid_t egid); }
348183	STD		{ int sys_seteuid(uid_t euid); }
349#ifdef LFS
350184	STD		{ int lfs_bmapv(fsid_t *fsidp, \
351			    struct block_info *blkiov, int blkcnt); }
352185	STD		{ int lfs_markv(fsid_t *fsidp, \
353			    struct block_info *blkiov, int blkcnt); }
354186	STD		{ int lfs_segclean(fsid_t *fsidp, u_long segment); }
355187	STD		{ int lfs_segwait(fsid_t *fsidp, struct timeval *tv); }
356#else
357184	UNIMPL
358185	UNIMPL
359186	UNIMPL
360187	UNIMPL
361#endif
362188	COMPAT_35	{ int sys_stat(const char *path, struct stat35 *ub); } \
363			    stat35
364189	COMPAT_35	{ int sys_fstat(int fd, struct stat35 *sb); } \
365			    fstat35
366190	COMPAT_35	{ int sys_lstat(const char *path, \
367			    struct stat35 *ub); } lstat35
368191	STD		{ long sys_pathconf(const char *path, int name); }
369192	STD		{ long sys_fpathconf(int fd, int name); }
370193	STD		{ int sys_swapctl(int cmd, const void *arg, int misc); }
371194	STD		{ int sys_getrlimit(int which, \
372			    struct rlimit *rlp); }
373195	STD		{ int sys_setrlimit(int which, \
374			    const struct rlimit *rlp); }
375196	STD		{ int sys_getdirentries(int fd, char *buf, \
376			    int count, long *basep); }
377197	STD		{ void *sys_mmap(void *addr, size_t len, int prot, \
378			    int flags, int fd, long pad, off_t pos); }
379198	INDIR		{ quad_t sys___syscall(quad_t num, ...); }
380199	STD		{ off_t sys_lseek(int fd, int pad, off_t offset, \
381			    int whence); }
382200	STD		{ int sys_truncate(const char *path, int pad, \
383			    off_t length); }
384201	STD		{ int sys_ftruncate(int fd, int pad, off_t length); }
385202	STD		{ int sys___sysctl(int *name, u_int namelen, \
386			    void *old, size_t *oldlenp, void *new, \
387			    size_t newlen); }
388203	STD		{ int sys_mlock(const void *addr, size_t len); }
389204	STD		{ int sys_munlock(const void *addr, size_t len); }
390205	UNIMPL		sys_undelete
391206	STD		{ int sys_futimes(int fd, \
392			    const struct timeval *tptr); }
393207	STD		{ pid_t sys_getpgid(pid_t pid); }
394208	STD		{ int sys_xfspioctl(int operation, char *a_pathP, \
395			    int a_opcode, struct ViceIoctl *a_paramsP, \
396			    int a_followSymlinks); }
397209	UNIMPL
398;
399; Syscalls 210-219 are reserved for dynamically loaded syscalls
400;
401#ifdef LKM
402210	NODEF		{ int sys_lkmnosys(void); }
403211	NODEF		{ int sys_lkmnosys(void); }
404212	NODEF		{ int sys_lkmnosys(void); }
405213	NODEF		{ int sys_lkmnosys(void); }
406214	NODEF		{ int sys_lkmnosys(void); }
407215	NODEF		{ int sys_lkmnosys(void); }
408216	NODEF		{ int sys_lkmnosys(void); }
409217	NODEF		{ int sys_lkmnosys(void); }
410218	NODEF		{ int sys_lkmnosys(void); }
411219	NODEF		{ int sys_lkmnosys(void); }
412#else	/* !LKM */
413210	UNIMPL
414211	UNIMPL
415212	UNIMPL
416213	UNIMPL
417214	UNIMPL
418215	UNIMPL
419216	UNIMPL
420217	UNIMPL
421218	UNIMPL
422219	UNIMPL
423#endif	/* !LKM */
424; System calls 220-240 are reserved for use by OpenBSD
425#ifdef SYSVSEM
426220	COMPAT_23	{ int sys___semctl(int semid, int semnum, int cmd, \
427			    union semun *arg); } semctl23
428221	STD		{ int sys_semget(key_t key, int nsems, int semflg); }
429222	COMPAT_35	{ int sys_semop(int semid, struct sembuf *sops, \
430			    u_int nsops); }
431223	OBSOL		sys_semconfig
432#else
433220	UNIMPL		semctl
434221	UNIMPL		semget
435222	UNIMPL		semop
436223	UNIMPL		semconfig
437#endif
438#ifdef SYSVMSG
439224	COMPAT_23	{ int sys_msgctl(int msqid, int cmd, \
440			    struct omsqid_ds *buf); } msgctl23
441225	STD		{ int sys_msgget(key_t key, int msgflg); }
442226	STD		{ int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, \
443			    int msgflg); }
444227	STD		{ int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \
445			    long msgtyp, int msgflg); }
446#else
447224	UNIMPL		msgctl
448225	UNIMPL		msgget
449226	UNIMPL		msgsnd
450227	UNIMPL		msgrcv
451#endif
452#ifdef SYSVSHM
453228	STD		{ void *sys_shmat(int shmid, const void *shmaddr, \
454			    int shmflg); }
455229	COMPAT_23	{ int sys_shmctl(int shmid, int cmd, \
456			    struct oshmid_ds *buf); } shmctl23
457230	STD		{ int sys_shmdt(const void *shmaddr); }
458231	COMPAT_35	{ int sys_shmget(key_t key, int size, int shmflg); }
459#else
460228	UNIMPL		shmat
461229	UNIMPL		shmctl
462230	UNIMPL		shmdt
463231	UNIMPL		shmget
464#endif
465232	STD		{ int sys_clock_gettime(clockid_t clock_id, \
466			    struct timespec *tp); }
467233	STD		{ int sys_clock_settime(clockid_t clock_id, \
468			    const struct timespec *tp); }
469234	STD		{ int sys_clock_getres(clockid_t clock_id, \
470			    struct timespec *tp); }
471235	UNIMPL		timer_create
472236	UNIMPL		timer_delete
473237	UNIMPL		timer_settime
474238	UNIMPL		timer_gettime
475239	UNIMPL		timer_getoverrun
476;
477; System calls 240-249 are reserved for other IEEE Std1003.1b syscalls
478;
479240	STD		{ int sys_nanosleep(const struct timespec *rqtp, \
480			    struct timespec *rmtp); }
481241	UNIMPL
482242	UNIMPL
483243	UNIMPL
484244	UNIMPL
485245	UNIMPL
486246	UNIMPL
487247	UNIMPL
488248	UNIMPL
489249	UNIMPL
490250	STD		{ int sys_minherit(void *addr, size_t len, \
491			    int inherit); }
492251	STD		{ int sys_rfork(int flags); }
493252	STD		{ int sys_poll(struct pollfd *fds, \
494			    u_int nfds, int timeout); }
495253	STD		{ int sys_issetugid(void); }
496254	STD		{ int sys_lchown(const char *path, uid_t uid, gid_t gid); }
497255	STD		{ pid_t sys_getsid(pid_t pid); }
498256	STD		{ int sys_msync(void *addr, size_t len, int flags); }
499#ifdef SYSVSEM
500257	COMPAT_35	{ int sys___semctl(int semid, int semnum, int cmd, \
501			    union semun *arg); } semctl35
502#else
503257	UNIMPL
504#endif
505#ifdef SYSVSHM
506258	COMPAT_35	{ int sys_shmctl(int shmid, int cmd, \
507			    struct shmid_ds35 *buf); } shmctl35
508#else
509258	UNIMPL
510#endif
511#ifdef SYSVMSG
512259	COMPAT_35	{ int sys_msgctl(int msqid, int cmd, \
513			    struct msqid_ds35 *buf); } msgctl35
514#else
515259	UNIMPL
516#endif
517260	COMPAT_O43	{ int sys_getfsstat(struct o43statfs *buf, size_t bufsize, \
518			    int flags); }
519261	COMPAT_O43	{ int sys_statfs(const char *path, \
520			    struct o43statfs *buf); }
521262	COMPAT_O43	{ int sys_fstatfs(int fd, struct o43statfs *buf); }
522263	STD		{ int sys_pipe(int *fdp); }
523264	STD		{ int sys_fhopen(const fhandle_t *fhp, int flags); }
524265	COMPAT_35	{ int sys_fhstat(const fhandle_t *fhp, \
525			    struct stat35 *sb); }
526266	COMPAT_O43	{ int sys_fhstatfs(const fhandle_t *fhp, \
527			    struct o43statfs *buf); }
528267	STD		{ ssize_t sys_preadv(int fd, \
529			  const struct iovec *iovp, int iovcnt, \
530			  int pad, off_t offset); }
531268	STD		{ ssize_t sys_pwritev(int fd, \
532			  const struct iovec *iovp, int iovcnt, \
533			  int pad, off_t offset); }
534269	STD		{ int sys_kqueue(void); }
535270	STD		{ int sys_kevent(int fd, \
536			    const struct kevent *changelist, int nchanges, \
537			    struct kevent *eventlist, int nevents, \
538			    const struct timespec *timeout); }
539271	STD		{ int sys_mlockall(int flags); }
540272	STD		{ int sys_munlockall(void); }
541273	STD		{ int sys_getpeereid(int fdes, uid_t *euid, gid_t *egid); }
542274	UNIMPL		sys_extattrctl
543275	UNIMPL		sys_extattr_set_file
544276	UNIMPL		sys_extattr_get_file
545277	UNIMPL		sys_extattr_delete_file
546278	UNIMPL		sys_extattr_set_fd
547279	UNIMPL		sys_extattr_get_fd
548280	UNIMPL		sys_extattr_delete_fd
549281	STD		{ int sys_getresuid(uid_t *ruid, uid_t *euid, \
550			    uid_t *suid); }
551282	STD		{ int sys_setresuid(uid_t ruid, uid_t euid, \
552			    uid_t suid); }
553283	STD		{ int sys_getresgid(gid_t *rgid, gid_t *egid, \
554			    gid_t *sgid); }
555284	STD		{ int sys_setresgid(gid_t rgid, gid_t egid, \
556			    gid_t sgid); }
557285	OBSOL		sys_omquery
558286	STD		{ void *sys_mquery(void *addr, size_t len, int prot, \
559			    int flags, int fd, long pad, off_t pos); }
560287	STD		{ int sys_closefrom(int fd); }
561288	STD		{ int sys_sigaltstack(const struct sigaltstack *nss, \
562			    struct sigaltstack *oss); }
563#ifdef SYSVSHM
564289	STD		{ int sys_shmget(key_t key, size_t size, int shmflg); }
565#else
566289	UNIMPL		shmget
567#endif
568#ifdef SYSVSEM
569290	STD		{ int sys_semop(int semid, struct sembuf *sops, \
570			    size_t nsops); }
571#else
572290    UNIMPL		semop
573#endif
574291	STD		{ int sys_stat(const char *path, struct stat *ub); }
575292	STD		{ int sys_fstat(int fd, struct stat *sb); }
576293	STD		{ int sys_lstat(const char *path, struct stat *ub); }
577294	STD		{ int sys_fhstat(const fhandle_t *fhp, \
578			    struct stat *sb); }
579#ifdef SYSVSEM
580295	STD		{ int sys___semctl(int semid, int semnum, int cmd, \
581			    union semun *arg); }
582#else
583295	UNIMPL
584#endif
585#ifdef SYSVSHM
586296	STD		{ int sys_shmctl(int shmid, int cmd, \
587			    struct shmid_ds *buf); }
588#else
589296	UNIMPL
590#endif
591#ifdef SYSVMSG
592297	STD		{ int sys_msgctl(int msqid, int cmd, \
593			    struct msqid_ds *buf); }
594#else
595297	UNIMPL
596#endif
597298	STD		{ int sys_sched_yield(void); }
598#ifdef RTHREADS
599299	STD		{ pid_t sys_getthrid(void); }
600300	STD		{ int sys_thrsleep(void *ident, int timeout, void *lock); }
601301	STD		{ int sys_thrwakeup(void *ident, int n); }
602302	STD		{ void sys_threxit(int rval); }
603303	STD		{ int sys_thrsigdivert(sigset_t sigmask); }
604#else
605299	UNIMPL
606300	UNIMPL
607301	UNIMPL
608302	UNIMPL
609303	UNIMPL
610#endif
611304	STD		{ int sys___getcwd(char *buf, size_t len); }
612305	STD		{ int sys_adjfreq(const int64_t *freq, \
613			    int64_t *oldfreq); }
614306	STD		{ int sys_getfsstat(struct statfs *buf, size_t bufsize, \
615			    int flags); }
616307	STD		{ int sys_statfs(const char *path, \
617			    struct statfs *buf); }
618308	STD		{ int sys_fstatfs(int fd, struct statfs *buf); }
619309	STD		{ int sys_fhstatfs(const fhandle_t *fhp, \
620			    struct statfs *buf); }
621