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 $
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
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
19 ; NOTE: All system calls are now called without the MP lock. Those
20 ; that need the MP lock will acquire it.
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
29 ; #ifdef's, etc. may be included, and are copied to the output files.
31 #include <sys/param.h>
32 #include <sys/sysent.h>
33 #include <sys/sysproto.h>
34 #include <sys/statvfs.h>
37 #include <emulation/43bsd/stat.h>
40 #include <emulation/dragonfly12/stat.h>
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.
48 0 STD { int nosys(void); } syscall nosys_args int
49 1 STD { void exit(int rval); }
50 2 STD { int fork(void); }
51 3 STD { ssize_t read(int fd, void *buf, size_t nbyte); }
52 4 STD { ssize_t write(int fd, const void *buf, size_t nbyte); }
53 5 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'.
57 6 STD { int close(int fd); }
58 7 STD { int wait4(int pid, int *status, int options, \
59 struct rusage *rusage); } wait4 wait_args int
60 8 COMPAT { int creat(char *path, int mode); }
61 9 STD { int link(char *path, char *link); }
62 10 STD { int unlink(char *path); }
64 12 STD { int chdir(char *path); }
65 13 STD { int fchdir(int fd); }
66 14 STD { int mknod(char *path, int mode, int dev); }
67 15 STD { int chmod(char *path, int mode); }
68 16 STD { int chown(char *path, int uid, int gid); }
69 17 STD { int obreak(char *nsize); } break obreak_args int
70 18 STD { int getfsstat(struct statfs *buf, long bufsize, \
72 19 COMPAT { long lseek(int fd, long offset, int whence); }
73 20 STD { pid_t getpid(void); }
74 21 STD { int mount(char *type, char *path, int flags, \
76 ; XXX `path' should have type `const char *' but we're not ready for that.
77 22 STD { int unmount(char *path, int flags); }
78 23 STD { int setuid(uid_t uid); }
79 24 STD { uid_t getuid(void); }
80 25 STD { uid_t geteuid(void); }
81 26 STD { int ptrace(int req, pid_t pid, caddr_t addr, \
83 27 STD { int recvmsg(int s, struct msghdr *msg, int flags); }
84 28 STD { int sendmsg(int s, caddr_t msg, int flags); }
85 29 STD { int recvfrom(int s, caddr_t buf, size_t len, \
86 int flags, caddr_t from, int *fromlenaddr); }
87 30 STD { int accept(int s, caddr_t name, int *anamelen); }
88 31 STD { int getpeername(int fdes, caddr_t asa, int *alen); }
89 32 STD { int getsockname(int fdes, caddr_t asa, int *alen); }
90 33 STD { int access(char *path, int flags); }
91 34 STD { int chflags(char *path, int flags); }
92 35 STD { int fchflags(int fd, int flags); }
93 36 STD { int sync(void); }
94 37 STD { int kill(int pid, int signum); }
95 38 COMPAT { int stat(char *path, struct ostat *ub); }
96 39 STD { pid_t getppid(void); }
97 40 COMPAT { int lstat(char *path, struct ostat *ub); }
98 41 STD { int dup(u_int fd); }
99 42 STD { int pipe(void); }
100 43 STD { gid_t getegid(void); }
101 44 STD { int profil(caddr_t samples, size_t size, \
102 size_t offset, u_int scale); }
103 45 STD { int ktrace(const char *fname, int ops, int facs, \
105 46 OBSOL freebsd3_sigaction
106 47 STD { gid_t getgid(void); }
107 48 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.
111 49 STD { int getlogin(char *namebuf, u_int namelen); }
112 50 STD { int setlogin(char *namebuf); }
113 51 STD { int acct(char *path); }
114 52 OBSOL freebsd3_sigpending
115 53 STD { int sigaltstack(stack_t *ss, stack_t *oss); }
116 54 STD { int ioctl(int fd, u_long com, caddr_t data); }
117 55 STD { int reboot(int opt); }
118 56 STD { int revoke(char *path); }
119 57 STD { int symlink(char *path, char *link); }
120 58 STD { int readlink(char *path, char *buf, int count); }
121 59 STD { int execve(char *fname, char **argv, char **envv); }
122 60 STD { int umask(int newmask); } umask umask_args int
123 61 STD { int chroot(char *path); }
124 62 COMPAT { int fstat(int fd, struct ostat *sb); }
125 63 COMPAT { int getkerninfo(int op, char *where, size_t *size, \
126 int arg); } getkerninfo getkerninfo_args int
127 64 COMPAT { int getpagesize(void); } \
128 getpagesize getpagesize_args int
129 65 STD { int msync(void *addr, size_t len, int flags); }
130 66 STD { pid_t vfork(void); }
133 69 STD { int sbrk(int incr); }
134 70 STD { int sstk(int incr); }
135 71 COMPAT { int mmap(void *addr, int len, int prot, \
136 int flags, int fd, long pos); }
137 72 COMPAT { int vadvise(int anom); } vadvise ovadvise_args int
138 73 STD { int munmap(void *addr, size_t len); }
139 74 STD { int mprotect(void *addr, size_t len, int prot); }
140 75 STD { int madvise(void *addr, size_t len, int behav); }
143 78 STD { int mincore(const void *addr, size_t len, \
145 79 STD { int getgroups(u_int gidsetsize, gid_t *gidset); }
146 80 STD { int setgroups(u_int gidsetsize, gid_t *gidset); }
147 81 STD { int getpgrp(void); }
148 82 STD { int setpgid(int pid, int pgid); }
149 83 STD { int setitimer(u_int which, struct itimerval *itv, \
150 struct itimerval *oitv); }
151 84 COMPAT { int wait(void); }
152 85 STD { int swapon(char *name); }
153 86 STD { int getitimer(u_int which, struct itimerval *itv); }
154 87 COMPAT { int gethostname(char *hostname, u_int len); } \
155 gethostname gethostname_args int
156 88 COMPAT { int sethostname(char *hostname, u_int len); } \
157 sethostname sethostname_args int
158 89 STD { int getdtablesize(void); }
159 90 STD { int dup2(u_int from, u_int to); }
161 92 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.
165 93 STD { int select(int nd, fd_set *in, fd_set *ou, \
166 fd_set *ex, struct timeval *tv); }
168 95 STD { int fsync(int fd); }
169 96 STD { int setpriority(int which, int who, int prio); }
170 97 STD { int socket(int domain, int type, int protocol); }
171 98 STD { int connect(int s, caddr_t name, int namelen); }
172 99 CPT_NOA { int accept(int s, caddr_t name, int *anamelen); } \
173 accept accept_args int
174 100 STD { int getpriority(int which, int who); }
175 101 COMPAT { int send(int s, caddr_t buf, int len, int flags); }
176 102 COMPAT { int recv(int s, caddr_t buf, int len, int flags); }
177 103 OBSOL freebsd3_sigreturn
178 104 STD { int bind(int s, caddr_t name, int namelen); }
179 105 STD { int setsockopt(int s, int level, int name, \
180 caddr_t val, int valsize); }
181 106 STD { int listen(int s, int backlog); }
183 108 COMPAT { int sigvec(int signum, struct sigvec *nsv, \
184 struct sigvec *osv); }
185 109 COMPAT { int sigblock(int mask); }
186 110 COMPAT { int sigsetmask(int mask); }
187 111 OBSOL freebsd3_sigsuspend
188 ; XXX note nonstandard (bogus) calling convention - the libc stub passes
189 ; us the mask, not a pointer to it.
190 112 COMPAT { int sigstack(struct sigstack *nss, \
191 struct sigstack *oss); }
192 113 COMPAT { int recvmsg(int s, struct omsghdr *msg, int flags); }
193 114 COMPAT { int sendmsg(int s, caddr_t msg, int flags); }
195 116 STD { int gettimeofday(struct timeval *tp, \
196 struct timezone *tzp); }
197 117 STD { int getrusage(int who, struct rusage *rusage); }
198 118 STD { int getsockopt(int s, int level, int name, \
199 caddr_t val, int *avalsize); }
200 119 UNIMPL resuba (BSD/OS 2.x)
201 120 STD { int readv(int fd, struct iovec *iovp, u_int iovcnt); }
202 121 STD { int writev(int fd, struct iovec *iovp, \
204 122 STD { int settimeofday(struct timeval *tv, \
205 struct timezone *tzp); }
206 123 STD { int fchown(int fd, int uid, int gid); }
207 124 STD { int fchmod(int fd, int mode); }
208 125 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
211 126 STD { int setreuid(int ruid, int euid); }
212 127 STD { int setregid(int rgid, int egid); }
213 128 STD { int rename(char *from, char *to); }
214 129 COMPAT { int truncate(char *path, long length); }
215 130 COMPAT { int ftruncate(int fd, long length); }
216 131 STD { int flock(int fd, int how); }
217 132 STD { int mkfifo(char *path, int mode); }
218 133 STD { int sendto(int s, caddr_t buf, size_t len, \
219 int flags, caddr_t to, int tolen); }
220 134 STD { int shutdown(int s, int how); }
221 135 STD { int socketpair(int domain, int type, int protocol, \
223 136 STD { int mkdir(char *path, int mode); }
224 137 STD { int rmdir(char *path); }
225 138 STD { int utimes(char *path, struct timeval *tptr); }
226 139 OBSOL 4.2 sigreturn
227 140 STD { int adjtime(struct timeval *delta, \
228 struct timeval *olddelta); }
229 141 COMPAT { int getpeername(int fdes, caddr_t asa, int *alen); }
230 142 COMPAT { long gethostid(void); }
231 143 COMPAT { int sethostid(long hostid); }
232 144 COMPAT { int getrlimit(u_int which, struct orlimit *rlp); }
233 145 COMPAT { int setrlimit(u_int which, struct orlimit *rlp); }
234 146 COMPAT { int killpg(int pgid, int signum); }
235 147 STD { int setsid(void); }
236 148 STD { int quotactl(char *path, int cmd, int uid, \
238 149 COMPAT { int quota(void); }
239 150 CPT_NOA { int getsockname(int fdec, caddr_t asa, int *alen); }\
240 getsockname getsockname_args int
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...
246 151 UNIMPL sem_lock (BSD/OS 2.x)
247 152 UNIMPL sem_wakeup (BSD/OS 2.x)
248 153 UNIMPL asyncdaemon (BSD/OS 2.x)
250 ; 155 is initialized by the NFS code, if present.
251 155 NOIMPL { int nfssvc(int flag, caddr_t argp); }
252 156 COMPAT { int getdirentries(int fd, char *buf, u_int count, \
254 157 STD { int statfs(char *path, struct statfs *buf); }
255 158 STD { int fstatfs(int fd, struct statfs *buf); }
258 ; 161 is initialized by the NFS code, if present.
259 161 STD { int getfh(char *fname, struct fhandle *fhp); }
260 162 STD { int getdomainname(char *domainname, int len); }
261 163 STD { int setdomainname(char *domainname, int len); }
262 164 STD { int uname(struct utsname *name); }
263 165 STD { int sysarch(int op, char *parms); }
264 166 STD { int rtprio(int function, pid_t pid, \
265 struct rtprio *rtp); }
272 173 STD { ssize_t extpread(int fd, void *buf, \
273 size_t nbyte, int flags, off_t offset); }
274 174 STD { ssize_t extpwrite(int fd, const void *buf, \
275 size_t nbyte, int flags, off_t offset); }
277 176 STD { int ntp_adjtime(struct timex *tp); }
278 177 UNIMPL sfork (BSD/OS 2.x)
279 178 UNIMPL getdescriptor (BSD/OS 2.x)
280 179 UNIMPL setdescriptor (BSD/OS 2.x)
283 ; Syscalls 181-199 are used by/reserved for BSD
284 181 STD { int setgid(gid_t gid); }
285 182 STD { int setegid(gid_t egid); }
286 183 STD { int seteuid(uid_t euid); }
289 186 UNIMPL lfs_segclean
290 187 UNIMPL lfs_segwait
291 188 COMPAT_DF12 { int stat(const char *path, struct dfbsd12_stat *ub); }
292 189 COMPAT_DF12 { int fstat(int fd, struct dfbsd12_stat *sb); }
293 190 COMPAT_DF12 { int lstat(const char *path, struct dfbsd12_stat *ub); }
294 191 STD { int pathconf(char *path, int name); }
295 192 STD { int fpathconf(int fd, int name); }
297 194 STD { int getrlimit(u_int which, \
298 struct rlimit *rlp); } \
299 getrlimit __getrlimit_args int
300 195 STD { int setrlimit(u_int which, \
301 struct rlimit *rlp); } \
302 setrlimit __setrlimit_args int
303 196 COMPAT_DF12 { int getdirentries(int fd, char *buf, \
304 u_int count, long *basep); }
305 197 STD { caddr_t mmap(caddr_t addr, size_t len, int prot, \
306 int flags, int fd, int pad, off_t pos); }
307 198 STD { int nosys(void); } __syscall __syscall_args int
308 199 STD { off_t lseek(int fd, int pad, off_t offset, \
310 200 STD { int truncate(char *path, int pad, off_t length); }
311 201 STD { int ftruncate(int fd, int pad, off_t length); }
312 202 STD { int __sysctl(int *name, u_int namelen, void *old, \
313 size_t *oldlenp, void *new, size_t newlen); } \
314 __sysctl sysctl_args int
315 203 STD { int mlock(const void *addr, size_t len); }
316 204 STD { int munlock(const void *addr, size_t len); }
317 205 STD { int undelete(char *path); }
318 206 STD { int futimes(int fd, struct timeval *tptr); }
319 207 STD { int getpgid(pid_t pid); }
320 208 UNIMPL newreboot (NetBSD)
321 209 STD { int poll(struct pollfd *fds, u_int nfds, \
325 ; The following are reserved for loadable syscalls
327 ; 210 is used by the Checkpoint Module
328 210 NODEF lkmnosys lkmnosys nosys_args int
329 211 NODEF lkmnosys lkmnosys nosys_args int
330 212 NODEF lkmnosys lkmnosys nosys_args int
331 213 NODEF lkmnosys lkmnosys nosys_args int
332 214 NODEF lkmnosys lkmnosys nosys_args int
333 215 NODEF lkmnosys lkmnosys nosys_args int
334 216 NODEF lkmnosys lkmnosys nosys_args int
335 217 NODEF lkmnosys lkmnosys nosys_args int
336 218 NODEF lkmnosys lkmnosys nosys_args int
337 219 NODEF lkmnosys lkmnosys nosys_args int
340 ; The following were introduced with NetBSD/4.4Lite-2
342 220 STD { int __semctl(int semid, int semnum, int cmd, \
344 221 STD { int semget(key_t key, int nsems, int semflg); }
345 222 STD { int semop(int semid, struct sembuf *sops, \
348 224 STD { int msgctl(int msqid, int cmd, \
349 struct msqid_ds *buf); }
350 225 STD { int msgget(key_t key, int msgflg); }
351 226 STD { int msgsnd(int msqid, void *msgp, size_t msgsz, \
353 227 STD { int msgrcv(int msqid, void *msgp, size_t msgsz, \
354 long msgtyp, int msgflg); }
355 228 STD { caddr_t shmat(int shmid, const void *shmaddr, \
357 229 STD { int shmctl(int shmid, int cmd, \
358 struct shmid_ds *buf); }
359 230 STD { int shmdt(const void *shmaddr); }
360 231 STD { int shmget(key_t key, size_t size, int shmflg); }
362 232 STD { int clock_gettime(clockid_t clock_id, \
363 struct timespec *tp); }
364 233 STD { int clock_settime(clockid_t clock_id, \
365 const struct timespec *tp); }
366 234 STD { int clock_getres(clockid_t clock_id, \
367 struct timespec *tp); }
368 235 UNIMPL timer_create
369 236 UNIMPL timer_delete
370 237 UNIMPL timer_settime
371 238 UNIMPL timer_gettime
372 239 UNIMPL timer_getoverrun
373 240 STD { int nanosleep(const struct timespec *rqtp, \
374 struct timespec *rmtp); }
384 ; syscall numbers initially used in OpenBSD
385 250 STD { int minherit(void *addr, size_t len, int inherit); }
386 251 STD { int rfork(int flags); }
387 252 STD { int openbsd_poll(struct pollfd *fds, u_int nfds, \
389 253 STD { int issetugid(void); }
390 254 STD { int lchown(char *path, int uid, int gid); }
408 272 COMPAT_DF12 { int getdents(int fd, char *buf, size_t count); }
410 274 STD { int lchmod(char *path, mode_t mode); }
411 275 NOPROTO { int lchown(char *path, uid_t uid, gid_t gid); } netbsd_lchown lchown_args int
412 276 STD { int lutimes(char *path, struct timeval *tptr); }
413 277 NOPROTO { int msync(void *addr, size_t len, int flags); } netbsd_msync msync_args int
414 278 OBSOL { int nstat(char *path, struct nstat *ub); }
415 279 OBSOL { int nfstat(int fd, struct nstat *sb); }
416 280 OBSOL { int nlstat(char *path, struct nstat *ub); }
425 ; 289 and 290 from NetBSD (OpenBSD: 267 and 268)
426 289 STD { ssize_t extpreadv(int fd, struct iovec *iovp, \
427 u_int iovcnt, int flags, off_t offset); }
428 290 STD { ssize_t extpwritev(int fd, struct iovec *iovp,\
429 u_int iovcnt, int flags, off_t offset); }
436 ; XXX 297 is 300 in NetBSD
437 297 STD { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
438 298 STD { int fhopen(const struct fhandle *u_fhp, int flags); }
439 299 COMPAT_DF12 { int fhstat(const struct fhandle *u_fhp, struct dfbsd12_stat *sb); }
440 ; syscall numbers for FreeBSD
441 300 STD { int modnext(int modid); }
442 301 STD { int modstat(int modid, struct module_stat* stat); }
443 302 STD { int modfnext(int modid); }
444 303 STD { int modfind(const char *name); }
445 304 STD { int kldload(const char *file); }
446 305 STD { int kldunload(int fileid); }
447 306 STD { int kldfind(const char *file); }
448 307 STD { int kldnext(int fileid); }
449 308 STD { int kldstat(int fileid, struct kld_file_stat* stat); }
450 309 STD { int kldfirstmod(int fileid); }
451 310 STD { int getsid(pid_t pid); }
452 311 STD { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
453 312 STD { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
454 313 OBSOL signanosleep
455 314 STD { int aio_return(struct aiocb *aiocbp); }
456 315 STD { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
457 316 STD { int aio_cancel(int fd, struct aiocb *aiocbp); }
458 317 STD { int aio_error(struct aiocb *aiocbp); }
459 318 STD { int aio_read(struct aiocb *aiocbp); }
460 319 STD { int aio_write(struct aiocb *aiocbp); }
461 320 STD { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
462 321 STD { int yield(void); }
464 323 UNIMPL thr_wakeup
465 324 STD { int mlockall(int how); }
466 325 STD { int munlockall(void); }
467 326 STD { int __getcwd(u_char *buf, u_int buflen); }
469 327 STD { int sched_setparam (pid_t pid, const struct sched_param *param); }
470 328 STD { int sched_getparam (pid_t pid, struct sched_param *param); }
472 329 STD { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
473 330 STD { int sched_getscheduler (pid_t pid); }
475 331 STD { int sched_yield (void); }
476 332 STD { int sched_get_priority_max (int policy); }
477 333 STD { int sched_get_priority_min (int policy); }
478 334 STD { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
479 335 STD { int utrace(const void *addr, size_t len); }
480 336 OBSOL freebsd4_sendfile
481 337 STD { int kldsym(int fileid, int cmd, void *data); }
482 338 STD { int jail(struct jail *jail); }
484 340 STD { int sigprocmask(int how, const sigset_t *set, \
486 341 STD { int sigsuspend(const sigset_t *sigmask); }
487 342 STD { int sigaction(int sig, const struct sigaction *act, \
488 struct sigaction *oact); }
489 343 STD { int sigpending(sigset_t *set); }
490 344 STD { int sigreturn(ucontext_t *sigcntxp); }
491 345 STD { int sigtimedwait(const sigset_t *set,\
492 siginfo_t *info, const struct timespec *timeout); }
493 346 STD { int sigwaitinfo(const sigset_t *set,\
495 347 STD { int __acl_get_file(const char *path, \
496 acl_type_t type, struct acl *aclp); }
497 348 STD { int __acl_set_file(const char *path, \
498 acl_type_t type, struct acl *aclp); }
499 349 STD { int __acl_get_fd(int filedes, acl_type_t type, \
501 350 STD { int __acl_set_fd(int filedes, acl_type_t type, \
503 351 STD { int __acl_delete_file(const char *path, \
505 352 STD { int __acl_delete_fd(int filedes, acl_type_t type); }
506 353 STD { int __acl_aclcheck_file(const char *path, \
507 acl_type_t type, struct acl *aclp); }
508 354 STD { int __acl_aclcheck_fd(int filedes, acl_type_t type, \
510 355 STD { int extattrctl(const char *path, int cmd, \
511 const char *filename, int attrnamespace, \
512 const char *attrname); }
513 356 STD { int extattr_set_file(const char *path, \
514 int attrnamespace, const char *attrname, \
515 void *data, size_t nbytes); }
516 357 STD { int extattr_get_file(const char *path, \
517 int attrnamespace, const char *attrname, \
518 void *data, size_t nbytes); }
519 358 STD { int extattr_delete_file(const char *path, \
520 int attrnamespace, const char *attrname); }
521 359 STD { int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
522 360 STD { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
523 361 STD { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
524 362 STD { int kqueue(void); }
525 363 STD { int kevent(int fd, \
526 const struct kevent *changelist, int nchanges, \
527 struct kevent *eventlist, int nevents, \
528 const struct timespec *timeout); }
529 364 STD { int sctp_peeloff(int sd, caddr_t name ); }
530 ; 365-392 used by FreeBSD-current
557 391 STD { int lchflags(char *path, int flags); }
558 392 STD { int uuidgen(struct uuid *store, int count); }
559 393 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
608 ; 440-449 reserved for FreeBSD-5.x growth
619 ; 450 DragonFly system calls
620 450 STD { int varsym_set(int level, const char *name, const char *data); }
621 451 STD { int varsym_get(int mask, const char *wild, char *buf, int bufsize); }
622 452 STD { int varsym_list(int level, char *buf, int maxsize, int *marker); }
623 453 OBSOL upc_register
624 454 OBSOL upc_control
625 455 OBSOL caps_sys_service
626 456 OBSOL caps_sys_client
627 457 OBSOL caps_sys_close
628 458 OBSOL caps_sys_put
629 459 OBSOL caps_sys_reply
630 460 OBSOL caps_sys_get
631 461 OBSOL caps_sys_wait
632 462 OBSOL caps_sys_abort
633 463 OBSOL caps_sys_getgen
634 464 OBSOL caps_sys_setgen
635 465 STD { int exec_sys_register(void *entry); }
636 466 STD { int exec_sys_unregister(int id); }
637 467 STD { int sys_checkpoint(int type, int fd, pid_t pid, int retval); }
638 468 STD { int mountctl(const char *path, int op, int fd, const void *ctl, int ctllen, void *buf, int buflen); }
639 469 STD { int umtx_sleep(volatile const int *ptr, int value, int timeout); }
640 470 STD { int umtx_wakeup(volatile const int *ptr, int count); }
641 471 STD { int jail_attach(int jid); }
642 472 STD { int set_tls_area(int which, struct tls_info *info, size_t infosize); }
643 473 STD { int get_tls_area(int which, struct tls_info *info, size_t infosize); }
644 474 STD { int closefrom(int fd); }
645 475 STD { int stat(const char *path, struct stat *ub); }
646 476 STD { int fstat(int fd, struct stat *sb); }
647 477 STD { int lstat(const char *path, struct stat *ub); }
648 478 STD { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
649 479 STD { int getdirentries(int fd, char *buf, u_int count, \
651 480 STD { int getdents(int fd, char *buf, size_t count); }
652 481 STD { int usched_set(pid_t pid, int cmd, void *data, \
654 482 STD { int extaccept(int s, int flags, caddr_t name, int *anamelen); }
655 483 STD { int extconnect(int s, int flags, caddr_t name, int namelen); }
657 485 STD { int mcontrol(void *addr, size_t len, int behav, off_t value); }
658 486 STD { int vmspace_create(void *id, int type, void *data); }
659 487 STD { int vmspace_destroy(void *id); }
660 488 STD { int vmspace_ctl(void *id, int cmd, \
661 struct trapframe *tframe, \
662 struct vextframe *vframe); }
663 489 STD { int vmspace_mmap(void *id, void *addr, size_t len, \
664 int prot, int flags, int fd, \
666 490 STD { int vmspace_munmap(void *id, void *addr, \
668 491 STD { int vmspace_mcontrol(void *id, void *addr, \
669 size_t len, int behav, off_t value); }
670 492 STD { ssize_t vmspace_pread(void *id, void *buf, \
671 size_t nbyte, int flags, off_t offset); }
672 493 STD { ssize_t vmspace_pwrite(void *id, const void *buf, \
673 size_t nbyte, int flags, off_t offset); }
674 494 STD { void extexit(int how, int status, void *addr); }
675 495 STD { int lwp_create(struct lwp_params *params); }
676 496 STD { lwpid_t lwp_gettid(void); }
677 497 STD { int lwp_kill(pid_t pid, lwpid_t tid, int signum); }
678 498 STD { int lwp_rtprio(int function, pid_t pid, lwpid_t tid, struct rtprio *rtp); }
679 499 STD { int pselect(int nd, fd_set *in, fd_set *ou, \
680 fd_set *ex, const struct timespec *ts, \
681 const sigset_t *sigmask); }
682 500 STD { int statvfs(const char *path, struct statvfs *buf); }
683 501 STD { int fstatvfs(int fd, struct statvfs *buf); }
684 502 STD { int fhstatvfs(const struct fhandle *u_fhp, struct statvfs *buf); }
685 503 STD { int getvfsstat(struct statfs *buf, \
686 struct statvfs *vbuf, long vbufsize, int flags); }
687 504 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'.
691 505 STD { int fstatat(int fd, char *path, \
692 struct stat *sb, int flags); }
693 506 STD { int fchmodat(int fd, char *path, int mode, \
695 507 STD { int fchownat(int fd, char *path, int uid, int gid, \
697 508 STD { int unlinkat(int fd, char *path, int flags); }
698 509 STD { int faccessat(int fd, char *path, int amode, \
701 ; POSIX message queues system calls
702 510 STD { mqd_t mq_open(const char * name, int oflag, \
703 mode_t mode, struct mq_attr *attr); }
704 511 STD { int mq_close(mqd_t mqdes); }
705 512 STD { int mq_unlink(const char *name); }
706 513 STD { int mq_getattr(mqd_t mqdes, \
707 struct mq_attr *mqstat); }
708 514 STD { int mq_setattr(mqd_t mqdes, \
709 const struct mq_attr *mqstat, \
710 struct mq_attr *omqstat); }
711 515 STD { int mq_notify(mqd_t mqdes, \
712 const struct sigevent *notification); }
713 516 STD { int mq_send(mqd_t mqdes, const char *msg_ptr, \
714 size_t msg_len, unsigned msg_prio); }
715 517 STD { ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, \
716 size_t msg_len, unsigned *msg_prio); }
717 518 STD { int mq_timedsend(mqd_t mqdes, \
718 const char *msg_ptr, size_t msg_len, \
720 const struct timespec *abs_timeout); }
721 519 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); }
724 520 STD { int ioprio_set(int which, int who, int prio); }
725 521 STD { int ioprio_get(int which, int who); }
726 522 STD { int chroot_kernel(char *path); }
727 523 STD { int renameat(int oldfd, char *old, int newfd, \
729 524 STD { int mkdirat(int fd, char *path, mode_t mode); }
730 525 STD { int mkfifoat(int fd, char *path, mode_t mode); }
731 526 STD { int mknodat(int fd, char *path, mode_t mode, \
733 527 STD { int readlinkat(int fd, char *path, char *buf, \
735 528 STD { int symlinkat(char *path1, int fd, char *path2); }
736 529 STD { int swapoff(char *name); }
737 530 STD { int vquotactl(const char *path, \
738 struct plistref *pref); }
739 531 STD { int linkat(int fd1, char *path1, int fd2, \
740 char *path2, int flags); }
741 532 STD { int eaccess(char *path, int flags); }
742 533 STD { int lpathconf(char *path, int name); }
743 534 STD { int vmm_guest_ctl(int op, struct vmm_guest_options *options); }
744 535 STD { int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); }