xref: /dragonfly/sys/kern/syscalls.master (revision 0db87cb7)
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; Reserved/unimplemented system calls in the range 0-150 inclusive
41; are reserved for use in future Berkeley releases.
42; Additional system calls implemented in vendor and other
43; redistributions should be placed in the reserved range at the end
44; of the current calls.
45
460	STD	{ int nosys(void); } syscall nosys_args int
471	STD	{ void exit(int rval); }
482	STD	{ int fork(void); }
493	STD	{ ssize_t read(int fd, void *buf, size_t nbyte); }
504	STD	{ ssize_t write(int fd, const void *buf, size_t nbyte); }
515	STD	{ int open(char *path, int flags, int mode); }
52; XXX should be		{ int open(const char *path, int flags, ...); }
53; but we're not ready for `const' or varargs.
54; XXX man page says `mode_t mode'.
556	STD	{ int close(int fd); }
567	STD	{ int wait4(int pid, int *status, int options, \
57			    struct rusage *rusage); } wait4 wait_args int
588	COMPAT	{ int creat(char *path, int mode); }
599	STD	{ int link(char *path, char *link); }
6010	STD	{ int unlink(char *path); }
6111	OBSOL	execv
6212	STD	{ int chdir(char *path); }
6313	STD	{ int fchdir(int fd); }
6414	STD	{ int mknod(char *path, int mode, int dev); }
6515	STD	{ int chmod(char *path, int mode); }
6616	STD	{ int chown(char *path, int uid, int gid); }
6717	STD	{ int obreak(char *nsize); } break obreak_args int
6818	STD	{ int getfsstat(struct statfs *buf, long bufsize, \
69			    int flags); }
7019	COMPAT	{ long lseek(int fd, long offset, int whence); }
7120	STD	{ pid_t getpid(void); }
7221	STD	{ int mount(char *type, char *path, int flags, \
73			    caddr_t data); }
74; XXX `path' should have type `const char *' but we're not ready for that.
7522	STD	{ int unmount(char *path, int flags); }
7623	STD	{ int setuid(uid_t uid); }
7724	STD	{ uid_t getuid(void); }
7825	STD	{ uid_t geteuid(void); }
7926	STD	{ int ptrace(int req, pid_t pid, caddr_t addr, \
80			    int data); }
8127	STD	{ int recvmsg(int s, struct msghdr *msg, int flags); }
8228	STD	{ int sendmsg(int s, caddr_t msg, int flags); }
8329	STD	{ int recvfrom(int s, caddr_t buf, size_t len, \
84			    int flags, caddr_t from, int *fromlenaddr); }
8530	STD	{ int accept(int s, caddr_t name, int *anamelen); }
8631	STD	{ int getpeername(int fdes, caddr_t asa, int *alen); }
8732	STD	{ int getsockname(int fdes, caddr_t asa, int *alen); }
8833	STD	{ int access(char *path, int flags); }
8934	STD	{ int chflags(char *path, int flags); }
9035	STD	{ int fchflags(int fd, int flags); }
9136	STD	{ int sync(void); }
9237	STD	{ int kill(int pid, int signum); }
9338	COMPAT	{ int stat(char *path, struct ostat *ub); }
9439	STD	{ pid_t getppid(void); }
9540	COMPAT	{ int lstat(char *path, struct ostat *ub); }
9641	STD	{ int dup(int fd); }
9742	STD	{ int pipe(void); }
9843	STD	{ gid_t getegid(void); }
9944	STD	{ int profil(caddr_t samples, size_t size, \
100			    size_t offset, u_int scale); }
10145	STD	{ int ktrace(const char *fname, int ops, int facs, \
102			    int pid); }
10346	OBSOL	freebsd3_sigaction
10447	STD	{ gid_t getgid(void); }
10548	OBSOL	freebsd3_sigprocmask
106; XXX note nonstandard (bogus) calling convention - the libc stub passes
107; us the mask, not a pointer to it, and we return the old mask as the
108; (int) return value.
10949	STD	{ int getlogin(char *namebuf, u_int namelen); }
11050	STD	{ int setlogin(char *namebuf); }
11151	STD	{ int acct(char *path); }
11252	OBSOL	freebsd3_sigpending
11353	STD	{ int sigaltstack(stack_t *ss, stack_t *oss); }
11454	STD	{ int ioctl(int fd, u_long com, caddr_t data); }
11555	STD	{ int reboot(int opt); }
11656	STD	{ int revoke(char *path); }
11757	STD	{ int symlink(char *path, char *link); }
11858	STD	{ int readlink(char *path, char *buf, int count); }
11959	STD	{ int execve(char *fname, char **argv, char **envv); }
12060	STD	{ int umask(int newmask); } umask umask_args int
12161	STD	{ int chroot(char *path); }
12262	COMPAT	{ int fstat(int fd, struct ostat *sb); }
12363	COMPAT	{ int getkerninfo(int op, char *where, size_t *size, \
124			    int arg); } getkerninfo getkerninfo_args int
12564	COMPAT	{ int getpagesize(void); } \
126			    getpagesize getpagesize_args int
12765	STD	{ int msync(void *addr, size_t len, int flags); }
12866	STD	{ pid_t vfork(void); }
12967	OBSOL	vread
13068	OBSOL	vwrite
13169	STD	{ int sbrk(int incr); }
13270	STD	{ int sstk(int incr); }
13371	COMPAT	{ int mmap(void *addr, int len, int prot, \
134			    int flags, int fd, long pos); }
13572	COMPAT	{ int vadvise(int anom); } vadvise ovadvise_args int
13673	STD	{ int munmap(void *addr, size_t len); }
13774	STD	{ int mprotect(void *addr, size_t len, int prot); }
13875	STD	{ int madvise(void *addr, size_t len, int behav); }
13976	OBSOL	vhangup
14077	OBSOL	vlimit
14178	STD	{ int mincore(const void *addr, size_t len, \
142			    char *vec); }
14379	STD	{ int getgroups(u_int gidsetsize, gid_t *gidset); }
14480	STD	{ int setgroups(u_int gidsetsize, gid_t *gidset); }
14581	STD	{ int getpgrp(void); }
14682	STD	{ int setpgid(int pid, int pgid); }
14783	STD	{ int setitimer(u_int which, struct itimerval *itv, \
148			    struct itimerval *oitv); }
14984	COMPAT	{ int wait(void); }
15085	STD	{ int swapon(char *name); }
15186	STD	{ int getitimer(u_int which, struct itimerval *itv); }
15287	COMPAT	{ int gethostname(char *hostname, u_int len); } \
153			    gethostname gethostname_args int
15488	COMPAT	{ int sethostname(char *hostname, u_int len); } \
155			    sethostname sethostname_args int
15689	STD	{ int getdtablesize(void); }
15790	STD	{ int dup2(int from, int to); }
15891	UNIMPL	getdopt
15992	STD	{ int fcntl(int fd, int cmd, long arg); }
160; XXX should be		{ int fcntl(int fd, int cmd, ...); }
161; but we're not ready for varargs.
162; XXX man page says `int arg' too.
16393	STD	{ int select(int nd, fd_set *in, fd_set *ou, \
164			    fd_set *ex, struct timeval *tv); }
16594	UNIMPL	setdopt
16695	STD	{ int fsync(int fd); }
16796	STD	{ int setpriority(int which, int who, int prio); }
16897	STD	{ int socket(int domain, int type, int protocol); }
16998	STD	{ int connect(int s, caddr_t name, int namelen); }
17099	CPT_NOA	{ int accept(int s, caddr_t name, int *anamelen); } \
171			    accept accept_args int
172100	STD	{ int getpriority(int which, int who); }
173101	COMPAT	{ int send(int s, caddr_t buf, int len, int flags); }
174102	COMPAT	{ int recv(int s, caddr_t buf, int len, int flags); }
175103	OBSOL	freebsd3_sigreturn
176104	STD	{ int bind(int s, caddr_t name, int namelen); }
177105	STD	{ int setsockopt(int s, int level, int name, \
178			    caddr_t val, int valsize); }
179106	STD	{ int listen(int s, int backlog); }
180107	OBSOL	vtimes
181108	COMPAT	{ int sigvec(int signum, struct sigvec *nsv, \
182			    struct sigvec *osv); }
183109	COMPAT	{ int sigblock(int mask); }
184110	COMPAT	{ int sigsetmask(int mask); }
185111	OBSOL	freebsd3_sigsuspend
186; XXX note nonstandard (bogus) calling convention - the libc stub passes
187; us the mask, not a pointer to it.
188112	COMPAT	{ int sigstack(struct sigstack *nss, \
189			    struct sigstack *oss); }
190113	COMPAT	{ int recvmsg(int s, struct omsghdr *msg, int flags); }
191114	COMPAT	{ int sendmsg(int s, caddr_t msg, int flags); }
192115	OBSOL	vtrace
193116	STD	{ int gettimeofday(struct timeval *tp, \
194			    struct timezone *tzp); }
195117	STD	{ int getrusage(int who, struct rusage *rusage); }
196118	STD	{ int getsockopt(int s, int level, int name, \
197			    caddr_t val, int *avalsize); }
198119	UNIMPL	resuba (BSD/OS 2.x)
199120	STD	{ int readv(int fd, struct iovec *iovp, u_int iovcnt); }
200121	STD	{ int writev(int fd, struct iovec *iovp, \
201			    u_int iovcnt); }
202122	STD	{ int settimeofday(struct timeval *tv, \
203			    struct timezone *tzp); }
204123	STD	{ int fchown(int fd, int uid, int gid); }
205124	STD	{ int fchmod(int fd, int mode); }
206125	CPT_NOA	{ int recvfrom(int s, caddr_t buf, size_t len, \
207			    int flags, caddr_t from, int *fromlenaddr); } \
208			    recvfrom recvfrom_args int
209126	STD	{ int setreuid(int ruid, int euid); }
210127	STD	{ int setregid(int rgid, int egid); }
211128	STD	{ int rename(char *from, char *to); }
212129	COMPAT	{ int truncate(char *path, long length); }
213130	COMPAT	{ int ftruncate(int fd, long length); }
214131	STD	{ int flock(int fd, int how); }
215132	STD	{ int mkfifo(char *path, int mode); }
216133	STD	{ int sendto(int s, caddr_t buf, size_t len, \
217			    int flags, caddr_t to, int tolen); }
218134	STD	{ int shutdown(int s, int how); }
219135	STD	{ int socketpair(int domain, int type, int protocol, \
220			    int *rsv); }
221136	STD	{ int mkdir(char *path, int mode); }
222137	STD	{ int rmdir(char *path); }
223138	STD	{ int utimes(char *path, struct timeval *tptr); }
224139	OBSOL	4.2 sigreturn
225140	STD	{ int adjtime(struct timeval *delta, \
226			    struct timeval *olddelta); }
227141	COMPAT	{ int getpeername(int fdes, caddr_t asa, int *alen); }
228142	COMPAT	{ long gethostid(void); }
229143	COMPAT	{ int sethostid(long hostid); }
230144	COMPAT	{ int getrlimit(u_int which, struct orlimit *rlp); }
231145	COMPAT	{ int setrlimit(u_int which, struct orlimit *rlp); }
232146	COMPAT	{ int killpg(int pgid, int signum); }
233147	STD	{ int setsid(void); }
234148	STD	{ int quotactl(char *path, int cmd, int uid, \
235			    caddr_t arg); }
236149	COMPAT	{ int quota(void); }
237150	CPT_NOA	{ int getsockname(int fdec, caddr_t asa, int *alen); }\
238			    getsockname getsockname_args int
239
240; Syscalls 151-180 inclusive are reserved for vendor-specific
241; system calls.  (This includes various calls added for compatibity
242; with other Unix variants.)
243; Some of these calls are now supported by BSD...
244151	UNIMPL	sem_lock (BSD/OS 2.x)
245152	UNIMPL	sem_wakeup (BSD/OS 2.x)
246153	UNIMPL	asyncdaemon (BSD/OS 2.x)
247154	UNIMPL	nosys
248; 155 is initialized by the NFS code, if present.
249155	NOIMPL	{ int nfssvc(int flag, caddr_t argp); }
250156	COMPAT	{ int getdirentries(int fd, char *buf, u_int count, \
251			    long *basep); }
252157	STD	{ int statfs(char *path, struct statfs *buf); }
253158	STD	{ int fstatfs(int fd, struct statfs *buf); }
254159	UNIMPL	nosys
255160	UNIMPL	nosys
256; 161 is initialized by the NFS code, if present.
257161	STD	{ int getfh(char *fname, struct fhandle *fhp); }
258162	STD	{ int getdomainname(char *domainname, int len); }
259163	STD	{ int setdomainname(char *domainname, int len); }
260164	STD	{ int uname(struct utsname *name); }
261165	STD	{ int sysarch(int op, char *parms); }
262166	STD	{ int rtprio(int function, pid_t pid, \
263			    struct rtprio *rtp); }
264167	UNIMPL	nosys
265168	UNIMPL	nosys
266169	OBSOL	semsys
267170	OBSOL	msgsys
268171	OBSOL	shmsys
269172	UNIMPL	nosys
270173	STD	{ ssize_t extpread(int fd, void *buf, \
271			    size_t nbyte, int flags, off_t offset); }
272174	STD	{ ssize_t extpwrite(int fd, const void *buf, \
273			    size_t nbyte, int flags, off_t offset); }
274175	UNIMPL	nosys
275176	STD	{ int ntp_adjtime(struct timex *tp); }
276177	UNIMPL	sfork (BSD/OS 2.x)
277178	UNIMPL	getdescriptor (BSD/OS 2.x)
278179	UNIMPL	setdescriptor (BSD/OS 2.x)
279180	UNIMPL	nosys
280
281; Syscalls 181-199 are used by/reserved for BSD
282181	STD	{ int setgid(gid_t gid); }
283182	STD	{ int setegid(gid_t egid); }
284183	STD	{ int seteuid(uid_t euid); }
285184	UNIMPL	lfs_bmapv
286185	UNIMPL	lfs_markv
287186	UNIMPL	lfs_segclean
288187	UNIMPL	lfs_segwait
289188	UNIMPL	nosys
290189	UNIMPL	nosys
291190	UNIMPL	nosys
292191	STD	{ int pathconf(char *path, int name); }
293192	STD	{ int fpathconf(int fd, int name); }
294193	UNIMPL	nosys
295194	STD	{ int getrlimit(u_int which, \
296			    struct rlimit *rlp); } \
297			    getrlimit __getrlimit_args int
298195	STD	{ int setrlimit(u_int which, \
299			    struct rlimit *rlp); } \
300			    setrlimit __setrlimit_args int
301196	UNIMPL	nosys
302197	STD	{ caddr_t mmap(caddr_t addr, size_t len, int prot, \
303			    int flags, int fd, int pad, off_t pos); }
304198	STD	{ int nosys(void); } __syscall __syscall_args int
305199	STD	{ off_t lseek(int fd, int pad, off_t offset, \
306			    int whence); }
307200	STD	{ int truncate(char *path, int pad, off_t length); }
308201	STD	{ int ftruncate(int fd, int pad, off_t length); }
309202	STD	{ int __sysctl(int *name, u_int namelen, void *old, \
310			    size_t *oldlenp, void *new, size_t newlen); } \
311			    __sysctl sysctl_args int
312203	STD	{ int mlock(const void *addr, size_t len); }
313204	STD	{ int munlock(const void *addr, size_t len); }
314205	STD	{ int undelete(char *path); }
315206	STD	{ int futimes(int fd, struct timeval *tptr); }
316207	STD	{ int getpgid(pid_t pid); }
317208	UNIMPL	newreboot (NetBSD)
318209	STD	{ int poll(struct pollfd *fds, u_int nfds, \
319			    int timeout); }
320
321;
322; The following are reserved for loadable syscalls
323;
324; 210 is used by the Checkpoint Module
325210	NODEF	lkmnosys lkmnosys nosys_args int
326211	NODEF	lkmnosys lkmnosys nosys_args int
327212	NODEF	lkmnosys lkmnosys nosys_args int
328213	NODEF	lkmnosys lkmnosys nosys_args int
329214	NODEF	lkmnosys lkmnosys nosys_args int
330215	NODEF	lkmnosys lkmnosys nosys_args int
331216	NODEF	lkmnosys lkmnosys nosys_args int
332217	NODEF	lkmnosys lkmnosys nosys_args int
333218	NODEF	lkmnosys lkmnosys nosys_args int
334219	NODEF	lkmnosys lkmnosys nosys_args int
335
336;
337; The following were introduced with NetBSD/4.4Lite-2
338;
339220	STD	{ int __semctl(int semid, int semnum, int cmd, \
340			    union semun *arg); }
341221	STD	{ int semget(key_t key, int nsems, int semflg); }
342222	STD	{ int semop(int semid, struct sembuf *sops, \
343			    u_int nsops); }
344223	UNIMPL	semconfig
345224	STD	{ int msgctl(int msqid, int cmd, \
346			    struct msqid_ds *buf); }
347225	STD	{ int msgget(key_t key, int msgflg); }
348226	STD	{ int msgsnd(int msqid, const void *msgp, size_t msgsz, \
349			    int msgflg); }
350227	STD	{ int msgrcv(int msqid, void *msgp, size_t msgsz, \
351			    long msgtyp, int msgflg); }
352228	STD	{ caddr_t shmat(int shmid, const void *shmaddr, \
353			    int shmflg); }
354229	STD	{ int shmctl(int shmid, int cmd, \
355			    struct shmid_ds *buf); }
356230	STD	{ int shmdt(const void *shmaddr); }
357231	STD	{ int shmget(key_t key, size_t size, int shmflg); }
358;
359232	STD	{ int clock_gettime(clockid_t clock_id, \
360			    struct timespec *tp); }
361233	STD	{ int clock_settime(clockid_t clock_id, \
362			    const struct timespec *tp); }
363234	STD	{ int clock_getres(clockid_t clock_id, \
364			    struct timespec *tp); }
365235	UNIMPL	timer_create
366236	UNIMPL	timer_delete
367237	UNIMPL	timer_settime
368238	UNIMPL	timer_gettime
369239	UNIMPL	timer_getoverrun
370240	STD	{ int nanosleep(const struct timespec *rqtp, \
371			    struct timespec *rmtp); }
372241	UNIMPL	nosys
373242	UNIMPL	nosys
374243	UNIMPL	nosys
375244	UNIMPL	nosys
376245	UNIMPL	nosys
377246	UNIMPL	nosys
378247	UNIMPL	nosys
379248	UNIMPL	nosys
380249	UNIMPL	nosys
381; syscall numbers initially used in OpenBSD
382250	STD	{ int minherit(void *addr, size_t len, int inherit); }
383251	STD	{ int rfork(int flags); }
384252	STD	{ int openbsd_poll(struct pollfd *fds, u_int nfds, \
385			    int timeout); }
386253	STD	{ int issetugid(void); }
387254	STD	{ int lchown(char *path, int uid, int gid); }
388255	UNIMPL	nosys
389256	UNIMPL	nosys
390257	UNIMPL	nosys
391258	UNIMPL	nosys
392259	UNIMPL	nosys
393260	UNIMPL	nosys
394261	UNIMPL	nosys
395262	UNIMPL	nosys
396263	UNIMPL	nosys
397264	UNIMPL	nosys
398265	UNIMPL	nosys
399266	UNIMPL	nosys
400267	UNIMPL	nosys
401268	UNIMPL	nosys
402269	UNIMPL	nosys
403270	UNIMPL	nosys
404271	UNIMPL	nosys
405272	UNIMPL	nosys
406273	UNIMPL	nosys
407274	STD	{ int lchmod(char *path, mode_t mode); }
408275	NOPROTO { int lchown(char *path, uid_t uid, gid_t gid); } netbsd_lchown lchown_args int
409276	STD	{ int lutimes(char *path, struct timeval *tptr); }
410277	NOPROTO	{ int msync(void *addr, size_t len, int flags); } netbsd_msync msync_args int
411278	OBSOL	{ int nstat(char *path, struct nstat *ub); }
412279	OBSOL	{ int nfstat(int fd, struct nstat *sb); }
413280	OBSOL	{ int nlstat(char *path, struct nstat *ub); }
414281	UNIMPL	nosys
415282	UNIMPL	nosys
416283	UNIMPL	nosys
417284	UNIMPL	nosys
418285	UNIMPL	nosys
419286	UNIMPL	nosys
420287	UNIMPL	nosys
421288	UNIMPL	nosys
422; 289 and 290 from NetBSD (OpenBSD: 267 and 268)
423289	STD	{ ssize_t extpreadv(int fd, struct iovec *iovp, \
424				  u_int iovcnt, int flags, off_t offset); }
425290	STD	{ ssize_t extpwritev(int fd, struct iovec *iovp,\
426				  u_int iovcnt, int flags, off_t offset); }
427291	UNIMPL	nosys
428292	UNIMPL	nosys
429293	UNIMPL	nosys
430294	UNIMPL	nosys
431295	UNIMPL	nosys
432296	UNIMPL	nosys
433; XXX 297 is 300 in NetBSD
434297	STD	{ int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
435298	STD	{ int fhopen(const struct fhandle *u_fhp, int flags); }
436299	UNIMPL	nosys
437; syscall numbers for FreeBSD
438300	STD	{ int modnext(int modid); }
439301	STD	{ int modstat(int modid, struct module_stat* stat); }
440302	STD	{ int modfnext(int modid); }
441303	STD	{ int modfind(const char *name); }
442304	STD	{ int kldload(const char *file); }
443305	STD	{ int kldunload(int fileid); }
444306	STD	{ int kldfind(const char *file); }
445307	STD	{ int kldnext(int fileid); }
446308	STD	{ int kldstat(int fileid, struct kld_file_stat* stat); }
447309	STD	{ int kldfirstmod(int fileid); }
448310	STD	{ int getsid(pid_t pid); }
449311	STD	{ int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
450312	STD	{ int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
451313	OBSOL	signanosleep
452314	STD	{ int aio_return(struct aiocb *aiocbp); }
453315	STD	{ int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
454316	STD	{ int aio_cancel(int fd, struct aiocb *aiocbp); }
455317	STD	{ int aio_error(struct aiocb *aiocbp); }
456318	STD	{ int aio_read(struct aiocb *aiocbp); }
457319	STD	{ int aio_write(struct aiocb *aiocbp); }
458320	STD	{ int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
459321	STD	{ int yield(void); }
460322	UNIMPL	thr_sleep
461323	UNIMPL	thr_wakeup
462324	STD	{ int mlockall(int how); }
463325	STD	{ int munlockall(void); }
464326	STD	{ int __getcwd(u_char *buf, u_int buflen); }
465
466327	STD	{ int sched_setparam (pid_t pid, const struct sched_param *param); }
467328	STD	{ int sched_getparam (pid_t pid, struct sched_param *param); }
468
469329	STD	{ int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
470330	STD	{ int sched_getscheduler (pid_t pid); }
471
472331	STD	{ int sched_yield (void); }
473332	STD	{ int sched_get_priority_max (int policy); }
474333	STD	{ int sched_get_priority_min (int policy); }
475334	STD	{ int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
476335	STD	{ int utrace(const void *addr, size_t len); }
477336	OBSOL	freebsd4_sendfile
478337	STD	{ int kldsym(int fileid, int cmd, void *data); }
479338	STD	{ int jail(struct jail *jail); }
480339	UNIMPL	pioctl
481340	STD	{ int sigprocmask(int how, const sigset_t *set, \
482			    sigset_t *oset); }
483341	STD	{ int sigsuspend(const sigset_t *sigmask); }
484342	STD	{ int sigaction(int sig, const struct sigaction *act, \
485			    struct sigaction *oact); }
486343	STD	{ int sigpending(sigset_t *set); }
487344	STD	{ int sigreturn(ucontext_t *sigcntxp); }
488345	STD	{ int sigtimedwait(const sigset_t *set,\
489			     siginfo_t *info, const struct timespec *timeout); }
490346	STD	{ int sigwaitinfo(const sigset_t *set,\
491			     siginfo_t *info); }
492347	STD	{ int __acl_get_file(const char *path, \
493			    acl_type_t type, struct acl *aclp); }
494348	STD	{ int __acl_set_file(const char *path, \
495			    acl_type_t type, struct acl *aclp); }
496349	STD	{ int __acl_get_fd(int filedes, acl_type_t type, \
497			    struct acl *aclp); }
498350	STD	{ int __acl_set_fd(int filedes, acl_type_t type, \
499			    struct acl *aclp); }
500351	STD	{ int __acl_delete_file(const char *path, \
501			    acl_type_t type); }
502352	STD	{ int __acl_delete_fd(int filedes, acl_type_t type); }
503353	STD	{ int __acl_aclcheck_file(const char *path, \
504			    acl_type_t type, struct acl *aclp); }
505354	STD	{ int __acl_aclcheck_fd(int filedes, acl_type_t type, \
506			    struct acl *aclp); }
507355	STD	{ int extattrctl(const char *path, int cmd, \
508			    const char *filename, int attrnamespace, \
509			    const char *attrname); }
510356	STD	{ int extattr_set_file(const char *path, \
511			    int attrnamespace, const char *attrname, \
512			    void *data, size_t nbytes); }
513357	STD	{ int extattr_get_file(const char *path, \
514			    int attrnamespace, const char *attrname, \
515			    void *data, size_t nbytes); }
516358	STD	{ int extattr_delete_file(const char *path, \
517			    int attrnamespace, const char *attrname); }
518359	STD	{ int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
519360	STD	{ int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
520361	STD	{ int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
521362	STD	{ int kqueue(void); }
522363	STD	{ int kevent(int fd, \
523			    const struct kevent *changelist, int nchanges, \
524			    struct kevent *eventlist, int nevents, \
525			    const struct timespec *timeout); }
526364	UNIMPL	sctp_peeloff
527; 365-392 used by FreeBSD-current
528365	UNIMPL	nosys
529366	UNIMPL	nosys
530367	UNIMPL	nosys
531368	UNIMPL	nosys
532369	UNIMPL	nosys
533370	UNIMPL	nosys
534371	UNIMPL	nosys
535372	UNIMPL	nosys
536373	UNIMPL	nosys
537374	UNIMPL	nosys
538375	UNIMPL	nosys
539376	UNIMPL	nosys
540377	UNIMPL	nosys
541378	UNIMPL	nosys
542379	UNIMPL	nosys
543380	UNIMPL	nosys
544381	UNIMPL	nosys
545382	UNIMPL	nosys
546383	UNIMPL	nosys
547384	UNIMPL	nosys
548385	UNIMPL	nosys
549386	UNIMPL	nosys
550387	UNIMPL	nosys
551388	UNIMPL	nosys
552389	UNIMPL	nosys
553390	UNIMPL	nosys
554391	STD	{ int lchflags(char *path, int flags); }
555392	STD	{ int uuidgen(struct uuid *store, int count); }
556393	STD	{ int sendfile(int fd, int s, off_t offset, size_t nbytes, \
557				struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
558; 394-439 used by FreeBSD-current
559394	UNIMPL	nosys
560395	UNIMPL	nosys
561396	UNIMPL	nosys
562397	UNIMPL	nosys
563398	UNIMPL	nosys
564399	UNIMPL	nosys
565400	UNIMPL	nosys
566401	UNIMPL	nosys
567402	UNIMPL	nosys
568403	UNIMPL	nosys
569404	UNIMPL	nosys
570405	UNIMPL	nosys
571406	UNIMPL	nosys
572407	UNIMPL	nosys
573408	UNIMPL	nosys
574409	UNIMPL	nosys
575410	UNIMPL	nosys
576411	UNIMPL	nosys
577412	UNIMPL	nosys
578413	UNIMPL	nosys
579414	UNIMPL	nosys
580415	UNIMPL	nosys
581416	UNIMPL	nosys
582417	UNIMPL	nosys
583418	UNIMPL	nosys
584419	UNIMPL	nosys
585420	UNIMPL	nosys
586421	UNIMPL	nosys
587422	UNIMPL	nosys
588423	UNIMPL	nosys
589424	UNIMPL	nosys
590425	UNIMPL	nosys
591426	UNIMPL	nosys
592427	UNIMPL	nosys
593428	UNIMPL	nosys
594429	UNIMPL	nosys
595430	UNIMPL	nosys
596431	UNIMPL	nosys
597432	UNIMPL	nosys
598433	UNIMPL	nosys
599434	UNIMPL	nosys
600435	UNIMPL	nosys
601436	UNIMPL	nosys
602437	UNIMPL	nosys
603438	UNIMPL	nosys
604439	UNIMPL	nosys
605; 440-449 reserved for FreeBSD-5.x growth
606440	UNIMPL	nosys
607441	UNIMPL	nosys
608442	UNIMPL	nosys
609443	UNIMPL	nosys
610444	UNIMPL	nosys
611445	UNIMPL	nosys
612446	UNIMPL	nosys
613447	UNIMPL	nosys
614448	UNIMPL	nosys
615449	UNIMPL	nosys
616; 450 DragonFly system calls
617450	STD	{ int varsym_set(int level, const char *name, const char *data); }
618451	STD	{ int varsym_get(int mask, const char *wild, char *buf, int bufsize); }
619452	STD	{ int varsym_list(int level, char *buf, int maxsize, int *marker); }
620453	OBSOL	upc_register
621454	OBSOL	upc_control
622455	OBSOL	caps_sys_service
623456	OBSOL	caps_sys_client
624457	OBSOL	caps_sys_close
625458	OBSOL	caps_sys_put
626459	OBSOL	caps_sys_reply
627460	OBSOL	caps_sys_get
628461	OBSOL	caps_sys_wait
629462	OBSOL	caps_sys_abort
630463	OBSOL	caps_sys_getgen
631464	OBSOL	caps_sys_setgen
632465	STD	{ int exec_sys_register(void *entry); }
633466	STD	{ int exec_sys_unregister(int id); }
634467	STD	{ int sys_checkpoint(int type, int fd, pid_t pid, int retval); }
635468	STD	{ int mountctl(const char *path, int op, int fd, const void *ctl, int ctllen, void *buf, int buflen); }
636469	STD	{ int umtx_sleep(volatile const int *ptr, int value, int timeout); }
637470	STD	{ int umtx_wakeup(volatile const int *ptr, int count); }
638471	STD	{ int jail_attach(int jid); }
639472	STD	{ int set_tls_area(int which, struct tls_info *info, size_t infosize); }
640473	STD	{ int get_tls_area(int which, struct tls_info *info, size_t infosize); }
641474	STD	{ int closefrom(int fd); }
642475	STD	{ int stat(const char *path, struct stat *ub); }
643476	STD	{ int fstat(int fd, struct stat *sb); }
644477	STD	{ int lstat(const char *path, struct stat *ub); }
645478	STD 	{ int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
646479	STD	{ int getdirentries(int fd, char *buf, u_int count, \
647			    long *basep); }
648480	STD	{ int getdents(int fd, char *buf, size_t count); }
649481	STD	{ int usched_set(pid_t pid, int cmd, void *data, \
650				int bytes); }
651482	STD	{ int extaccept(int s, int flags, caddr_t name, int *anamelen); }
652483	STD	{ int extconnect(int s, int flags, caddr_t name, int namelen); }
653484	OBSOL	syslink
654485	STD	{ int mcontrol(void *addr, size_t len, int behav, off_t value); }
655486	STD	{ int vmspace_create(void *id, int type, void *data); }
656487	STD	{ int vmspace_destroy(void *id); }
657488	STD	{ int vmspace_ctl(void *id, int cmd, 		\
658					  struct trapframe *tframe,	\
659					  struct vextframe *vframe); }
660489	STD	{ int vmspace_mmap(void *id, void *addr, size_t len, \
661					  int prot, int flags, int fd, \
662					  off_t offset); }
663490	STD	{ int vmspace_munmap(void *id, void *addr,	\
664					  size_t len); }
665491	STD	{ int vmspace_mcontrol(void *id, void *addr, 	\
666					  size_t len, int behav, off_t value); }
667492	STD	{ ssize_t vmspace_pread(void *id, void *buf, \
668			    size_t nbyte, int flags, off_t offset); }
669493	STD	{ ssize_t vmspace_pwrite(void *id, const void *buf, \
670			    size_t nbyte, int flags, off_t offset); }
671494	STD	{ void extexit(int how, int status, void *addr); }
672495	STD	{ int lwp_create(struct lwp_params *params); }
673496	STD	{ lwpid_t lwp_gettid(void); }
674497	STD	{ int lwp_kill(pid_t pid, lwpid_t tid, int signum); }
675498	STD	{ int lwp_rtprio(int function, pid_t pid, lwpid_t tid, struct rtprio *rtp); }
676499	STD	{ int pselect(int nd, fd_set *in, fd_set *ou, \
677			    fd_set *ex, const struct timespec *ts,    \
678			    const sigset_t *sigmask); }
679500	STD	{ int statvfs(const char *path, struct statvfs *buf); }
680501	STD	{ int fstatvfs(int fd, struct statvfs *buf); }
681502	STD	{ int fhstatvfs(const struct fhandle *u_fhp, struct statvfs *buf); }
682503	STD	{ int getvfsstat(struct statfs *buf,          \
683			    struct statvfs *vbuf, long vbufsize, int flags); }
684504	STD	{ int openat(int fd, char *path, int flags, int mode); }
685; XXX should be		{ int openat(int fd, const char *path, int flags, ...);}
686; but we're not ready for `const' or varargs.
687; XXX man page says `mode_t mode'.
688505	STD	{ int fstatat(int fd, char *path, 	\
689					struct stat *sb, int flags); }
690506	STD	{ int fchmodat(int fd, char *path, int mode, \
691					int flags); }
692507	STD	{ int fchownat(int fd, char *path, int uid, int gid, \
693					int flags); }
694508	STD	{ int unlinkat(int fd, char *path, int flags); }
695509	STD	{ int faccessat(int fd, char *path, int amode, \
696					int flags); }
697
698; POSIX message queues system calls
699510	STD	{ mqd_t mq_open(const char * name, int oflag, \
700				  mode_t mode, struct mq_attr *attr); }
701511	STD	{ int mq_close(mqd_t mqdes); }
702512	STD	{ int mq_unlink(const char *name); }
703513	STD	{ int mq_getattr(mqd_t mqdes, \
704				  struct mq_attr *mqstat); }
705514	STD	{ int mq_setattr(mqd_t mqdes, \
706				  const struct mq_attr *mqstat, \
707				  struct mq_attr *omqstat); }
708515	STD	{ int mq_notify(mqd_t mqdes, \
709				  const struct sigevent *notification); }
710516	STD	{ int mq_send(mqd_t mqdes, const char *msg_ptr, \
711				  size_t msg_len, unsigned msg_prio); }
712517	STD	{ ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, \
713				  size_t msg_len, unsigned *msg_prio); }
714518	STD	{ int mq_timedsend(mqd_t mqdes, \
715				  const char *msg_ptr, size_t msg_len, \
716				  unsigned msg_prio, \
717				  const struct timespec *abs_timeout); }
718519	STD	{ ssize_t mq_timedreceive(mqd_t mqdes, \
719				  char *msg_ptr, size_t msg_len, unsigned *msg_prio, \
720				  const struct timespec *abs_timeout); }
721520	STD	{ int ioprio_set(int which, int who, int prio); }
722521	STD	{ int ioprio_get(int which, int who); }
723522	STD	{ int chroot_kernel(char *path); }
724523	STD	{ int renameat(int oldfd, char *old, int newfd, \
725				  char *new); }
726524	STD	{ int mkdirat(int fd, char *path, mode_t mode); }
727525	STD	{ int mkfifoat(int fd, char *path, mode_t mode); }
728526	STD	{ int mknodat(int fd, char *path, mode_t mode, \
729				  dev_t dev); }
730527	STD	{ int readlinkat(int fd, char *path, char *buf, \
731				  size_t bufsize); }
732528	STD	{ int symlinkat(char *path1, int fd, char *path2); }
733529	STD	{ int swapoff(char *name); }
734530	STD	{ int vquotactl(const char *path, \
735			    struct plistref *pref); }
736531	STD	{ int linkat(int fd1, char *path1, int fd2, \
737				char *path2, int flags); }
738532	STD	{ int eaccess(char *path, int flags); }
739533	STD	{ int lpathconf(char *path, int name); }
740534	STD	{ int vmm_guest_ctl(int op, struct vmm_guest_options *options); }
741535	STD	{ int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); }
742536	STD	{ int procctl(idtype_t idtype, id_t id, int cmd, void *data); }
743537	STD	{ int chflagsat(int fd, const char *path, int flags, int atflags);}
744538	STD	{ int pipe2(int *fildes, int flags); }
745539	STD	{ int utimensat(int fd, const char *path, const struct timespec *ts, int flags); }
746540	STD	{ int futimens(int fd, const struct timespec *ts); }
747