xref: /dragonfly/sys/kern/syscalls.master (revision 2b3f93ea)
1; @(#)syscalls.master	8.2 (Berkeley) 1/13/94
2; $FreeBSD: src/sys/kern/syscalls.master,v 1.72.2.10 2002/07/12 08:22:46 alfred Exp $
3;
4; System call name/number master file.
5; Processed to create kern/init_sysent.c, kern/syscalls.c, sys/syscall.h,
6;                     sys/syscall.mk, and sys/sysmsg.h
7
8; Columns: number type nargs namespc name alt{name,tag,rtyp}/comments
9;	number	system call number, must be in order
10;	type	one of STD, OBSOL, UNIMPL, NODEF, NOARGS, NOPROTO, NOIMPL
11;	name	pseudo-prototype of syscall routine
12;		If one of the following alts is different, then all appear:
13;	altname	name of system call if different
14;	alttag	name of args struct tag if different from [o]`name'"_args"
15;	altrtyp	return type if not int (bogus - syscalls always return int)
16;		for UNIMPL/OBSOL, name continues with comments
17;
18;	NOTE: All system calls are now called without the MP lock.  Those
19;	      that need the MP lock will acquire it.
20
21; types:
22;	STD	always included
23;	OBSOL	obsolete, not included in system, only specifies name
24;	UNIMPL	not implemented, placeholder only
25
26; #ifdef's, etc. may be included, and are copied to the output files.
27
28#include <sys/param.h>
29#include <sys/sysent.h>
30#include <sys/sysmsg.h>
31#include <sys/statvfs.h>
32
33; Reserved/unimplemented system calls in the range 0-150 inclusive
34; are reserved for use in future Berkeley releases.
35; Additional system calls implemented in vendor and other
36; redistributions should be placed in the reserved range at the end
37; of the current calls.
38
390	NOARGS	{ int xsyscall(void); } syscall nosys_args int
401	STD	{ void exit(int rval); }
412	STD	{ int fork(void); }
423	STD	{ ssize_t read(int fd, void *buf, size_t nbyte); }
434	STD	{ ssize_t write(int fd, const void *buf, size_t nbyte); }
445	STD	{ int open(char *path, int flags, int mode); }
45; XXX should be		{ int open(const char *path, int flags, ...); }
46; but we're not ready for `const' or varargs.
47; XXX man page says `mode_t mode'.
486	STD	{ int close(int fd); }
497	STD	{ int wait4(int pid, int *status, int options, \
50			    struct rusage *rusage); } wait4 wait_args int
518	STD	{ int nosys(void); } __nosys nosys_args int
529	STD	{ int link(char *path, char *link); }
5310	STD	{ int unlink(char *path); }
5411	OBSOL	execv
5512	STD	{ int chdir(char *path); }
5613	STD	{ int fchdir(int fd); }
5714	STD	{ int mknod(char *path, int mode, int dev); }
5815	STD	{ int chmod(char *path, int mode); }
5916	STD	{ int chown(char *path, int uid, int gid); }
6017	STD	{ int obreak(char *nsize); } break obreak_args int
6118	STD	{ int getfsstat(struct statfs *buf, long bufsize, \
62			    int flags); }
6319	OBSOL	old lseek
6420	STD	{ pid_t getpid(void); }
6521	STD	{ int mount(char *type, char *path, int flags, \
66			    caddr_t data); }
67; XXX `path' should have type `const char *' but we're not ready for that.
6822	STD	{ int unmount(char *path, int flags); }
6923	STD	{ int setuid(uid_t uid); }
7024	STD	{ uid_t getuid(void); }
7125	STD	{ uid_t geteuid(void); }
7226	STD	{ int ptrace(int req, pid_t pid, caddr_t addr, \
73			    int data); }
7427	STD	{ int recvmsg(int s, struct msghdr *msg, int flags); }
7528	STD	{ int sendmsg(int s, caddr_t msg, int flags); }
7629	STD	{ int recvfrom(int s, caddr_t buf, size_t len, \
77			    int flags, caddr_t from, int *fromlenaddr); }
7830	STD	{ int accept(int s, caddr_t name, int *anamelen); }
7931	STD	{ int getpeername(int fdes, caddr_t asa, int *alen); }
8032	STD	{ int getsockname(int fdes, caddr_t asa, int *alen); }
8133	STD	{ int access(char *path, int flags); }
8234	STD	{ int chflags(const char *path, u_long flags); }
8335	STD	{ int fchflags(int fd, u_long flags); }
8436	STD	{ int sync(void); }
8537	STD	{ int kill(int pid, int signum); }
8638	OBSOL	old stat
8739	STD	{ pid_t getppid(void); }
8840	OBSOL	old lstat
8941	STD	{ int dup(int fd); }
9042	STD	{ int pipe(void); }
9143	STD	{ gid_t getegid(void); }
9244	STD	{ int profil(caddr_t samples, size_t size, \
93			    u_long offset, u_int scale); }
9445	STD	{ int ktrace(const char *fname, int ops, int facs, \
95			    int pid); }
9646	OBSOL	freebsd3_sigaction
9747	STD	{ gid_t getgid(void); }
9848	OBSOL	freebsd3_sigprocmask
9949	STD	{ int getlogin(char *namebuf, size_t namelen); }
10050	STD	{ int setlogin(char *namebuf); }
10151	STD	{ int acct(char *path); }
10252	OBSOL	freebsd3_sigpending
10353	STD	{ int sigaltstack(stack_t *ss, stack_t *oss); }
10454	STD	{ int ioctl(int fd, u_long com, caddr_t data); }
10555	STD	{ int reboot(int opt); }
10656	STD	{ int revoke(char *path); }
10757	STD	{ int symlink(char *path, char *link); }
10858	STD	{ int readlink(char *path, char *buf, int count); }
10959	STD	{ int execve(char *fname, char **argv, char **envv); }
11060	STD	{ int umask(int newmask); } umask umask_args int
11161	STD	{ int chroot(char *path); }
11262	OBSOL	old fstat
11363	OBSOL	getkerninfo
11464	OBSOL	getpagesize
11565	STD	{ int msync(void *addr, size_t len, int flags); }
11666	STD	{ pid_t vfork(void); }
11767	OBSOL	vread
11868	OBSOL	vwrite
11969	STD	{ caddr_t sbrk(size_t incr); }
12070	STD	{ int sstk(size_t incr); }
12171	OBSOL	old mmap
12272	OBSOL	vadvise
12373	STD	{ int munmap(void *addr, size_t len); }
12474	STD	{ int mprotect(void *addr, size_t len, int prot); }
12575	STD	{ int madvise(void *addr, size_t len, int behav); }
12676	OBSOL	vhangup
12777	OBSOL	vlimit
12878	STD	{ int mincore(const void *addr, size_t len, \
129			    char *vec); }
13079	STD	{ int getgroups(u_int gidsetsize, gid_t *gidset); }
13180	STD	{ int setgroups(u_int gidsetsize, gid_t *gidset); }
13281	STD	{ int getpgrp(void); }
13382	STD	{ int setpgid(int pid, int pgid); }
13483	STD	{ int setitimer(u_int which, struct itimerval *itv, \
135			    struct itimerval *oitv); }
13684	OBSOL	wait
13785	STD	{ int swapon(char *name); }
13886	STD	{ int getitimer(u_int which, struct itimerval *itv); }
13987	OBSOL	gethostname
14088	OBSOL	sethostname
14189	STD	{ int getdtablesize(void); }
14290	STD	{ int dup2(int from, int to); }
14391	UNIMPL	getdopt
14492	STD	{ int fcntl(int fd, int cmd, long arg); }
145; XXX should be		{ int fcntl(int fd, int cmd, ...); }
146; but we're not ready for varargs.
147; XXX man page says `int arg' too.
14893	STD	{ int select(int nd, fd_set *in, fd_set *ou, \
149			    fd_set *ex, struct timeval *tv); }
15094	UNIMPL	setdopt
15195	STD	{ int fsync(int fd); }
15296	STD	{ int setpriority(int which, int who, int prio); }
15397	STD	{ int socket(int domain, int type, int protocol); }
15498	STD	{ int connect(int s, caddr_t name, int namelen); }
15599	OBSOL	old accept
156100	STD	{ int getpriority(int which, int who); }
157101	OBSOL	send
158102	OBSOL	recv
159103	OBSOL	freebsd3_sigreturn
160104	STD	{ int bind(int s, caddr_t name, int namelen); }
161105	STD	{ int setsockopt(int s, int level, int name, \
162			    caddr_t val, int valsize); }
163106	STD	{ int listen(int s, int backlog); }
164107	OBSOL	vtimes
165108	OBSOL	4.3 sigvec
166109	OBSOL	4.3 sigblock
167110	OBSOL	4.3 sigsetmask
168111	OBSOL	freebsd3_sigsuspend
169112	OBSOL	sigstack
170113	OBSOL	old recvmsg
171114	OBSOL	old sendmsg
172115	OBSOL	vtrace
173116	STD	{ int gettimeofday(struct timeval *tp, \
174			    struct timezone *tzp); }
175117	STD	{ int getrusage(int who, struct rusage *rusage); }
176118	STD	{ int getsockopt(int s, int level, int name, \
177			    caddr_t val, int *avalsize); }
178119	UNIMPL	resuba (BSD/OS 2.x)
179120	STD	{ int readv(int fd, struct iovec *iovp, u_int iovcnt); }
180121	STD	{ int writev(int fd, struct iovec *iovp, \
181			    u_int iovcnt); }
182122	STD	{ int settimeofday(struct timeval *tv, \
183			    struct timezone *tzp); }
184123	STD	{ int fchown(int fd, int uid, int gid); }
185124	STD	{ int fchmod(int fd, int mode); }
186125	OBSOL	old recvfrom
187126	STD	{ int setreuid(int ruid, int euid); }
188127	STD	{ int setregid(int rgid, int egid); }
189128	STD	{ int rename(char *from, char *to); }
190129	OBSOL	old truncate
191130	OBSOL	old ftruncate
192131	STD	{ int flock(int fd, int how); }
193132	STD	{ int mkfifo(char *path, int mode); }
194133	STD	{ int sendto(int s, caddr_t buf, size_t len, \
195			    int flags, caddr_t to, int tolen); }
196134	STD	{ int shutdown(int s, int how); }
197135	STD	{ int socketpair(int domain, int type, int protocol, \
198			    int *rsv); }
199136	STD	{ int mkdir(char *path, int mode); }
200137	STD	{ int rmdir(char *path); }
201138	STD	{ int utimes(char *path, struct timeval *tptr); }
202139	OBSOL	4.2 sigreturn
203140	STD	{ int adjtime(struct timeval *delta, \
204			    struct timeval *olddelta); }
205141	OBSOL	old getpeername
206142	OBSOL	4.3 gethostid
207143	OBSOL	4.3 sethostid
208144	OBSOL	old getrlimit
209145	OBSOL	old setrlimit
210146	OBSOL	4.3 killpg
211147	STD	{ int setsid(void); }
212148	STD	{ int quotactl(char *path, int cmd, int uid, \
213			    caddr_t arg); }
214149	OBSOL	quota
215150	OBSOL	old getsockname
216
217; Syscalls 151-180 inclusive are reserved for vendor-specific
218; system calls.  (This includes various calls added for compatibity
219; with other Unix variants.)
220; Some of these calls are now supported by BSD...
221151	UNIMPL	sem_lock (BSD/OS 2.x)
222152	UNIMPL	sem_wakeup (BSD/OS 2.x)
223153	UNIMPL	asyncdaemon (BSD/OS 2.x)
224154	UNIMPL	nosys
225; 155 is initialized by the NFS code, if present.
226155	NOIMPL	{ int nfssvc(int flag, caddr_t argp); }
227156	OBSOL	old getdirentries
228157	STD	{ int statfs(char *path, struct statfs *buf); }
229158	STD	{ int fstatfs(int fd, struct statfs *buf); }
230159	UNIMPL	nosys
231160	UNIMPL	nosys
232; 161 is initialized by the NFS code, if present.
233161	STD	{ int getfh(char *fname, struct fhandle *fhp); }
234162	OBSOL	getdomainname
235163	OBSOL	setdomainname
236164	OBSOL	uname
237165	STD	{ int sysarch(int op, char *parms); }
238166	STD	{ int rtprio(int function, pid_t pid, \
239			    struct rtprio *rtp); }
240167	UNIMPL	nosys
241168	UNIMPL	nosys
242169	OBSOL	semsys
243170	OBSOL	msgsys
244171	OBSOL	shmsys
245172	UNIMPL	nosys
246173	STD	{ ssize_t extpread(int fd, void *buf, \
247			    size_t nbyte, int flags, off_t offset); }
248174	STD	{ ssize_t extpwrite(int fd, const void *buf, \
249			    size_t nbyte, int flags, off_t offset); }
250175	UNIMPL	nosys
251176	STD	{ int ntp_adjtime(struct timex *tp); }
252177	UNIMPL	sfork (BSD/OS 2.x)
253178	UNIMPL	getdescriptor (BSD/OS 2.x)
254179	UNIMPL	setdescriptor (BSD/OS 2.x)
255180	UNIMPL	nosys
256
257; Syscalls 181-199 are used by/reserved for BSD
258181	STD	{ int setgid(gid_t gid); }
259182	STD	{ int setegid(gid_t egid); }
260183	STD	{ int seteuid(uid_t euid); }
261184	UNIMPL	lfs_bmapv
262185	UNIMPL	lfs_markv
263186	UNIMPL	lfs_segclean
264187	UNIMPL	lfs_segwait
265188	UNIMPL	nosys
266189	UNIMPL	nosys
267190	UNIMPL	nosys
268191	STD	{ int pathconf(char *path, int name); }
269192	STD	{ int fpathconf(int fd, int name); }
270193	UNIMPL	nosys
271194	STD	{ int getrlimit(u_int which, \
272			    struct rlimit *rlp); } \
273			    getrlimit __getrlimit_args int
274195	STD	{ int setrlimit(u_int which, \
275			    struct rlimit *rlp); } \
276			    setrlimit __setrlimit_args int
277196	UNIMPL	nosys
278197	STD	{ caddr_t mmap(caddr_t addr, size_t len, int prot, \
279			    int flags, int fd, int pad, off_t pos); }
280198	NOPROTO	{ int xsyscall(void); } __syscall nosys_args int
281199	STD	{ off_t lseek(int fd, int pad, off_t offset, \
282			    int whence); }
283200	STD	{ int truncate(char *path, int pad, off_t length); }
284201	STD	{ int ftruncate(int fd, int pad, off_t length); }
285202	STD	{ int __sysctl(int *name, u_int namelen, void *old, \
286			    size_t *oldlenp, void *new, size_t newlen); } \
287			    __sysctl sysctl_args int
288203	STD	{ int mlock(const void *addr, size_t len); }
289204	STD	{ int munlock(const void *addr, size_t len); }
290205	STD	{ int undelete(char *path); }
291206	STD	{ int futimes(int fd, struct timeval *tptr); }
292207	STD	{ int getpgid(pid_t pid); }
293208	UNIMPL	newreboot (NetBSD)
294209	STD	{ int poll(struct pollfd *fds, u_int nfds, \
295			    int timeout); }
296
297;
298; The following are reserved for loadable syscalls
299;
300; 210 is used by the Checkpoint Module
301210	NODEF	lkmnosys lkmnosys nosys_args int
302211	NODEF	lkmnosys lkmnosys nosys_args int
303212	NODEF	lkmnosys lkmnosys nosys_args int
304213	NODEF	lkmnosys lkmnosys nosys_args int
305214	NODEF	lkmnosys lkmnosys nosys_args int
306215	NODEF	lkmnosys lkmnosys nosys_args int
307216	NODEF	lkmnosys lkmnosys nosys_args int
308217	NODEF	lkmnosys lkmnosys nosys_args int
309218	NODEF	lkmnosys lkmnosys nosys_args int
310219	NODEF	lkmnosys lkmnosys nosys_args int
311
312;
313; The following were introduced with NetBSD/4.4Lite-2
314;
315220	STD	{ int __semctl(int semid, int semnum, int cmd, \
316			    union semun *arg); }
317221	STD	{ int semget(key_t key, int nsems, int semflg); }
318222	STD	{ int semop(int semid, struct sembuf *sops, \
319			    u_int nsops); }
320223	UNIMPL	semconfig
321224	STD	{ int msgctl(int msqid, int cmd, \
322			    struct msqid_ds *buf); }
323225	STD	{ int msgget(key_t key, int msgflg); }
324226	STD	{ int msgsnd(int msqid, const void *msgp, size_t msgsz, \
325			    int msgflg); }
326227	STD	{ int msgrcv(int msqid, void *msgp, size_t msgsz, \
327			    long msgtyp, int msgflg); }
328228	STD	{ caddr_t shmat(int shmid, const void *shmaddr, \
329			    int shmflg); }
330229	STD	{ int shmctl(int shmid, int cmd, \
331			    struct shmid_ds *buf); }
332230	STD	{ int shmdt(const void *shmaddr); }
333231	STD	{ int shmget(key_t key, size_t size, int shmflg); }
334;
335232	STD	{ int clock_gettime(clockid_t clock_id, \
336			    struct timespec *tp); }
337233	STD	{ int clock_settime(clockid_t clock_id, \
338			    const struct timespec *tp); }
339234	STD	{ int clock_getres(clockid_t clock_id, \
340			    struct timespec *tp); }
341235	UNIMPL	timer_create
342236	UNIMPL	timer_delete
343237	UNIMPL	timer_settime
344238	UNIMPL	timer_gettime
345239	UNIMPL	timer_getoverrun
346240	STD	{ int nanosleep(const struct timespec *rqtp, \
347			    struct timespec *rmtp); }
348241	STD	{ int clock_nanosleep(clockid_t clock_id, int flags, \
349			    const struct timespec *rqtp, \
350			    struct timespec *rmtp); }
351242	UNIMPL	nosys
352243	UNIMPL	nosys
353244	UNIMPL	nosys
354245	UNIMPL	nosys
355246	UNIMPL	nosys
356247	UNIMPL	nosys
357248	UNIMPL	nosys
358249	UNIMPL	nosys
359; syscall numbers initially used in OpenBSD
360250	STD	{ int minherit(void *addr, size_t len, int inherit); }
361251	STD	{ int rfork(int flags); }
362252	STD	{ int openbsd_poll(struct pollfd *fds, u_int nfds, \
363			    int timeout); }
364253	STD	{ int issetugid(void); }
365254	STD	{ int lchown(char *path, int uid, int gid); }
366255	UNIMPL	nosys
367256	UNIMPL	nosys
368257	UNIMPL	nosys
369258	UNIMPL	nosys
370259	UNIMPL	nosys
371260	UNIMPL	nosys
372261	UNIMPL	nosys
373262	UNIMPL	nosys
374263	UNIMPL	nosys
375264	UNIMPL	nosys
376265	UNIMPL	nosys
377266	UNIMPL	nosys
378267	UNIMPL	nosys
379268	UNIMPL	nosys
380269	UNIMPL	nosys
381270	UNIMPL	nosys
382271	UNIMPL	nosys
383272	UNIMPL	nosys
384273	UNIMPL	nosys
385274	STD	{ int lchmod(char *path, mode_t mode); }
386275	NOPROTO { int lchown(char *path, uid_t uid, gid_t gid); } netbsd_lchown lchown_args int
387276	STD	{ int lutimes(char *path, struct timeval *tptr); }
388277	NOPROTO	{ int msync(void *addr, size_t len, int flags); } netbsd_msync msync_args int
389278	OBSOL	nstat
390279	OBSOL	nfstat
391280	OBSOL	nlstat
392281	UNIMPL	nosys
393282	UNIMPL	nosys
394283	UNIMPL	nosys
395284	UNIMPL	nosys
396285	UNIMPL	nosys
397286	UNIMPL	nosys
398287	UNIMPL	nosys
399288	UNIMPL	nosys
400; 289 and 290 from NetBSD (OpenBSD: 267 and 268)
401289	STD	{ ssize_t extpreadv(int fd, const struct iovec *iovp, \
402				  int iovcnt, int flags, off_t offset); }
403290	STD	{ ssize_t extpwritev(int fd, const struct iovec *iovp, \
404				  int iovcnt, int flags, off_t offset); }
405291	UNIMPL	nosys
406292	UNIMPL	nosys
407293	UNIMPL	nosys
408294	UNIMPL	nosys
409295	UNIMPL	nosys
410296	UNIMPL	nosys
411; XXX 297 is 300 in NetBSD
412297	STD	{ int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
413298	STD	{ int fhopen(const struct fhandle *u_fhp, int flags); }
414299	UNIMPL	nosys
415; syscall numbers for FreeBSD
416300	STD	{ int modnext(int modid); }
417301	STD	{ int modstat(int modid, struct module_stat* stat); }
418302	STD	{ int modfnext(int modid); }
419303	STD	{ int modfind(const char *name); }
420304	STD	{ int kldload(const char *file); }
421305	STD	{ int kldunload(int fileid); }
422306	STD	{ int kldfind(const char *file); }
423307	STD	{ int kldnext(int fileid); }
424308	STD	{ int kldstat(int fileid, struct kld_file_stat* stat); }
425309	STD	{ int kldfirstmod(int fileid); }
426310	STD	{ int getsid(pid_t pid); }
427311	STD	{ int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
428312	STD	{ int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
429313	OBSOL	signanosleep
430314	STD	{ int aio_return(struct aiocb *aiocbp); }
431315	STD	{ int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
432316	STD	{ int aio_cancel(int fd, struct aiocb *aiocbp); }
433317	STD	{ int aio_error(struct aiocb *aiocbp); }
434318	STD	{ int aio_read(struct aiocb *aiocbp); }
435319	STD	{ int aio_write(struct aiocb *aiocbp); }
436320	STD	{ int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
437321	STD	{ int yield(void); }
438322	UNIMPL	thr_sleep
439323	UNIMPL	thr_wakeup
440324	STD	{ int mlockall(int how); }
441325	STD	{ int munlockall(void); }
442326	STD	{ int __getcwd(u_char *buf, u_int buflen); }
443
444327	STD	{ int sched_setparam (pid_t pid, const struct sched_param *param); }
445328	STD	{ int sched_getparam (pid_t pid, struct sched_param *param); }
446
447329	STD	{ int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
448330	STD	{ int sched_getscheduler (pid_t pid); }
449
450331	STD	{ int sched_yield (void); }
451332	STD	{ int sched_get_priority_max (int policy); }
452333	STD	{ int sched_get_priority_min (int policy); }
453334	STD	{ int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
454335	STD	{ int utrace(const void *addr, size_t len); }
455336	OBSOL	freebsd4_sendfile
456337	STD	{ int kldsym(int fileid, int cmd, void *data); }
457338	STD	{ int jail(struct jail *jail); }
458339	UNIMPL	pioctl
459340	STD	{ int sigprocmask(int how, const sigset_t *set, \
460			    sigset_t *oset); }
461341	STD	{ int sigsuspend(const sigset_t *sigmask); }
462342	STD	{ int sigaction(int sig, const struct sigaction *act, \
463			    struct sigaction *oact); }
464343	STD	{ int sigpending(sigset_t *set); }
465344	STD	{ int sigreturn(ucontext_t *sigcntxp); }
466345	STD	{ int sigtimedwait(const sigset_t *set,\
467			     siginfo_t *info, const struct timespec *timeout); }
468346	STD	{ int sigwaitinfo(const sigset_t *set,\
469			     siginfo_t *info); }
470347	STD	{ int __acl_get_file(const char *path, \
471			    acl_type_t type, struct acl *aclp); }
472348	STD	{ int __acl_set_file(const char *path, \
473			    acl_type_t type, struct acl *aclp); }
474349	STD	{ int __acl_get_fd(int filedes, acl_type_t type, \
475			    struct acl *aclp); }
476350	STD	{ int __acl_set_fd(int filedes, acl_type_t type, \
477			    struct acl *aclp); }
478351	STD	{ int __acl_delete_file(const char *path, \
479			    acl_type_t type); }
480352	STD	{ int __acl_delete_fd(int filedes, acl_type_t type); }
481353	STD	{ int __acl_aclcheck_file(const char *path, \
482			    acl_type_t type, struct acl *aclp); }
483354	STD	{ int __acl_aclcheck_fd(int filedes, acl_type_t type, \
484			    struct acl *aclp); }
485355	STD	{ int extattrctl(const char *path, int cmd, \
486			    const char *filename, int attrnamespace, \
487			    const char *attrname); }
488356	STD	{ int extattr_set_file(const char *path, \
489			    int attrnamespace, const char *attrname, \
490			    void *data, size_t nbytes); }
491357	STD	{ int extattr_get_file(const char *path, \
492			    int attrnamespace, const char *attrname, \
493			    void *data, size_t nbytes); }
494358	STD	{ int extattr_delete_file(const char *path, \
495			    int attrnamespace, const char *attrname); }
496359	STD	{ int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
497360	STD	{ int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
498361	STD	{ int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
499362	STD	{ int kqueue(void); }
500363	STD	{ int kevent(int fd, \
501			    const struct kevent *changelist, int nchanges, \
502			    struct kevent *eventlist, int nevents, \
503			    const struct timespec *timeout); }
504364	UNIMPL	sctp_peeloff
505; 365-392 used by FreeBSD-current
506365	UNIMPL	nosys
507366	UNIMPL	nosys
508367	UNIMPL	nosys
509368	UNIMPL	nosys
510369	UNIMPL	nosys
511370	UNIMPL	nosys
512371	UNIMPL	nosys
513372	UNIMPL	nosys
514373	UNIMPL	nosys
515374	UNIMPL	nosys
516375	UNIMPL	nosys
517376	UNIMPL	nosys
518377	UNIMPL	nosys
519378	UNIMPL	nosys
520379	UNIMPL	nosys
521380	UNIMPL	nosys
522381	UNIMPL	nosys
523382	UNIMPL	nosys
524383	UNIMPL	nosys
525384	UNIMPL	nosys
526385	UNIMPL	nosys
527386	UNIMPL	nosys
528387	UNIMPL	nosys
529388	UNIMPL	nosys
530389	UNIMPL	nosys
531390	STD	{ int kenv(int what, const char *name, char *value, int len); }
532391	STD	{ int lchflags(const char *path, u_long flags); }
533392	STD	{ int uuidgen(struct uuid *store, int count); }
534393	STD	{ int sendfile(int fd, int s, off_t offset, size_t nbytes, \
535				struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
536; 394-439 used by FreeBSD-current
537394	UNIMPL	nosys
538395	UNIMPL	nosys
539396	UNIMPL	nosys
540397	UNIMPL	nosys
541398	UNIMPL	nosys
542399	UNIMPL	nosys
543400	UNIMPL	nosys
544401	UNIMPL	nosys
545402	UNIMPL	nosys
546403	UNIMPL	nosys
547404	UNIMPL	nosys
548405	UNIMPL	nosys
549406	UNIMPL	nosys
550407	UNIMPL	nosys
551408	UNIMPL	nosys
552409	UNIMPL	nosys
553410	UNIMPL	nosys
554411	UNIMPL	nosys
555412	UNIMPL	nosys
556413	UNIMPL	nosys
557414	UNIMPL	nosys
558415	UNIMPL	nosys
559416	UNIMPL	nosys
560417	UNIMPL	nosys
561418	UNIMPL	nosys
562419	UNIMPL	nosys
563420	UNIMPL	nosys
564421	UNIMPL	nosys
565422	UNIMPL	nosys
566423	UNIMPL	nosys
567424	UNIMPL	nosys
568425	UNIMPL	nosys
569426	UNIMPL	nosys
570427	UNIMPL	nosys
571428	UNIMPL	nosys
572429	UNIMPL	nosys
573430	UNIMPL	nosys
574431	UNIMPL	nosys
575432	UNIMPL	nosys
576433	UNIMPL	nosys
577434	UNIMPL	nosys
578435	UNIMPL	nosys
579436	UNIMPL	nosys
580437	UNIMPL	nosys
581438	UNIMPL	nosys
582439	UNIMPL	nosys
583; 440-449 reserved for FreeBSD-5.x growth
584440	UNIMPL	nosys
585441	UNIMPL	nosys
586442	UNIMPL	nosys
587443	UNIMPL	nosys
588444	UNIMPL	nosys
589445	UNIMPL	nosys
590446	UNIMPL	nosys
591447	UNIMPL	nosys
592448	UNIMPL	nosys
593449	UNIMPL	nosys
594; 450 DragonFly system calls
595450	STD	{ int varsym_set(int level, const char *name, const char *data); }
596451	STD	{ int varsym_get(int mask, const char *wild, char *buf, int bufsize); }
597452	STD	{ int varsym_list(int level, char *buf, int maxsize, int *marker); }
598453	OBSOL	upc_register
599454	OBSOL	upc_control
600455	STD	{ int syscap_get(int cap, void *data, size_t bytes); }
601456	STD	{ int syscap_set(int cap, int flags, const void *data, size_t bytes); }
602457	UNIMPL	nosys
603458	UNIMPL	nosys
604459	UNIMPL	nosys
605460	UNIMPL	nosys
606461	UNIMPL	nosys
607462	UNIMPL	nosys
608463	UNIMPL	nosys
609464	UNIMPL	nosys
610465	STD	{ int exec_sys_register(void *entry); }
611466	STD	{ int exec_sys_unregister(int id); }
612467	STD	{ int sys_checkpoint(int type, int fd, pid_t pid, int retval); }
613468	STD	{ int mountctl(const char *path, int op, int fd, const void *ctl, int ctllen, void *buf, int buflen); }
614469	STD	{ int umtx_sleep(volatile const int *ptr, int value, int timeout); }
615470	STD	{ int umtx_wakeup(volatile const int *ptr, int count); }
616471	STD	{ int jail_attach(int jid); }
617472	STD	{ int set_tls_area(int which, struct tls_info *info, size_t infosize); }
618473	STD	{ int get_tls_area(int which, struct tls_info *info, size_t infosize); }
619474	STD	{ int closefrom(int fd); }
620475	STD	{ int stat(const char *path, struct stat *ub); }
621476	STD	{ int fstat(int fd, struct stat *sb); }
622477	STD	{ int lstat(const char *path, struct stat *ub); }
623478	STD 	{ int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
624479	STD	{ int getdirentries(int fd, char *buf, u_int count, \
625			    long *basep); }
626480	STD	{ int getdents(int fd, char *buf, size_t count); }
627481	STD	{ int usched_set(pid_t pid, int cmd, void *data, \
628				int bytes); }
629482	STD	{ int extaccept(int s, int flags, caddr_t name, int *anamelen); }
630483	STD	{ int extconnect(int s, int flags, caddr_t name, int namelen); }
631484	OBSOL	syslink
632485	STD	{ int mcontrol(void *addr, size_t len, int behav, off_t value); }
633486	STD	{ int vmspace_create(void *id, int type, void *data); }
634487	STD	{ int vmspace_destroy(void *id); }
635488	STD	{ int vmspace_ctl(void *id, int cmd, 		\
636					  struct trapframe *tframe,	\
637					  struct vextframe *vframe); }
638489	STD	{ int vmspace_mmap(void *id, void *addr, size_t len, \
639					  int prot, int flags, int fd, \
640					  off_t offset); }
641490	STD	{ int vmspace_munmap(void *id, void *addr,	\
642					  size_t len); }
643491	STD	{ int vmspace_mcontrol(void *id, void *addr, 	\
644					  size_t len, int behav, off_t value); }
645492	STD	{ ssize_t vmspace_pread(void *id, void *buf, \
646			    size_t nbyte, int flags, off_t offset); }
647493	STD	{ ssize_t vmspace_pwrite(void *id, const void *buf, \
648			    size_t nbyte, int flags, off_t offset); }
649494	STD	{ void extexit(int how, int status, void *addr); }
650495	STD	{ int lwp_create(struct lwp_params *params); }
651496	STD	{ lwpid_t lwp_gettid(void); }
652497	STD	{ int lwp_kill(pid_t pid, lwpid_t tid, int signum); }
653498	STD	{ int lwp_rtprio(int function, pid_t pid, lwpid_t tid, struct rtprio *rtp); }
654499	STD	{ int pselect(int nd, fd_set *in, fd_set *ou, \
655			    fd_set *ex, const struct timespec *ts,    \
656			    const sigset_t *sigmask); }
657500	STD	{ int statvfs(const char *path, struct statvfs *buf); }
658501	STD	{ int fstatvfs(int fd, struct statvfs *buf); }
659502	STD	{ int fhstatvfs(const struct fhandle *u_fhp, struct statvfs *buf); }
660503	STD	{ int getvfsstat(struct statfs *buf,          \
661			    struct statvfs *vbuf, long vbufsize, int flags); }
662504	STD	{ int openat(int fd, char *path, int flags, int mode); }
663; XXX should be		{ int openat(int fd, const char *path, int flags, ...);}
664; but we're not ready for `const' or varargs.
665; XXX man page says `mode_t mode'.
666505	STD	{ int fstatat(int fd, char *path, 	\
667					struct stat *sb, int flags); }
668506	STD	{ int fchmodat(int fd, char *path, int mode, \
669					int flags); }
670507	STD	{ int fchownat(int fd, char *path, int uid, int gid, \
671					int flags); }
672508	STD	{ int unlinkat(int fd, char *path, int flags); }
673509	STD	{ int faccessat(int fd, char *path, int amode, \
674					int flags); }
675
676; POSIX message queues system calls
677510	STD	{ mqd_t mq_open(const char * name, int oflag, \
678				  mode_t mode, struct mq_attr *attr); }
679511	STD	{ int mq_close(mqd_t mqdes); }
680512	STD	{ int mq_unlink(const char *name); }
681513	STD	{ int mq_getattr(mqd_t mqdes, \
682				  struct mq_attr *mqstat); }
683514	STD	{ int mq_setattr(mqd_t mqdes, \
684				  const struct mq_attr *mqstat, \
685				  struct mq_attr *omqstat); }
686515	STD	{ int mq_notify(mqd_t mqdes, \
687				  const struct sigevent *notification); }
688516	STD	{ int mq_send(mqd_t mqdes, const char *msg_ptr, \
689				  size_t msg_len, unsigned msg_prio); }
690517	STD	{ ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, \
691				  size_t msg_len, unsigned *msg_prio); }
692518	STD	{ int mq_timedsend(mqd_t mqdes, \
693				  const char *msg_ptr, size_t msg_len, \
694				  unsigned msg_prio, \
695				  const struct timespec *abs_timeout); }
696519	STD	{ ssize_t mq_timedreceive(mqd_t mqdes, \
697				  char *msg_ptr, size_t msg_len, unsigned *msg_prio, \
698				  const struct timespec *abs_timeout); }
699520	STD	{ int ioprio_set(int which, int who, int prio); }
700521	STD	{ int ioprio_get(int which, int who); }
701522	STD	{ int chroot_kernel(char *path); }
702523	STD	{ int renameat(int oldfd, char *old, int newfd, \
703				  char *new); }
704524	STD	{ int mkdirat(int fd, char *path, mode_t mode); }
705525	STD	{ int mkfifoat(int fd, char *path, mode_t mode); }
706526	STD	{ int mknodat(int fd, char *path, mode_t mode, \
707				  dev_t dev); }
708527	STD	{ int readlinkat(int fd, char *path, char *buf, \
709				  size_t bufsize); }
710528	STD	{ int symlinkat(char *path1, int fd, char *path2); }
711529	STD	{ int swapoff(char *name); }
712530	STD	{ int vquotactl(const char *path, \
713			    struct plistref *pref); }
714531	STD	{ int linkat(int fd1, char *path1, int fd2, \
715				char *path2, int flags); }
716532	STD	{ int eaccess(char *path, int flags); }
717533	STD	{ int lpathconf(char *path, int name); }
718534	OBSOL	vmm_guest_ctl
719535	OBSOL	vmm_guest_sync_addr
720536	STD	{ int procctl(idtype_t idtype, id_t id, int cmd, void *data); }
721537	STD	{ int chflagsat(int fd, const char *path, u_long flags, int atflags);}
722538	STD	{ int pipe2(int *fildes, int flags); }
723539	STD	{ int utimensat(int fd, const char *path, const struct timespec *ts, int flags); }
724540	STD	{ int futimens(int fd, const struct timespec *ts); }
725541	STD	{ int accept4(int s, caddr_t name, int *anamelen, int flags); }
726542	STD	{ int lwp_setname(lwpid_t tid, const char *name); }
727543	STD	{ int ppoll(struct pollfd *fds, u_int nfds, \
728			const struct timespec *ts, const sigset_t *sigmask); }
729544	STD	{ int lwp_setaffinity(pid_t pid, lwpid_t tid, const cpumask_t *mask); }
730545	STD	{ int lwp_getaffinity(pid_t pid, lwpid_t tid, cpumask_t *mask); }
731546	STD	{ int lwp_create2(struct lwp_params *params, const cpumask_t *mask); }
732547	STD	{ int getcpuclockid(pid_t pid, lwpid_t lwp_id, clockid_t *clock_id); }
733548	STD	{ int wait6(idtype_t idtype, id_t id, int *status, int options, \
734				struct __wrusage *wrusage, siginfo_t *info); }
735549	STD	{ int lwp_getname(lwpid_t tid, char *name, size_t len); }
736550	STD	{ ssize_t getrandom(void *buf, size_t len, unsigned flags); }
737551	STD	{ ssize_t __realpath(const char *path, char *buf, size_t len); }
738552	STD	{ int fexecve(int fd, char **argv, char **envv); }
739553	STD	{ int posix_fallocate(int fd, off_t offset, off_t len); }
740554	STD	{ int fdatasync(int fd); }
741