syscalls.master revision 151720
1 $FreeBSD: head/sys/compat/freebsd32/syscalls.master 151720 2005-10-26 22:19:51Z peter $
2;	from: @(#)syscalls.master	8.2 (Berkeley) 1/13/94
3;	from: src/sys/kern/syscalls.master 1.107
4;
5; System call name/number master file.
6; Processed to created init_sysent.c, syscalls.c and syscall.h.
7
8; Columns: number [M]type nargs name alt{name,tag,rtyp}/comments
9;	number	system call number, must be in order
10;	audit	the audit event associated with the system call
11;		A value of AUE_NULL means no auditing, but it also means that
12;		there is no audit event for the call at this time. For the
13;		case where the event exists, but we don't want auditing, the
14;		event should be #defined to AUE_NULL in audit_kevents.h.
15;	type	one of [M]STD, [M]OBSOL, [M]UNIMPL, [M]COMPAT, [M]CPT_NOA,
16;		[M]LIBCOMPAT, [M]NODEF,  [M]NOARGS,  [M]NOPROTO,  [M]NOIMPL,
17;		[M]NOSTD
18;	name	psuedo-prototype of syscall routine
19;		If one of the following alts is different, then all appear:
20;	altname	name of system call if different
21;	alttag	name of args struct tag if different from [o]`name'"_args"
22;	altrtyp	return type if not int (bogus - syscalls always return int)
23;		for UNIMPL/OBSOL, name continues with comments
24
25; types:
26;	[M]	e.g. like MSTD -- means the system call is MP-safe.  If no
27;		M prefix is used, the syscall wrapper will obtain the Giant
28;		lock for the syscall.
29;	STD	always included
30;	COMPAT	included on COMPAT #ifdef
31;	LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h
32;	OBSOL	obsolete, not included in system, only specifies name
33;	UNIMPL	not implemented, placeholder only
34;	NOSTD	implemented but as a lkm that can be statically
35;			compiled in sysent entry will be filled with lkmsys
36;			so the SYSCALL_MODULE macro works
37
38; #ifdef's, etc. may be included, and are copied to the output files.
39
40#include <sys/param.h>
41#include <sys/sysent.h>
42#include <sys/sysproto.h>
43#include <sys/mount.h>
44#include <compat/freebsd32/freebsd32.h>
45#include <compat/freebsd32/freebsd32_proto.h>
46
47; Reserved/unimplemented system calls in the range 0-150 inclusive
48; are reserved for use in future Berkeley releases.
49; Additional system calls implemented in vendor and other
50; redistributions should be placed in the reserved range at the end
51; of the current calls.
52
530	AUE_NULL	MNOPROTO { int nosys(void); } syscall nosys_args int
541	AUE_NULL	MNOPROTO { void sys_exit(int rval); } exit \
55				    sys_exit_args void
562	AUE_NULL	MNOPROTO { int fork(void); }
573	AUE_NULL	MNOPROTO { ssize_t read(int fd, void *buf, \
58				    size_t nbyte); }
594	AUE_NULL	MNOPROTO { ssize_t write(int fd, const void *buf, \
60				    size_t nbyte); }
615	AUE_NULL	MNOPROTO { int open(char *path, int flags, \
62				    int mode); }
636	AUE_NULL	MNOPROTO { int close(int fd); }
647	AUE_NULL	MSTD	{ int freebsd32_wait4(int pid, int *status, \
65				    int options, struct rusage32 *rusage); }
668	AUE_NULL	OBSOL	old creat
679	AUE_NULL	MNOPROTO { int link(char *path, char *link); }
6810	AUE_NULL	MNOPROTO { int unlink(char *path); }
6911	AUE_NULL	OBSOL	execv
7012	AUE_NULL	MNOPROTO	{ int chdir(char *path); }
7113	AUE_NULL	MNOPROTO	{ int fchdir(int fd); }
7214	AUE_NULL	MNOPROTO	{ int mknod(char *path, int mode, int dev); }
7315	AUE_NULL	MNOPROTO	{ int chmod(char *path, int mode); }
7416	AUE_NULL	MNOPROTO	{ int chown(char *path, int uid, int gid); }
7517	AUE_NULL	MNOPROTO { int obreak(char *nsize); } break \
76				    obreak_args int
7718	AUE_NULL	MCOMPAT4	{ int freebsd32_getfsstat( \
78				    struct statfs32 *buf, long bufsize, \
79				    int flags); }
8019	AUE_NULL	OBSOL	olseek
8120	AUE_NULL	MNOPROTO { pid_t getpid(void); }
8221	AUE_NULL	NOPROTO { int mount(char *type, char *path, \
83				    int flags, caddr_t data); }
8422	AUE_NULL	NOPROTO { int unmount(char *path, int flags); }
8523	AUE_NULL	MNOPROTO { int setuid(uid_t uid); }
8624	AUE_NULL	MNOPROTO { uid_t getuid(void); }
8725	AUE_NULL	MNOPROTO { uid_t geteuid(void); }
8826	AUE_NULL	MNOPROTO { int ptrace(int req, pid_t pid, \
89				    caddr_t addr, int data); }
90; XXX implement
9127	AUE_NULL	MSTD	 { int freebsd32_recvmsg(int s, struct msghdr32 *msg, \
92				    int flags); }
9328	AUE_NULL	MSTD	 { int freebsd32_sendmsg(int s, struct msghdr32 *msg, \
94				    int flags); }
9529	AUE_NULL	MSTD	 { int freebsd32_recvfrom(int s, u_int32_t buf, \
96				    u_int32_t len, int flags, u_int32_t from, \
97				    u_int32_t fromlenaddr); }
9830	AUE_NULL	MNOPROTO { int accept(int s, caddr_t name, \
99				    int *anamelen); }
10031	AUE_NULL	MNOPROTO { int getpeername(int fdes, caddr_t asa, \
101				    int *alen); }
10232	AUE_NULL	MNOPROTO { int getsockname(int fdes, caddr_t asa, \
103				    int *alen); }
10433	AUE_NULL	MNOPROTO	{ int access(char *path, int flags); }
10534	AUE_NULL	MNOPROTO	{ int chflags(char *path, int flags); }
10635	AUE_NULL	MNOPROTO	{ int fchflags(int fd, int flags); }
10736	AUE_NULL	MNOPROTO	{ int sync(void); }
10837	AUE_NULL	MNOPROTO { int kill(int pid, int signum); }
10938	AUE_NULL	UNIMPL	ostat
11039	AUE_NULL	MNOPROTO { pid_t getppid(void); }
11140	AUE_NULL	UNIMPL	olstat
11241	AUE_NULL	MNOPROTO { int dup(u_int fd); }
11342	AUE_NULL	MNOPROTO { int pipe(void); }
11443	AUE_NULL	MNOPROTO { gid_t getegid(void); }
11544	AUE_NULL	MNOPROTO { int profil(caddr_t samples, size_t size, \
116				    size_t offset, u_int scale); }
11745	AUE_NULL	MNOPROTO { int ktrace(const char *fname, int ops, \
118				    int facs, int pid); }
11946	AUE_NULL	MCOMPAT	 { int freebsd32_sigaction( int signum, \
120				   struct osigaction32 *nsa, \
121				   struct osigaction32 *osa); }
12247	AUE_NULL	MNOPROTO { gid_t getgid(void); }
12348	AUE_NULL	MCOMPAT	 { int freebsd32_sigprocmask(int how, \
124				   osigset_t mask); }
12549	AUE_NULL	MNOPROTO { int getlogin(char *namebuf, \
126				    u_int namelen); }
12750	AUE_NULL	MNOPROTO { int setlogin(char *namebuf); }
12851	AUE_NULL	MNOPROTO { int acct(char *path); }
12952	AUE_NULL	MCOMPAT	 { int freebsd32_sigpending(void); }
13053	AUE_NULL	MSTD	{ int freebsd32_sigaltstack( \
131				    struct sigaltstack32 *ss, \
132				    struct sigaltstack32 *oss); }
13354	AUE_NULL	MNOPROTO { int ioctl(int fd, u_long com, \
134				    caddr_t data); }
13555	AUE_NULL	MNOPROTO { int reboot(int opt); }
13656	AUE_NULL	MNOPROTO	{ int revoke(char *path); }
13757	AUE_NULL	MNOPROTO	{ int symlink(char *path, char *link); }
13858	AUE_NULL	MNOPROTO	{ int readlink(char *path, char *buf, \
139				    int count); }
14059	AUE_NULL	MSTD	 { int freebsd32_execve(char *fname, \
141				    u_int32_t *argv, u_int32_t *envv); }
14260	AUE_NULL	MNOPROTO { int umask(int newmask); } umask \
143				    umask_args int
14461	AUE_NULL	MNOPROTO	{ int chroot(char *path); }
14562	AUE_NULL	OBSOL	ofstat
14663	AUE_NULL	OBSOL	ogetkerninfo
14764	AUE_NULL	OBSOL	ogetpagesize
148; XXX implement (not OBSOL at all)
14965	AUE_NULL	MNOPROTO { int msync(void *addr, size_t len, \
150				    int flags); }
15166	AUE_NULL	MNOPROTO { int vfork(void); }
15267	AUE_NULL	OBSOL	vread
15368	AUE_NULL	OBSOL	vwrite
15469	AUE_NULL	MNOPROTO { int sbrk(int incr); }
15570	AUE_NULL	MNOPROTO { int sstk(int incr); }
15671	AUE_NULL	OBSOL	ommap
15772	AUE_NULL	MNOPROTO { int ovadvise(int anom); } vadvise \
158				    ovadvise_args int
15973	AUE_NULL	MNOPROTO { int munmap(void *addr, size_t len); }
16074	AUE_NULL	MNOPROTO { int mprotect(const void *addr, \
161				    size_t len, int prot); }
16275	AUE_NULL	MNOPROTO { int madvise(void *addr, size_t len, \
163				    int behav); }
16476	AUE_NULL	OBSOL	vhangup
16577	AUE_NULL	OBSOL	vlimit
16678	AUE_NULL	MNOPROTO { int mincore(const void *addr, size_t len, \
167				    char *vec); }
16879	AUE_NULL	MNOPROTO { int getgroups(u_int gidsetsize, \
169				    gid_t *gidset); }
17080	AUE_NULL	MNOPROTO { int setgroups(u_int gidsetsize, \
171				    gid_t *gidset); }
17281	AUE_NULL	MNOPROTO { int getpgrp(void); }
17382	AUE_NULL	MNOPROTO { int setpgid(int pid, int pgid); }
17483	AUE_NULL	MSTD	{ int freebsd32_setitimer(u_int which, \
175				    struct itimerval32 *itv, \
176				    struct itimerval32 *oitv); }
17784	AUE_NULL	OBSOL	owait
178; XXX implement
17985	AUE_NULL	OBSOL	oswapon
18086	AUE_NULL	MSTD	{ int freebsd32_getitimer(u_int which, \
181				    struct itimerval32 *itv); }
18287	AUE_NULL	OBSOL	ogethostname
18388	AUE_NULL	OBSOL	osethostname
18489	AUE_NULL	MNOPROTO { int getdtablesize(void); }
18590	AUE_NULL	MNOPROTO { int dup2(u_int from, u_int to); }
18691	AUE_NULL	UNIMPL	getdopt
18792	AUE_NULL	MNOPROTO { int fcntl(int fd, int cmd, long arg); }
18893	AUE_NULL	MSTD	{ int freebsd32_select(int nd, fd_set *in, \
189				    fd_set *ou, fd_set *ex, \
190				    struct timeval32 *tv); }
191; XXX need to override for big-endian - little-endian should work fine.
19294	AUE_NULL	UNIMPL	setdopt
19395	AUE_NULL	MNOPROTO	{ int fsync(int fd); }
19496	AUE_NULL	MNOPROTO { int setpriority(int which, int who, \
195				    int prio); }
19697	AUE_NULL	MNOPROTO { int socket(int domain, int type, \
197				    int protocol); }
19898	AUE_NULL	MNOPROTO { int connect(int s, caddr_t name, \
199				    int namelen); }
20099	AUE_NULL	OBSOL	oaccept
201100	AUE_NULL	MNOPROTO { int getpriority(int which, int who); }
202101	AUE_NULL	OBSOL	osend
203102	AUE_NULL	OBSOL	orecv
204103	AUE_NULL	OBSOL	osigreturn
205104	AUE_NULL	MNOPROTO { int bind(int s, caddr_t name, \
206				    int namelen); }
207105	AUE_NULL	MNOPROTO { int setsockopt(int s, int level, \
208				    int name, caddr_t val, int valsize); }
209106	AUE_NULL	MNOPROTO { int listen(int s, int backlog); }
210107	AUE_NULL	OBSOL	vtimes
211108	AUE_NULL	MCOMPAT	 { int freebsd32_sigvec(int signum, \
212				     struct sigvec32 *nsv, \
213				     struct sigvec32 *osv); }
214109	AUE_NULL	MCOMPAT	 { int freebsd32_sigblock(int mask); }
215110	AUE_NULL	MCOMPAT	 { int freebsd32_sigsetmask( int mask); }
216111	AUE_NULL	MCOMPAT	 { int freebsd32_sigsuspend( int mask); }
217112	AUE_NULL	MCOMPAT	 { int freebsd32_sigstack( \
218				     struct sigstack32 *nss, \
219				     struct sigstack32 *oss); }
220113	AUE_NULL	OBSOL	orecvmsg
221114	AUE_NULL	OBSOL	osendmsg
222115	AUE_NULL	OBSOL	vtrace
223116	AUE_NULL	MSTD	{ int freebsd32_gettimeofday( \
224				    struct timeval32 *tp, \
225				    struct timezone *tzp); }
226117	AUE_NULL	MSTD	{ int freebsd32_getrusage(int who, \
227				    struct rusage32 *rusage); }
228118	AUE_NULL	MNOPROTO { int getsockopt(int s, int level, \
229				    int name, caddr_t val, int *avalsize); }
230119	AUE_NULL	UNIMPL	resuba (BSD/OS 2.x)
231120	AUE_NULL	MSTD	{ int freebsd32_readv(int fd, \
232				    struct iovec32 *iovp, u_int iovcnt); }
233121	AUE_NULL	MSTD	{ int freebsd32_writev(int fd, \
234				    struct iovec32 *iovp, u_int iovcnt); }
235122	AUE_NULL	MSTD	{ int freebsd32_settimeofday( \
236				    struct timeval32 *tv, \
237				    struct timezone *tzp); }
238123	AUE_NULL	MNOPROTO	{ int fchown(int fd, int uid, int gid); }
239124	AUE_NULL	MNOPROTO	{ int fchmod(int fd, int mode); }
240125	AUE_NULL	OBSOL	orecvfrom
241126	AUE_NULL	MNOPROTO { int setreuid(int ruid, int euid); }
242127	AUE_NULL	MNOPROTO { int setregid(int rgid, int egid); }
243128	AUE_NULL	MNOPROTO	{ int rename(char *from, char *to); }
244129	AUE_NULL	OBSOL	otruncate
245130	AUE_NULL	OBSOL	ftruncate
246131	AUE_NULL	MNOPROTO { int flock(int fd, int how); }
247132	AUE_NULL	MNOPROTO	{ int mkfifo(char *path, int mode); }
248133	AUE_NULL	MNOPROTO { int sendto(int s, caddr_t buf, \
249				    size_t len, int flags, caddr_t to, \
250				    int tolen); }
251134	AUE_NULL	MNOPROTO { int shutdown(int s, int how); }
252135	AUE_NULL	MNOPROTO { int socketpair(int domain, int type, \
253				    int protocol, int *rsv); }
254136	AUE_NULL	MNOPROTO	{ int mkdir(char *path, int mode); }
255137	AUE_NULL	MNOPROTO	{ int rmdir(char *path); }
256138	AUE_NULL	MSTD	{ int freebsd32_utimes(char *path, \
257				    struct timeval32 *tptr); }
258139	AUE_NULL	OBSOL	4.2 sigreturn
259140	AUE_NULL	MSTD	{ int freebsd32_adjtime( \
260				    struct timeval32 *delta, \
261				    struct timeval32 *olddelta); }
262141	AUE_NULL	OBSOL	ogetpeername
263142	AUE_NULL	OBSOL	ogethostid
264143	AUE_NULL	OBSOL	sethostid
265144	AUE_NULL	OBSOL	getrlimit
266145	AUE_NULL	OBSOL	setrlimit
267146	AUE_NULL	OBSOL	killpg
268147	AUE_NULL	MNOPROTO { int setsid(void); }
269148	AUE_NULL	MNOPROTO	{ int quotactl(char *path, int cmd, int uid, \
270				    caddr_t arg); }
271149	AUE_NULL	OBSOL oquota
272150	AUE_NULL	OBSOL ogetsockname
273
274; Syscalls 151-180 inclusive are reserved for vendor-specific
275; system calls.  (This includes various calls added for compatibity
276; with other Unix variants.)
277; Some of these calls are now supported by BSD...
278151	AUE_NULL	UNIMPL	sem_lock (BSD/OS 2.x)
279152	AUE_NULL	UNIMPL	sem_wakeup (BSD/OS 2.x)
280153	AUE_NULL	UNIMPL	asyncdaemon (BSD/OS 2.x)
281154	AUE_NULL	UNIMPL	nosys
282; 155 is initialized by the NFS code, if present.
283; XXX this is a problem!!!
284155	AUE_NULL	UNIMPL	nfssvc
285156	AUE_NULL	OBSOL	ogetdirentries
286157	AUE_NULL	MCOMPAT4	{ int freebsd32_statfs(char *path, \
287				    struct statfs32 *buf); }
288158	AUE_NULL	MCOMPAT4	{ int freebsd32_fstatfs(int fd, \
289				    struct statfs32 *buf); }
290159	AUE_NULL	UNIMPL	nosys
291160	AUE_NULL	UNIMPL	nosys
292161	AUE_NULL	MNOPROTO	{ int getfh(char *fname, \
293				    struct fhandle *fhp); }
294162	AUE_NULL	MNOPROTO { int getdomainname(char *domainname, \
295				    int len); }
296163	AUE_NULL	MNOPROTO { int setdomainname(char *domainname, \
297				    int len); }
298164	AUE_NULL	MNOPROTO { int uname(struct utsname *name); }
299165	AUE_NULL	MNOPROTO { int sysarch(int op, char *parms); }
300166	AUE_NULL	MNOPROTO { int rtprio(int function, pid_t pid, \
301				    struct rtprio *rtp); }
302167	AUE_NULL	UNIMPL	nosys
303168	AUE_NULL	UNIMPL	nosys
304169	AUE_NULL	MSTD	{ int freebsd32_semsys(int which, int a2, \
305				    int a3, int a4, int a5); }
306170	AUE_NULL	MSTD	{ int freebsd32_msgsys(int which, int a2, \
307				    int a3, int a4, int a5, int a6); }
308171	AUE_NULL	MSTD	{ int freebsd32_shmsys(int which, int a2, \
309				    int a3, int a4); }
310172	AUE_NULL	UNIMPL	nosys
311173	AUE_NULL	MSTD	{ ssize_t freebsd32_pread(int fd, void *buf, \
312				    size_t nbyte, int pad, \
313				    u_int32_t offsetlo, u_int32_t offsethi); }
314; XXX note - bigendian is different
315174	AUE_NULL	MSTD	{ ssize_t freebsd32_pwrite(int fd, \
316				    const void *buf, size_t nbyte, int pad, \
317				    u_int32_t offsetlo, u_int32_t offsethi); }
318; XXX note - bigendian is different
319175	AUE_NULL	UNIMPL	nosys
320176	AUE_NULL	MNOPROTO { int ntp_adjtime(struct timex *tp); }
321177	AUE_NULL	UNIMPL	sfork (BSD/OS 2.x)
322178	AUE_NULL	UNIMPL	getdescriptor (BSD/OS 2.x)
323179	AUE_NULL	UNIMPL	setdescriptor (BSD/OS 2.x)
324180	AUE_NULL	UNIMPL	nosys
325
326; Syscalls 181-199 are used by/reserved for BSD
327181	AUE_NULL	MNOPROTO { int setgid(gid_t gid); }
328182	AUE_NULL	MNOPROTO { int setegid(gid_t egid); }
329183	AUE_NULL	MNOPROTO { int seteuid(uid_t euid); }
330184	AUE_NULL	UNIMPL	lfs_bmapv
331185	AUE_NULL	UNIMPL	lfs_markv
332186	AUE_NULL	UNIMPL	lfs_segclean
333187	AUE_NULL	UNIMPL	lfs_segwait
334188	AUE_NULL	MSTD	{ int freebsd32_stat(char *path, \
335				    struct stat32 *ub); }
336189	AUE_NULL	MSTD	{ int freebsd32_fstat(int fd, \
337				    struct stat32 *ub); }
338190	AUE_NULL	MSTD	{ int freebsd32_lstat(char *path, \
339				    struct stat32 *ub); }
340191	AUE_NULL	MNOPROTO	{ int pathconf(char *path, int name); }
341192	AUE_NULL	MNOPROTO { int fpathconf(int fd, int name); }
342193	AUE_NULL	UNIMPL	nosys
343194	AUE_NULL	MNOPROTO { int getrlimit(u_int which, \
344				    struct rlimit *rlp); } getrlimit \
345				    __getrlimit_args int
346195	AUE_NULL	MNOPROTO { int setrlimit(u_int which, \
347				    struct rlimit *rlp); } setrlimit \
348				    __setrlimit_args int
349196	AUE_NULL	MNOPROTO	{ int getdirentries(int fd, char *buf, \
350				    u_int count, long *basep); }
351197	AUE_NULL	MSTD 	{ caddr_t freebsd32_mmap(caddr_t addr, \
352				    size_t len, int prot, int flags, int fd, \
353				    int pad, u_int32_t poslo, \
354				    u_int32_t poshi); }
355198	AUE_NULL	MNOPROTO	{ int nosys(void); } __syscall \
356				    __syscall_args int
357; XXX note - bigendian is different
358199	AUE_NULL	MSTD	{ off_t freebsd32_lseek(int fd, int pad, \
359				    u_int32_t offsetlo, u_int32_t offsethi, \
360				    int whence); }
361; XXX note - bigendian is different
362200	AUE_NULL	MSTD	{ int freebsd32_truncate(char *path, \
363				    int pad, u_int32_t lengthlo, \
364				    u_int32_t lengthhi); }
365; XXX note - bigendian is different
366201	AUE_NULL	MSTD	{ int freebsd32_ftruncate(int fd, int pad, \
367				    u_int32_t lengthlo, u_int32_t lengthhi); }
368202	AUE_NULL	MSTD	{ int freebsd32_sysctl(int *name, \
369				    u_int namelen, void *old, \
370				    u_int32_t *oldlenp, void *new, \
371				    u_int32_t newlen); }
372203	AUE_NULL	MNOPROTO { int mlock(const void *addr, \
373				    size_t len); }
374204	AUE_NULL	MNOPROTO { int munlock(const void *addr, \
375				    size_t len); }
376205	AUE_NULL	MNOPROTO	{ int undelete(char *path); }
377206	AUE_NULL	MNOPROTO	{ int futimes(int fd, struct timeval *tptr); }
378207	AUE_NULL	MNOPROTO { int getpgid(pid_t pid); }
379208	AUE_NULL	UNIMPL	newreboot (NetBSD)
380209	AUE_NULL	MNOPROTO { int poll(struct pollfd *fds, u_int nfds, \
381				    int timeout); }
382
383;
384; The following are reserved for loadable syscalls
385;
386210	AUE_NULL	UNIMPL
387211	AUE_NULL	UNIMPL
388212	AUE_NULL	UNIMPL
389213	AUE_NULL	UNIMPL
390214	AUE_NULL	UNIMPL
391215	AUE_NULL	UNIMPL
392216	AUE_NULL	UNIMPL
393217	AUE_NULL	UNIMPL
394218	AUE_NULL	UNIMPL
395219	AUE_NULL	UNIMPL
396
397;
398; The following were introduced with NetBSD/4.4Lite-2
399; They are initialized by thier respective modules/sysinits
400; XXX PROBLEM!!
401220	AUE_NULL	MNOPROTO { int __semctl(int semid, int semnum, \
402				    int cmd, union semun *arg); }
403221	AUE_NULL	MNOPROTO { int semget(key_t key, int nsems, \
404				    int semflg); }
405222	AUE_NULL	MNOPROTO { int semop(int semid, struct sembuf *sops, \
406				    u_int nsops); }
407223	AUE_NULL	UNIMPL	semconfig
408224	AUE_NULL	MNOPROTO { int msgctl(int msqid, int cmd, \
409				    struct msqid_ds *buf); }
410225	AUE_NULL	MNOPROTO { int msgget(key_t key, int msgflg); }
411226	AUE_NULL	MNOPROTO { int msgsnd(int msqid, void *msgp, \
412				    size_t msgsz, int msgflg); }
413227	AUE_NULL	MNOPROTO { int msgrcv(int msqid, void *msgp, \
414				    size_t msgsz, long msgtyp, int msgflg); }
415228	AUE_NULL	MNOPROTO { int shmat(int shmid, void *shmaddr, \
416				    int shmflg); }
417229	AUE_NULL	MNOPROTO { int shmctl(int shmid, int cmd, \
418				    struct shmid_ds *buf); }
419230	AUE_NULL	MNOPROTO { int shmdt(void *shmaddr); }
420231	AUE_NULL	MNOPROTO { int shmget(key_t key, int size, \
421				    int shmflg); }
422;
423232	AUE_NULL	MSTD 	 { int freebsd32_clock_gettime(clockid_t clock_id, \
424				    struct timespec32 *tp); }
425233	AUE_NULL	MSTD	 { int freebsd32_clock_settime(clockid_t clock_id, \
426				    const struct timespec32 *tp); }
427234	AUE_NULL	MSTD	 { int freebsd32_clock_getres(clockid_t clock_id, \
428				    struct timespec32 *tp); }
429235	AUE_NULL	UNIMPL	timer_create
430236	AUE_NULL	UNIMPL	timer_delete
431237	AUE_NULL	UNIMPL	timer_settime
432238	AUE_NULL	UNIMPL	timer_gettime
433239	AUE_NULL	UNIMPL	timer_getoverrun
434240	AUE_NULL	MSTD	{ int freebsd32_nanosleep( \
435				    const struct timespec32 *rqtp, \
436				    struct timespec32 *rmtp); }
437241	AUE_NULL	UNIMPL	nosys
438242	AUE_NULL	UNIMPL	nosys
439243	AUE_NULL	UNIMPL	nosys
440244	AUE_NULL	UNIMPL	nosys
441245	AUE_NULL	UNIMPL	nosys
442246	AUE_NULL	UNIMPL	nosys
443247	AUE_NULL	UNIMPL	nosys
444248	AUE_NULL	UNIMPL	ntp_gettime
445249	AUE_NULL	UNIMPL	nosys
446; syscall numbers initially used in OpenBSD
447250	AUE_NULL	MNOPROTO { int minherit(void *addr, size_t len, \
448				    int inherit); }
449251	AUE_NULL	MNOPROTO { int rfork(int flags); }
450252	AUE_NULL	MNOPROTO { int openbsd_poll(struct pollfd *fds, \
451				    u_int nfds, int timeout); }
452253	AUE_NULL	MNOPROTO { int issetugid(void); }
453254	AUE_NULL	MNOPROTO	{ int lchown(char *path, int uid, int gid); }
454255	AUE_NULL	UNIMPL	nosys
455256	AUE_NULL	UNIMPL	nosys
456257	AUE_NULL	UNIMPL	nosys
457258	AUE_NULL	UNIMPL	nosys
458259	AUE_NULL	UNIMPL	nosys
459260	AUE_NULL	UNIMPL	nosys
460261	AUE_NULL	UNIMPL	nosys
461262	AUE_NULL	UNIMPL	nosys
462263	AUE_NULL	UNIMPL	nosys
463264	AUE_NULL	UNIMPL	nosys
464265	AUE_NULL	UNIMPL	nosys
465266	AUE_NULL	UNIMPL	nosys
466267	AUE_NULL	UNIMPL	nosys
467268	AUE_NULL	UNIMPL	nosys
468269	AUE_NULL	UNIMPL	nosys
469270	AUE_NULL	UNIMPL	nosys
470271	AUE_NULL	UNIMPL	nosys
471272	AUE_NULL	MNOPROTO	{ int getdents(int fd, char *buf, \
472				    size_t count); }
473273	AUE_NULL	UNIMPL	nosys
474274	AUE_NULL	MNOPROTO	{ int lchmod(char *path, mode_t mode); }
475275	AUE_NULL	MNOPROTO { int lchown(char *path, uid_t uid, \
476				    gid_t gid); } netbsd_lchown \
477				    lchown_args int
478276	AUE_NULL	MNOPROTO	{ int lutimes(char *path, \
479				    struct timeval *tptr); }
480277	AUE_NULL	MNOPROTO { int msync(void *addr, size_t len, \
481				    int flags); } netbsd_msync msync_args int
482278	AUE_NULL	MNOPROTO	{ int nstat(char *path, struct nstat *ub); }
483279	AUE_NULL	MNOPROTO { int nfstat(int fd, struct nstat *sb); }
484280	AUE_NULL	MNOPROTO	{ int nlstat(char *path, struct nstat *ub); }
485281	AUE_NULL	UNIMPL	nosys
486282	AUE_NULL	UNIMPL	nosys
487283	AUE_NULL	UNIMPL	nosys
488284	AUE_NULL	UNIMPL	nosys
489285	AUE_NULL	UNIMPL	nosys
490286	AUE_NULL	UNIMPL	nosys
491287	AUE_NULL	UNIMPL	nosys
492288	AUE_NULL	UNIMPL	nosys
493; 289 and 290 from NetBSD (OpenBSD: 267 and 268)
494289	AUE_NULL	MSTD	{ ssize_t freebsd32_preadv(int fd, \
495					struct iovec32 *iovp, \
496					u_int iovcnt, off_t offset); }
497; XXX note - bigendian is different
498290	AUE_NULL	MSTD	{ ssize_t freebsd32_pwritev(int fd, \
499					struct iovec32 *iovp, \
500					u_int iovcnt, off_t offset); }
501; XXX note - bigendian is different
502291	AUE_NULL	UNIMPL	nosys
503292	AUE_NULL	UNIMPL	nosys
504293	AUE_NULL	UNIMPL	nosys
505294	AUE_NULL	UNIMPL	nosys
506295	AUE_NULL	UNIMPL	nosys
507296	AUE_NULL	UNIMPL	nosys
508; XXX 297 is 300 in NetBSD 
509297	AUE_NULL	MCOMPAT4	{ int freebsd32_fhstatfs( \
510				    const struct fhandle *u_fhp, \
511				    struct statfs32 *buf); }
512298	AUE_NULL	MNOPROTO	{ int fhopen(const struct fhandle *u_fhp, \
513			 	    int flags); }
514299	AUE_NULL	MNOPROTO	{ int fhstat(const struct fhandle *u_fhp, \
515				    struct stat *sb); }
516; syscall numbers for FreeBSD
517300	AUE_NULL	MNOPROTO { int modnext(int modid); }
518301	AUE_NULL	MSTD	{ int freebsd32_modstat(int modid, \
519				    struct module_stat32* stat); }
520302	AUE_NULL	MNOPROTO { int modfnext(int modid); }
521303	AUE_NULL	MNOPROTO { int modfind(const char *name); }
522304	AUE_NULL	MNOPROTO { int kldload(const char *file); }
523305	AUE_NULL	MNOPROTO { int kldunload(int fileid); }
524306	AUE_NULL	MNOPROTO { int kldfind(const char *file); }
525307	AUE_NULL	MNOPROTO { int kldnext(int fileid); }
526308	AUE_NULL	MNOPROTO { int kldstat(int fileid, \
527				    struct kld_file_stat* stat); }
528309	AUE_NULL	MNOPROTO { int kldfirstmod(int fileid); }
529310	AUE_NULL	MNOPROTO { int getsid(pid_t pid); }
530311	AUE_NULL	MNOPROTO { int setresuid(uid_t ruid, uid_t euid, \
531				    uid_t suid); }
532312	AUE_NULL	MNOPROTO { int setresgid(gid_t rgid, gid_t egid, \
533				    gid_t sgid); }
534313	AUE_NULL	OBSOL	signanosleep
535314	AUE_NULL	UNIMPL	aio_return
536315	AUE_NULL	UNIMPL	aio_suspend
537316	AUE_NULL	UNIMPL	aio_cancel
538317	AUE_NULL	UNIMPL	aio_error
539318	AUE_NULL	UNIMPL	aio_read
540319	AUE_NULL	UNIMPL	aio_write
541320	AUE_NULL	UNIMPL	lio_listio
542321	AUE_NULL	MNOPROTO { int yield(void); }
543322	AUE_NULL	OBSOL	thr_sleep
544323	AUE_NULL	OBSOL	thr_wakeup
545324	AUE_NULL	MNOPROTO { int mlockall(int how); }
546325	AUE_NULL	MNOPROTO { int munlockall(void); }
547326	AUE_NULL	MNOPROTO	{ int __getcwd(u_char *buf, u_int buflen); }
548
549327	AUE_NULL	MNOPROTO { int sched_setparam (pid_t pid, \
550				    const struct sched_param *param); }
551328	AUE_NULL	MNOPROTO { int sched_getparam (pid_t pid, \
552				    struct sched_param *param); }
553
554329	AUE_NULL	MNOPROTO { int sched_setscheduler (pid_t pid, \
555				    int policy, \
556				    const struct sched_param *param); }
557330	AUE_NULL	MNOPROTO { int sched_getscheduler (pid_t pid); }
558
559331	AUE_NULL	MNOPROTO { int sched_yield (void); }
560332	AUE_NULL	MNOPROTO { int sched_get_priority_max (int policy); }
561333	AUE_NULL	MNOPROTO { int sched_get_priority_min (int policy); }
562334	AUE_NULL	MNOPROTO { int sched_rr_get_interval (pid_t pid, \
563				    struct timespec *interval); }
564335	AUE_NULL	MNOPROTO { int utrace(const void *addr, size_t len); }
565; XXX note - bigendian is different
566336	AUE_NULL	MCOMPAT4 { int freebsd32_sendfile(int fd, int s, \
567				    u_int32_t offsetlo, u_int32_t offsethi, \
568				    size_t nbytes, struct sf_hdtr *hdtr, \
569				    off_t *sbytes, int flags); }
570337	AUE_NULL	MNOPROTO	{ int kldsym(int fileid, int cmd, \
571				    void *data); }
572338	AUE_NULL	MNOPROTO { int jail(struct jail *jail); }
573339	AUE_NULL	UNIMPL	pioctl
574340	AUE_NULL	MNOPROTO { int sigprocmask(int how, \
575				    const sigset_t *set, sigset_t *oset); }
576341	AUE_NULL	MNOPROTO { int sigsuspend(const sigset_t *sigmask); }
577342	AUE_NULL	MCOMPAT4 { int freebsd32_sigaction(int sig, \
578				    struct sigaction32 *act, \
579				    struct sigaction32 *oact); }
580343	AUE_NULL	MNOPROTO { int sigpending(sigset_t *set); }
581344	AUE_NULL	MCOMPAT4 { int freebsd32_sigreturn( \
582		    const struct freebsd4_freebsd32_ucontext *sigcntxp); }
583; XXX implement
584345	AUE_NULL	UNIMPL	sigtimedwait
585; XXX implement
586346	AUE_NULL	UNIMPL	sigwaitinfo
587347	AUE_NULL	MNOPROTO { int __acl_get_file(const char *path, \
588				    acl_type_t type, struct acl *aclp); }
589348	AUE_NULL	MNOPROTO { int __acl_set_file(const char *path, \
590				    acl_type_t type, struct acl *aclp); }
591349	AUE_NULL	MNOPROTO { int __acl_get_fd(int filedes, \
592				    acl_type_t type, struct acl *aclp); }
593350	AUE_NULL	MNOPROTO { int __acl_set_fd(int filedes, \
594				    acl_type_t type, struct acl *aclp); }
595351	AUE_NULL	MNOPROTO { int __acl_delete_file(const char *path, \
596				    acl_type_t type); }
597352	AUE_NULL	MNOPROTO { int __acl_delete_fd(int filedes, \
598				    acl_type_t type); }
599353	AUE_NULL	MNOPROTO { int __acl_aclcheck_file(const char *path, \
600				    acl_type_t type, struct acl *aclp); }
601354	AUE_NULL	MNOPROTO { int __acl_aclcheck_fd(int filedes, \
602				    acl_type_t type, struct acl *aclp); }
603355	AUE_NULL	NOPROTO	{ int extattrctl(const char *path, int cmd, \
604				    const char *filename, int attrnamespace, \
605				    const char *attrname); }
606356	AUE_NULL	NOPROTO	{ int extattr_set_file(const char *path, \
607				    int attrnamespace, const char *attrname, \
608				    void *data, size_t nbytes); }
609357	AUE_NULL	NOPROTO	{ ssize_t extattr_get_file(const char *path, \
610				    int attrnamespace, const char *attrname, \
611				    void *data, size_t nbytes); }
612358	AUE_NULL	NOPROTO	{ int extattr_delete_file(const char *path, \
613				    int attrnamespace, \
614				    const char *attrname); }
615359	AUE_NULL	UNIMPL	aio_waitcomplete
616360	AUE_NULL	MNOPROTO { int getresuid(uid_t *ruid, uid_t *euid, \
617				    uid_t *suid); }
618361	AUE_NULL	MNOPROTO { int getresgid(gid_t *rgid, gid_t *egid, \
619				    gid_t *sgid); }
620362	AUE_NULL	MNOPROTO { int kqueue(void); }
621363	AUE_NULL	MSTD { int freebsd32_kevent(int fd, \
622				    const struct kevent32 *changelist, \
623				    int nchanges, \
624				    struct kevent32 *eventlist, int nevents, \
625				    const struct timespec32 *timeout); }
626364	AUE_NULL	UNIMPL	__cap_get_proc
627365	AUE_NULL	UNIMPL	__cap_set_proc
628366	AUE_NULL	UNIMPL	__cap_get_fd
629367	AUE_NULL	UNIMPL	__cap_get_file
630368	AUE_NULL	UNIMPL	__cap_set_fd
631369	AUE_NULL	UNIMPL	__cap_set_file
632370	AUE_NULL	UNIMPL	lkmressys
633371	AUE_NULL	NOPROTO	{ int extattr_set_fd(int fd, \
634				    int attrnamespace, const char *attrname, \
635				    void *data, size_t nbytes); }
636372	AUE_NULL	NOPROTO	{ ssize_t extattr_get_fd(int fd, \
637				    int attrnamespace, const char *attrname, \
638				    void *data, size_t nbytes); }
639373	AUE_NULL	NOPROTO	{ int extattr_delete_fd(int fd, \
640				    int attrnamespace, \
641				    const char *attrname); }
642374	AUE_NULL	MNOPROTO { int __setugid(int flag); }
643375	AUE_NULL	UNIMPL	nfsclnt
644376	AUE_NULL	MNOPROTO	{ int eaccess(char *path, int flags); }
645377	AUE_NULL	UNIMPL	afs_syscall
646378	AUE_NULL	NOPROTO { int nmount(struct iovec *iovp, \
647				    unsigned int iovcnt, int flags); }
648379	AUE_NULL	MNOPROTO	{ int kse_exit(void); }
649380	AUE_NULL	MNOPROTO	{ int kse_wakeup(struct kse_mailbox *mbx); }
650381	AUE_NULL	MNOPROTO	{ int kse_create(struct kse_mailbox *mbx, \
651				    int newgroup); }
652382	AUE_NULL	MNOPROTO	{ int kse_thr_interrupt( \
653				    struct kse_thr_mailbox *tmbx); }
654383	AUE_NULL	MNOPROTO	{ int kse_release(void); }
655384	AUE_NULL	UNIMPL	__mac_get_proc
656385	AUE_NULL	UNIMPL	__mac_set_proc
657386	AUE_NULL	UNIMPL	__mac_get_fd
658387	AUE_NULL	UNIMPL	__mac_get_file
659388	AUE_NULL	UNIMPL	__mac_set_fd
660389	AUE_NULL	UNIMPL	__mac_set_file
661390	AUE_NULL	MNOPROTO	{ int kenv(int what, const char *name, \
662				    char *value, int len); }
663391	AUE_NULL	MNOPROTO	{ int lchflags(const char *path, int flags); }
664392	AUE_NULL	MNOPROTO { int uuidgen(struct uuid *store, \
665				    int count); }
666393	AUE_NULL	MSTD	{ int freebsd32_sendfile(int fd, int s, \
667				    u_int32_t offsetlo, u_int32_t offsethi, \
668				    size_t nbytes, struct sf_hdtr *hdtr, \
669				    off_t *sbytes, int flags); }
670394	AUE_NULL	UNIMPL	mac_syscall
671395	AUE_NULL	MNOPROTO	{ int getfsstat(struct statfs *buf, \
672				    long bufsize, int flags); }
673396	AUE_NULL	MNOPROTO	{ int statfs(char *path, \
674				    struct statfs *buf); }
675397	AUE_NULL	MNOPROTO	{ int fstatfs(int fd, struct statfs *buf); }
676398	AUE_NULL	MNOPROTO	{ int fhstatfs(const struct fhandle *u_fhp, \
677				    struct statfs *buf); }
678399	AUE_NULL	UNIMPL	nosys
679; XXX implement these?
680400	AUE_NULL	UNIMPL	ksem_close
681401	AUE_NULL	UNIMPL	ksem_post
682402	AUE_NULL	UNIMPL	ksem_wait
683403	AUE_NULL	UNIMPL	ksem_trywait
684404	AUE_NULL	UNIMPL	ksem_init
685405	AUE_NULL	UNIMPL	ksem_open
686406	AUE_NULL	UNIMPL	ksem_unlink
687407	AUE_NULL	UNIMPL	ksem_getvalue
688408	AUE_NULL	UNIMPL	ksem_destroy
689409	AUE_NULL	UNIMPL	__mac_get_pid
690410	AUE_NULL	UNIMPL	__mac_get_link
691411	AUE_NULL	UNIMPL	__mac_set_link
692412	AUE_NULL	UNIMPL	extattr_set_link
693413	AUE_NULL	UNIMPL	extattr_get_link
694414	AUE_NULL	UNIMPL	extattr_delete_link
695415	AUE_NULL	UNIMPL	__mac_execve
696416	AUE_NULL	MSTD { int freebsd32_sigaction(int sig, \
697				    struct sigaction32 *act, \
698				    struct sigaction32 *oact); }
699417	AUE_NULL	MSTD { int freebsd32_sigreturn( \
700		    const struct freebsd32_ucontext *sigcntxp); }
701418	AUE_NULL	UNIMPL	__xstat
702419	AUE_NULL	UNIMPL	__xfstat
703420	AUE_NULL	UNIMPL	__xlstat
704421	AUE_NULL	MSTD	{ int freebsd32_getcontext( \
705				    struct freebsd32_ucontext *ucp); }
706422	AUE_NULL	MSTD	{ int freebsd32_setcontext( \
707				    const struct freebsd32_ucontext *ucp); }
708423	AUE_NULL	MSTD	{ int freebsd32_swapcontext( \
709				    struct freebsd32_ucontext *oucp, \
710				    const struct freebsd32_ucontext *ucp); }
711424	AUE_NULL	UNIMPL	swapoff
712425	AUE_NULL	UNIMPL	__acl_get_link
713426	AUE_NULL	UNIMPL	__acl_set_link
714427	AUE_NULL	UNIMPL	__acl_delete_link
715428	AUE_NULL	UNIMPL	__acl_aclcheck_link
716; XXX implement
717429	AUE_NULL	UNIMPL	sigwait
718430	AUE_NULL	MNOPROTO { int thr_create(ucontext_t *ctx, long *id, \
719				    int flag s); }
720431	AUE_NULL	MNOPROTO { void thr_exit(long *state); }
721432	AUE_NULL	MNOPROTO { int thr_self(long *id); }
722433	AUE_NULL	MNOPROTO { int thr_kill(long id, int sig); }
723434	AUE_NULL	MNOPROTO { int _umtx_lock(struct umtx *umtx); }
724435	AUE_NULL	MNOPROTO { int _umtx_unlock(struct umtx *umtx); }
725436	AUE_NULL	MNOPROTO { int jail_attach(int jid); }
726437	AUE_NULL	UNIMPL	extattr_list_fd
727438	AUE_NULL	UNIMPL	extattr_list_file
728439	AUE_NULL	UNIMPL	extattr_list_link
729440	AUE_NULL	UNIMPL	kse_switchin
730441	AUE_NULL	UNIMPL	ksem_timedwait
731442	AUE_NULL	MNOPROTO { int thr_suspend( \
732				    const struct timespec *timeout); }
733443	AUE_NULL	MNOPROTO { int thr_wake(long id); }
734444	AUE_NULL	MNOPROTO { int kldunloadf(int fileid, int flags); }
735445	AUE_NULL	UNIMPL	audit
736446	AUE_NULL	UNIMPL	auditon
737447	AUE_NULL	UNIMPL	getauid
738448	AUE_NULL	UNIMPL	setauid
739449	AUE_NULL	UNIMPL	getaudit
740450	AUE_NULL	UNIMPL	setaudit
741451	AUE_NULL	UNIMPL	getaudit_addr
742452	AUE_NULL	UNIMPL	setaudit_addr
743453	AUE_NULL	UNIMPL	auditctl
744454	AUE_NULL	UNIMPL	_umtx_op
745