xref: /dragonfly/sys/kern/syscalls.master (revision 3a48e5e1)
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	UNIMPL	nosys
349242	UNIMPL	nosys
350243	UNIMPL	nosys
351244	UNIMPL	nosys
352245	UNIMPL	nosys
353246	UNIMPL	nosys
354247	UNIMPL	nosys
355248	UNIMPL	nosys
356249	UNIMPL	nosys
357; syscall numbers initially used in OpenBSD
358250	STD	{ int minherit(void *addr, size_t len, int inherit); }
359251	STD	{ int rfork(int flags); }
360252	STD	{ int openbsd_poll(struct pollfd *fds, u_int nfds, \
361			    int timeout); }
362253	STD	{ int issetugid(void); }
363254	STD	{ int lchown(char *path, int uid, int gid); }
364255	UNIMPL	nosys
365256	UNIMPL	nosys
366257	UNIMPL	nosys
367258	UNIMPL	nosys
368259	UNIMPL	nosys
369260	UNIMPL	nosys
370261	UNIMPL	nosys
371262	UNIMPL	nosys
372263	UNIMPL	nosys
373264	UNIMPL	nosys
374265	UNIMPL	nosys
375266	UNIMPL	nosys
376267	UNIMPL	nosys
377268	UNIMPL	nosys
378269	UNIMPL	nosys
379270	UNIMPL	nosys
380271	UNIMPL	nosys
381272	UNIMPL	nosys
382273	UNIMPL	nosys
383274	STD	{ int lchmod(char *path, mode_t mode); }
384275	NOPROTO { int lchown(char *path, uid_t uid, gid_t gid); } netbsd_lchown lchown_args int
385276	STD	{ int lutimes(char *path, struct timeval *tptr); }
386277	NOPROTO	{ int msync(void *addr, size_t len, int flags); } netbsd_msync msync_args int
387278	OBSOL	nstat
388279	OBSOL	nfstat
389280	OBSOL	nlstat
390281	UNIMPL	nosys
391282	UNIMPL	nosys
392283	UNIMPL	nosys
393284	UNIMPL	nosys
394285	UNIMPL	nosys
395286	UNIMPL	nosys
396287	UNIMPL	nosys
397288	UNIMPL	nosys
398; 289 and 290 from NetBSD (OpenBSD: 267 and 268)
399289	STD	{ ssize_t extpreadv(int fd, const struct iovec *iovp, \
400				  int iovcnt, int flags, off_t offset); }
401290	STD	{ ssize_t extpwritev(int fd, const struct iovec *iovp, \
402				  int iovcnt, int flags, off_t offset); }
403291	UNIMPL	nosys
404292	UNIMPL	nosys
405293	UNIMPL	nosys
406294	UNIMPL	nosys
407295	UNIMPL	nosys
408296	UNIMPL	nosys
409; XXX 297 is 300 in NetBSD
410297	STD	{ int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
411298	STD	{ int fhopen(const struct fhandle *u_fhp, int flags); }
412299	UNIMPL	nosys
413; syscall numbers for FreeBSD
414300	STD	{ int modnext(int modid); }
415301	STD	{ int modstat(int modid, struct module_stat* stat); }
416302	STD	{ int modfnext(int modid); }
417303	STD	{ int modfind(const char *name); }
418304	STD	{ int kldload(const char *file); }
419305	STD	{ int kldunload(int fileid); }
420306	STD	{ int kldfind(const char *file); }
421307	STD	{ int kldnext(int fileid); }
422308	STD	{ int kldstat(int fileid, struct kld_file_stat* stat); }
423309	STD	{ int kldfirstmod(int fileid); }
424310	STD	{ int getsid(pid_t pid); }
425311	STD	{ int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
426312	STD	{ int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
427313	OBSOL	signanosleep
428314	STD	{ int aio_return(struct aiocb *aiocbp); }
429315	STD	{ int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
430316	STD	{ int aio_cancel(int fd, struct aiocb *aiocbp); }
431317	STD	{ int aio_error(struct aiocb *aiocbp); }
432318	STD	{ int aio_read(struct aiocb *aiocbp); }
433319	STD	{ int aio_write(struct aiocb *aiocbp); }
434320	STD	{ int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
435321	STD	{ int yield(void); }
436322	UNIMPL	thr_sleep
437323	UNIMPL	thr_wakeup
438324	STD	{ int mlockall(int how); }
439325	STD	{ int munlockall(void); }
440326	STD	{ int __getcwd(u_char *buf, u_int buflen); }
441
442327	STD	{ int sched_setparam (pid_t pid, const struct sched_param *param); }
443328	STD	{ int sched_getparam (pid_t pid, struct sched_param *param); }
444
445329	STD	{ int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
446330	STD	{ int sched_getscheduler (pid_t pid); }
447
448331	STD	{ int sched_yield (void); }
449332	STD	{ int sched_get_priority_max (int policy); }
450333	STD	{ int sched_get_priority_min (int policy); }
451334	STD	{ int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
452335	STD	{ int utrace(const void *addr, size_t len); }
453336	OBSOL	freebsd4_sendfile
454337	STD	{ int kldsym(int fileid, int cmd, void *data); }
455338	STD	{ int jail(struct jail *jail); }
456339	UNIMPL	pioctl
457340	STD	{ int sigprocmask(int how, const sigset_t *set, \
458			    sigset_t *oset); }
459341	STD	{ int sigsuspend(const sigset_t *sigmask); }
460342	STD	{ int sigaction(int sig, const struct sigaction *act, \
461			    struct sigaction *oact); }
462343	STD	{ int sigpending(sigset_t *set); }
463344	STD	{ int sigreturn(ucontext_t *sigcntxp); }
464345	STD	{ int sigtimedwait(const sigset_t *set,\
465			     siginfo_t *info, const struct timespec *timeout); }
466346	STD	{ int sigwaitinfo(const sigset_t *set,\
467			     siginfo_t *info); }
468347	STD	{ int __acl_get_file(const char *path, \
469			    acl_type_t type, struct acl *aclp); }
470348	STD	{ int __acl_set_file(const char *path, \
471			    acl_type_t type, struct acl *aclp); }
472349	STD	{ int __acl_get_fd(int filedes, acl_type_t type, \
473			    struct acl *aclp); }
474350	STD	{ int __acl_set_fd(int filedes, acl_type_t type, \
475			    struct acl *aclp); }
476351	STD	{ int __acl_delete_file(const char *path, \
477			    acl_type_t type); }
478352	STD	{ int __acl_delete_fd(int filedes, acl_type_t type); }
479353	STD	{ int __acl_aclcheck_file(const char *path, \
480			    acl_type_t type, struct acl *aclp); }
481354	STD	{ int __acl_aclcheck_fd(int filedes, acl_type_t type, \
482			    struct acl *aclp); }
483355	STD	{ int extattrctl(const char *path, int cmd, \
484			    const char *filename, int attrnamespace, \
485			    const char *attrname); }
486356	STD	{ int extattr_set_file(const char *path, \
487			    int attrnamespace, const char *attrname, \
488			    void *data, size_t nbytes); }
489357	STD	{ int extattr_get_file(const char *path, \
490			    int attrnamespace, const char *attrname, \
491			    void *data, size_t nbytes); }
492358	STD	{ int extattr_delete_file(const char *path, \
493			    int attrnamespace, const char *attrname); }
494359	STD	{ int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
495360	STD	{ int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
496361	STD	{ int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
497362	STD	{ int kqueue(void); }
498363	STD	{ int kevent(int fd, \
499			    const struct kevent *changelist, int nchanges, \
500			    struct kevent *eventlist, int nevents, \
501			    const struct timespec *timeout); }
502364	UNIMPL	sctp_peeloff
503; 365-392 used by FreeBSD-current
504365	UNIMPL	nosys
505366	UNIMPL	nosys
506367	UNIMPL	nosys
507368	UNIMPL	nosys
508369	UNIMPL	nosys
509370	UNIMPL	nosys
510371	UNIMPL	nosys
511372	UNIMPL	nosys
512373	UNIMPL	nosys
513374	UNIMPL	nosys
514375	UNIMPL	nosys
515376	UNIMPL	nosys
516377	UNIMPL	nosys
517378	UNIMPL	nosys
518379	UNIMPL	nosys
519380	UNIMPL	nosys
520381	UNIMPL	nosys
521382	UNIMPL	nosys
522383	UNIMPL	nosys
523384	UNIMPL	nosys
524385	UNIMPL	nosys
525386	UNIMPL	nosys
526387	UNIMPL	nosys
527388	UNIMPL	nosys
528389	UNIMPL	nosys
529390	STD	{ int kenv(int what, const char *name, char *value, int len); }
530391	STD	{ int lchflags(const char *path, u_long flags); }
531392	STD	{ int uuidgen(struct uuid *store, int count); }
532393	STD	{ int sendfile(int fd, int s, off_t offset, size_t nbytes, \
533				struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
534; 394-439 used by FreeBSD-current
535394	UNIMPL	nosys
536395	UNIMPL	nosys
537396	UNIMPL	nosys
538397	UNIMPL	nosys
539398	UNIMPL	nosys
540399	UNIMPL	nosys
541400	UNIMPL	nosys
542401	UNIMPL	nosys
543402	UNIMPL	nosys
544403	UNIMPL	nosys
545404	UNIMPL	nosys
546405	UNIMPL	nosys
547406	UNIMPL	nosys
548407	UNIMPL	nosys
549408	UNIMPL	nosys
550409	UNIMPL	nosys
551410	UNIMPL	nosys
552411	UNIMPL	nosys
553412	UNIMPL	nosys
554413	UNIMPL	nosys
555414	UNIMPL	nosys
556415	UNIMPL	nosys
557416	UNIMPL	nosys
558417	UNIMPL	nosys
559418	UNIMPL	nosys
560419	UNIMPL	nosys
561420	UNIMPL	nosys
562421	UNIMPL	nosys
563422	UNIMPL	nosys
564423	UNIMPL	nosys
565424	UNIMPL	nosys
566425	UNIMPL	nosys
567426	UNIMPL	nosys
568427	UNIMPL	nosys
569428	UNIMPL	nosys
570429	UNIMPL	nosys
571430	UNIMPL	nosys
572431	UNIMPL	nosys
573432	UNIMPL	nosys
574433	UNIMPL	nosys
575434	UNIMPL	nosys
576435	UNIMPL	nosys
577436	UNIMPL	nosys
578437	UNIMPL	nosys
579438	UNIMPL	nosys
580439	UNIMPL	nosys
581; 440-449 reserved for FreeBSD-5.x growth
582440	UNIMPL	nosys
583441	UNIMPL	nosys
584442	UNIMPL	nosys
585443	UNIMPL	nosys
586444	UNIMPL	nosys
587445	UNIMPL	nosys
588446	UNIMPL	nosys
589447	UNIMPL	nosys
590448	UNIMPL	nosys
591449	UNIMPL	nosys
592; 450 DragonFly system calls
593450	STD	{ int varsym_set(int level, const char *name, const char *data); }
594451	STD	{ int varsym_get(int mask, const char *wild, char *buf, int bufsize); }
595452	STD	{ int varsym_list(int level, char *buf, int maxsize, int *marker); }
596453	OBSOL	upc_register
597454	OBSOL	upc_control
598455	OBSOL	caps_sys_service
599456	OBSOL	caps_sys_client
600457	OBSOL	caps_sys_close
601458	OBSOL	caps_sys_put
602459	OBSOL	caps_sys_reply
603460	OBSOL	caps_sys_get
604461	OBSOL	caps_sys_wait
605462	OBSOL	caps_sys_abort
606463	OBSOL	caps_sys_getgen
607464	OBSOL	caps_sys_setgen
608465	STD	{ int exec_sys_register(void *entry); }
609466	STD	{ int exec_sys_unregister(int id); }
610467	STD	{ int sys_checkpoint(int type, int fd, pid_t pid, int retval); }
611468	STD	{ int mountctl(const char *path, int op, int fd, const void *ctl, int ctllen, void *buf, int buflen); }
612469	STD	{ int umtx_sleep(volatile const int *ptr, int value, int timeout); }
613470	STD	{ int umtx_wakeup(volatile const int *ptr, int count); }
614471	STD	{ int jail_attach(int jid); }
615472	STD	{ int set_tls_area(int which, struct tls_info *info, size_t infosize); }
616473	STD	{ int get_tls_area(int which, struct tls_info *info, size_t infosize); }
617474	STD	{ int closefrom(int fd); }
618475	STD	{ int stat(const char *path, struct stat *ub); }
619476	STD	{ int fstat(int fd, struct stat *sb); }
620477	STD	{ int lstat(const char *path, struct stat *ub); }
621478	STD 	{ int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
622479	STD	{ int getdirentries(int fd, char *buf, u_int count, \
623			    long *basep); }
624480	STD	{ int getdents(int fd, char *buf, size_t count); }
625481	STD	{ int usched_set(pid_t pid, int cmd, void *data, \
626				int bytes); }
627482	STD	{ int extaccept(int s, int flags, caddr_t name, int *anamelen); }
628483	STD	{ int extconnect(int s, int flags, caddr_t name, int namelen); }
629484	OBSOL	syslink
630485	STD	{ int mcontrol(void *addr, size_t len, int behav, off_t value); }
631486	STD	{ int vmspace_create(void *id, int type, void *data); }
632487	STD	{ int vmspace_destroy(void *id); }
633488	STD	{ int vmspace_ctl(void *id, int cmd, 		\
634					  struct trapframe *tframe,	\
635					  struct vextframe *vframe); }
636489	STD	{ int vmspace_mmap(void *id, void *addr, size_t len, \
637					  int prot, int flags, int fd, \
638					  off_t offset); }
639490	STD	{ int vmspace_munmap(void *id, void *addr,	\
640					  size_t len); }
641491	STD	{ int vmspace_mcontrol(void *id, void *addr, 	\
642					  size_t len, int behav, off_t value); }
643492	STD	{ ssize_t vmspace_pread(void *id, void *buf, \
644			    size_t nbyte, int flags, off_t offset); }
645493	STD	{ ssize_t vmspace_pwrite(void *id, const void *buf, \
646			    size_t nbyte, int flags, off_t offset); }
647494	STD	{ void extexit(int how, int status, void *addr); }
648495	STD	{ int lwp_create(struct lwp_params *params); }
649496	STD	{ lwpid_t lwp_gettid(void); }
650497	STD	{ int lwp_kill(pid_t pid, lwpid_t tid, int signum); }
651498	STD	{ int lwp_rtprio(int function, pid_t pid, lwpid_t tid, struct rtprio *rtp); }
652499	STD	{ int pselect(int nd, fd_set *in, fd_set *ou, \
653			    fd_set *ex, const struct timespec *ts,    \
654			    const sigset_t *sigmask); }
655500	STD	{ int statvfs(const char *path, struct statvfs *buf); }
656501	STD	{ int fstatvfs(int fd, struct statvfs *buf); }
657502	STD	{ int fhstatvfs(const struct fhandle *u_fhp, struct statvfs *buf); }
658503	STD	{ int getvfsstat(struct statfs *buf,          \
659			    struct statvfs *vbuf, long vbufsize, int flags); }
660504	STD	{ int openat(int fd, char *path, int flags, int mode); }
661; XXX should be		{ int openat(int fd, const char *path, int flags, ...);}
662; but we're not ready for `const' or varargs.
663; XXX man page says `mode_t mode'.
664505	STD	{ int fstatat(int fd, char *path, 	\
665					struct stat *sb, int flags); }
666506	STD	{ int fchmodat(int fd, char *path, int mode, \
667					int flags); }
668507	STD	{ int fchownat(int fd, char *path, int uid, int gid, \
669					int flags); }
670508	STD	{ int unlinkat(int fd, char *path, int flags); }
671509	STD	{ int faccessat(int fd, char *path, int amode, \
672					int flags); }
673
674; POSIX message queues system calls
675510	STD	{ mqd_t mq_open(const char * name, int oflag, \
676				  mode_t mode, struct mq_attr *attr); }
677511	STD	{ int mq_close(mqd_t mqdes); }
678512	STD	{ int mq_unlink(const char *name); }
679513	STD	{ int mq_getattr(mqd_t mqdes, \
680				  struct mq_attr *mqstat); }
681514	STD	{ int mq_setattr(mqd_t mqdes, \
682				  const struct mq_attr *mqstat, \
683				  struct mq_attr *omqstat); }
684515	STD	{ int mq_notify(mqd_t mqdes, \
685				  const struct sigevent *notification); }
686516	STD	{ int mq_send(mqd_t mqdes, const char *msg_ptr, \
687				  size_t msg_len, unsigned msg_prio); }
688517	STD	{ ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, \
689				  size_t msg_len, unsigned *msg_prio); }
690518	STD	{ int mq_timedsend(mqd_t mqdes, \
691				  const char *msg_ptr, size_t msg_len, \
692				  unsigned msg_prio, \
693				  const struct timespec *abs_timeout); }
694519	STD	{ ssize_t mq_timedreceive(mqd_t mqdes, \
695				  char *msg_ptr, size_t msg_len, unsigned *msg_prio, \
696				  const struct timespec *abs_timeout); }
697520	STD	{ int ioprio_set(int which, int who, int prio); }
698521	STD	{ int ioprio_get(int which, int who); }
699522	STD	{ int chroot_kernel(char *path); }
700523	STD	{ int renameat(int oldfd, char *old, int newfd, \
701				  char *new); }
702524	STD	{ int mkdirat(int fd, char *path, mode_t mode); }
703525	STD	{ int mkfifoat(int fd, char *path, mode_t mode); }
704526	STD	{ int mknodat(int fd, char *path, mode_t mode, \
705				  dev_t dev); }
706527	STD	{ int readlinkat(int fd, char *path, char *buf, \
707				  size_t bufsize); }
708528	STD	{ int symlinkat(char *path1, int fd, char *path2); }
709529	STD	{ int swapoff(char *name); }
710530	STD	{ int vquotactl(const char *path, \
711			    struct plistref *pref); }
712531	STD	{ int linkat(int fd1, char *path1, int fd2, \
713				char *path2, int flags); }
714532	STD	{ int eaccess(char *path, int flags); }
715533	STD	{ int lpathconf(char *path, int name); }
716534	STD	{ int vmm_guest_ctl(int op, struct vmm_guest_options *options); }
717535	STD	{ int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); }
718536	STD	{ int procctl(idtype_t idtype, id_t id, int cmd, void *data); }
719537	STD	{ int chflagsat(int fd, const char *path, u_long flags, int atflags);}
720538	STD	{ int pipe2(int *fildes, int flags); }
721539	STD	{ int utimensat(int fd, const char *path, const struct timespec *ts, int flags); }
722540	STD	{ int futimens(int fd, const struct timespec *ts); }
723541	STD	{ int accept4(int s, caddr_t name, int *anamelen, int flags); }
724542	STD	{ int lwp_setname(lwpid_t tid, const char *name); }
725543	STD	{ int ppoll(struct pollfd *fds, u_int nfds, \
726			const struct timespec *ts, const sigset_t *sigmask); }
727544	STD	{ int lwp_setaffinity(pid_t pid, lwpid_t tid, const cpumask_t *mask); }
728545	STD	{ int lwp_getaffinity(pid_t pid, lwpid_t tid, cpumask_t *mask); }
729546	STD	{ int lwp_create2(struct lwp_params *params, const cpumask_t *mask); }
730547	STD	{ int getcpuclockid(pid_t pid, lwpid_t lwp_id, clockid_t *clock_id); }
731548	STD	{ int wait6(idtype_t idtype, id_t id, int *status, int options, \
732				struct __wrusage *wrusage, siginfo_t *info); }
733549	STD	{ int lwp_getname(lwpid_t tid, char *name, size_t len); }
734550	STD	{ ssize_t getrandom(void *buf, size_t len, unsigned flags); }
735551	STD	{ ssize_t __realpath(const char *path, char *buf, size_t len); }
736