syscalls.master revision 123750
1 $FreeBSD: head/sys/kern/syscalls.master 123750 2003-12-23 03:51:36Z peter $
2;	from: @(#)syscalls.master	8.2 (Berkeley) 1/13/94
3;
4; System call name/number master file.
5; Processed to created init_sysent.c, syscalls.c and syscall.h.
6
7; Columns: number [M]type nargs name alt{name,tag,rtyp}/comments
8;	number	system call number, must be in order
9;	type	one of [M]STD, [M]OBSOL, [M]UNIMPL, [M]COMPAT, [M]CPT_NOA,
10;		[M]LIBCOMPAT, [M]NODEF,  [M]NOARGS,  [M]NOPROTO,  [M]NOIMPL,
11;		[M]NOSTD, [M]COMPAT4
12;	name	psuedo-prototype of syscall routine
13;		If one of the following alts is different, then all appear:
14;	altname	name of system call if different
15;	alttag	name of args struct tag if different from [o]`name'"_args"
16;	altrtyp	return type if not int (bogus - syscalls always return int)
17;		for UNIMPL/OBSOL, name continues with comments
18
19; types:
20;	[M]	e.g. like MSTD -- means the system call is MP-safe.  If no
21;		M prefix is used, the syscall wrapper will obtain the Giant
22;		lock for the syscall.
23;	STD	always included
24;	COMPAT	included on COMPAT #ifdef
25;	COMPAT4	included on COMPAT4 #ifdef (FreeBSD 4 compat)
26;	LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h
27;	OBSOL	obsolete, not included in system, only specifies name
28;	UNIMPL	not implemented, placeholder only
29;	NOSTD	implemented but as a lkm that can be statically
30;			compiled in sysent entry will be filled with lkmsys
31;			so the SYSCALL_MODULE macro works
32;
33; Please copy any additions and changes to the following compatability tables:
34; sys/compat/freebsd32/syscalls.master
35
36; #ifdef's, etc. may be included, and are copied to the output files.
37
38#include <sys/param.h>
39#include <sys/sysent.h>
40#include <sys/sysproto.h>
41
42; Reserved/unimplemented system calls in the range 0-150 inclusive
43; are reserved for use in future Berkeley releases.
44; Additional system calls implemented in vendor and other
45; redistributions should be placed in the reserved range at the end
46; of the current calls.
47
480	STD	{ int nosys(void); } syscall nosys_args int
491	MSTD	{ void sys_exit(int rval); } exit sys_exit_args void
502	MSTD	{ int fork(void); }
513	MSTD	{ ssize_t read(int fd, void *buf, size_t nbyte); }
524	MSTD	{ ssize_t write(int fd, const void *buf, size_t nbyte); }
535	STD	{ int open(char *path, int flags, int mode); }
54; XXX should be		{ int open(const char *path, int flags, ...); }
55; but we're not ready for `const' or varargs.
56; XXX man page says `mode_t mode'.
576	MSTD	{ int close(int fd); }
587	MSTD	{ int wait4(int pid, int *status, int options, \
59			    struct rusage *rusage); } wait4 wait_args int
608	COMPAT	{ int creat(char *path, int mode); }
619	STD	{ int link(char *path, char *link); }
6210	STD	{ int unlink(char *path); }
6311	OBSOL	execv
6412	STD	{ int chdir(char *path); }
6513	STD	{ int fchdir(int fd); }
6614	STD	{ int mknod(char *path, int mode, int dev); }
6715	STD	{ int chmod(char *path, int mode); }
6816	STD	{ int chown(char *path, int uid, int gid); }
6917	MSTD	{ int obreak(char *nsize); } break obreak_args int
7018	COMPAT4	{ int getfsstat(struct ostatfs *buf, long bufsize, int flags); }
7119	COMPAT	{ long lseek(int fd, long offset, int whence); }
7220	MSTD	{ pid_t getpid(void); }
7321	STD	{ int mount(char *type, char *path, int flags, caddr_t data); }
74; XXX `path' should have type `const char *' but we're not ready for that.
7522	STD	{ int unmount(char *path, int flags); }
7623	MSTD	{ int setuid(uid_t uid); }
7724	MSTD	{ uid_t getuid(void); }
7825	MSTD	{ uid_t geteuid(void); }
7926	STD	{ int ptrace(int req, pid_t pid, caddr_t addr, int data); }
8027	MSTD	{ int recvmsg(int s, struct msghdr *msg, int flags); }
8128	MSTD	{ int sendmsg(int s, struct msghdr *msg, int flags); }
8229	MSTD	{ int recvfrom(int s, caddr_t buf, size_t len, int flags, \
83		    caddr_t from, int *fromlenaddr); }
8430	MSTD	{ int accept(int s, caddr_t name, int *anamelen); }
8531	MSTD	{ int getpeername(int fdes, caddr_t asa, int *alen); }
8632	MSTD	{ int getsockname(int fdes, caddr_t asa, int *alen); }
8733	STD	{ int access(char *path, int flags); }
8834	STD	{ int chflags(char *path, int flags); }
8935	STD	{ int fchflags(int fd, int flags); }
9036	STD	{ int sync(void); }
9137	MSTD	{ int kill(int pid, int signum); }
9238	COMPAT	{ int stat(char *path, struct ostat *ub); }
9339	MSTD	{ pid_t getppid(void); }
9440	COMPAT	{ int lstat(char *path, struct ostat *ub); }
9541	MSTD	{ int dup(u_int fd); }
9642	MSTD	{ int pipe(void); }
9743	MSTD	{ gid_t getegid(void); }
9844	MSTD	{ int profil(caddr_t samples, size_t size, size_t offset, \
99		    u_int scale); }
10045	MSTD	{ int ktrace(const char *fname, int ops, int facs, int pid); }
10146	MCOMPAT	{ int sigaction(int signum, struct osigaction *nsa, \
102		    struct osigaction *osa); }
10347	MSTD	{ gid_t getgid(void); }
10448	MCOMPAT	{ int sigprocmask(int how, osigset_t mask); }
105; XXX note nonstandard (bogus) calling convention - the libc stub passes
106; us the mask, not a pointer to it, and we return the old mask as the
107; (int) return value.
10849	MSTD	{ int getlogin(char *namebuf, u_int namelen); }
10950	MSTD	{ int setlogin(char *namebuf); }
11051	MSTD	{ int acct(char *path); }
11152	MCOMPAT	{ int sigpending(void); }
11253	MSTD	{ int sigaltstack(stack_t *ss, stack_t *oss); }
11354	MSTD	{ int ioctl(int fd, u_long com, caddr_t data); }
11455	MSTD	{ int reboot(int opt); }
11556	STD	{ int revoke(char *path); }
11657	STD	{ int symlink(char *path, char *link); }
11758	STD	{ int readlink(char *path, char *buf, int count); }
11859	MSTD	{ int execve(char *fname, char **argv, char **envv); }
11960	MSTD	{ int umask(int newmask); } umask umask_args int
12061	STD	{ int chroot(char *path); }
12162	MCOMPAT	{ int fstat(int fd, struct ostat *sb); }
12263	MCOMPAT	{ int getkerninfo(int op, char *where, size_t *size, \
123		    int arg); } getkerninfo getkerninfo_args int
12464	MCOMPAT	{ int getpagesize(void); } getpagesize getpagesize_args int
12565	MSTD	{ int msync(void *addr, size_t len, int flags); }
12666	MSTD	{ int vfork(void); }
12767	OBSOL	vread
12868	OBSOL	vwrite
12969	MSTD	{ int sbrk(int incr); }
13070	MSTD	{ int sstk(int incr); }
13171	MCOMPAT	{ int mmap(void *addr, int len, int prot, int flags, int fd, \
132		    long pos); }
13372	MSTD	{ int ovadvise(int anom); } vadvise ovadvise_args int
13473	MSTD	{ int munmap(void *addr, size_t len); }
13574	MSTD	{ int mprotect(const void *addr, size_t len, int prot); }
13675	MSTD	{ int madvise(void *addr, size_t len, int behav); }
13776	OBSOL	vhangup
13877	OBSOL	vlimit
13978	MSTD	{ int mincore(const void *addr, size_t len, char *vec); }
14079	MSTD	{ int getgroups(u_int gidsetsize, gid_t *gidset); }
14180	MSTD	{ int setgroups(u_int gidsetsize, gid_t *gidset); }
14281	MSTD	{ int getpgrp(void); }
14382	MSTD	{ int setpgid(int pid, int pgid); }
14483	MSTD	{ int setitimer(u_int which, struct itimerval *itv, \
145		    struct itimerval *oitv); }
14684	MCOMPAT	{ int wait(void); }
14785	MSTD	{ int swapon(char *name); }
14886	MSTD	{ int getitimer(u_int which, struct itimerval *itv); }
14987	MCOMPAT	{ int gethostname(char *hostname, u_int len); } \
150		    gethostname gethostname_args int
15188	MCOMPAT	{ int sethostname(char *hostname, u_int len); } \
152		    sethostname sethostname_args int
15389	MSTD	{ int getdtablesize(void); }
15490	MSTD	{ int dup2(u_int from, u_int to); }
15591	UNIMPL	getdopt
15692	MSTD	{ int fcntl(int fd, int cmd, long arg); }
157; XXX should be	{ int fcntl(int fd, int cmd, ...); }
158; but we're not ready for varargs.
15993	MSTD	{ int select(int nd, fd_set *in, fd_set *ou, \
160		    fd_set *ex, struct timeval *tv); }
16194	UNIMPL	setdopt
16295	STD	{ int fsync(int fd); }
16396	MSTD	{ int setpriority(int which, int who, int prio); }
16497	MSTD	{ int socket(int domain, int type, int protocol); }
16598	MSTD	{ int connect(int s, caddr_t name, int namelen); }
16699	MCPT_NOA { int accept(int s, caddr_t name, int *anamelen); } \
167		    accept accept_args int
168100	MSTD	{ int getpriority(int which, int who); }
169101	MCOMPAT	{ int send(int s, caddr_t buf, int len, int flags); }
170102	MCOMPAT	{ int recv(int s, caddr_t buf, int len, int flags); }
171103	MCOMPAT	{ int sigreturn(struct osigcontext *sigcntxp); }
172104	MSTD	{ int bind(int s, caddr_t name, int namelen); }
173105	MSTD	{ int setsockopt(int s, int level, int name, caddr_t val, \
174		    int valsize); }
175106	MSTD	{ int listen(int s, int backlog); }
176107	OBSOL	vtimes
177108	MCOMPAT	{ int sigvec(int signum, struct sigvec *nsv, \
178		    struct sigvec *osv); }
179109	MCOMPAT	{ int sigblock(int mask); }
180110	MCOMPAT	{ int sigsetmask(int mask); }
181111	MCOMPAT	{ int sigsuspend(osigset_t mask); }
182; XXX note nonstandard (bogus) calling convention - the libc stub passes
183; us the mask, not a pointer to it.
184112	MCOMPAT	{ int sigstack(struct sigstack *nss, struct sigstack *oss); }
185113	MCOMPAT	{ int recvmsg(int s, struct omsghdr *msg, int flags); }
186114	MCOMPAT	{ int sendmsg(int s, caddr_t msg, int flags); }
187115	OBSOL	vtrace
188116	MSTD	{ int gettimeofday(struct timeval *tp, struct timezone *tzp); }
189117	MSTD	{ int getrusage(int who, struct rusage *rusage); }
190118	MSTD	{ int getsockopt(int s, int level, int name, caddr_t val, \
191		    int *avalsize); }
192119	UNIMPL	resuba (BSD/OS 2.x)
193120	MSTD	{ int readv(int fd, struct iovec *iovp, u_int iovcnt); }
194121	MSTD	{ int writev(int fd, struct iovec *iovp, u_int iovcnt); }
195122	MSTD	{ int settimeofday(struct timeval *tv, struct timezone *tzp); }
196123	STD	{ int fchown(int fd, int uid, int gid); }
197124	STD	{ int fchmod(int fd, int mode); }
198125	MCPT_NOA { int recvfrom(int s, caddr_t buf, size_t len, int flags, \
199		    caddr_t from, int *fromlenaddr); } \
200		    recvfrom recvfrom_args int
201126	MSTD	{ int setreuid(int ruid, int euid); }
202127	MSTD	{ int setregid(int rgid, int egid); }
203128	STD	{ int rename(char *from, char *to); }
204129	COMPAT	{ int truncate(char *path, long length); }
205130	COMPAT	{ int ftruncate(int fd, long length); }
206131	MSTD	{ int flock(int fd, int how); }
207132	STD	{ int mkfifo(char *path, int mode); }
208133	MSTD	{ int sendto(int s, caddr_t buf, size_t len, int flags, \
209		    caddr_t to, int tolen); }
210134	MSTD	{ int shutdown(int s, int how); }
211135	MSTD	{ int socketpair(int domain, int type, int protocol, \
212		    int *rsv); }
213136	STD	{ int mkdir(char *path, int mode); }
214137	STD	{ int rmdir(char *path); }
215138	STD	{ int utimes(char *path, struct timeval *tptr); }
216139	OBSOL	4.2 sigreturn
217140	MSTD	{ int adjtime(struct timeval *delta, \
218		    struct timeval *olddelta); }
219141	MCOMPAT	{ int getpeername(int fdes, caddr_t asa, int *alen); }
220142	MCOMPAT	{ long gethostid(void); }
221143	MCOMPAT	{ int sethostid(long hostid); }
222144	MCOMPAT	{ int getrlimit(u_int which, struct orlimit *rlp); }
223145	MCOMPAT	{ int setrlimit(u_int which, struct orlimit *rlp); }
224146	MCOMPAT	{ int killpg(int pgid, int signum); }
225147	MSTD	{ int setsid(void); }
226148	STD	{ int quotactl(char *path, int cmd, int uid, caddr_t arg); }
227149	MCOMPAT	{ int quota(void); }
228150	MCPT_NOA { int getsockname(int fdec, caddr_t asa, int *alen); }\
229		    getsockname getsockname_args int
230
231; Syscalls 151-180 inclusive are reserved for vendor-specific
232; system calls.  (This includes various calls added for compatibity
233; with other Unix variants.)
234; Some of these calls are now supported by BSD...
235151	UNIMPL	sem_lock (BSD/OS 2.x)
236152	UNIMPL	sem_wakeup (BSD/OS 2.x)
237153	UNIMPL	asyncdaemon (BSD/OS 2.x)
238154	UNIMPL	nosys
239; 155 is initialized by the NFS code, if present.
240155	MNOIMPL	{ int nfssvc(int flag, caddr_t argp); }
241156	COMPAT	{ int getdirentries(int fd, char *buf, u_int count, \
242		    long *basep); }
243157	COMPAT4	{ int statfs(char *path, struct ostatfs *buf); }
244158	COMPAT4	{ int fstatfs(int fd, struct ostatfs *buf); }
245159	UNIMPL	nosys
246160	UNIMPL	nosys
247161	STD	{ int getfh(char *fname, struct fhandle *fhp); }
248162	MSTD	{ int getdomainname(char *domainname, int len); }
249163	MSTD	{ int setdomainname(char *domainname, int len); }
250164	MSTD	{ int uname(struct utsname *name); }
251165	MSTD	{ int sysarch(int op, char *parms); }
252166	MSTD	{ int rtprio(int function, pid_t pid, struct rtprio *rtp); }
253167	UNIMPL	nosys
254168	UNIMPL	nosys
255; 169 is initialized by the SYSVSEM code if present or loaded
256169	MNOSTD	{ int semsys(int which, int a2, int a3, int a4, int a5); }
257; 169 is initialized by the SYSVMSG code if present or loaded
258; XXX should be	{ int semsys(int which, ...); }
259170	MNOSTD	{ int msgsys(int which, int a2, int a3, int a4, int a5, \
260		    int a6); }
261; 169 is initialized by the SYSVSHM code if present or loaded
262; XXX should be	{ int msgsys(int which, ...); }
263171	MNOSTD	{ int shmsys(int which, int a2, int a3, int a4); }
264; XXX should be	{ int shmsys(int which, ...); }
265172	UNIMPL	nosys
266173	MSTD	{ ssize_t pread(int fd, void *buf, size_t nbyte, \
267		    int pad, off_t offset); }
268174	MSTD	{ ssize_t pwrite(int fd, const void *buf, \
269		    size_t nbyte, int pad, off_t offset); }
270175	UNIMPL	nosys
271176	MSTD	{ int ntp_adjtime(struct timex *tp); }
272177	UNIMPL	sfork (BSD/OS 2.x)
273178	UNIMPL	getdescriptor (BSD/OS 2.x)
274179	UNIMPL	setdescriptor (BSD/OS 2.x)
275180	UNIMPL	nosys
276
277; Syscalls 181-199 are used by/reserved for BSD
278181	MSTD	{ int setgid(gid_t gid); }
279182	MSTD	{ int setegid(gid_t egid); }
280183	MSTD	{ int seteuid(uid_t euid); }
281184	UNIMPL	lfs_bmapv
282185	UNIMPL	lfs_markv
283186	UNIMPL	lfs_segclean
284187	UNIMPL	lfs_segwait
285188	STD	{ int stat(char *path, struct stat *ub); }
286189	MSTD	{ int fstat(int fd, struct stat *sb); }
287190	STD	{ int lstat(char *path, struct stat *ub); }
288191	STD	{ int pathconf(char *path, int name); }
289192	MSTD	{ int fpathconf(int fd, int name); }
290193	UNIMPL	nosys
291194	MSTD	{ int getrlimit(u_int which, struct rlimit *rlp); } \
292		    getrlimit __getrlimit_args int
293195	MSTD	{ int setrlimit(u_int which, struct rlimit *rlp); } \
294		    setrlimit __setrlimit_args int
295196	STD	{ int getdirentries(int fd, char *buf, u_int count, \
296		    long *basep); }
297197	MSTD	{ caddr_t mmap(caddr_t addr, size_t len, int prot, \
298		    int flags, int fd, int pad, off_t pos); }
299198	STD	{ int nosys(void); } __syscall __syscall_args int
300199	STD	{ off_t lseek(int fd, int pad, off_t offset, int whence); }
301200	STD	{ int truncate(char *path, int pad, off_t length); }
302201	STD	{ int ftruncate(int fd, int pad, off_t length); }
303202	MSTD	{ int __sysctl(int *name, u_int namelen, void *old, \
304		    size_t *oldlenp, void *new, size_t newlen); } \
305		    __sysctl sysctl_args int
306203	MSTD	{ int mlock(const void *addr, size_t len); }
307204	MSTD	{ int munlock(const void *addr, size_t len); }
308205	STD	{ int undelete(char *path); }
309206	STD	{ int futimes(int fd, struct timeval *tptr); }
310207	MSTD	{ int getpgid(pid_t pid); }
311208	UNIMPL	newreboot (NetBSD)
312209	MSTD	{ int poll(struct pollfd *fds, u_int nfds, int timeout); }
313
314;
315; The following are reserved for loadable syscalls
316;
317210	NODEF	lkmnosys lkmnosys nosys_args int
318211	NODEF	lkmnosys lkmnosys nosys_args int
319212	NODEF	lkmnosys lkmnosys nosys_args int
320213	NODEF	lkmnosys lkmnosys nosys_args int
321214	NODEF	lkmnosys lkmnosys nosys_args int
322215	NODEF	lkmnosys lkmnosys nosys_args int
323216	NODEF	lkmnosys lkmnosys nosys_args int
324217	NODEF	lkmnosys lkmnosys nosys_args int
325218	NODEF	lkmnosys lkmnosys nosys_args int
326219	NODEF	lkmnosys lkmnosys nosys_args int
327
328;
329; The following were introduced with NetBSD/4.4Lite-2
330; They are initialized by thier respective modules/sysinits
331220	MNOSTD	{ int __semctl(int semid, int semnum, int cmd, \
332		    union semun *arg); }
333221	MNOSTD	{ int semget(key_t key, int nsems, int semflg); }
334222	MNOSTD	{ int semop(int semid, struct sembuf *sops, size_t nsops); }
335223	UNIMPL	semconfig
336224	MNOSTD	{ int msgctl(int msqid, int cmd, struct msqid_ds *buf); }
337225	MNOSTD	{ int msgget(key_t key, int msgflg); }
338226	MNOSTD	{ int msgsnd(int msqid, const void *msgp, size_t msgsz, \
339		    int msgflg); }
340227	MNOSTD	{ int msgrcv(int msqid, void *msgp, size_t msgsz, \
341		    long msgtyp, int msgflg); }
342228	MNOSTD	{ int shmat(int shmid, const void *shmaddr, int shmflg); }
343229	MNOSTD	{ int shmctl(int shmid, int cmd, struct shmid_ds *buf); }
344230	MNOSTD	{ int shmdt(const void *shmaddr); }
345231	MNOSTD	{ int shmget(key_t key, size_t size, int shmflg); }
346;
347232	MSTD	{ int clock_gettime(clockid_t clock_id, struct timespec *tp); }
348233	MSTD	{ int clock_settime(clockid_t clock_id, \
349		    const struct timespec *tp); }
350234	MSTD	{ int clock_getres(clockid_t clock_id, struct timespec *tp); }
351235	UNIMPL	timer_create
352236	UNIMPL	timer_delete
353237	UNIMPL	timer_settime
354238	UNIMPL	timer_gettime
355239	UNIMPL	timer_getoverrun
356240	MSTD	{ int nanosleep(const struct timespec *rqtp, \
357		    struct timespec *rmtp); }
358241	UNIMPL	nosys
359242	UNIMPL	nosys
360243	UNIMPL	nosys
361244	UNIMPL	nosys
362245	UNIMPL	nosys
363246	UNIMPL	nosys
364247	UNIMPL	nosys
365248	UNIMPL	nosys
366249	UNIMPL	nosys
367; syscall numbers initially used in OpenBSD
368250	MSTD	{ int minherit(void *addr, size_t len, int inherit); }
369251	MSTD	{ int rfork(int flags); }
370252	MSTD	{ int openbsd_poll(struct pollfd *fds, u_int nfds, \
371		    int timeout); }
372253	MSTD	{ int issetugid(void); }
373254	STD	{ int lchown(char *path, int uid, int gid); }
374255	UNIMPL	nosys
375256	UNIMPL	nosys
376257	UNIMPL	nosys
377258	UNIMPL	nosys
378259	UNIMPL	nosys
379260	UNIMPL	nosys
380261	UNIMPL	nosys
381262	UNIMPL	nosys
382263	UNIMPL	nosys
383264	UNIMPL	nosys
384265	UNIMPL	nosys
385266	UNIMPL	nosys
386267	UNIMPL	nosys
387268	UNIMPL	nosys
388269	UNIMPL	nosys
389270	UNIMPL	nosys
390271	UNIMPL	nosys
391272	STD	{ int getdents(int fd, char *buf, size_t count); }
392273	UNIMPL	nosys
393274	STD	{ int lchmod(char *path, mode_t mode); }
394275	NOPROTO { int lchown(char *path, uid_t uid, gid_t gid); } \
395		    netbsd_lchown lchown_args int
396276	STD	{ int lutimes(char *path, struct timeval *tptr); }
397277	MNOPROTO { int msync(void *addr, size_t len, int flags); } \
398		    netbsd_msync msync_args int
399278	STD	{ int nstat(char *path, struct nstat *ub); }
400279	MSTD	{ int nfstat(int fd, struct nstat *sb); }
401280	STD	{ int nlstat(char *path, struct nstat *ub); }
402281	UNIMPL	nosys
403282	UNIMPL	nosys
404283	UNIMPL	nosys
405284	UNIMPL	nosys
406285	UNIMPL	nosys
407286	UNIMPL	nosys
408287	UNIMPL	nosys
409288	UNIMPL	nosys
410289	UNIMPL	nosys
411290	UNIMPL	nosys
412291	UNIMPL	nosys
413292	UNIMPL	nosys
414293	UNIMPL	nosys
415294	UNIMPL	nosys
416295	UNIMPL	nosys
417296	UNIMPL	nosys
418; XXX 297 is 300 in NetBSD 
419297	COMPAT4	{ int fhstatfs(const struct fhandle *u_fhp, \
420		    struct ostatfs *buf); }
421298	STD	{ int fhopen(const struct fhandle *u_fhp, int flags); }
422299	STD	{ int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
423; syscall numbers for FreeBSD
424300	MSTD	{ int modnext(int modid); }
425301	MSTD	{ int modstat(int modid, struct module_stat* stat); }
426302	MSTD	{ int modfnext(int modid); }
427303	MSTD	{ int modfind(const char *name); }
428304	MSTD	{ int kldload(const char *file); }
429305	MSTD	{ int kldunload(int fileid); }
430306	MSTD	{ int kldfind(const char *file); }
431307	MSTD	{ int kldnext(int fileid); }
432308	MSTD	{ int kldstat(int fileid, struct kld_file_stat* stat); }
433309	MSTD	{ int kldfirstmod(int fileid); }
434310	MSTD	{ int getsid(pid_t pid); }
435311	MSTD	{ int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
436312	MSTD	{ int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
437313	OBSOL	signanosleep
438314     NOSTD	{ int aio_return(struct aiocb *aiocbp); }
439315     NOSTD	{ int aio_suspend(struct aiocb * const * aiocbp, int nent, \
440		    const struct timespec *timeout); }
441316     NOSTD	{ int aio_cancel(int fd, struct aiocb *aiocbp); }
442317     NOSTD	{ int aio_error(struct aiocb *aiocbp); }
443318     NOSTD	{ int aio_read(struct aiocb *aiocbp); }
444319     NOSTD	{ int aio_write(struct aiocb *aiocbp); }
445320     NOSTD	{ int lio_listio(int mode, struct aiocb * const *acb_list, \
446		    int nent, struct sigevent *sig); }
447321     MSTD	{ int yield(void); }
448322	OBSOL	thr_sleep
449323	OBSOL	thr_wakeup
450324     MSTD	{ int mlockall(int how); }
451325     MSTD	{ int munlockall(void); }
452326     STD	{ int __getcwd(u_char *buf, u_int buflen); }
453
454327     MSTD	{ int sched_setparam (pid_t pid, \
455		    const struct sched_param *param); }
456328     MSTD	{ int sched_getparam (pid_t pid, struct sched_param *param); }
457
458329     MSTD	{ int sched_setscheduler (pid_t pid, int policy, \
459		    const struct sched_param *param); }
460330     MSTD	{ int sched_getscheduler (pid_t pid); }
461
462331     MSTD	{ int sched_yield (void); }
463332     MSTD	{ int sched_get_priority_max (int policy); }
464333     MSTD	{ int sched_get_priority_min (int policy); }
465334     MSTD	{ int sched_rr_get_interval (pid_t pid, \
466		    struct timespec *interval); }
467335	MSTD	{ int utrace(const void *addr, size_t len); }
468336	MCOMPAT4 { int sendfile(int fd, int s, off_t offset, size_t nbytes, \
469		    struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
470337	STD	{ int kldsym(int fileid, int cmd, void *data); }
471338	MSTD	{ int jail(struct jail *jail); }
472339	UNIMPL	pioctl
473340	MSTD	{ int sigprocmask(int how, const sigset_t *set, \
474		    sigset_t *oset); }
475341	MSTD	{ int sigsuspend(const sigset_t *sigmask); }
476342	MCOMPAT4 { int sigaction(int sig, const struct sigaction *act, \
477		    struct sigaction *oact); }
478343	MSTD	{ int sigpending(sigset_t *set); }
479344	MCOMPAT4 { int sigreturn(const struct ucontext4 *sigcntxp); }
480345	MSTD	{ int sigtimedwait(const sigset_t *set, \
481		    siginfo_t *info, const struct timespec *timeout); }
482346	MSTD	{ int sigwaitinfo(const sigset_t *set, siginfo_t *info); }
483347	MSTD	{ int __acl_get_file(const char *path, \
484		    acl_type_t type, struct acl *aclp); }
485348	MSTD	{ int __acl_set_file(const char *path, \
486		    acl_type_t type, struct acl *aclp); }
487349	MSTD	{ int __acl_get_fd(int filedes, acl_type_t type, \
488		    struct acl *aclp); }
489350	MSTD	{ int __acl_set_fd(int filedes, acl_type_t type, \
490		    struct acl *aclp); }
491351	MSTD	{ int __acl_delete_file(const char *path, acl_type_t type); }
492352	MSTD	{ int __acl_delete_fd(int filedes, acl_type_t type); }
493353	MSTD	{ int __acl_aclcheck_file(const char *path, \
494		    acl_type_t type, struct acl *aclp); }
495354	MSTD	{ int __acl_aclcheck_fd(int filedes, acl_type_t type, \
496		    struct acl *aclp); }
497355	STD	{ int extattrctl(const char *path, int cmd, \
498		    const char *filename, int attrnamespace, \
499		    const char *attrname); }
500356	STD	{ int extattr_set_file(const char *path, \
501		    int attrnamespace, const char *attrname, \
502		    void *data, size_t nbytes); }
503357	STD	{ ssize_t extattr_get_file(const char *path, \
504		    int attrnamespace, const char *attrname, \
505		    void *data, size_t nbytes); }
506358	STD	{ int extattr_delete_file(const char *path, \
507		    int attrnamespace, const char *attrname); }
508359	NOSTD	{ int aio_waitcomplete(struct aiocb **aiocbp, \
509		    struct timespec *timeout); }
510360	MSTD	{ int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
511361	MSTD	{ int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
512362	MSTD	{ int kqueue(void); }
513363	MSTD	{ int kevent(int fd, \
514		    const struct kevent *changelist, int nchanges, \
515		    struct kevent *eventlist, int nevents, \
516		    const struct timespec *timeout); }
517364	UNIMPL	__cap_get_proc
518365	UNIMPL	__cap_set_proc
519366	UNIMPL	__cap_get_fd
520367	UNIMPL	__cap_get_file
521368	UNIMPL	__cap_set_fd
522369	UNIMPL	__cap_set_file
523370	NODEF	lkmressys lkmressys nosys_args int
524371	STD	{ int extattr_set_fd(int fd, int attrnamespace, \
525		    const char *attrname, void *data, \
526		    size_t nbytes); }
527372	STD	{ ssize_t extattr_get_fd(int fd, int attrnamespace, \
528		    const char *attrname, void *data, size_t nbytes); }
529373	STD	{ int extattr_delete_fd(int fd, int attrnamespace, \
530		    const char *attrname); }
531374	MSTD	{ int __setugid(int flag); }
532375	NOIMPL	{ int nfsclnt(int flag, caddr_t argp); }
533376	STD	{ int eaccess(char *path, int flags); }
534377	UNIMPL	afs_syscall
535378	STD	{ int nmount(struct iovec *iovp, unsigned int iovcnt, \
536		    int flags); }
537379	MSTD	{ int kse_exit(void); }
538380	MSTD	{ int kse_wakeup(struct kse_mailbox *mbx); }
539381	STD	{ int kse_create(struct kse_mailbox *mbx, \
540		    int newgroup); }
541382	MSTD	{ int kse_thr_interrupt(struct kse_thr_mailbox *tmbx, int cmd, \
542		    long data); }
543383	MSTD	{ int kse_release(struct timespec *timeout); }
544384	MSTD	{ int __mac_get_proc(struct mac *mac_p); }
545385	MSTD	{ int __mac_set_proc(struct mac *mac_p); }
546386	MSTD	{ int __mac_get_fd(int fd, struct mac *mac_p); }
547387	MSTD	{ int __mac_get_file(const char *path_p, \
548		    struct mac *mac_p); }
549388	MSTD	{ int __mac_set_fd(int fd, struct mac *mac_p); }
550389	MSTD	{ int __mac_set_file(const char *path_p, \
551		    struct mac *mac_p); }
552390	STD	{ int kenv(int what, const char *name, char *value, \
553		    int len); }
554391	STD	{ int lchflags(const char *path, int flags); }
555392	STD	{ int uuidgen(struct uuid *store, int count); }
556393	MSTD	{ int sendfile(int fd, int s, off_t offset, size_t nbytes, \
557		    struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
558394	MSTD	{ int mac_syscall(const char *policy, int call, \
559		    void *arg); }
560395	STD	{ int getfsstat(struct statfs *buf, long bufsize, \
561		    int flags); }
562396	STD	{ int statfs(char *path, struct statfs *buf); }
563397	STD	{ int fstatfs(int fd, struct statfs *buf); }
564398	STD	{ int fhstatfs(const struct fhandle *u_fhp, \
565		    struct statfs *buf); }
566399	UNIMPL	nosys
567400	MNOSTD	{ int ksem_close(semid_t id); }
568401	MNOSTD	{ int ksem_post(semid_t id); }
569402	MNOSTD	{ int ksem_wait(semid_t id); }
570403	MNOSTD	{ int ksem_trywait(semid_t id); }
571404	MNOSTD	{ int ksem_init(semid_t *idp, unsigned int value); }
572405	MNOSTD	{ int ksem_open(semid_t *idp, const char *name, \
573		    int oflag, mode_t mode, unsigned int value); }
574406	MNOSTD	{ int ksem_unlink(const char *name); }
575407	MNOSTD	{ int ksem_getvalue(semid_t id, int *val); }
576408	MNOSTD	{ int ksem_destroy(semid_t id); }
577409	MSTD	{ int __mac_get_pid(pid_t pid, struct mac *mac_p); }
578410	MSTD	{ int __mac_get_link(const char *path_p, \
579		    struct mac *mac_p); }
580411	MSTD	{ int __mac_set_link(const char *path_p, \
581		    struct mac *mac_p); }
582412	STD	{ int extattr_set_link(const char *path, \
583		    int attrnamespace, const char *attrname, \
584		    void *data, size_t nbytes); }
585413	STD	{ ssize_t extattr_get_link(const char *path, \
586		    int attrnamespace, const char *attrname, \
587		    void *data, size_t nbytes); }
588414	STD	{ int extattr_delete_link(const char *path, \
589		    int attrnamespace, const char *attrname); }
590415	MSTD	{ int __mac_execve(char *fname, char **argv, \
591		    char **envv, struct mac *mac_p); }
592416	MSTD	{ int sigaction(int sig, const struct sigaction *act, \
593		    struct sigaction *oact); }
594417	MSTD	{ int sigreturn(const struct __ucontext *sigcntxp); }
595418	UNIMPL	__xstat
596419	UNIMPL	__xfstat
597420	UNIMPL	__xlstat
598421	MSTD	{ int getcontext(struct __ucontext *ucp); }
599422	MSTD	{ int setcontext(const struct __ucontext *ucp); }
600423	MSTD	{ int swapcontext(struct __ucontext *oucp, \
601		    const struct __ucontext *ucp); }
602424	MSTD	{ int swapoff(const char *name); }
603425	MSTD	{ int __acl_get_link(const char *path, \
604		    acl_type_t type, struct acl *aclp); }
605426	MSTD	{ int __acl_set_link(const char *path, \
606		    acl_type_t type, struct acl *aclp); }
607427	MSTD	{ int __acl_delete_link(const char *path, \
608		    acl_type_t type); }
609428	MSTD	{ int __acl_aclcheck_link(const char *path, \
610		    acl_type_t type, struct acl *aclp); }
611429	MSTD	{ int sigwait(const sigset_t *set, int *sig); }
612430	MSTD	{ int thr_create(ucontext_t *ctx, thr_id_t *id, int flags); }
613431	MSTD	{ void thr_exit(void); }
614432	MSTD	{ int thr_self(thr_id_t *id); }
615433	MSTD	{ int thr_kill(thr_id_t id, int sig); }
616434	MSTD	{ int _umtx_lock(struct umtx *umtx); }
617435	MSTD	{ int _umtx_unlock(struct umtx *umtx); }
618436	MSTD	{ int jail_attach(int jid); }
619437	STD	{ ssize_t extattr_list_fd(int fd, int attrnamespace, \
620		    void *data, size_t nbytes); }
621438	STD	{ ssize_t extattr_list_file(const char *path, \
622		    int attrnamespace, void *data, size_t nbytes); }
623439	STD	{ ssize_t extattr_list_link(const char *path, \
624		    int attrnamespace, void *data, size_t nbytes); }
625440	MSTD	{ int kse_switchin(const struct __mcontext *mcp, \
626		    long val, long *loc); }
627; Please copy any additions and changes to the following compatability tables:
628; sys/compat/freebsd32/syscalls.master
629