xref: /dragonfly/sys/kern/syscalls.master (revision cfd1aba3)
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, sys/sysproto.h and sys/sysunion.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, COMPAT, CPT_NOA, LIBCOMPAT,
11;		NODEF, NOARGS, NOPROTO, NOIMPL
12;	name	pseudo-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;	NOTE: All system calls are now called without the MP lock.  Those
20;	      that need the MP lock will acquire it.
21
22; types:
23;	STD	always included
24;	COMPAT	included on COMPAT #ifdef
25;	LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h
26;	OBSOL	obsolete, not included in system, only specifies name
27;	UNIMPL	not implemented, placeholder only
28
29; #ifdef's, etc. may be included, and are copied to the output files.
30
31#include <sys/param.h>
32#include <sys/sysent.h>
33#include <sys/sysproto.h>
34#include <sys/statvfs.h>
35
36#ifdef COMPAT_43
37#include <emulation/43bsd/stat.h>
38#endif
39
40#include <emulation/dragonfly12/stat.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	STD	{ void exit(int rval); }
502	STD	{ int fork(void); }
513	STD	{ ssize_t read(int fd, void *buf, size_t nbyte); }
524	STD	{ 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	STD	{ int close(int fd); }
587	STD	{ 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	STD	{ int obreak(char *nsize); } break obreak_args int
7018	STD	{ int getfsstat(struct statfs *buf, long bufsize, \
71			    int flags); }
7219	COMPAT	{ long lseek(int fd, long offset, int whence); }
7320	STD	{ pid_t getpid(void); }
7421	STD	{ int mount(char *type, char *path, int flags, \
75			    caddr_t data); }
76; XXX `path' should have type `const char *' but we're not ready for that.
7722	STD	{ int unmount(char *path, int flags); }
7823	STD	{ int setuid(uid_t uid); }
7924	STD	{ uid_t getuid(void); }
8025	STD	{ uid_t geteuid(void); }
8126	STD	{ int ptrace(int req, pid_t pid, caddr_t addr, \
82			    int data); }
8327	STD	{ int recvmsg(int s, struct msghdr *msg, int flags); }
8428	STD	{ int sendmsg(int s, caddr_t msg, int flags); }
8529	STD	{ int recvfrom(int s, caddr_t buf, size_t len, \
86			    int flags, caddr_t from, int *fromlenaddr); }
8730	STD	{ int accept(int s, caddr_t name, int *anamelen); }
8831	STD	{ int getpeername(int fdes, caddr_t asa, int *alen); }
8932	STD	{ int getsockname(int fdes, caddr_t asa, int *alen); }
9033	STD	{ int access(char *path, int flags); }
9134	STD	{ int chflags(char *path, int flags); }
9235	STD	{ int fchflags(int fd, int flags); }
9336	STD	{ int sync(void); }
9437	STD	{ int kill(int pid, int signum); }
9538	COMPAT	{ int stat(char *path, struct ostat *ub); }
9639	STD	{ pid_t getppid(void); }
9740	COMPAT	{ int lstat(char *path, struct ostat *ub); }
9841	STD	{ int dup(u_int fd); }
9942	STD	{ int pipe(void); }
10043	STD	{ gid_t getegid(void); }
10144	STD	{ int profil(caddr_t samples, size_t size, \
102			    size_t offset, u_int scale); }
10345	STD	{ int ktrace(const char *fname, int ops, int facs, \
104			    int pid); }
10546	OBSOL	freebsd3_sigaction
10647	STD	{ gid_t getgid(void); }
10748	OBSOL	freebsd3_sigprocmask
108; XXX note nonstandard (bogus) calling convention - the libc stub passes
109; us the mask, not a pointer to it, and we return the old mask as the
110; (int) return value.
11149	STD	{ int getlogin(char *namebuf, u_int namelen); }
11250	STD	{ int setlogin(char *namebuf); }
11351	STD	{ int acct(char *path); }
11452	OBSOL	freebsd3_sigpending
11553	STD	{ int sigaltstack(stack_t *ss, stack_t *oss); }
11654	STD	{ int ioctl(int fd, u_long com, caddr_t data); }
11755	STD	{ int reboot(int opt); }
11856	STD	{ int revoke(char *path); }
11957	STD	{ int symlink(char *path, char *link); }
12058	STD	{ int readlink(char *path, char *buf, int count); }
12159	STD	{ int execve(char *fname, char **argv, char **envv); }
12260	STD	{ int umask(int newmask); } umask umask_args int
12361	STD	{ int chroot(char *path); }
12462	COMPAT	{ int fstat(int fd, struct ostat *sb); }
12563	COMPAT	{ int getkerninfo(int op, char *where, size_t *size, \
126			    int arg); } getkerninfo getkerninfo_args int
12764	COMPAT	{ int getpagesize(void); } \
128			    getpagesize getpagesize_args int
12965	STD	{ int msync(void *addr, size_t len, int flags); }
13066	STD	{ pid_t vfork(void); }
13167	OBSOL	vread
13268	OBSOL	vwrite
13369	STD	{ int sbrk(int incr); }
13470	STD	{ int sstk(int incr); }
13571	COMPAT	{ int mmap(void *addr, int len, int prot, \
136			    int flags, int fd, long pos); }
13772	COMPAT	{ int vadvise(int anom); } vadvise ovadvise_args int
13873	STD	{ int munmap(void *addr, size_t len); }
13974	STD	{ int mprotect(void *addr, size_t len, int prot); }
14075	STD	{ int madvise(void *addr, size_t len, int behav); }
14176	OBSOL	vhangup
14277	OBSOL	vlimit
14378	STD	{ int mincore(const void *addr, size_t len, \
144			    char *vec); }
14579	STD	{ int getgroups(u_int gidsetsize, gid_t *gidset); }
14680	STD	{ int setgroups(u_int gidsetsize, gid_t *gidset); }
14781	STD	{ int getpgrp(void); }
14882	STD	{ int setpgid(int pid, int pgid); }
14983	STD	{ int setitimer(u_int which, struct itimerval *itv, \
150			    struct itimerval *oitv); }
15184	COMPAT	{ int wait(void); }
15285	STD	{ int swapon(char *name); }
15386	STD	{ int getitimer(u_int which, struct itimerval *itv); }
15487	COMPAT	{ int gethostname(char *hostname, u_int len); } \
155			    gethostname gethostname_args int
15688	COMPAT	{ int sethostname(char *hostname, u_int len); } \
157			    sethostname sethostname_args int
15889	STD	{ int getdtablesize(void); }
15990	STD	{ int dup2(u_int from, u_int to); }
16091	UNIMPL	getdopt
16192	STD	{ int fcntl(int fd, int cmd, long arg); }
162; XXX should be		{ int fcntl(int fd, int cmd, ...); }
163; but we're not ready for varargs.
164; XXX man page says `int arg' too.
16593	STD	{ int select(int nd, fd_set *in, fd_set *ou, \
166			    fd_set *ex, struct timeval *tv); }
16794	UNIMPL	setdopt
16895	STD	{ int fsync(int fd); }
16996	STD	{ int setpriority(int which, int who, int prio); }
17097	STD	{ int socket(int domain, int type, int protocol); }
17198	STD	{ int connect(int s, caddr_t name, int namelen); }
17299	CPT_NOA	{ int accept(int s, caddr_t name, int *anamelen); } \
173			    accept accept_args int
174100	STD	{ int getpriority(int which, int who); }
175101	COMPAT	{ int send(int s, caddr_t buf, int len, int flags); }
176102	COMPAT	{ int recv(int s, caddr_t buf, int len, int flags); }
177103	OBSOL	freebsd3_sigreturn
178104	STD	{ int bind(int s, caddr_t name, int namelen); }
179105	STD	{ int setsockopt(int s, int level, int name, \
180			    caddr_t val, int valsize); }
181106	STD	{ int listen(int s, int backlog); }
182107	OBSOL	vtimes
183108	COMPAT	{ int sigvec(int signum, struct sigvec *nsv, \
184			    struct sigvec *osv); }
185109	COMPAT	{ int sigblock(int mask); }
186110	COMPAT	{ int sigsetmask(int mask); }
187111	OBSOL	freebsd3_sigsuspend
188; XXX note nonstandard (bogus) calling convention - the libc stub passes
189; us the mask, not a pointer to it.
190112	COMPAT	{ int sigstack(struct sigstack *nss, \
191			    struct sigstack *oss); }
192113	COMPAT	{ int recvmsg(int s, struct omsghdr *msg, int flags); }
193114	COMPAT	{ int sendmsg(int s, caddr_t msg, int flags); }
194115	OBSOL	vtrace
195116	STD	{ int gettimeofday(struct timeval *tp, \
196			    struct timezone *tzp); }
197117	STD	{ int getrusage(int who, struct rusage *rusage); }
198118	STD	{ int getsockopt(int s, int level, int name, \
199			    caddr_t val, int *avalsize); }
200119	UNIMPL	resuba (BSD/OS 2.x)
201120	STD	{ int readv(int fd, struct iovec *iovp, u_int iovcnt); }
202121	STD	{ int writev(int fd, struct iovec *iovp, \
203			    u_int iovcnt); }
204122	STD	{ int settimeofday(struct timeval *tv, \
205			    struct timezone *tzp); }
206123	STD	{ int fchown(int fd, int uid, int gid); }
207124	STD	{ int fchmod(int fd, int mode); }
208125	CPT_NOA	{ int recvfrom(int s, caddr_t buf, size_t len, \
209			    int flags, caddr_t from, int *fromlenaddr); } \
210			    recvfrom recvfrom_args int
211126	STD	{ int setreuid(int ruid, int euid); }
212127	STD	{ int setregid(int rgid, int egid); }
213128	STD	{ int rename(char *from, char *to); }
214129	COMPAT	{ int truncate(char *path, long length); }
215130	COMPAT	{ int ftruncate(int fd, long length); }
216131	STD	{ int flock(int fd, int how); }
217132	STD	{ int mkfifo(char *path, int mode); }
218133	STD	{ int sendto(int s, caddr_t buf, size_t len, \
219			    int flags, caddr_t to, int tolen); }
220134	STD	{ int shutdown(int s, int how); }
221135	STD	{ int socketpair(int domain, int type, int protocol, \
222			    int *rsv); }
223136	STD	{ int mkdir(char *path, int mode); }
224137	STD	{ int rmdir(char *path); }
225138	STD	{ int utimes(char *path, struct timeval *tptr); }
226139	OBSOL	4.2 sigreturn
227140	STD	{ int adjtime(struct timeval *delta, \
228			    struct timeval *olddelta); }
229141	COMPAT	{ int getpeername(int fdes, caddr_t asa, int *alen); }
230142	COMPAT	{ long gethostid(void); }
231143	COMPAT	{ int sethostid(long hostid); }
232144	COMPAT	{ int getrlimit(u_int which, struct orlimit *rlp); }
233145	COMPAT	{ int setrlimit(u_int which, struct orlimit *rlp); }
234146	COMPAT	{ int killpg(int pgid, int signum); }
235147	STD	{ int setsid(void); }
236148	STD	{ int quotactl(char *path, int cmd, int uid, \
237			    caddr_t arg); }
238149	COMPAT	{ int quota(void); }
239150	CPT_NOA	{ int getsockname(int fdec, caddr_t asa, int *alen); }\
240			    getsockname getsockname_args int
241
242; Syscalls 151-180 inclusive are reserved for vendor-specific
243; system calls.  (This includes various calls added for compatibity
244; with other Unix variants.)
245; Some of these calls are now supported by BSD...
246151	UNIMPL	sem_lock (BSD/OS 2.x)
247152	UNIMPL	sem_wakeup (BSD/OS 2.x)
248153	UNIMPL	asyncdaemon (BSD/OS 2.x)
249154	UNIMPL	nosys
250; 155 is initialized by the NFS code, if present.
251155	NOIMPL	{ int nfssvc(int flag, caddr_t argp); }
252156	COMPAT	{ int getdirentries(int fd, char *buf, u_int count, \
253			    long *basep); }
254157	STD	{ int statfs(char *path, struct statfs *buf); }
255158	STD	{ int fstatfs(int fd, struct statfs *buf); }
256159	UNIMPL	nosys
257160	UNIMPL	nosys
258; 161 is initialized by the NFS code, if present.
259161	STD	{ int getfh(char *fname, struct fhandle *fhp); }
260162	STD	{ int getdomainname(char *domainname, int len); }
261163	STD	{ int setdomainname(char *domainname, int len); }
262164	STD	{ int uname(struct utsname *name); }
263165	STD	{ int sysarch(int op, char *parms); }
264166	STD	{ int rtprio(int function, pid_t pid, \
265			    struct rtprio *rtp); }
266167	UNIMPL	nosys
267168	UNIMPL	nosys
268169	OBSOL	semsys
269170	OBSOL	msgsys
270171	OBSOL	shmsys
271172	UNIMPL	nosys
272173	STD	{ ssize_t extpread(int fd, void *buf, \
273			    size_t nbyte, int flags, off_t offset); }
274174	STD	{ ssize_t extpwrite(int fd, const void *buf, \
275			    size_t nbyte, int flags, off_t offset); }
276175	UNIMPL	nosys
277176	STD	{ int ntp_adjtime(struct timex *tp); }
278177	UNIMPL	sfork (BSD/OS 2.x)
279178	UNIMPL	getdescriptor (BSD/OS 2.x)
280179	UNIMPL	setdescriptor (BSD/OS 2.x)
281180	UNIMPL	nosys
282
283; Syscalls 181-199 are used by/reserved for BSD
284181	STD	{ int setgid(gid_t gid); }
285182	STD	{ int setegid(gid_t egid); }
286183	STD	{ int seteuid(uid_t euid); }
287184	UNIMPL	lfs_bmapv
288185	UNIMPL	lfs_markv
289186	UNIMPL	lfs_segclean
290187	UNIMPL	lfs_segwait
291188	COMPAT_DF12	{ int stat(const char *path, struct dfbsd12_stat *ub); }
292189	COMPAT_DF12	{ int fstat(int fd, struct dfbsd12_stat *sb); }
293190	COMPAT_DF12	{ int lstat(const char *path, struct dfbsd12_stat *ub); }
294191	STD	{ int pathconf(char *path, int name); }
295192	STD	{ int fpathconf(int fd, int name); }
296193	UNIMPL	nosys
297194	STD	{ int getrlimit(u_int which, \
298			    struct rlimit *rlp); } \
299			    getrlimit __getrlimit_args int
300195	STD	{ int setrlimit(u_int which, \
301			    struct rlimit *rlp); } \
302			    setrlimit __setrlimit_args int
303196	COMPAT_DF12	{ int getdirentries(int fd, char *buf, \
304				    u_int count, long *basep); }
305197	STD	{ caddr_t mmap(caddr_t addr, size_t len, int prot, \
306			    int flags, int fd, int pad, off_t pos); }
307198	STD	{ int nosys(void); } __syscall __syscall_args int
308199	STD	{ off_t lseek(int fd, int pad, off_t offset, \
309			    int whence); }
310200	STD	{ int truncate(char *path, int pad, off_t length); }
311201	STD	{ int ftruncate(int fd, int pad, off_t length); }
312202	STD	{ int __sysctl(int *name, u_int namelen, void *old, \
313			    size_t *oldlenp, void *new, size_t newlen); } \
314			    __sysctl sysctl_args int
315203	STD	{ int mlock(const void *addr, size_t len); }
316204	STD	{ int munlock(const void *addr, size_t len); }
317205	STD	{ int undelete(char *path); }
318206	STD	{ int futimes(int fd, struct timeval *tptr); }
319207	STD	{ int getpgid(pid_t pid); }
320208	UNIMPL	newreboot (NetBSD)
321209	STD	{ int poll(struct pollfd *fds, u_int nfds, \
322			    int timeout); }
323
324;
325; The following are reserved for loadable syscalls
326;
327; 210 is used by the Checkpoint Module
328210	NODEF	lkmnosys lkmnosys nosys_args int
329211	NODEF	lkmnosys lkmnosys nosys_args int
330212	NODEF	lkmnosys lkmnosys nosys_args int
331213	NODEF	lkmnosys lkmnosys nosys_args int
332214	NODEF	lkmnosys lkmnosys nosys_args int
333215	NODEF	lkmnosys lkmnosys nosys_args int
334216	NODEF	lkmnosys lkmnosys nosys_args int
335217	NODEF	lkmnosys lkmnosys nosys_args int
336218	NODEF	lkmnosys lkmnosys nosys_args int
337219	NODEF	lkmnosys lkmnosys nosys_args int
338
339;
340; The following were introduced with NetBSD/4.4Lite-2
341;
342220	STD	{ int __semctl(int semid, int semnum, int cmd, \
343			    union semun *arg); }
344221	STD	{ int semget(key_t key, int nsems, int semflg); }
345222	STD	{ int semop(int semid, struct sembuf *sops, \
346			    u_int nsops); }
347223	UNIMPL	semconfig
348224	STD	{ int msgctl(int msqid, int cmd, \
349			    struct msqid_ds *buf); }
350225	STD	{ int msgget(key_t key, int msgflg); }
351226	STD	{ int msgsnd(int msqid, void *msgp, size_t msgsz, \
352			    int msgflg); }
353227	STD	{ int msgrcv(int msqid, void *msgp, size_t msgsz, \
354			    long msgtyp, int msgflg); }
355228	STD	{ caddr_t shmat(int shmid, const void *shmaddr, \
356			    int shmflg); }
357229	STD	{ int shmctl(int shmid, int cmd, \
358			    struct shmid_ds *buf); }
359230	STD	{ int shmdt(const void *shmaddr); }
360231	STD	{ int shmget(key_t key, size_t size, int shmflg); }
361;
362232	STD	{ int clock_gettime(clockid_t clock_id, \
363			    struct timespec *tp); }
364233	STD	{ int clock_settime(clockid_t clock_id, \
365			    const struct timespec *tp); }
366234	STD	{ int clock_getres(clockid_t clock_id, \
367			    struct timespec *tp); }
368235	UNIMPL	timer_create
369236	UNIMPL	timer_delete
370237	UNIMPL	timer_settime
371238	UNIMPL	timer_gettime
372239	UNIMPL	timer_getoverrun
373240	STD	{ int nanosleep(const struct timespec *rqtp, \
374			    struct timespec *rmtp); }
375241	UNIMPL	nosys
376242	UNIMPL	nosys
377243	UNIMPL	nosys
378244	UNIMPL	nosys
379245	UNIMPL	nosys
380246	UNIMPL	nosys
381247	UNIMPL	nosys
382248	UNIMPL	nosys
383249	UNIMPL	nosys
384; syscall numbers initially used in OpenBSD
385250	STD	{ int minherit(void *addr, size_t len, int inherit); }
386251	STD	{ int rfork(int flags); }
387252	STD	{ int openbsd_poll(struct pollfd *fds, u_int nfds, \
388			    int timeout); }
389253	STD	{ int issetugid(void); }
390254	STD	{ int lchown(char *path, int uid, int gid); }
391255	UNIMPL	nosys
392256	UNIMPL	nosys
393257	UNIMPL	nosys
394258	UNIMPL	nosys
395259	UNIMPL	nosys
396260	UNIMPL	nosys
397261	UNIMPL	nosys
398262	UNIMPL	nosys
399263	UNIMPL	nosys
400264	UNIMPL	nosys
401265	UNIMPL	nosys
402266	UNIMPL	nosys
403267	UNIMPL	nosys
404268	UNIMPL	nosys
405269	UNIMPL	nosys
406270	UNIMPL	nosys
407271	UNIMPL	nosys
408272	COMPAT_DF12	{ int getdents(int fd, char *buf, size_t count); }
409273	UNIMPL	nosys
410274	STD	{ int lchmod(char *path, mode_t mode); }
411275	NOPROTO { int lchown(char *path, uid_t uid, gid_t gid); } netbsd_lchown lchown_args int
412276	STD	{ int lutimes(char *path, struct timeval *tptr); }
413277	NOPROTO	{ int msync(void *addr, size_t len, int flags); } netbsd_msync msync_args int
414278	OBSOL	{ int nstat(char *path, struct nstat *ub); }
415279	OBSOL	{ int nfstat(int fd, struct nstat *sb); }
416280	OBSOL	{ int nlstat(char *path, struct nstat *ub); }
417281	UNIMPL	nosys
418282	UNIMPL	nosys
419283	UNIMPL	nosys
420284	UNIMPL	nosys
421285	UNIMPL	nosys
422286	UNIMPL	nosys
423287	UNIMPL	nosys
424288	UNIMPL	nosys
425; 289 and 290 from NetBSD (OpenBSD: 267 and 268)
426289	STD	{ ssize_t extpreadv(int fd, struct iovec *iovp, \
427				  u_int iovcnt, int flags, off_t offset); }
428290	STD	{ ssize_t extpwritev(int fd, struct iovec *iovp,\
429				  u_int iovcnt, int flags, off_t offset); }
430291	UNIMPL	nosys
431292	UNIMPL	nosys
432293	UNIMPL	nosys
433294	UNIMPL	nosys
434295	UNIMPL	nosys
435296	UNIMPL	nosys
436; XXX 297 is 300 in NetBSD
437297	STD	{ int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
438298	STD	{ int fhopen(const struct fhandle *u_fhp, int flags); }
439299	COMPAT_DF12 	{ int fhstat(const struct fhandle *u_fhp, struct dfbsd12_stat *sb); }
440; syscall numbers for FreeBSD
441300	STD	{ int modnext(int modid); }
442301	STD	{ int modstat(int modid, struct module_stat* stat); }
443302	STD	{ int modfnext(int modid); }
444303	STD	{ int modfind(const char *name); }
445304	STD	{ int kldload(const char *file); }
446305	STD	{ int kldunload(int fileid); }
447306	STD	{ int kldfind(const char *file); }
448307	STD	{ int kldnext(int fileid); }
449308	STD	{ int kldstat(int fileid, struct kld_file_stat* stat); }
450309	STD	{ int kldfirstmod(int fileid); }
451310	STD	{ int getsid(pid_t pid); }
452311	STD	{ int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
453312	STD	{ int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
454313	OBSOL	signanosleep
455314	STD	{ int aio_return(struct aiocb *aiocbp); }
456315	STD	{ int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
457316	STD	{ int aio_cancel(int fd, struct aiocb *aiocbp); }
458317	STD	{ int aio_error(struct aiocb *aiocbp); }
459318	STD	{ int aio_read(struct aiocb *aiocbp); }
460319	STD	{ int aio_write(struct aiocb *aiocbp); }
461320	STD	{ int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
462321	STD	{ int yield(void); }
463322	UNIMPL	thr_sleep
464323	UNIMPL	thr_wakeup
465324	STD	{ int mlockall(int how); }
466325	STD	{ int munlockall(void); }
467326	STD	{ int __getcwd(u_char *buf, u_int buflen); }
468
469327	STD	{ int sched_setparam (pid_t pid, const struct sched_param *param); }
470328	STD	{ int sched_getparam (pid_t pid, struct sched_param *param); }
471
472329	STD	{ int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
473330	STD	{ int sched_getscheduler (pid_t pid); }
474
475331	STD	{ int sched_yield (void); }
476332	STD	{ int sched_get_priority_max (int policy); }
477333	STD	{ int sched_get_priority_min (int policy); }
478334	STD	{ int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
479335	STD	{ int utrace(const void *addr, size_t len); }
480336	OBSOL	freebsd4_sendfile
481337	STD	{ int kldsym(int fileid, int cmd, void *data); }
482338	STD	{ int jail(struct jail *jail); }
483339	UNIMPL	pioctl
484340	STD	{ int sigprocmask(int how, const sigset_t *set, \
485			    sigset_t *oset); }
486341	STD	{ int sigsuspend(const sigset_t *sigmask); }
487342	STD	{ int sigaction(int sig, const struct sigaction *act, \
488			    struct sigaction *oact); }
489343	STD	{ int sigpending(sigset_t *set); }
490344	STD	{ int sigreturn(ucontext_t *sigcntxp); }
491345	STD	{ int sigtimedwait(const sigset_t *set,\
492			     siginfo_t *info, const struct timespec *timeout); }
493346	STD	{ int sigwaitinfo(const sigset_t *set,\
494			     siginfo_t *info); }
495347	STD	{ int __acl_get_file(const char *path, \
496			    acl_type_t type, struct acl *aclp); }
497348	STD	{ int __acl_set_file(const char *path, \
498			    acl_type_t type, struct acl *aclp); }
499349	STD	{ int __acl_get_fd(int filedes, acl_type_t type, \
500			    struct acl *aclp); }
501350	STD	{ int __acl_set_fd(int filedes, acl_type_t type, \
502			    struct acl *aclp); }
503351	STD	{ int __acl_delete_file(const char *path, \
504			    acl_type_t type); }
505352	STD	{ int __acl_delete_fd(int filedes, acl_type_t type); }
506353	STD	{ int __acl_aclcheck_file(const char *path, \
507			    acl_type_t type, struct acl *aclp); }
508354	STD	{ int __acl_aclcheck_fd(int filedes, acl_type_t type, \
509			    struct acl *aclp); }
510355	STD	{ int extattrctl(const char *path, int cmd, \
511			    const char *filename, int attrnamespace, \
512			    const char *attrname); }
513356	STD	{ int extattr_set_file(const char *path, \
514			    int attrnamespace, const char *attrname, \
515			    void *data, size_t nbytes); }
516357	STD	{ int extattr_get_file(const char *path, \
517			    int attrnamespace, const char *attrname, \
518			    void *data, size_t nbytes); }
519358	STD	{ int extattr_delete_file(const char *path, \
520			    int attrnamespace, const char *attrname); }
521359	STD	{ int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
522360	STD	{ int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
523361	STD	{ int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
524362	STD	{ int kqueue(void); }
525363	STD	{ int kevent(int fd, \
526			    const struct kevent *changelist, int nchanges, \
527			    struct kevent *eventlist, int nevents, \
528			    const struct timespec *timeout); }
529364	STD	{ int sctp_peeloff(int sd, caddr_t name ); }
530; 365-392 used by FreeBSD-current
531365	UNIMPL	nosys
532366	UNIMPL	nosys
533367	UNIMPL	nosys
534368	UNIMPL	nosys
535369	UNIMPL	nosys
536370	UNIMPL	nosys
537371	UNIMPL	nosys
538372	UNIMPL	nosys
539373	UNIMPL	nosys
540374	UNIMPL	nosys
541375	UNIMPL	nosys
542376	UNIMPL	nosys
543377	UNIMPL	nosys
544378	UNIMPL	nosys
545379	UNIMPL	nosys
546380	UNIMPL	nosys
547381	UNIMPL	nosys
548382	UNIMPL	nosys
549383	UNIMPL	nosys
550384	UNIMPL	nosys
551385	UNIMPL	nosys
552386	UNIMPL	nosys
553387	UNIMPL	nosys
554388	UNIMPL	nosys
555389	UNIMPL	nosys
556390	UNIMPL	nosys
557391	STD	{ int lchflags(char *path, int flags); }
558392	STD	{ int uuidgen(struct uuid *store, int count); }
559393	STD	{ int sendfile(int fd, int s, off_t offset, size_t nbytes, \
560				struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
561; 394-439 used by FreeBSD-current
562394	UNIMPL	nosys
563395	UNIMPL	nosys
564396	UNIMPL	nosys
565397	UNIMPL	nosys
566398	UNIMPL	nosys
567399	UNIMPL	nosys
568400	UNIMPL	nosys
569401	UNIMPL	nosys
570402	UNIMPL	nosys
571403	UNIMPL	nosys
572404	UNIMPL	nosys
573405	UNIMPL	nosys
574406	UNIMPL	nosys
575407	UNIMPL	nosys
576408	UNIMPL	nosys
577409	UNIMPL	nosys
578410	UNIMPL	nosys
579411	UNIMPL	nosys
580412	UNIMPL	nosys
581413	UNIMPL	nosys
582414	UNIMPL	nosys
583415	UNIMPL	nosys
584416	UNIMPL	nosys
585417	UNIMPL	nosys
586418	UNIMPL	nosys
587419	UNIMPL	nosys
588420	UNIMPL	nosys
589421	UNIMPL	nosys
590422	UNIMPL	nosys
591423	UNIMPL	nosys
592424	UNIMPL	nosys
593425	UNIMPL	nosys
594426	UNIMPL	nosys
595427	UNIMPL	nosys
596428	UNIMPL	nosys
597429	UNIMPL	nosys
598430	UNIMPL	nosys
599431	UNIMPL	nosys
600432	UNIMPL	nosys
601433	UNIMPL	nosys
602434	UNIMPL	nosys
603435	UNIMPL	nosys
604436	UNIMPL	nosys
605437	UNIMPL	nosys
606438	UNIMPL	nosys
607439	UNIMPL	nosys
608; 440-449 reserved for FreeBSD-5.x growth
609440	UNIMPL	nosys
610441	UNIMPL	nosys
611442	UNIMPL	nosys
612443	UNIMPL	nosys
613444	UNIMPL	nosys
614445	UNIMPL	nosys
615446	UNIMPL	nosys
616447	UNIMPL	nosys
617448	UNIMPL	nosys
618449	UNIMPL	nosys
619; 450 DragonFly system calls
620450	STD	{ int varsym_set(int level, const char *name, const char *data); }
621451	STD	{ int varsym_get(int mask, const char *wild, char *buf, int bufsize); }
622452	STD	{ int varsym_list(int level, char *buf, int maxsize, int *marker); }
623453	OBSOL	upc_register
624454	OBSOL	upc_control
625455	OBSOL	caps_sys_service
626456	OBSOL	caps_sys_client
627457	OBSOL	caps_sys_close
628458	OBSOL	caps_sys_put
629459	OBSOL	caps_sys_reply
630460	OBSOL	caps_sys_get
631461	OBSOL	caps_sys_wait
632462	OBSOL	caps_sys_abort
633463	OBSOL	caps_sys_getgen
634464	OBSOL	caps_sys_setgen
635465	STD	{ int exec_sys_register(void *entry); }
636466	STD	{ int exec_sys_unregister(int id); }
637467	STD	{ int sys_checkpoint(int type, int fd, pid_t pid, int retval); }
638468	STD	{ int mountctl(const char *path, int op, int fd, const void *ctl, int ctllen, void *buf, int buflen); }
639469	STD	{ int umtx_sleep(volatile const int *ptr, int value, int timeout); }
640470	STD	{ int umtx_wakeup(volatile const int *ptr, int count); }
641471	STD	{ int jail_attach(int jid); }
642472	STD	{ int set_tls_area(int which, struct tls_info *info, size_t infosize); }
643473	STD	{ int get_tls_area(int which, struct tls_info *info, size_t infosize); }
644474	STD	{ int closefrom(int fd); }
645475	STD	{ int stat(const char *path, struct stat *ub); }
646476	STD	{ int fstat(int fd, struct stat *sb); }
647477	STD	{ int lstat(const char *path, struct stat *ub); }
648478	STD 	{ int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
649479	STD	{ int getdirentries(int fd, char *buf, u_int count, \
650			    long *basep); }
651480	STD	{ int getdents(int fd, char *buf, size_t count); }
652481	STD	{ int usched_set(pid_t pid, int cmd, void *data, \
653				int bytes); }
654482	STD	{ int extaccept(int s, int flags, caddr_t name, int *anamelen); }
655483	STD	{ int extconnect(int s, int flags, caddr_t name, int namelen); }
656484	OBSOL	syslink
657485	STD	{ int mcontrol(void *addr, size_t len, int behav, off_t value); }
658486	STD	{ int vmspace_create(void *id, int type, void *data); }
659487	STD	{ int vmspace_destroy(void *id); }
660488	STD	{ int vmspace_ctl(void *id, int cmd, 		\
661					  struct trapframe *tframe,	\
662					  struct vextframe *vframe); }
663489	STD	{ int vmspace_mmap(void *id, void *addr, size_t len, \
664					  int prot, int flags, int fd, \
665					  off_t offset); }
666490	STD	{ int vmspace_munmap(void *id, void *addr,	\
667					  size_t len); }
668491	STD	{ int vmspace_mcontrol(void *id, void *addr, 	\
669					  size_t len, int behav, off_t value); }
670492	STD	{ ssize_t vmspace_pread(void *id, void *buf, \
671			    size_t nbyte, int flags, off_t offset); }
672493	STD	{ ssize_t vmspace_pwrite(void *id, const void *buf, \
673			    size_t nbyte, int flags, off_t offset); }
674494	STD	{ void extexit(int how, int status, void *addr); }
675495	STD	{ int lwp_create(struct lwp_params *params); }
676496	STD	{ lwpid_t lwp_gettid(void); }
677497	STD	{ int lwp_kill(pid_t pid, lwpid_t tid, int signum); }
678498	STD	{ int lwp_rtprio(int function, pid_t pid, lwpid_t tid, struct rtprio *rtp); }
679499	STD	{ int pselect(int nd, fd_set *in, fd_set *ou, \
680			    fd_set *ex, const struct timespec *ts,    \
681			    const sigset_t *sigmask); }
682500	STD	{ int statvfs(const char *path, struct statvfs *buf); }
683501	STD	{ int fstatvfs(int fd, struct statvfs *buf); }
684502	STD	{ int fhstatvfs(const struct fhandle *u_fhp, struct statvfs *buf); }
685503	STD	{ int getvfsstat(struct statfs *buf,          \
686			    struct statvfs *vbuf, long vbufsize, int flags); }
687504	STD	{ int openat(int fd, char *path, int flags, int mode); }
688; XXX should be		{ int openat(int fd, const char *path, int flags, ...);}
689; but we're not ready for `const' or varargs.
690; XXX man page says `mode_t mode'.
691505	STD	{ int fstatat(int fd, char *path, 	\
692					struct stat *sb, int flags); }
693506	STD	{ int fchmodat(int fd, char *path, int mode, \
694					int flags); }
695507	STD	{ int fchownat(int fd, char *path, int uid, int gid, \
696					int flags); }
697508	STD	{ int unlinkat(int fd, char *path, int flags); }
698509	STD	{ int faccessat(int fd, char *path, int amode, \
699					int flags); }
700
701; POSIX message queues system calls
702510	STD	{ mqd_t mq_open(const char * name, int oflag, \
703				  mode_t mode, struct mq_attr *attr); }
704511	STD	{ int mq_close(mqd_t mqdes); }
705512	STD	{ int mq_unlink(const char *name); }
706513	STD	{ int mq_getattr(mqd_t mqdes, \
707				  struct mq_attr *mqstat); }
708514	STD	{ int mq_setattr(mqd_t mqdes, \
709				  const struct mq_attr *mqstat, \
710				  struct mq_attr *omqstat); }
711515	STD	{ int mq_notify(mqd_t mqdes, \
712				  const struct sigevent *notification); }
713516	STD	{ int mq_send(mqd_t mqdes, const char *msg_ptr, \
714				  size_t msg_len, unsigned msg_prio); }
715517	STD	{ ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, \
716				  size_t msg_len, unsigned *msg_prio); }
717518	STD	{ int mq_timedsend(mqd_t mqdes, \
718				  const char *msg_ptr, size_t msg_len, \
719				  unsigned msg_prio, \
720				  const struct timespec *abs_timeout); }
721519	STD	{ ssize_t mq_timedreceive(mqd_t mqdes, \
722				  char *msg_ptr, size_t msg_len, unsigned *msg_prio, \
723				  const struct timespec *abs_timeout); }
724520	STD	{ int ioprio_set(int which, int who, int prio); }
725521	STD	{ int ioprio_get(int which, int who); }
726522	STD	{ int chroot_kernel(char *path); }
727523	STD	{ int renameat(int oldfd, char *old, int newfd, \
728				  char *new); }
729524	STD	{ int mkdirat(int fd, char *path, mode_t mode); }
730525	STD	{ int mkfifoat(int fd, char *path, mode_t mode); }
731526	STD	{ int mknodat(int fd, char *path, mode_t mode, \
732				  dev_t dev); }
733527	STD	{ int readlinkat(int fd, char *path, char *buf, \
734				  size_t bufsize); }
735528	STD	{ int symlinkat(char *path1, int fd, char *path2); }
736529	STD	{ int swapoff(char *name); }
737530	STD	{ int vquotactl(const char *path, \
738			    struct plistref *pref); }
739531	STD	{ int linkat(int fd1, char *path1, int fd2, \
740				char *path2, int flags); }
741532	STD	{ int eaccess(char *path, int flags); }
742533	STD	{ int lpathconf(char *path, int name); }
743534	STD	{ int vmm_guest_ctl(int op, struct vmm_guest_options *options); }
744535	STD	{ int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); }
745