syscalls.master revision 153679
1 $FreeBSD: head/sys/compat/freebsd32/syscalls.master 153679 2005-12-23 11:54:11Z phk $
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	MSTD	{ int freebsd32_futimes(int fd, \
378				    struct timeval32 *tptr); }
379207	AUE_NULL	MNOPROTO { int getpgid(pid_t pid); }
380208	AUE_NULL	UNIMPL	newreboot (NetBSD)
381209	AUE_NULL	MNOPROTO { int poll(struct pollfd *fds, u_int nfds, \
382				    int timeout); }
383
384;
385; The following are reserved for loadable syscalls
386;
387210	AUE_NULL	UNIMPL
388211	AUE_NULL	UNIMPL
389212	AUE_NULL	UNIMPL
390213	AUE_NULL	UNIMPL
391214	AUE_NULL	UNIMPL
392215	AUE_NULL	UNIMPL
393216	AUE_NULL	UNIMPL
394217	AUE_NULL	UNIMPL
395218	AUE_NULL	UNIMPL
396219	AUE_NULL	UNIMPL
397
398;
399; The following were introduced with NetBSD/4.4Lite-2
400; They are initialized by thier respective modules/sysinits
401; XXX PROBLEM!!
402220	AUE_NULL	MNOPROTO { int __semctl(int semid, int semnum, \
403				    int cmd, union semun *arg); }
404221	AUE_NULL	MNOPROTO { int semget(key_t key, int nsems, \
405				    int semflg); }
406222	AUE_NULL	MNOPROTO { int semop(int semid, struct sembuf *sops, \
407				    u_int nsops); }
408223	AUE_NULL	UNIMPL	semconfig
409224	AUE_NULL	MNOPROTO { int msgctl(int msqid, int cmd, \
410				    struct msqid_ds *buf); }
411225	AUE_NULL	MNOPROTO { int msgget(key_t key, int msgflg); }
412226	AUE_NULL	MNOPROTO { int msgsnd(int msqid, void *msgp, \
413				    size_t msgsz, int msgflg); }
414227	AUE_NULL	MNOPROTO { int msgrcv(int msqid, void *msgp, \
415				    size_t msgsz, long msgtyp, int msgflg); }
416228	AUE_NULL	MNOPROTO { int shmat(int shmid, void *shmaddr, \
417				    int shmflg); }
418229	AUE_NULL	MNOPROTO { int shmctl(int shmid, int cmd, \
419				    struct shmid_ds *buf); }
420230	AUE_NULL	MNOPROTO { int shmdt(void *shmaddr); }
421231	AUE_NULL	MNOPROTO { int shmget(key_t key, int size, \
422				    int shmflg); }
423;
424232	AUE_NULL	MSTD 	 { int freebsd32_clock_gettime(clockid_t clock_id, \
425				    struct timespec32 *tp); }
426233	AUE_NULL	MSTD	 { int freebsd32_clock_settime(clockid_t clock_id, \
427				    const struct timespec32 *tp); }
428234	AUE_NULL	MSTD	 { int freebsd32_clock_getres(clockid_t clock_id, \
429				    struct timespec32 *tp); }
430235	AUE_NULL	UNIMPL	timer_create
431236	AUE_NULL	UNIMPL	timer_delete
432237	AUE_NULL	UNIMPL	timer_settime
433238	AUE_NULL	UNIMPL	timer_gettime
434239	AUE_NULL	UNIMPL	timer_getoverrun
435240	AUE_NULL	MSTD	{ int freebsd32_nanosleep( \
436				    const struct timespec32 *rqtp, \
437				    struct timespec32 *rmtp); }
438241	AUE_NULL	UNIMPL	nosys
439242	AUE_NULL	UNIMPL	nosys
440243	AUE_NULL	UNIMPL	nosys
441244	AUE_NULL	UNIMPL	nosys
442245	AUE_NULL	UNIMPL	nosys
443246	AUE_NULL	UNIMPL	nosys
444247	AUE_NULL	UNIMPL	nosys
445248	AUE_NULL	UNIMPL	ntp_gettime
446249	AUE_NULL	UNIMPL	nosys
447; syscall numbers initially used in OpenBSD
448250	AUE_NULL	MNOPROTO { int minherit(void *addr, size_t len, \
449				    int inherit); }
450251	AUE_NULL	MNOPROTO { int rfork(int flags); }
451252	AUE_NULL	MNOPROTO { int openbsd_poll(struct pollfd *fds, \
452				    u_int nfds, int timeout); }
453253	AUE_NULL	MNOPROTO { int issetugid(void); }
454254	AUE_NULL	MNOPROTO	{ int lchown(char *path, int uid, int gid); }
455255	AUE_NULL	UNIMPL	nosys
456256	AUE_NULL	UNIMPL	nosys
457257	AUE_NULL	UNIMPL	nosys
458258	AUE_NULL	UNIMPL	nosys
459259	AUE_NULL	UNIMPL	nosys
460260	AUE_NULL	UNIMPL	nosys
461261	AUE_NULL	UNIMPL	nosys
462262	AUE_NULL	UNIMPL	nosys
463263	AUE_NULL	UNIMPL	nosys
464264	AUE_NULL	UNIMPL	nosys
465265	AUE_NULL	UNIMPL	nosys
466266	AUE_NULL	UNIMPL	nosys
467267	AUE_NULL	UNIMPL	nosys
468268	AUE_NULL	UNIMPL	nosys
469269	AUE_NULL	UNIMPL	nosys
470270	AUE_NULL	UNIMPL	nosys
471271	AUE_NULL	UNIMPL	nosys
472272	AUE_NULL	MNOPROTO	{ int getdents(int fd, char *buf, \
473				    size_t count); }
474273	AUE_NULL	UNIMPL	nosys
475274	AUE_NULL	MNOPROTO	{ int lchmod(char *path, mode_t mode); }
476275	AUE_NULL	MNOPROTO { int lchown(char *path, uid_t uid, \
477				    gid_t gid); } netbsd_lchown \
478				    lchown_args int
479276	AUE_NULL	MNOPROTO	{ int lutimes(char *path, \
480				    struct timeval *tptr); }
481277	AUE_NULL	MNOPROTO { int msync(void *addr, size_t len, \
482				    int flags); } netbsd_msync msync_args int
483278	AUE_NULL	MNOPROTO	{ int nstat(char *path, struct nstat *ub); }
484279	AUE_NULL	MNOPROTO { int nfstat(int fd, struct nstat *sb); }
485280	AUE_NULL	MNOPROTO	{ int nlstat(char *path, struct nstat *ub); }
486281	AUE_NULL	UNIMPL	nosys
487282	AUE_NULL	UNIMPL	nosys
488283	AUE_NULL	UNIMPL	nosys
489284	AUE_NULL	UNIMPL	nosys
490285	AUE_NULL	UNIMPL	nosys
491286	AUE_NULL	UNIMPL	nosys
492287	AUE_NULL	UNIMPL	nosys
493288	AUE_NULL	UNIMPL	nosys
494; 289 and 290 from NetBSD (OpenBSD: 267 and 268)
495289	AUE_NULL	MSTD	{ ssize_t freebsd32_preadv(int fd, \
496					struct iovec32 *iovp, \
497					u_int iovcnt, off_t offset); }
498; XXX note - bigendian is different
499290	AUE_NULL	MSTD	{ ssize_t freebsd32_pwritev(int fd, \
500					struct iovec32 *iovp, \
501					u_int iovcnt, off_t offset); }
502; XXX note - bigendian is different
503291	AUE_NULL	UNIMPL	nosys
504292	AUE_NULL	UNIMPL	nosys
505293	AUE_NULL	UNIMPL	nosys
506294	AUE_NULL	UNIMPL	nosys
507295	AUE_NULL	UNIMPL	nosys
508296	AUE_NULL	UNIMPL	nosys
509; XXX 297 is 300 in NetBSD 
510297	AUE_NULL	MCOMPAT4	{ int freebsd32_fhstatfs( \
511				    const struct fhandle *u_fhp, \
512				    struct statfs32 *buf); }
513298	AUE_NULL	MNOPROTO	{ int fhopen(const struct fhandle *u_fhp, \
514			 	    int flags); }
515299	AUE_NULL	MNOPROTO	{ int fhstat(const struct fhandle *u_fhp, \
516				    struct stat *sb); }
517; syscall numbers for FreeBSD
518300	AUE_NULL	MNOPROTO { int modnext(int modid); }
519301	AUE_NULL	MSTD	{ int freebsd32_modstat(int modid, \
520				    struct module_stat32* stat); }
521302	AUE_NULL	MNOPROTO { int modfnext(int modid); }
522303	AUE_NULL	MNOPROTO { int modfind(const char *name); }
523304	AUE_NULL	MNOPROTO { int kldload(const char *file); }
524305	AUE_NULL	MNOPROTO { int kldunload(int fileid); }
525306	AUE_NULL	MNOPROTO { int kldfind(const char *file); }
526307	AUE_NULL	MNOPROTO { int kldnext(int fileid); }
527308	AUE_NULL	MNOPROTO { int kldstat(int fileid, \
528				    struct kld_file_stat* stat); }
529309	AUE_NULL	MNOPROTO { int kldfirstmod(int fileid); }
530310	AUE_NULL	MNOPROTO { int getsid(pid_t pid); }
531311	AUE_NULL	MNOPROTO { int setresuid(uid_t ruid, uid_t euid, \
532				    uid_t suid); }
533312	AUE_NULL	MNOPROTO { int setresgid(gid_t rgid, gid_t egid, \
534				    gid_t sgid); }
535313	AUE_NULL	OBSOL	signanosleep
536314	AUE_NULL	UNIMPL	aio_return
537315	AUE_NULL	UNIMPL	aio_suspend
538316	AUE_NULL	UNIMPL	aio_cancel
539317	AUE_NULL	UNIMPL	aio_error
540318	AUE_NULL	UNIMPL	aio_read
541319	AUE_NULL	UNIMPL	aio_write
542320	AUE_NULL	UNIMPL	lio_listio
543321	AUE_NULL	MNOPROTO { int yield(void); }
544322	AUE_NULL	OBSOL	thr_sleep
545323	AUE_NULL	OBSOL	thr_wakeup
546324	AUE_NULL	MNOPROTO { int mlockall(int how); }
547325	AUE_NULL	MNOPROTO { int munlockall(void); }
548326	AUE_NULL	MNOPROTO	{ int __getcwd(u_char *buf, u_int buflen); }
549
550327	AUE_NULL	MNOPROTO { int sched_setparam (pid_t pid, \
551				    const struct sched_param *param); }
552328	AUE_NULL	MNOPROTO { int sched_getparam (pid_t pid, \
553				    struct sched_param *param); }
554
555329	AUE_NULL	MNOPROTO { int sched_setscheduler (pid_t pid, \
556				    int policy, \
557				    const struct sched_param *param); }
558330	AUE_NULL	MNOPROTO { int sched_getscheduler (pid_t pid); }
559
560331	AUE_NULL	MNOPROTO { int sched_yield (void); }
561332	AUE_NULL	MNOPROTO { int sched_get_priority_max (int policy); }
562333	AUE_NULL	MNOPROTO { int sched_get_priority_min (int policy); }
563334	AUE_NULL	MNOPROTO { int sched_rr_get_interval (pid_t pid, \
564				    struct timespec *interval); }
565335	AUE_NULL	MNOPROTO { int utrace(const void *addr, size_t len); }
566; XXX note - bigendian is different
567336	AUE_NULL	MCOMPAT4 { int freebsd32_sendfile(int fd, int s, \
568				    u_int32_t offsetlo, u_int32_t offsethi, \
569				    size_t nbytes, struct sf_hdtr *hdtr, \
570				    off_t *sbytes, int flags); }
571337	AUE_NULL	MNOPROTO	{ int kldsym(int fileid, int cmd, \
572				    void *data); }
573338	AUE_NULL	MNOPROTO { int jail(struct jail *jail); }
574339	AUE_NULL	UNIMPL	pioctl
575340	AUE_NULL	MNOPROTO { int sigprocmask(int how, \
576				    const sigset_t *set, sigset_t *oset); }
577341	AUE_NULL	MNOPROTO { int sigsuspend(const sigset_t *sigmask); }
578342	AUE_NULL	MCOMPAT4 { int freebsd32_sigaction(int sig, \
579				    struct sigaction32 *act, \
580				    struct sigaction32 *oact); }
581343	AUE_NULL	MNOPROTO { int sigpending(sigset_t *set); }
582344	AUE_NULL	MCOMPAT4 { int freebsd32_sigreturn( \
583		    const struct freebsd4_freebsd32_ucontext *sigcntxp); }
584; XXX implement
585345	AUE_NULL	UNIMPL	sigtimedwait
586; XXX implement
587346	AUE_NULL	UNIMPL	sigwaitinfo
588347	AUE_NULL	MNOPROTO { int __acl_get_file(const char *path, \
589				    acl_type_t type, struct acl *aclp); }
590348	AUE_NULL	MNOPROTO { int __acl_set_file(const char *path, \
591				    acl_type_t type, struct acl *aclp); }
592349	AUE_NULL	MNOPROTO { int __acl_get_fd(int filedes, \
593				    acl_type_t type, struct acl *aclp); }
594350	AUE_NULL	MNOPROTO { int __acl_set_fd(int filedes, \
595				    acl_type_t type, struct acl *aclp); }
596351	AUE_NULL	MNOPROTO { int __acl_delete_file(const char *path, \
597				    acl_type_t type); }
598352	AUE_NULL	MNOPROTO { int __acl_delete_fd(int filedes, \
599				    acl_type_t type); }
600353	AUE_NULL	MNOPROTO { int __acl_aclcheck_file(const char *path, \
601				    acl_type_t type, struct acl *aclp); }
602354	AUE_NULL	MNOPROTO { int __acl_aclcheck_fd(int filedes, \
603				    acl_type_t type, struct acl *aclp); }
604355	AUE_NULL	NOPROTO	{ int extattrctl(const char *path, int cmd, \
605				    const char *filename, int attrnamespace, \
606				    const char *attrname); }
607356	AUE_NULL	NOPROTO	{ int extattr_set_file(const char *path, \
608				    int attrnamespace, const char *attrname, \
609				    void *data, size_t nbytes); }
610357	AUE_NULL	NOPROTO	{ ssize_t extattr_get_file(const char *path, \
611				    int attrnamespace, const char *attrname, \
612				    void *data, size_t nbytes); }
613358	AUE_NULL	NOPROTO	{ int extattr_delete_file(const char *path, \
614				    int attrnamespace, \
615				    const char *attrname); }
616359	AUE_NULL	UNIMPL	aio_waitcomplete
617360	AUE_NULL	MNOPROTO { int getresuid(uid_t *ruid, uid_t *euid, \
618				    uid_t *suid); }
619361	AUE_NULL	MNOPROTO { int getresgid(gid_t *rgid, gid_t *egid, \
620				    gid_t *sgid); }
621362	AUE_NULL	MNOPROTO { int kqueue(void); }
622363	AUE_NULL	MSTD { int freebsd32_kevent(int fd, \
623				    const struct kevent32 *changelist, \
624				    int nchanges, \
625				    struct kevent32 *eventlist, int nevents, \
626				    const struct timespec32 *timeout); }
627364	AUE_NULL	UNIMPL	__cap_get_proc
628365	AUE_NULL	UNIMPL	__cap_set_proc
629366	AUE_NULL	UNIMPL	__cap_get_fd
630367	AUE_NULL	UNIMPL	__cap_get_file
631368	AUE_NULL	UNIMPL	__cap_set_fd
632369	AUE_NULL	UNIMPL	__cap_set_file
633370	AUE_NULL	UNIMPL	lkmressys
634371	AUE_NULL	NOPROTO	{ int extattr_set_fd(int fd, \
635				    int attrnamespace, const char *attrname, \
636				    void *data, size_t nbytes); }
637372	AUE_NULL	NOPROTO	{ ssize_t extattr_get_fd(int fd, \
638				    int attrnamespace, const char *attrname, \
639				    void *data, size_t nbytes); }
640373	AUE_NULL	NOPROTO	{ int extattr_delete_fd(int fd, \
641				    int attrnamespace, \
642				    const char *attrname); }
643374	AUE_NULL	MNOPROTO { int __setugid(int flag); }
644375	AUE_NULL	UNIMPL	nfsclnt
645376	AUE_NULL	MNOPROTO	{ int eaccess(char *path, int flags); }
646377	AUE_NULL	UNIMPL	afs_syscall
647378	AUE_NULL	NOPROTO { int nmount(struct iovec *iovp, \
648				    unsigned int iovcnt, int flags); }
649379	AUE_NULL	MNOPROTO	{ int kse_exit(void); }
650380	AUE_NULL	MNOPROTO	{ int kse_wakeup(struct kse_mailbox *mbx); }
651381	AUE_NULL	MNOPROTO	{ int kse_create(struct kse_mailbox *mbx, \
652				    int newgroup); }
653382	AUE_NULL	MNOPROTO	{ int kse_thr_interrupt( \
654				    struct kse_thr_mailbox *tmbx); }
655383	AUE_NULL	MNOPROTO	{ int kse_release(void); }
656384	AUE_NULL	UNIMPL	__mac_get_proc
657385	AUE_NULL	UNIMPL	__mac_set_proc
658386	AUE_NULL	UNIMPL	__mac_get_fd
659387	AUE_NULL	UNIMPL	__mac_get_file
660388	AUE_NULL	UNIMPL	__mac_set_fd
661389	AUE_NULL	UNIMPL	__mac_set_file
662390	AUE_NULL	MNOPROTO	{ int kenv(int what, const char *name, \
663				    char *value, int len); }
664391	AUE_NULL	MNOPROTO	{ int lchflags(const char *path, int flags); }
665392	AUE_NULL	MNOPROTO { int uuidgen(struct uuid *store, \
666				    int count); }
667393	AUE_NULL	MSTD	{ int freebsd32_sendfile(int fd, int s, \
668				    u_int32_t offsetlo, u_int32_t offsethi, \
669				    size_t nbytes, struct sf_hdtr *hdtr, \
670				    off_t *sbytes, int flags); }
671394	AUE_NULL	UNIMPL	mac_syscall
672395	AUE_NULL	MNOPROTO	{ int getfsstat(struct statfs *buf, \
673				    long bufsize, int flags); }
674396	AUE_NULL	MNOPROTO	{ int statfs(char *path, \
675				    struct statfs *buf); }
676397	AUE_NULL	MNOPROTO	{ int fstatfs(int fd, struct statfs *buf); }
677398	AUE_NULL	MNOPROTO	{ int fhstatfs(const struct fhandle *u_fhp, \
678				    struct statfs *buf); }
679399	AUE_NULL	UNIMPL	nosys
680; XXX implement these?
681400	AUE_NULL	UNIMPL	ksem_close
682401	AUE_NULL	UNIMPL	ksem_post
683402	AUE_NULL	UNIMPL	ksem_wait
684403	AUE_NULL	UNIMPL	ksem_trywait
685404	AUE_NULL	UNIMPL	ksem_init
686405	AUE_NULL	UNIMPL	ksem_open
687406	AUE_NULL	UNIMPL	ksem_unlink
688407	AUE_NULL	UNIMPL	ksem_getvalue
689408	AUE_NULL	UNIMPL	ksem_destroy
690409	AUE_NULL	UNIMPL	__mac_get_pid
691410	AUE_NULL	UNIMPL	__mac_get_link
692411	AUE_NULL	UNIMPL	__mac_set_link
693412	AUE_NULL	UNIMPL	extattr_set_link
694413	AUE_NULL	UNIMPL	extattr_get_link
695414	AUE_NULL	UNIMPL	extattr_delete_link
696415	AUE_NULL	UNIMPL	__mac_execve
697416	AUE_NULL	MSTD { int freebsd32_sigaction(int sig, \
698				    struct sigaction32 *act, \
699				    struct sigaction32 *oact); }
700417	AUE_NULL	MSTD { int freebsd32_sigreturn( \
701		    const struct freebsd32_ucontext *sigcntxp); }
702418	AUE_NULL	UNIMPL	__xstat
703419	AUE_NULL	UNIMPL	__xfstat
704420	AUE_NULL	UNIMPL	__xlstat
705421	AUE_NULL	MSTD	{ int freebsd32_getcontext( \
706				    struct freebsd32_ucontext *ucp); }
707422	AUE_NULL	MSTD	{ int freebsd32_setcontext( \
708				    const struct freebsd32_ucontext *ucp); }
709423	AUE_NULL	MSTD	{ int freebsd32_swapcontext( \
710				    struct freebsd32_ucontext *oucp, \
711				    const struct freebsd32_ucontext *ucp); }
712424	AUE_NULL	UNIMPL	swapoff
713425	AUE_NULL	UNIMPL	__acl_get_link
714426	AUE_NULL	UNIMPL	__acl_set_link
715427	AUE_NULL	UNIMPL	__acl_delete_link
716428	AUE_NULL	UNIMPL	__acl_aclcheck_link
717; XXX implement
718429	AUE_NULL	UNIMPL	sigwait
719430	AUE_NULL	MNOPROTO { int thr_create(ucontext_t *ctx, long *id, \
720				    int flag s); }
721431	AUE_NULL	MNOPROTO { void thr_exit(long *state); }
722432	AUE_NULL	MNOPROTO { int thr_self(long *id); }
723433	AUE_NULL	MNOPROTO { int thr_kill(long id, int sig); }
724434	AUE_NULL	MNOPROTO { int _umtx_lock(struct umtx *umtx); }
725435	AUE_NULL	MNOPROTO { int _umtx_unlock(struct umtx *umtx); }
726436	AUE_NULL	MNOPROTO { int jail_attach(int jid); }
727437	AUE_NULL	UNIMPL	extattr_list_fd
728438	AUE_NULL	UNIMPL	extattr_list_file
729439	AUE_NULL	UNIMPL	extattr_list_link
730440	AUE_NULL	UNIMPL	kse_switchin
731441	AUE_NULL	UNIMPL	ksem_timedwait
732442	AUE_NULL	MNOPROTO { int thr_suspend( \
733				    const struct timespec *timeout); }
734443	AUE_NULL	MNOPROTO { int thr_wake(long id); }
735444	AUE_NULL	MNOPROTO { int kldunloadf(int fileid, int flags); }
736445	AUE_NULL	UNIMPL	audit
737446	AUE_NULL	UNIMPL	auditon
738447	AUE_NULL	UNIMPL	getauid
739448	AUE_NULL	UNIMPL	setauid
740449	AUE_NULL	UNIMPL	getaudit
741450	AUE_NULL	UNIMPL	setaudit
742451	AUE_NULL	UNIMPL	getaudit_addr
743452	AUE_NULL	UNIMPL	setaudit_addr
744453	AUE_NULL	UNIMPL	auditctl
745454	AUE_NULL	UNIMPL	_umtx_op
746463	AUE_NULL	MSTD	{ int abort2(const char *why, int nargs, void **args); }
747