syscalls.master revision 1.44
1	$NetBSD: syscalls.master,v 1.44 2004/04/21 01:05:36 christos Exp $
2
3;	from: @(#)syscalls.master	8.2 (Berkeley) 1/13/94
4
5; NetBSD COMPAT_FREEBSD 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; types:
14;	STD	always included
15;	OBSOL	obsolete, not included in system
16;	UNIMPL	unimplemented, not included in system
17;	NODEF	included, but don't define the syscall number
18;	NOARGS	included, but don't define the syscall args structure
19;
20; The compat options are defined in the syscalls.conf file, and the
21; compat option name is prefixed to the syscall name.  Other than
22; that, they're like NODEF (for 'compat' options), or STD (for
23; 'libcompat' options).
24;
25; The type-dependent arguments are as follows:
26; For STD, NODEF, NOARGS, and compat syscalls:
27;	{ pseudo-proto } [alias]
28; For other syscalls:
29;	[comment]
30;
31; #ifdef's, etc. may be included, and are copied to the output files.
32; #include's are copied to the syscall names and switch definition files only.
33
34#if defined(_KERNEL_OPT)
35#include "opt_ktrace.h"
36#include "opt_nfsserver.h"
37#include "opt_ntp.h"
38#include "opt_sysv.h"
39#include "opt_compat_43.h"
40#include "opt_posix.h"
41
42#include "fs_lfs.h"
43#include "fs_nfs.h"
44#endif
45
46#include <sys/param.h>
47#include <sys/systm.h>
48#include <sys/signal.h>
49#include <sys/mount.h>
50#include <sys/sa.h>
51#include <sys/syscallargs.h>
52
53#include <compat/freebsd/freebsd_syscallargs.h>
54
55#include <machine/freebsd_machdep.h>
56
57%%
58
59; Reserved/unimplemented system calls in the range 0-150 inclusive
60; are reserved for use in future Berkeley releases.
61; Additional system calls implemented in vendor and other
62; redistributions should be placed in the reserved range at the end
63; of the current calls.
64
650	NOARGS		{ int sys_nosys(void); } syscall
661	NOARGS		{ int sys_exit(int rval); }
672	NOARGS		{ int sys_fork(void); }
683	NOARGS		{ int sys_read(int fd, char *buf, u_int nbyte); }
694	NOARGS		{ int sys_write(int fd, char *buf, u_int nbyte); }
705	STD		{ int freebsd_sys_open(const char *path, int flags, \
71			    int mode); }
726	NOARGS		{ int sys_close(int fd); }
737	NOARGS		{ int sys_wait4(int pid, int *status, int options, \
74			    struct rusage *rusage); }
758	STD		{ int compat_43_freebsd_sys_creat(const char *path, \
76			    int mode); } ocreat
779	STD		{ int freebsd_sys_link(const char *path, \
78			    const char *link); }
7910	STD		{ int freebsd_sys_unlink(const char *path); }
8011	OBSOL		execv
8112	STD		{ int freebsd_sys_chdir(const char *path); }
8213	NOARGS		{ int sys_fchdir(int fd); }
8314	STD		{ int freebsd_sys_mknod(const char *path, int mode, \
84			    int dev); }
8515	STD		{ int freebsd_sys_chmod(const char *path, int mode); }
8616	STD		{ int freebsd_sys_chown(const char *path, int uid, \
87			    int gid); }
8817	NOARGS		{ int sys_obreak(char *nsize); } break
89#ifdef COMPAT_20
9018	NOARGS		{ int compat_20_sys_getfsstat(struct statfs12 *buf, \
91			    long bufsize, int flags); }
92#else
9318	EXCL		compat_20_sys_getfsstat
94#endif
9519	NOARGS		{ long compat_43_sys_lseek(int fd, long offset, \
96			    int whence); } olseek
9720	NOARGS		{ pid_t sys_getpid_with_ppid(void); }
9821	STD		{ int freebsd_sys_mount(int type, const char *path, \
99			    int flags, caddr_t data); }
10022	STD		{ int freebsd_sys_unmount(const char *path, \
101			    int flags); }
10223	NOARGS		{ int sys_setuid(uid_t uid); }
10324	NOARGS		{ uid_t sys_getuid_with_euid(void); }
10425	NOARGS		{ uid_t sys_geteuid(void); }
10526	STD		{ int freebsd_sys_ptrace(int req, pid_t pid, \
106			    caddr_t addr, int data); }
10727	NOARGS		{ int sys_recvmsg(int s, struct msghdr *msg, \
108			    int flags); }
10928	NOARGS		{ int sys_sendmsg(int s, caddr_t msg, int flags); }
11029	NOARGS		{ int sys_recvfrom(int s, caddr_t buf, size_t len, \
111			    int flags, caddr_t from, int *fromlenaddr); }
11230	NOARGS		{ int sys_accept(int s, caddr_t name, int *anamelen); }
11331	NOARGS		{ int sys_getpeername(int fdes, caddr_t asa, \
114			    int *alen); }
11532	NOARGS		{ int sys_getsockname(int fdes, caddr_t asa, \
116			    int *alen); }
11733	STD		{ int freebsd_sys_access(const char *path, int flags); }
11834	STD		{ int freebsd_sys_chflags(const char *path, \
119			    int flags); }
12035	NOARGS		{ int sys_fchflags(int fd, int flags); }
12136	NOARGS		{ int sys_sync(void); }
12237	NOARGS		{ int sys_kill(int pid, int signum); }
12338	STD		{ int compat_43_freebsd_sys_stat(const char *path, \
124			    struct stat43 *ub); } stat43
12539	NOARGS		{ pid_t sys_getppid(void); }
12640	STD		{ int compat_43_freebsd_sys_lstat(const char *path, \
127			    struct stat43 *ub); } lstat43
12841	NOARGS		{ int sys_dup(u_int fd); }
12942	NOARGS		{ int sys_pipe(void); }
13043	NOARGS		{ gid_t sys_getegid(void); }
13144	NOARGS		{ int sys_profil(caddr_t samples, u_int size, \
132			    u_int offset, u_int scale); }
133#ifdef KTRACE
13445	NOARGS		{ int sys_ktrace(char *fname, int ops, int facs, \
135			    int pid); }
136#else
13745	EXCL		ktrace
138#endif
13946	NOARGS		{ int compat_13_sys_sigaction(int signum, \
140			    const struct sigaction13 *nsa, \
141			    struct sigaction13 *osa); }
14247	NOARGS		{ gid_t sys_getgid_with_egid(void); }
14348	NOARGS		{ int compat_13_sys_sigprocmask(int how, \
144			    int mask); }
14549	NOARGS		{ int sys___getlogin(char *namebuf, u_int namelen); }
14650	NOARGS		{ int sys___setlogin(char *namebuf); }
14751	NOARGS		{ int sys_acct(char *path); }
14852	NOARGS		{ int compat_13_sys_sigpending(void); }
14953	NOARGS		{ int compat_13_sys_sigaltstack( \
150			    const struct sigaltstack13 *nss, \
151			    struct sigaltstack13 *oss); }
15254	STD		{ int freebsd_sys_ioctl(int fd, u_long com, \
153			    caddr_t data); }
15455	NOARGS		{ int sys_reboot(int opt); } oreboot
15556	STD		{ int freebsd_sys_revoke(const char *path); }
15657	STD		{ int freebsd_sys_symlink(const char *path, \
157			    const char *link); }
15858	STD		{ int freebsd_sys_readlink(const char *path, \
159			    char *buf, int count); }
16059	STD		{ int freebsd_sys_execve(const char *path, \
161			    char **argp, char **envp); }
16260	NOARGS		{ int sys_umask(int newmask); }
16361	STD		{ int freebsd_sys_chroot(const char *path); }
16462	NOARGS		{ int compat_43_sys_fstat(int fd, struct stat43 *sb); } \
165			    fstat43
16663	NOARGS		{ int compat_43_sys_getkerninfo(int op, char *where, \
167			    int *size, int arg); } ogetkerninfo
16864	NOARGS		{ int compat_43_sys_getpagesize(void); } ogetpagesize
16965	STD		{ int freebsd_sys_msync(caddr_t addr, size_t len, \
170			    int flags); }
17166	NOARGS		{ int sys_vfork(void); }
17267	OBSOL		vread
17368	OBSOL		vwrite
17469	NOARGS		{ int sys_sbrk(intptr_t incr); }
17570	NOARGS		{ int sys_sstk(int incr); }
17671	NOARGS		{ int compat_43_sys_mmap(caddr_t addr, size_t len, \
177			    int prot, int flags, int fd, long pos); } ommap
17872	NOARGS		{ int sys_ovadvise(int anom); } vadvise
17973	NOARGS		{ int sys_munmap(caddr_t addr, size_t len); }
18074	NOARGS		{ int sys_mprotect(caddr_t addr, size_t len, \
181			    int prot); }
18275	NOARGS		{ int sys_madvise(caddr_t addr, size_t len, \
183			    int behav); }
18476	OBSOL		vhangup
18577	OBSOL		vlimit
18678	NOARGS		{ int sys_mincore(caddr_t addr, size_t len, char *vec); }
18779	NOARGS		{ int sys_getgroups(u_int gidsetsize, gid_t *gidset); }
18880	NOARGS		{ int sys_setgroups(u_int gidsetsize, gid_t *gidset); }
18981	NOARGS		{ int sys_getpgrp(void); }
19082	NOARGS		{ int sys_setpgid(int pid, int pgid); }
19183	NOARGS		{ int sys_setitimer(u_int which, \
192			    struct itimerval *itv, struct itimerval *oitv); }
19384	NOARGS		{ int compat_43_sys_wait(void); } owait
19485	NOARGS		{ int compat_12_sys_swapon(char *name); }
19586	NOARGS		{ int sys_getitimer(u_int which, \
196			    struct itimerval *itv); }
19787	NOARGS		{ int compat_43_sys_gethostname(char *hostname, \
198			    u_int len); } ogethostname
19988	NOARGS		{ int compat_43_sys_sethostname(char *hostname, \
200			    u_int len); } osethostname
20189	NOARGS		{ int compat_43_sys_getdtablesize(void); } \
202			    ogetdtablesize
20390	NOARGS		{ int sys_dup2(u_int from, u_int to); }
20491	UNIMPL		getdopt
20592	NOARGS		{ int sys_fcntl(int fd, int cmd, void *arg); }
20693	NOARGS		{ int sys_select(u_int nd, fd_set *in, fd_set *ou, \
207			    fd_set *ex, struct timeval *tv); }
20894	UNIMPL		setdopt
20995	NOARGS		{ int sys_fsync(int fd); }
21096	NOARGS		{ int sys_setpriority(int which, int who, int prio); }
21197	NOARGS		{ int sys_socket(int domain, int type, int protocol); }
21298	NOARGS		{ int sys_connect(int s, caddr_t name, int namelen); }
21399	NOARGS		{ int compat_43_sys_accept(int s, caddr_t name, \
214			    int *anamelen); } oaccept
215100	NOARGS		{ int sys_getpriority(int which, int who); }
216101	NOARGS		{ int compat_43_sys_send(int s, caddr_t buf, int len, \
217			    int flags); } osend
218102	NOARGS		{ int compat_43_sys_recv(int s, caddr_t buf, int len, \
219			    int flags); } orecv
220103	STD		{ int freebsd_sys_sigreturn( \
221			    struct freebsd_sigcontext *scp); }
222104	NOARGS		{ int sys_bind(int s, caddr_t name, int namelen); }
223105	NOARGS		{ int sys_setsockopt(int s, int level, int name, \
224			    caddr_t val, int valsize); }
225106	NOARGS		{ int sys_listen(int s, int backlog); }
226107	OBSOL		vtimes
227108	NOARGS		{ int compat_43_sys_sigvec(int signum, \
228			    struct sigvec *nsv, struct sigvec *osv); } osigvec
229109	NOARGS		{ int compat_43_sys_sigblock(int mask); } osigblock
230110	NOARGS		{ int compat_43_sys_sigsetmask(int mask); } osigsetmask
231111	NOARGS		{ int compat_13_sys_sigsuspend(int mask); }
232112	NOARGS		{ int compat_43_sys_sigstack(struct sigstack *nss, \
233			    struct sigstack *oss); } osigstack
234113	NOARGS		{ int compat_43_sys_recvmsg(int s, \
235			    struct omsghdr *msg, int flags); } orecvmsg
236114	NOARGS		{ int compat_43_sys_sendmsg(int s, caddr_t msg, \
237			    int flags); } osendmsg
238#ifdef TRACE
239115	NOARGS		{ int sys_vtrace(int request, int value); }
240#else
241115	OBSOL		vtrace
242#endif
243116	NOARGS		{ int sys_gettimeofday(struct timeval *tp, \
244			    struct timezone *tzp); }
245117	NOARGS		{ int sys_getrusage(int who, struct rusage *rusage); }
246118	NOARGS		{ int sys_getsockopt(int s, int level, int name, \
247			    caddr_t val, int *avalsize); }
248119	OBSOL		resuba
249120	NOARGS		{ int sys_readv(int fd, struct iovec *iovp, \
250			    u_int iovcnt); }
251121	NOARGS		{ int sys_writev(int fd, struct iovec *iovp, \
252			    u_int iovcnt); }
253122	NOARGS		{ int sys_settimeofday(struct timeval *tv, \
254			    struct timezone *tzp); }
255123	NOARGS		{ int sys_fchown(int fd, int uid, int gid); }
256124	NOARGS		{ int sys_fchmod(int fd, int mode); }
257125	NOARGS		{ int compat_43_sys_recvfrom(int s, caddr_t buf, \
258			    size_t len, int flags, caddr_t from, \
259			    int *fromlenaddr); } orecvfrom
260126	NOARGS		{ int sys_setreuid(int ruid, int euid); }
261127	NOARGS		{ int sys_setregid(int rgid, int egid); }
262128	STD		{ int freebsd_sys_rename(const char *from, \
263			    const char *to); }
264129	STD		{ int compat_43_freebsd_sys_truncate(const char *path, \
265			    long length); } otruncate
266130	NOARGS		{ int compat_43_sys_ftruncate(int fd, long length); } \
267			    oftruncate
268131	NOARGS		{ int sys_flock(int fd, int how); }
269132	STD		{ int freebsd_sys_mkfifo(const char *path, int mode); }
270133	NOARGS		{ int sys_sendto(int s, caddr_t buf, size_t len, \
271			    int flags, caddr_t to, int tolen); }
272134	NOARGS		{ int sys_shutdown(int s, int how); }
273135	NOARGS		{ int sys_socketpair(int domain, int type, \
274			    int protocol, int *rsv); }
275136	STD		{ int freebsd_sys_mkdir(const char *path, int mode); }
276137	STD		{ int freebsd_sys_rmdir(const char *path); }
277138	NOARGS		{ int sys_utimes(char *path, struct timeval *tptr); }
278139	OBSOL		4.2 sigreturn
279140	NOARGS		{ int sys_adjtime(struct timeval *delta, \
280			    struct timeval *olddelta); }
281141	NOARGS		{ int compat_43_sys_getpeername(int fdes, caddr_t asa, \
282			    int *alen); } ogetpeername
283142	NOARGS		{ int32_t compat_43_sys_gethostid(void); } ogethostid
284143	NOARGS		{ int compat_43_sys_sethostid(int32_t hostid); } \
285			    osethostid
286144	NOARGS		{ int compat_43_sys_getrlimit(u_int which, \
287			    struct orlimit *rlp); } ogetrlimit
288145	NOARGS		{ int compat_43_sys_setrlimit(u_int which, \
289			    struct orlimit *rlp); } osetrlimit
290146	NOARGS		{ int compat_43_sys_killpg(int pgid, int signum); } \
291			    okillpg
292147	NOARGS		{ int sys_setsid(void); }
293148	NOARGS		{ int sys_quotactl(char *path, int cmd, int uid, \
294			    caddr_t arg); }
295149	NOARGS		{ int compat_43_sys_quota(void); } oquota
296150	NOARGS		{ int compat_43_sys_getsockname(int fdec, caddr_t asa, \
297			    int *alen); } ogetsockname
298
299; Syscalls 151-180 inclusive are reserved for vendor-specific
300; system calls.  (This includes various calls added for compatibity
301; with other Unix variants.)
302; Some of these calls are now supported by BSD...
303151	UNIMPL		sem_lock
304152	UNIMPL		sem_wakeup
305153	UNIMPL		asyncdaemon
306154	UNIMPL
307#if defined(NFS) || defined(NFSSERVER)
308155	NOARGS		{ int sys_nfssvc(int flag, caddr_t argp); }
309#else
310155	UNIMPL		nfssvc
311#endif
312156	NOARGS		{ int compat_43_sys_getdirentries(int fd, char *buf, \
313			    u_int count, long *basep); } ogetdirentries
314157	STD		{ int freebsd_sys_statfs(const char *path, \
315			    struct statfs12 *buf); }
316#ifdef COMPAT_20
317158	NOARGS		{ int compat_20_sys_fstatfs(int fd, \
318			    struct statfs12 *buf); }
319#else
320158	EXCL		compat_20_sys_fstatfs
321#endif
322159	UNIMPL
323160	UNIMPL
324#ifdef NFS
325161	STD		{ int freebsd_sys_getfh(const char *fname, \
326			    fhandle_t *fhp); }
327#else
328161	UNIMPL		getfh
329#endif
330162	NOARGS		{ int compat_09_sys_getdomainname(char *domainname, \
331			    int len); }
332163	NOARGS		{ int compat_09_sys_setdomainname(char *domainname, \
333			    int len); }
334164	NOARGS		{ int compat_09_sys_uname(struct outsname *name); }
335165	NOARGS		{ int sys_sysarch(int op, char *parms); }
336166	STD		{ int freebsd_sys_rtprio(int function, pid_t pid, \
337			    struct freebsd_rtprio *rtp); }
338167	UNIMPL
339168	UNIMPL
340; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
341#if defined(SYSVSEM) && !defined(_LP64)
342169	STD		{ int freebsd_sys_semsys(int which, int a2, int a3, \
343			    int a4, int a5); }
344#else
345169	UNIMPL		1.0 semsys
346#endif
347; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
348#if defined(SYSVMSG) && !defined(_LP64)
349170	STD		{ int freebsd_sys_msgsys(int which, int a2, int a3, \
350			    int a4, int a5, int a6); }
351#else
352170	UNIMPL		1.0 msgsys
353#endif
354; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
355#if defined(SYSVSHM) && !defined(_LP64)
356171	STD		{ int freebsd_sys_shmsys(int which, int a2, int a3, \
357			    int a4); }
358#else
359171	UNIMPL		1.0 shmsys
360#endif
361172	UNIMPL
362173	NOARGS		{ ssize_t sys_pread(int fd, void *buf, \
363			    size_t nbyte, int pad, off_t offset); }
364174	NOARGS		{ ssize_t sys_pwrite(int fd, const void *buf, \
365			    size_t nbyte, int pad, off_t offset); }
366175	UNIMPL
367#ifdef NTP
368176	STD		{ int freebsd_ntp_adjtime(struct freebsd_timex *tp); }
369#else
370176     EXCL            ntp_adjtime
371#endif
372177	UNIMPL		sfork
373178	UNIMPL		getdescriptor
374179	UNIMPL		setdescriptor
375180	UNIMPL
376
377; Syscalls 180-199 are used by/reserved for BSD
378181	NOARGS		{ int sys_setgid(gid_t gid); }
379182	NOARGS		{ int sys_setegid(gid_t egid); }
380183	NOARGS		{ int sys_seteuid(uid_t euid); }
381#ifdef LFS
382184	NOARGS		{ int sys_lfs_bmapv(fsid_t *fsidp, \
383			    struct block_info *blkiov, int blkcnt); }
384185	NOARGS		{ int sys_lfs_markv(fsid_t *fsidp, \
385			    struct block_info *blkiov, int blkcnt); }
386186	NOARGS		{ int sys_lfs_segclean(fsid_t *fsidp, u_long segment); }
387187	NOARGS		{ int sys_lfs_segwait(fsid_t *fsidp, struct timeval *tv); }
388#else
389184	UNIMPL
390185	UNIMPL
391186	UNIMPL
392187	UNIMPL
393#endif
394188	STD		{ int freebsd_sys_stat(const char *path, \
395			    struct stat12 *ub); }
396189	NOARGS		{ int compat_12_sys_fstat(int fd, \
397			    struct stat12 *sb); }
398190	STD		{ int freebsd_sys_lstat(const char *path, \
399			    struct stat12 *ub); }
400191	STD		{ int freebsd_sys_pathconf(const char *path, \
401			    int name); }
402192	NOARGS		{ int sys_fpathconf(int fd, int name); }
403193	UNIMPL
404194	NOARGS		{ int sys_getrlimit(u_int which, struct rlimit *rlp); }
405195	NOARGS		{ int sys_setrlimit(u_int which, struct rlimit *rlp); }
406196	NOARGS		{ int compat_12_sys_getdirentries(int fd, char *buf, \
407			    u_int count, long *basep); }
408197	STD		{ caddr_t freebsd_sys_mmap(caddr_t addr, size_t len, \
409			    int prot, int flags, int fd, long pad, off_t pos); }
410198	NOARGS		{ int sys_nosys(void); } __syscall
411199	NOARGS		{ off_t sys_lseek(int fd, int pad, off_t offset, \
412			    int whence); }
413200	STD		{ int freebsd_sys_truncate(const char *path, int pad, \
414			    off_t length); }
415201	NOARGS		{ int sys_ftruncate(int fd, int pad, off_t length); }
416202	NOARGS		{ int sys___sysctl(int *name, u_int namelen, \
417			    void *old, size_t *oldlenp, void *new, \
418			    size_t newlen); }
419203	NOARGS		{ int sys_mlock(caddr_t addr, size_t len); }
420204	NOARGS		{ int sys_munlock(caddr_t addr, size_t len); }
421#ifdef FREEBSD_BASED_ON_44LITE_R2
422205	STD		{ int freebsd_sys_undelete(char *path); }
423#else
424205	UNIMPL		undelete
425#endif
426206	NOARGS		{ int sys_futimes(int fd, const struct timeval *tptr); }
427207	NOARGS		{ pid_t sys_getpgid(pid_t pid); }
428#if 0
429208	NOARGS		{ int sys_reboot(int opt, char *bootstr); }
430#else
431208	UNIMPL		newreboot
432#endif
433209	NOARGS		{ int sys_poll(struct pollfd *fds, u_int nfds, \
434			    int timeout); }
435;
436; Syscalls 210-219 are reserved for dynamically loaded syscalls
437;
438210	UNIMPL
439211	UNIMPL
440212	UNIMPL
441213	UNIMPL
442214	UNIMPL
443215	UNIMPL
444216	UNIMPL
445217	UNIMPL
446218	UNIMPL
447219	UNIMPL
448;
449; Syscalls 220-239 are reserved for syscalls imported from NetBSD
450;
451#ifdef SYSVSEM
452220	NOARGS		{ int compat_14_sys___semctl(int semid, int semnum, \
453			    int cmd, union __semun *arg); }
454221	NOARGS		{ int sys_semget(key_t key, int nsems, int semflg); }
455222	NOARGS		{ int sys_semop(int semid, struct sembuf *sops, \
456			    u_int nsops); }
457223	NOARGS		{ int sys_semconfig(int flag); }
458#else
459220	UNIMPL		semctl
460221	UNIMPL		semget
461222	UNIMPL		semop
462223	UNIMPL		semconfig
463#endif
464#ifdef SYSVMSG
465224	NOARGS		{ int compat_14_sys_msgctl(int msqid, int cmd, \
466			    struct msqid14_ds *buf); }
467225	NOARGS		{ int sys_msgget(key_t key, int msgflg); }
468226	NOARGS		{ int sys_msgsnd(int msqid, void *msgp, size_t msgsz, \
469			    int msgflg); }
470227	NOARGS		{ int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \
471			    long msgtyp, int msgflg); }
472#else
473224	UNIMPL		msgctl
474225	UNIMPL		msgget
475226	UNIMPL		msgsnd
476227	UNIMPL		msgrcv
477#endif
478#ifdef SYSVSHM
479228	NOARGS		{ int sys_shmat(int shmid, void *shmaddr, int shmflg); }
480229	NOARGS		{ int compat_14_sys_shmctl(int shmid, int cmd, \
481			    struct shmid_ds14 *buf); }
482230	NOARGS		{ int sys_shmdt(void *shmaddr); }
483231	NOARGS		{ int sys_shmget(key_t key, int size, int shmflg); }
484#else
485228	UNIMPL		shmat
486229	UNIMPL		shmctl
487230	UNIMPL		shmdt
488231	UNIMPL		shmget
489#endif
490;
491; XXXX
492232	NOARGS		{ int sys_clock_gettime(clockid_t clock_id, \
493			    struct timespec *tp); }
494233	NOARGS		{ int sys_clock_settime(clockid_t clock_id, \
495			    const struct timespec *tp); }
496234	NOARGS		{ int sys_clock_getres(clockid_t clock_id, \
497			    struct timespec *tp); }
498235	UNIMPL		timer_create
499236	UNIMPL		timer_delete
500237	UNIMPL		timer_settime
501238	UNIMPL		timer_gettime
502239	UNIMPL		timer_getoverrun
503240	NOARGS		{ int sys_nanosleep(const struct timespec *rqtp, \
504			    struct timespec *rmtp); }
505241	UNIMPL
506242	UNIMPL
507243	UNIMPL
508244	UNIMPL
509245	UNIMPL
510246	UNIMPL
511247	UNIMPL
512248	UNIMPL
513249	UNIMPL
514; syscall numbers initially used in OpenBSD
515250	NOARGS		{ int sys_minherit(void *addr, size_t len, \
516			    int inherit); }
517251	STD		{ int freebsd_sys_rfork(int flags); }
518252	UNIMPL		openbsd_poll
519253	NOARGS		{ int sys_issetugid(void); }
520254	STD		{ int freebsd_sys_lchown(const char *path, int uid, \
521			    int gid); }
522255	UNIMPL
523256	UNIMPL
524257	UNIMPL
525258	UNIMPL
526259	UNIMPL
527260	UNIMPL
528261	UNIMPL
529262	UNIMPL
530263	UNIMPL
531264	UNIMPL
532265	UNIMPL
533266	UNIMPL
534267	UNIMPL
535268	UNIMPL
536269	UNIMPL
537270	UNIMPL
538271	UNIMPL
539272	NOARGS		{ int sys_getdents(int fd, char *buf, size_t count); }
540273	UNIMPL
541274	NOARGS		{ int sys_lchmod(const char *path, mode_t mode); }
542275	NOARGS		{ int sys_lchown(const char *path, uid_t uid, \
543			    gid_t gid); } netbsd_lchown
544276	NOARGS		{ int sys_lutimes(const char *path, \
545			    const struct timeval *tptr); }
546277	NOARGS		{ int sys___msync13(void *addr, size_t len, int flags); }
547278	NOARGS		{ int sys___stat13(const char *path, struct stat *ub); }
548279	NOARGS		{ int sys___fstat13(int fd, struct stat *sb); }
549280	NOARGS		{ int sys___lstat13(const char *path, struct stat *ub);}
550281	UNIMPL
551282	UNIMPL
552283	UNIMPL
553284	UNIMPL
554285	UNIMPL
555286	UNIMPL
556287	UNIMPL
557288	UNIMPL
558289	UNIMPL
559290	UNIMPL
560291	UNIMPL
561292	UNIMPL
562293	UNIMPL
563294	UNIMPL
564295	UNIMPL
565296	UNIMPL
566#ifdef COMPAT_20
567297	NOARGS		{ int compat_20_sys_fhstatfs(const fhandle_t *fhp, \
568			    struct statfs12 *buf); }
569#else
570297	EXCL		compat_20_sys_fhstatfs
571#endif
572298	NOARGS		{ int sys_fhopen(const fhandle_t *fhp, int flags); }
573299	NOARGS		{ int sys_fhstat(const fhandle_t *fhp, \
574			    struct stat *sb); }
575; syscall numbers for FreeBSD
576300	UNIMPL		modnext
577301	UNIMPL		modstat
578302	UNIMPL		modfnext
579303	UNIMPL		modfind
580304	UNIMPL		kldload
581305	UNIMPL		kldunload
582306	UNIMPL		kldfind
583307	UNIMPL		kldnext
584308	UNIMPL		kldstat
585309	UNIMPL		kldfirstmod
586310	NOARGS		{ pid_t sys_getsid(pid_t pid); }
587311	UNIMPL		setresuid
588312	UNIMPL		setresgid
589313	UNIMPL		signanosleep
590314	UNIMPL		aio_return
591315	UNIMPL		aio_suspend
592316	UNIMPL		aio_cancel
593317	UNIMPL		aio_error
594318	UNIMPL		aio_read
595319	UNIMPL		aio_write
596320	UNIMPL		lio_listio
597321	NOARGS		{ void freebsd_sys_yield(void); }
598322	UNIMPL		thr_sleep
599323	UNIMPL		thr_wakeup
600324	NOARGS		{ int sys_mlockall(int flags); }
601325	NOARGS		{ int sys_munlockall(void); }
602326	NOARGS		{ int sys___getcwd(char *bufp, size_t length); }
603327	STD		{ int freebsd_sys_sched_setparam(pid_t pid, \
604			    const struct freebsd_sched_param *sp); }
605328	STD		{ int freebsd_sys_sched_getparam(pid_t pid, \
606			    struct freebsd_sched_param *sp); }
607329	STD		{ int freebsd_sys_sched_setscheduler(pid_t pid, \
608			    int policy, const struct sched_param *sp); }
609330	STD		{ int freebsd_sys_sched_getscheduler(pid_t pid); }
610331	STD		{ int freebsd_sys_sched_yield(void); }
611332	STD		{ int freebsd_sys_sched_get_priority_max(int policy); }
612333	STD		{ int freebsd_sys_sched_get_priority_min(int policy); }
613334	UNIMPL		sched_rr_get_interval
614335	STD		{ int freebsd_sys_utrace(void *addr, size_t len); }
615336	UNIMPL		sendfile
616337	UNIMPL		kldsym
617338	UNIMPL		jail
618339	UNIMPL		pioctl
619340	NOARGS		{ int sys___sigprocmask14(int how, \
620			    const sigset_t *set, \
621			    sigset_t *oset); }
622341	NOARGS		{ int sys___sigsuspend14(const sigset_t *set); }
623342	STD		{ int freebsd_sys_sigaction4(int signum, \
624			    const struct freebsd_sigaction4 *nsa, \
625			    struct freebsd_sigaction4 *osa); }
626343	NOARGS		{ int sys___sigpending14(const sigset_t *set); }
627344	UNIMPL		4.0 sigreturn
628345	UNIMPL		sigtimedwait
629346	UNIMPL		sigwaitinfo
630347	UNIMPL		__acl_get_file
631348	UNIMPL		__acl_set_file
632349	UNIMPL		__acl_get_fd
633350	UNIMPL		__acl_set_fd
634351	UNIMPL		__acl_delete_file
635352	UNIMPL		__acl_delete_fd
636353	UNIMPL		__acl_aclcheck_file
637354	UNIMPL		__acl_aclcheck_fd
638355	UNIMPL		extattrctl
639356	UNIMPL		extattr_set_file
640357	UNIMPL		extattr_get_file
641358	UNIMPL		extattr_delete_file
642359	UNIMPL		aio_waitcomplete
643360	UNIMPL		getresuid
644361	UNIMPL		getresgid
645362	UNIMPL		kqueue
646363	UNIMPL		kevent
647364	UNIMPL		__cap_get_proc
648365	UNIMPL		__cap_set_proc
649366	UNIMPL		__cap_get_fd
650367	UNIMPL		__cap_get_file
651368	UNIMPL		__cap_set_fd
652369	UNIMPL		__cap_set_file
653370	UNIMPL		lkmressym
654371	UNIMPL		extattr_set_fd
655372	UNIMPL		extattr_get_fd
656373	UNIMPL		extattr_delete_fd
657374	UNIMPL		__setugid
658375	UNIMPL		nfsclnt
659376	UNIMPL		eaccess
660377	UNIMPL		afs_syscall
661378	UNIMPL		nmount
662379	UNIMPL		kse_exit
663380	UNIMPL		kse_wakeup
664381	UNIMPL		kse_create
665382	UNIMPL		kse_thr_interrupt
666383	UNIMPL		kse_release
667384	UNIMPL		__mac_get_proc
668385	UNIMPL		__mac_set_proc
669386	UNIMPL		__mac_get_fd
670387	UNIMPL		__mac_get_file
671388	UNIMPL		__mac_set_fd
672389	UNIMPL		__mac_set_file
673390	UNIMPL		kenv
674391	NOARGS		{ int sys_lchflags(const char *path, u_long flags); }
675392	NOARGS		{ int sys_uuidgen(struct uuid *store, int count); }
676393	UNIMPL		sendfile
677394	UNIMPL		mac_syscall
678395	UNIMPL		getfsstat
679396	UNIMPL		statfs
680397	UNIMPL		fsstatfs
681398	UNIMPL		fhstatfs
682399	UNIMPL		nosys
683#if defined(P1003_1B_SEMAPHORE) || !defined(_KERNEL)
684400	NOARGS		{ int sys__ksem_close(semid_t id); }
685401	NOARGS		{ int sys__ksem_post(semid_t id); }
686402	NOARGS		{ int sys__ksem_wait(semid_t id); }
687403	NOARGS		{ int sys__ksem_trywait(semid_t id); }
688404	UNIMPL		ksem_init
689405	UNIMPL		ksem_open
690406	NOARGS		{ int sys__ksem_unlink(const char *name); }
691407	NOARGS		{ int sys__ksem_getvalue(semid_t id, \
692			    unsigned int *value); }
693408	NOARGS		{ int sys__ksem_destroy(semid_t id); }
694#else
695400	EXCL		ksem_close
696401	EXCL		ksem_post
697402	EXCL		ksem_wait
698403	EXCL		ksem_trywait
699404	EXCL		ksem_init
700405	EXCL		ksem_open
701406	EXCL		ksem_unlink
702407	EXCL		ksem_getvalue
703408	EXCL		ksem_destroy
704#endif
705409	UNIMPL		__mac_get_pid
706410	UNIMPL		__mac_get_link
707411	UNIMPL		__mac_set_link
708412	UNIMPL		extattr_set_link
709413	UNIMPL		extattr_get_link
710414	UNIMPL		extattr_delete_link
711415	UNIMPL		__mac_execve
712416	UNIMPL		sigaction
713417	UNIMPL		sigreturn
714418	UNIMPL		__xstat
715419	UNIMPL		__xfstat
716420	UNIMPL		__xlstat
717421	UNIMPL		getcontext
718422	UNIMPL		setcontext
719423	UNIMPL		swapcontext
720424	UNIMPL		swapoff
721425	UNIMPL		__acl_get_link
722426	UNIMPL		__acl_set_link
723427	UNIMPL		__acl_delete_link
724428	UNIMPL		__acl_aclcheck_link
725429	UNIMPL		sigwait
726430	UNIMPL		thr_create
727431	UNIMPL		thr_exit
728432	UNIMPL		thr_self
729433	UNIMPL		thr_kill
730434	UNIMPL		_umtx_lock
731435	UNIMPL		_umtx_unlock
732436	UNIMPL		jail_attach
733437	UNIMPL		extattr_list_fd
734438	UNIMPL		extattr_list_file
735439	UNIMPL		extattr_list_link
736