xref: /netbsd-src/sys/compat/freebsd/syscalls.master (revision e5548b402ae4c44fb816de42c7bba9581ce23ef5)
1	$NetBSD: syscalls.master,v 1.50 2005/12/11 12:20:02 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/sys/signal.h>
54
55#include <compat/freebsd/freebsd_syscallargs.h>
56
57#include <machine/freebsd_machdep.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	NOARGS		{ int sys_nosys(void); } syscall
681	NOARGS		{ int sys_exit(int rval); }
692	NOARGS		{ int sys_fork(void); }
703	NOARGS		{ int sys_read(int fd, char *buf, u_int nbyte); }
714	NOARGS		{ int sys_write(int fd, char *buf, u_int nbyte); }
725	STD		{ int freebsd_sys_open(const char *path, int flags, \
73			    int mode); }
746	NOARGS		{ int sys_close(int fd); }
757	NOARGS		{ int sys_wait4(int pid, int *status, int options, \
76			    struct rusage *rusage); }
778	STD		{ int compat_43_freebsd_sys_creat(const char *path, \
78			    int mode); } ocreat
799	STD		{ int freebsd_sys_link(const char *path, \
80			    const char *link); }
8110	STD		{ int freebsd_sys_unlink(const char *path); }
8211	OBSOL		execv
8312	STD		{ int freebsd_sys_chdir(const char *path); }
8413	NOARGS		{ int sys_fchdir(int fd); }
8514	STD		{ int freebsd_sys_mknod(const char *path, int mode, \
86			    int dev); }
8715	STD		{ int freebsd_sys_chmod(const char *path, int mode); }
8816	STD		{ int freebsd_sys_chown(const char *path, int uid, \
89			    int gid); }
9017	NOARGS		{ int sys_obreak(char *nsize); } break
9118	NOARGS		{ int compat_20_sys_getfsstat(struct statfs12 *buf, \
92			    long bufsize, int flags); }
9319	NOARGS		{ long compat_43_sys_lseek(int fd, long offset, \
94			    int whence); } olseek
9520	NOARGS		{ pid_t sys_getpid_with_ppid(void); }
9621	STD		{ int freebsd_sys_mount(int type, const char *path, \
97			    int flags, caddr_t data); }
9822	STD		{ int freebsd_sys_unmount(const char *path, \
99			    int flags); }
10023	NOARGS		{ int sys_setuid(uid_t uid); }
10124	NOARGS		{ uid_t sys_getuid_with_euid(void); }
10225	NOARGS		{ uid_t sys_geteuid(void); }
10326	STD		{ int freebsd_sys_ptrace(int req, pid_t pid, \
104			    caddr_t addr, int data); }
10527	NOARGS		{ int sys_recvmsg(int s, struct msghdr *msg, \
106			    int flags); }
10728	NOARGS		{ int sys_sendmsg(int s, caddr_t msg, int flags); }
10829	NOARGS		{ int sys_recvfrom(int s, caddr_t buf, size_t len, \
109			    int flags, caddr_t from, int *fromlenaddr); }
11030	NOARGS		{ int sys_accept(int s, caddr_t name, int *anamelen); }
11131	NOARGS		{ int sys_getpeername(int fdes, caddr_t asa, \
112			    int *alen); }
11332	NOARGS		{ int sys_getsockname(int fdes, caddr_t asa, \
114			    int *alen); }
11533	STD		{ int freebsd_sys_access(const char *path, int flags); }
11634	STD		{ int freebsd_sys_chflags(const char *path, \
117			    int flags); }
11835	NOARGS		{ int sys_fchflags(int fd, int flags); }
11936	NOARGS		{ int sys_sync(void); }
12037	NOARGS		{ int sys_kill(int pid, int signum); }
12138	STD		{ int compat_43_freebsd_sys_stat(const char *path, \
122			    struct stat43 *ub); } stat43
12339	NOARGS		{ pid_t sys_getppid(void); }
12440	STD		{ int compat_43_freebsd_sys_lstat(const char *path, \
125			    struct stat43 *ub); } lstat43
12641	NOARGS		{ int sys_dup(u_int fd); }
12742	NOARGS		{ int sys_pipe(void); }
12843	NOARGS		{ gid_t sys_getegid(void); }
12944	NOARGS		{ int sys_profil(caddr_t samples, u_int size, \
130			    u_int offset, u_int scale); }
131#ifdef KTRACE
13245	NOARGS		{ int sys_ktrace(char *fname, int ops, int facs, \
133			    int pid); }
134#else
13545	EXCL		ktrace
136#endif
13746	NOARGS		{ int compat_13_sys_sigaction(int signum, \
138			    const struct sigaction13 *nsa, \
139			    struct sigaction13 *osa); }
14047	NOARGS		{ gid_t sys_getgid_with_egid(void); }
14148	NOARGS		{ int compat_13_sys_sigprocmask(int how, \
142			    int mask); }
14349	NOARGS		{ int sys___getlogin(char *namebuf, u_int namelen); }
14450	NOARGS		{ int sys___setlogin(char *namebuf); }
14551	NOARGS		{ int sys_acct(char *path); }
14652	NOARGS		{ int compat_13_sys_sigpending(void); }
14753	NOARGS		{ int compat_13_sys_sigaltstack( \
148			    const struct sigaltstack13 *nss, \
149			    struct sigaltstack13 *oss); }
15054	STD		{ int freebsd_sys_ioctl(int fd, u_long com, \
151			    caddr_t data); }
15255	NOARGS		{ int sys_reboot(int opt); } oreboot
15356	STD		{ int freebsd_sys_revoke(const char *path); }
15457	STD		{ int freebsd_sys_symlink(const char *path, \
155			    const char *link); }
15658	STD		{ int freebsd_sys_readlink(const char *path, \
157			    char *buf, int count); }
15859	STD		{ int freebsd_sys_execve(const char *path, \
159			    char **argp, char **envp); }
16060	NOARGS		{ int sys_umask(int newmask); }
16161	STD		{ int freebsd_sys_chroot(const char *path); }
16262	NOARGS		{ int compat_43_sys_fstat(int fd, struct stat43 *sb); } \
163			    fstat43
16463	NOARGS		{ int compat_43_sys_getkerninfo(int op, char *where, \
165			    int *size, int arg); } ogetkerninfo
16664	NOARGS		{ int compat_43_sys_getpagesize(void); } ogetpagesize
16765	STD		{ int freebsd_sys_msync(caddr_t addr, size_t len, \
168			    int flags); }
16966	NOARGS		{ int sys_vfork(void); }
17067	OBSOL		vread
17168	OBSOL		vwrite
17269	NOARGS		{ int sys_sbrk(intptr_t incr); }
17370	NOARGS		{ int sys_sstk(int incr); }
17471	NOARGS		{ int compat_43_sys_mmap(caddr_t addr, size_t len, \
175			    int prot, int flags, int fd, long pos); } ommap
17672	NOARGS		{ int sys_ovadvise(int anom); } vadvise
17773	NOARGS		{ int sys_munmap(caddr_t addr, size_t len); }
17874	NOARGS		{ int sys_mprotect(caddr_t addr, size_t len, \
179			    int prot); }
18075	NOARGS		{ int sys_madvise(caddr_t addr, size_t len, \
181			    int behav); }
18276	OBSOL		vhangup
18377	OBSOL		vlimit
18478	NOARGS		{ int sys_mincore(caddr_t addr, size_t len, char *vec); }
18579	NOARGS		{ int sys_getgroups(u_int gidsetsize, gid_t *gidset); }
18680	NOARGS		{ int sys_setgroups(u_int gidsetsize, gid_t *gidset); }
18781	NOARGS		{ int sys_getpgrp(void); }
18882	NOARGS		{ int sys_setpgid(int pid, int pgid); }
18983	NOARGS		{ int sys_setitimer(u_int which, \
190			    struct itimerval *itv, struct itimerval *oitv); }
19184	NOARGS		{ int compat_43_sys_wait(void); } owait
19285	NOARGS		{ int compat_12_sys_swapon(char *name); }
19386	NOARGS		{ int sys_getitimer(u_int which, \
194			    struct itimerval *itv); }
19587	NOARGS		{ int compat_43_sys_gethostname(char *hostname, \
196			    u_int len); } ogethostname
19788	NOARGS		{ int compat_43_sys_sethostname(char *hostname, \
198			    u_int len); } osethostname
19989	NOARGS		{ int compat_43_sys_getdtablesize(void); } \
200			    ogetdtablesize
20190	NOARGS		{ int sys_dup2(u_int from, u_int to); }
20291	UNIMPL		getdopt
20392	NOARGS		{ int sys_fcntl(int fd, int cmd, void *arg); }
20493	NOARGS		{ int sys_select(u_int nd, fd_set *in, fd_set *ou, \
205			    fd_set *ex, struct timeval *tv); }
20694	UNIMPL		setdopt
20795	NOARGS		{ int sys_fsync(int fd); }
20896	NOARGS		{ int sys_setpriority(int which, int who, int prio); }
20997	NOARGS		{ int sys_socket(int domain, int type, int protocol); }
21098	NOARGS		{ int sys_connect(int s, caddr_t name, int namelen); }
21199	NOARGS		{ int compat_43_sys_accept(int s, caddr_t name, \
212			    int *anamelen); } oaccept
213100	NOARGS		{ int sys_getpriority(int which, int who); }
214101	NOARGS		{ int compat_43_sys_send(int s, caddr_t buf, int len, \
215			    int flags); } osend
216102	NOARGS		{ int compat_43_sys_recv(int s, caddr_t buf, int len, \
217			    int flags); } orecv
218103	STD		{ int freebsd_sys_sigreturn( \
219			    struct freebsd_sigcontext *scp); }
220104	NOARGS		{ int sys_bind(int s, caddr_t name, int namelen); }
221105	NOARGS		{ int sys_setsockopt(int s, int level, int name, \
222			    caddr_t val, int valsize); }
223106	NOARGS		{ int sys_listen(int s, int backlog); }
224107	OBSOL		vtimes
225108	NOARGS		{ int compat_43_sys_sigvec(int signum, \
226			    struct sigvec *nsv, struct sigvec *osv); } osigvec
227109	NOARGS		{ int compat_43_sys_sigblock(int mask); } osigblock
228110	NOARGS		{ int compat_43_sys_sigsetmask(int mask); } osigsetmask
229111	NOARGS		{ int compat_13_sys_sigsuspend(int mask); }
230112	NOARGS		{ int compat_43_sys_sigstack(struct sigstack *nss, \
231			    struct sigstack *oss); } osigstack
232113	NOARGS		{ int compat_43_sys_recvmsg(int s, \
233			    struct omsghdr *msg, int flags); } orecvmsg
234114	NOARGS		{ int compat_43_sys_sendmsg(int s, caddr_t msg, \
235			    int flags); } osendmsg
236#ifdef TRACE
237115	NOARGS		{ int sys_vtrace(int request, int value); }
238#else
239115	OBSOL		vtrace
240#endif
241116	NOARGS		{ int sys_gettimeofday(struct timeval *tp, \
242			    struct timezone *tzp); }
243117	NOARGS		{ int sys_getrusage(int who, struct rusage *rusage); }
244118	NOARGS		{ int sys_getsockopt(int s, int level, int name, \
245			    caddr_t val, int *avalsize); }
246119	OBSOL		resuba
247120	NOARGS		{ int sys_readv(int fd, struct iovec *iovp, \
248			    u_int iovcnt); }
249121	NOARGS		{ int sys_writev(int fd, struct iovec *iovp, \
250			    u_int iovcnt); }
251122	NOARGS		{ int sys_settimeofday(struct timeval *tv, \
252			    struct timezone *tzp); }
253123	NOARGS		{ int sys_fchown(int fd, int uid, int gid); }
254124	NOARGS		{ int sys_fchmod(int fd, int mode); }
255125	NOARGS		{ int compat_43_sys_recvfrom(int s, caddr_t buf, \
256			    size_t len, int flags, caddr_t from, \
257			    int *fromlenaddr); } orecvfrom
258126	NOARGS		{ int sys_setreuid(int ruid, int euid); }
259127	NOARGS		{ int sys_setregid(int rgid, int egid); }
260128	STD		{ int freebsd_sys_rename(const char *from, \
261			    const char *to); }
262129	STD		{ int compat_43_freebsd_sys_truncate(const char *path, \
263			    long length); } otruncate
264130	NOARGS		{ int compat_43_sys_ftruncate(int fd, long length); } \
265			    oftruncate
266131	NOARGS		{ int sys_flock(int fd, int how); }
267132	STD		{ int freebsd_sys_mkfifo(const char *path, int mode); }
268133	NOARGS		{ int sys_sendto(int s, caddr_t buf, size_t len, \
269			    int flags, caddr_t to, int tolen); }
270134	NOARGS		{ int sys_shutdown(int s, int how); }
271135	NOARGS		{ int sys_socketpair(int domain, int type, \
272			    int protocol, int *rsv); }
273136	STD		{ int freebsd_sys_mkdir(const char *path, int mode); }
274137	STD		{ int freebsd_sys_rmdir(const char *path); }
275138	NOARGS		{ int sys_utimes(char *path, struct timeval *tptr); }
276139	OBSOL		4.2 sigreturn
277140	NOARGS		{ int sys_adjtime(struct timeval *delta, \
278			    struct timeval *olddelta); }
279141	NOARGS		{ int compat_43_sys_getpeername(int fdes, caddr_t asa, \
280			    int *alen); } ogetpeername
281142	NOARGS		{ int32_t compat_43_sys_gethostid(void); } ogethostid
282143	NOARGS		{ int compat_43_sys_sethostid(int32_t hostid); } \
283			    osethostid
284144	NOARGS		{ int compat_43_sys_getrlimit(u_int which, \
285			    struct orlimit *rlp); } ogetrlimit
286145	NOARGS		{ int compat_43_sys_setrlimit(u_int which, \
287			    struct orlimit *rlp); } osetrlimit
288146	NOARGS		{ int compat_43_sys_killpg(int pgid, int signum); } \
289			    okillpg
290147	NOARGS		{ int sys_setsid(void); }
291148	NOARGS		{ int sys_quotactl(char *path, int cmd, int uid, \
292			    caddr_t arg); }
293149	NOARGS		{ int compat_43_sys_quota(void); } oquota
294150	NOARGS		{ int compat_43_sys_getsockname(int fdec, caddr_t asa, \
295			    int *alen); } ogetsockname
296
297; Syscalls 151-180 inclusive are reserved for vendor-specific
298; system calls.  (This includes various calls added for compatibity
299; with other Unix variants.)
300; Some of these calls are now supported by BSD...
301151	UNIMPL		sem_lock
302152	UNIMPL		sem_wakeup
303153	UNIMPL		asyncdaemon
304154	UNIMPL
305#if defined(NFS) || defined(NFSSERVER)
306155	NOARGS		{ int sys_nfssvc(int flag, caddr_t argp); }
307#else
308155	UNIMPL		nfssvc
309#endif
310156	NOARGS		{ int compat_43_sys_getdirentries(int fd, char *buf, \
311			    u_int count, long *basep); } ogetdirentries
312157	STD		{ int freebsd_sys_statfs(const char *path, \
313			    struct statfs12 *buf); }
314158	NOARGS		{ int compat_20_sys_fstatfs(int fd, \
315			    struct statfs12 *buf); }
316159	UNIMPL
317160	UNIMPL
318#ifdef NFS
319161	STD		{ int freebsd_sys_getfh(const char *fname, \
320			    fhandle_t *fhp); }
321#else
322161	UNIMPL		getfh
323#endif
324162	NOARGS		{ int compat_09_sys_getdomainname(char *domainname, \
325			    int len); }
326163	NOARGS		{ int compat_09_sys_setdomainname(char *domainname, \
327			    int len); }
328164	NOARGS		{ int compat_09_sys_uname(struct outsname *name); }
329165	NOARGS		{ int sys_sysarch(int op, char *parms); }
330166	STD		{ int freebsd_sys_rtprio(int function, pid_t pid, \
331			    struct freebsd_rtprio *rtp); }
332167	UNIMPL
333168	UNIMPL
334; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
335#if defined(SYSVSEM) && !defined(_LP64)
336169	STD		{ int freebsd_sys_semsys(int which, int a2, int a3, \
337			    int a4, int a5); }
338#else
339169	UNIMPL		1.0 semsys
340#endif
341; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
342#if defined(SYSVMSG) && !defined(_LP64)
343170	STD		{ int freebsd_sys_msgsys(int which, int a2, int a3, \
344			    int a4, int a5, int a6); }
345#else
346170	UNIMPL		1.0 msgsys
347#endif
348; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
349#if defined(SYSVSHM) && !defined(_LP64)
350171	STD		{ int freebsd_sys_shmsys(int which, int a2, int a3, \
351			    int a4); }
352#else
353171	UNIMPL		1.0 shmsys
354#endif
355172	UNIMPL
356173	NOARGS		{ ssize_t sys_pread(int fd, void *buf, \
357			    size_t nbyte, int pad, off_t offset); }
358174	NOARGS		{ ssize_t sys_pwrite(int fd, const void *buf, \
359			    size_t nbyte, int pad, off_t offset); }
360175	UNIMPL
361#ifdef NTP
362176	STD		{ int freebsd_ntp_adjtime(struct freebsd_timex *tp); }
363#else
364176     EXCL            ntp_adjtime
365#endif
366177	UNIMPL		sfork
367178	UNIMPL		getdescriptor
368179	UNIMPL		setdescriptor
369180	UNIMPL
370
371; Syscalls 180-199 are used by/reserved for BSD
372181	NOARGS		{ int sys_setgid(gid_t gid); }
373182	NOARGS		{ int sys_setegid(gid_t egid); }
374183	NOARGS		{ int sys_seteuid(uid_t euid); }
375#ifdef LFS
376184	NOARGS		{ int sys_lfs_bmapv(fsid_t *fsidp, \
377			    struct block_info *blkiov, int blkcnt); }
378185	NOARGS		{ int sys_lfs_markv(fsid_t *fsidp, \
379			    struct block_info *blkiov, int blkcnt); }
380186	NOARGS		{ int sys_lfs_segclean(fsid_t *fsidp, u_long segment); }
381187	NOARGS		{ int sys_lfs_segwait(fsid_t *fsidp, struct timeval *tv); }
382#else
383184	UNIMPL
384185	UNIMPL
385186	UNIMPL
386187	UNIMPL
387#endif
388188	STD		{ int freebsd_sys_stat(const char *path, \
389			    struct stat12 *ub); }
390189	NOARGS		{ int compat_12_sys_fstat(int fd, \
391			    struct stat12 *sb); }
392190	STD		{ int freebsd_sys_lstat(const char *path, \
393			    struct stat12 *ub); }
394191	STD		{ int freebsd_sys_pathconf(const char *path, \
395			    int name); }
396192	NOARGS		{ int sys_fpathconf(int fd, int name); }
397193	UNIMPL
398194	NOARGS		{ int sys_getrlimit(u_int which, struct rlimit *rlp); }
399195	NOARGS		{ int sys_setrlimit(u_int which, struct rlimit *rlp); }
400196	NOARGS		{ int compat_12_sys_getdirentries(int fd, char *buf, \
401			    u_int count, long *basep); }
402197	STD		{ caddr_t freebsd_sys_mmap(caddr_t addr, size_t len, \
403			    int prot, int flags, int fd, long pad, off_t pos); }
404198	NOARGS		{ int sys_nosys(void); } __syscall
405199	NOARGS		{ off_t sys_lseek(int fd, int pad, off_t offset, \
406			    int whence); }
407200	STD		{ int freebsd_sys_truncate(const char *path, int pad, \
408			    off_t length); }
409201	NOARGS		{ int sys_ftruncate(int fd, int pad, off_t length); }
410202	STD		{ int freebsd_sys_sysctl(int *name, u_int namelen, \
411			    void *old, size_t *oldlenp, void *new, \
412			    size_t newlen); }
413203	NOARGS		{ int sys_mlock(caddr_t addr, size_t len); }
414204	NOARGS		{ int sys_munlock(caddr_t addr, size_t len); }
415#ifdef FREEBSD_BASED_ON_44LITE_R2
416205	STD		{ int freebsd_sys_undelete(char *path); }
417#else
418205	UNIMPL		undelete
419#endif
420206	NOARGS		{ int sys_futimes(int fd, const struct timeval *tptr); }
421207	NOARGS		{ pid_t sys_getpgid(pid_t pid); }
422#if 0
423208	NOARGS		{ int sys_reboot(int opt, char *bootstr); }
424#else
425208	UNIMPL		newreboot
426#endif
427209	NOARGS		{ int sys_poll(struct pollfd *fds, u_int nfds, \
428			    int timeout); }
429;
430; Syscalls 210-219 are reserved for dynamically loaded syscalls
431;
432210	UNIMPL
433211	UNIMPL
434212	UNIMPL
435213	UNIMPL
436214	UNIMPL
437215	UNIMPL
438216	UNIMPL
439217	UNIMPL
440218	UNIMPL
441219	UNIMPL
442;
443; Syscalls 220-239 are reserved for syscalls imported from NetBSD
444;
445#ifdef SYSVSEM
446220	NOARGS		{ int compat_14_sys___semctl(int semid, int semnum, \
447			    int cmd, union __semun *arg); }
448221	NOARGS		{ int sys_semget(key_t key, int nsems, int semflg); }
449222	NOARGS		{ int sys_semop(int semid, struct sembuf *sops, \
450			    u_int nsops); }
451223	NOARGS		{ int sys_semconfig(int flag); }
452#else
453220	UNIMPL		semctl
454221	UNIMPL		semget
455222	UNIMPL		semop
456223	UNIMPL		semconfig
457#endif
458#ifdef SYSVMSG
459224	NOARGS		{ int compat_14_sys_msgctl(int msqid, int cmd, \
460			    struct msqid14_ds *buf); }
461225	NOARGS		{ int sys_msgget(key_t key, int msgflg); }
462226	NOARGS		{ int sys_msgsnd(int msqid, void *msgp, size_t msgsz, \
463			    int msgflg); }
464227	NOARGS		{ int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \
465			    long msgtyp, int msgflg); }
466#else
467224	UNIMPL		msgctl
468225	UNIMPL		msgget
469226	UNIMPL		msgsnd
470227	UNIMPL		msgrcv
471#endif
472#ifdef SYSVSHM
473228	NOARGS		{ int sys_shmat(int shmid, void *shmaddr, int shmflg); }
474229	NOARGS		{ int compat_14_sys_shmctl(int shmid, int cmd, \
475			    struct shmid_ds14 *buf); }
476230	NOARGS		{ int sys_shmdt(void *shmaddr); }
477231	NOARGS		{ int sys_shmget(key_t key, int size, int shmflg); }
478#else
479228	UNIMPL		shmat
480229	UNIMPL		shmctl
481230	UNIMPL		shmdt
482231	UNIMPL		shmget
483#endif
484;
485; XXXX
486232	NOARGS		{ int sys_clock_gettime(clockid_t clock_id, \
487			    struct timespec *tp); }
488233	NOARGS		{ int sys_clock_settime(clockid_t clock_id, \
489			    const struct timespec *tp); }
490234	NOARGS		{ int sys_clock_getres(clockid_t clock_id, \
491			    struct timespec *tp); }
492235	UNIMPL		timer_create
493236	UNIMPL		timer_delete
494237	UNIMPL		timer_settime
495238	UNIMPL		timer_gettime
496239	UNIMPL		timer_getoverrun
497240	NOARGS		{ int sys_nanosleep(const struct timespec *rqtp, \
498			    struct timespec *rmtp); }
499241	UNIMPL
500242	UNIMPL
501243	UNIMPL
502244	UNIMPL
503245	UNIMPL
504246	UNIMPL
505247	UNIMPL
506248	UNIMPL
507249	UNIMPL
508; syscall numbers initially used in OpenBSD
509250	NOARGS		{ int sys_minherit(void *addr, size_t len, \
510			    int inherit); }
511251	STD		{ int freebsd_sys_rfork(int flags); }
512252	UNIMPL		openbsd_poll
513253	NOARGS		{ int sys_issetugid(void); }
514254	STD		{ int freebsd_sys_lchown(const char *path, int uid, \
515			    int gid); }
516255	UNIMPL
517256	UNIMPL
518257	UNIMPL
519258	UNIMPL
520259	UNIMPL
521260	UNIMPL
522261	UNIMPL
523262	UNIMPL
524263	UNIMPL
525264	UNIMPL
526265	UNIMPL
527266	UNIMPL
528267	UNIMPL
529268	UNIMPL
530269	UNIMPL
531270	UNIMPL
532271	UNIMPL
533272	NOARGS		{ int compat_30_sys_getdents(int fd, char *buf, size_t count); }
534273	UNIMPL
535274	NOARGS		{ int sys_lchmod(const char *path, mode_t mode); }
536275	NOARGS		{ int sys_lchown(const char *path, uid_t uid, \
537			    gid_t gid); } netbsd_lchown
538276	NOARGS		{ int sys_lutimes(const char *path, \
539			    const struct timeval *tptr); }
540277	NOARGS		{ int sys___msync13(void *addr, size_t len, int flags); }
541278	NOARGS		{ int compat_30_sys___stat13(const char *path, struct stat30 *ub); }
542279	NOARGS		{ int compat_30_sys___fstat13(int fd, struct stat30 *sb); }
543280	NOARGS		{ int compat_30_sys___lstat13(const char *path, struct stat30 *ub);}
544281	UNIMPL
545282	UNIMPL
546283	UNIMPL
547284	UNIMPL
548285	UNIMPL
549286	UNIMPL
550287	UNIMPL
551288	UNIMPL
552289	UNIMPL
553290	UNIMPL
554291	UNIMPL
555292	UNIMPL
556293	UNIMPL
557294	UNIMPL
558295	UNIMPL
559296	UNIMPL
560297	NOARGS		{ int compat_20_sys_fhstatfs(const fhandle_t *fhp, \
561			    struct statfs12 *buf); }
562298	NOARGS		{ int sys_fhopen(const fhandle_t *fhp, int flags); }
563299	NOARGS		{ int sys_fhstat(const fhandle_t *fhp, \
564			    struct stat *sb); }
565; syscall numbers for FreeBSD
566300	UNIMPL		modnext
567301	UNIMPL		modstat
568302	UNIMPL		modfnext
569303	UNIMPL		modfind
570304	UNIMPL		kldload
571305	UNIMPL		kldunload
572306	UNIMPL		kldfind
573307	UNIMPL		kldnext
574308	UNIMPL		kldstat
575309	UNIMPL		kldfirstmod
576310	NOARGS		{ pid_t sys_getsid(pid_t pid); }
577311	UNIMPL		setresuid
578312	UNIMPL		setresgid
579313	UNIMPL		signanosleep
580314	UNIMPL		aio_return
581315	UNIMPL		aio_suspend
582316	UNIMPL		aio_cancel
583317	UNIMPL		aio_error
584318	UNIMPL		aio_read
585319	UNIMPL		aio_write
586320	UNIMPL		lio_listio
587321	NOARGS		{ void freebsd_sys_yield(void); }
588322	UNIMPL		thr_sleep
589323	UNIMPL		thr_wakeup
590324	NOARGS		{ int sys_mlockall(int flags); }
591325	NOARGS		{ int sys_munlockall(void); }
592326	NOARGS		{ int sys___getcwd(char *bufp, size_t length); }
593327	STD		{ int freebsd_sys_sched_setparam(pid_t pid, \
594			    const struct freebsd_sched_param *sp); }
595328	STD		{ int freebsd_sys_sched_getparam(pid_t pid, \
596			    struct freebsd_sched_param *sp); }
597329	STD		{ int freebsd_sys_sched_setscheduler(pid_t pid, \
598			    int policy, const struct sched_param *sp); }
599330	STD		{ int freebsd_sys_sched_getscheduler(pid_t pid); }
600331	STD		{ int freebsd_sys_sched_yield(void); }
601332	STD		{ int freebsd_sys_sched_get_priority_max(int policy); }
602333	STD		{ int freebsd_sys_sched_get_priority_min(int policy); }
603334	UNIMPL		sched_rr_get_interval
604335	STD		{ int freebsd_sys_utrace(void *addr, size_t len); }
605336	UNIMPL		sendfile
606337	UNIMPL		kldsym
607338	UNIMPL		jail
608339	UNIMPL		pioctl
609340	NOARGS		{ int sys___sigprocmask14(int how, \
610			    const sigset_t *set, \
611			    sigset_t *oset); }
612341	NOARGS		{ int sys___sigsuspend14(const sigset_t *set); }
613342	STD		{ int freebsd_sys_sigaction4(int signum, \
614			    const struct freebsd_sigaction4 *nsa, \
615			    struct freebsd_sigaction4 *osa); }
616343	NOARGS		{ int sys___sigpending14(const sigset_t *set); }
617344	UNIMPL		4.0 sigreturn
618345	UNIMPL		sigtimedwait
619346	UNIMPL		sigwaitinfo
620347	UNIMPL		__acl_get_file
621348	UNIMPL		__acl_set_file
622349	UNIMPL		__acl_get_fd
623350	UNIMPL		__acl_set_fd
624351	UNIMPL		__acl_delete_file
625352	UNIMPL		__acl_delete_fd
626353	UNIMPL		__acl_aclcheck_file
627354	UNIMPL		__acl_aclcheck_fd
628355	UNIMPL		extattrctl
629356	UNIMPL		extattr_set_file
630357	UNIMPL		extattr_get_file
631358	UNIMPL		extattr_delete_file
632359	UNIMPL		aio_waitcomplete
633360	UNIMPL		getresuid
634361	UNIMPL		getresgid
635362	UNIMPL		kqueue
636363	UNIMPL		kevent
637364	UNIMPL		__cap_get_proc
638365	UNIMPL		__cap_set_proc
639366	UNIMPL		__cap_get_fd
640367	UNIMPL		__cap_get_file
641368	UNIMPL		__cap_set_fd
642369	UNIMPL		__cap_set_file
643370	UNIMPL		lkmressym
644371	UNIMPL		extattr_set_fd
645372	UNIMPL		extattr_get_fd
646373	UNIMPL		extattr_delete_fd
647374	UNIMPL		__setugid
648375	UNIMPL		nfsclnt
649376	UNIMPL		eaccess
650377	UNIMPL		afs_syscall
651378	UNIMPL		nmount
652379	UNIMPL		kse_exit
653380	UNIMPL		kse_wakeup
654381	UNIMPL		kse_create
655382	UNIMPL		kse_thr_interrupt
656383	UNIMPL		kse_release
657384	UNIMPL		__mac_get_proc
658385	UNIMPL		__mac_set_proc
659386	UNIMPL		__mac_get_fd
660387	UNIMPL		__mac_get_file
661388	UNIMPL		__mac_set_fd
662389	UNIMPL		__mac_set_file
663390	UNIMPL		kenv
664391	NOARGS		{ int sys_lchflags(const char *path, u_long flags); }
665392	NOARGS		{ int sys_uuidgen(struct uuid *store, int count); }
666393	UNIMPL		sendfile
667394	UNIMPL		mac_syscall
668395	UNIMPL		getfsstat
669396	UNIMPL		statfs
670397	UNIMPL		fsstatfs
671398	UNIMPL		fhstatfs
672399	UNIMPL		nosys
673#if defined(P1003_1B_SEMAPHORE) || !defined(_KERNEL)
674400	NOARGS		{ int sys__ksem_close(semid_t id); }
675401	NOARGS		{ int sys__ksem_post(semid_t id); }
676402	NOARGS		{ int sys__ksem_wait(semid_t id); }
677403	NOARGS		{ int sys__ksem_trywait(semid_t id); }
678404	UNIMPL		ksem_init
679405	UNIMPL		ksem_open
680406	NOARGS		{ int sys__ksem_unlink(const char *name); }
681407	NOARGS		{ int sys__ksem_getvalue(semid_t id, \
682			    unsigned int *value); }
683408	NOARGS		{ int sys__ksem_destroy(semid_t id); }
684#else
685400	EXCL		ksem_close
686401	EXCL		ksem_post
687402	EXCL		ksem_wait
688403	EXCL		ksem_trywait
689404	EXCL		ksem_init
690405	EXCL		ksem_open
691406	EXCL		ksem_unlink
692407	EXCL		ksem_getvalue
693408	EXCL		ksem_destroy
694#endif
695409	UNIMPL		__mac_get_pid
696410	UNIMPL		__mac_get_link
697411	UNIMPL		__mac_set_link
698412	UNIMPL		extattr_set_link
699413	UNIMPL		extattr_get_link
700414	UNIMPL		extattr_delete_link
701415	UNIMPL		__mac_execve
702416	UNIMPL		sigaction
703417	UNIMPL		sigreturn
704418	UNIMPL		__xstat
705419	UNIMPL		__xfstat
706420	UNIMPL		__xlstat
707421	UNIMPL		getcontext
708422	UNIMPL		setcontext
709423	UNIMPL		swapcontext
710424	UNIMPL		swapoff
711425	UNIMPL		__acl_get_link
712426	UNIMPL		__acl_set_link
713427	UNIMPL		__acl_delete_link
714428	UNIMPL		__acl_aclcheck_link
715429	UNIMPL		sigwait
716430	UNIMPL		thr_create
717431	UNIMPL		thr_exit
718432	UNIMPL		thr_self
719433	UNIMPL		thr_kill
720434	UNIMPL		_umtx_lock
721435	UNIMPL		_umtx_unlock
722436	UNIMPL		jail_attach
723437	UNIMPL		extattr_list_fd
724438	UNIMPL		extattr_list_file
725439	UNIMPL		extattr_list_link
726