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); }
268 169 STD { int semsys(int which, int a2, int a3, int a4, \
270 ; XXX should be { int semsys(int which, ...); }
271 170 STD { int msgsys(int which, int a2, int a3, int a4, \
273 ; XXX should be { int msgsys(int which, ...); }
274 171 STD { int shmsys(int which, int a2, int a3, int a4); }
275 ; XXX should be { int shmsys(int which, ...); }
277 173 STD { ssize_t extpread(int fd, void *buf, \
278 size_t nbyte, int flags, off_t offset); }
279 174 STD { ssize_t extpwrite(int fd, const void *buf, \
280 size_t nbyte, int flags, off_t offset); }
282 176 STD { int ntp_adjtime(struct timex *tp); }
283 177 UNIMPL sfork (BSD/OS 2.x)
284 178 UNIMPL getdescriptor (BSD/OS 2.x)
285 179 UNIMPL setdescriptor (BSD/OS 2.x)
288 ; Syscalls 181-199 are used by/reserved for BSD
289 181 STD { int setgid(gid_t gid); }
290 182 STD { int setegid(gid_t egid); }
291 183 STD { int seteuid(uid_t euid); }
294 186 UNIMPL lfs_segclean
295 187 UNIMPL lfs_segwait
296 188 COMPAT_DF12 { int stat(const char *path, struct dfbsd12_stat *ub); }
297 189 COMPAT_DF12 { int fstat(int fd, struct dfbsd12_stat *sb); }
298 190 COMPAT_DF12 { int lstat(const char *path, struct dfbsd12_stat *ub); }
299 191 STD { int pathconf(char *path, int name); }
300 192 STD { int fpathconf(int fd, int name); }
302 194 STD { int getrlimit(u_int which, \
303 struct rlimit *rlp); } \
304 getrlimit __getrlimit_args int
305 195 STD { int setrlimit(u_int which, \
306 struct rlimit *rlp); } \
307 setrlimit __setrlimit_args int
308 196 COMPAT_DF12 { int getdirentries(int fd, char *buf, \
309 u_int count, long *basep); }
310 197 STD { caddr_t mmap(caddr_t addr, size_t len, int prot, \
311 int flags, int fd, int pad, off_t pos); }
312 198 STD { int nosys(void); } __syscall __syscall_args int
313 199 STD { off_t lseek(int fd, int pad, off_t offset, \
315 200 STD { int truncate(char *path, int pad, off_t length); }
316 201 STD { int ftruncate(int fd, int pad, off_t length); }
317 202 STD { int __sysctl(int *name, u_int namelen, void *old, \
318 size_t *oldlenp, void *new, size_t newlen); } \
319 __sysctl sysctl_args int
320 203 STD { int mlock(const void *addr, size_t len); }
321 204 STD { int munlock(const void *addr, size_t len); }
322 205 STD { int undelete(char *path); }
323 206 STD { int futimes(int fd, struct timeval *tptr); }
324 207 STD { int getpgid(pid_t pid); }
325 208 UNIMPL newreboot (NetBSD)
326 209 STD { int poll(struct pollfd *fds, u_int nfds, \
330 ; The following are reserved for loadable syscalls
332 ; 210 is used by the Checkpoint Module
333 210 NODEF lkmnosys lkmnosys nosys_args int
334 211 NODEF lkmnosys lkmnosys nosys_args int
335 212 NODEF lkmnosys lkmnosys nosys_args int
336 213 NODEF lkmnosys lkmnosys nosys_args int
337 214 NODEF lkmnosys lkmnosys nosys_args int
338 215 NODEF lkmnosys lkmnosys nosys_args int
339 216 NODEF lkmnosys lkmnosys nosys_args int
340 217 NODEF lkmnosys lkmnosys nosys_args int
341 218 NODEF lkmnosys lkmnosys nosys_args int
342 219 NODEF lkmnosys lkmnosys nosys_args int
345 ; The following were introduced with NetBSD/4.4Lite-2
347 220 STD { int __semctl(int semid, int semnum, int cmd, \
349 221 STD { int semget(key_t key, int nsems, int semflg); }
350 222 STD { int semop(int semid, struct sembuf *sops, \
353 224 STD { int msgctl(int msqid, int cmd, \
354 struct msqid_ds *buf); }
355 225 STD { int msgget(key_t key, int msgflg); }
356 226 STD { int msgsnd(int msqid, void *msgp, size_t msgsz, \
358 227 STD { int msgrcv(int msqid, void *msgp, size_t msgsz, \
359 long msgtyp, int msgflg); }
360 228 STD { caddr_t shmat(int shmid, const void *shmaddr, \
362 229 STD { int shmctl(int shmid, int cmd, \
363 struct shmid_ds *buf); }
364 230 STD { int shmdt(const void *shmaddr); }
365 231 STD { int shmget(key_t key, size_t size, int shmflg); }
367 232 STD { int clock_gettime(clockid_t clock_id, \
368 struct timespec *tp); }
369 233 STD { int clock_settime(clockid_t clock_id, \
370 const struct timespec *tp); }
371 234 STD { int clock_getres(clockid_t clock_id, \
372 struct timespec *tp); }
373 235 UNIMPL timer_create
374 236 UNIMPL timer_delete
375 237 UNIMPL timer_settime
376 238 UNIMPL timer_gettime
377 239 UNIMPL timer_getoverrun
378 240 STD { int nanosleep(const struct timespec *rqtp, \
379 struct timespec *rmtp); }
389 ; syscall numbers initially used in OpenBSD
390 250 STD { int minherit(void *addr, size_t len, int inherit); }
391 251 STD { int rfork(int flags); }
392 252 STD { int openbsd_poll(struct pollfd *fds, u_int nfds, \
394 253 STD { int issetugid(void); }
395 254 STD { int lchown(char *path, int uid, int gid); }
413 272 COMPAT_DF12 { int getdents(int fd, char *buf, size_t count); }
415 274 STD { int lchmod(char *path, mode_t mode); }
416 275 NOPROTO { int lchown(char *path, uid_t uid, gid_t gid); } netbsd_lchown lchown_args int
417 276 STD { int lutimes(char *path, struct timeval *tptr); }
418 277 NOPROTO { int msync(void *addr, size_t len, int flags); } netbsd_msync msync_args int
419 278 OBSOL { int nstat(char *path, struct nstat *ub); }
420 279 OBSOL { int nfstat(int fd, struct nstat *sb); }
421 280 OBSOL { int nlstat(char *path, struct nstat *ub); }
430 ; 289 and 290 from NetBSD (OpenBSD: 267 and 268)
431 289 STD { ssize_t extpreadv(int fd, struct iovec *iovp, \
432 u_int iovcnt, int flags, off_t offset); }
433 290 STD { ssize_t extpwritev(int fd, struct iovec *iovp,\
434 u_int iovcnt, int flags, off_t offset); }
441 ; XXX 297 is 300 in NetBSD
442 297 STD { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
443 298 STD { int fhopen(const struct fhandle *u_fhp, int flags); }
444 299 COMPAT_DF12 { int fhstat(const struct fhandle *u_fhp, struct dfbsd12_stat *sb); }
445 ; syscall numbers for FreeBSD
446 300 STD { int modnext(int modid); }
447 301 STD { int modstat(int modid, struct module_stat* stat); }
448 302 STD { int modfnext(int modid); }
449 303 STD { int modfind(const char *name); }
450 304 STD { int kldload(const char *file); }
451 305 STD { int kldunload(int fileid); }
452 306 STD { int kldfind(const char *file); }
453 307 STD { int kldnext(int fileid); }
454 308 STD { int kldstat(int fileid, struct kld_file_stat* stat); }
455 309 STD { int kldfirstmod(int fileid); }
456 310 STD { int getsid(pid_t pid); }
457 311 STD { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
458 312 STD { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
459 313 OBSOL signanosleep
460 314 STD { int aio_return(struct aiocb *aiocbp); }
461 315 STD { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
462 316 STD { int aio_cancel(int fd, struct aiocb *aiocbp); }
463 317 STD { int aio_error(struct aiocb *aiocbp); }
464 318 STD { int aio_read(struct aiocb *aiocbp); }
465 319 STD { int aio_write(struct aiocb *aiocbp); }
466 320 STD { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
467 321 STD { int yield(void); }
469 323 UNIMPL thr_wakeup
470 324 STD { int mlockall(int how); }
471 325 STD { int munlockall(void); }
472 326 STD { int __getcwd(u_char *buf, u_int buflen); }
474 327 STD { int sched_setparam (pid_t pid, const struct sched_param *param); }
475 328 STD { int sched_getparam (pid_t pid, struct sched_param *param); }
477 329 STD { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
478 330 STD { int sched_getscheduler (pid_t pid); }
480 331 STD { int sched_yield (void); }
481 332 STD { int sched_get_priority_max (int policy); }
482 333 STD { int sched_get_priority_min (int policy); }
483 334 STD { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
484 335 STD { int utrace(const void *addr, size_t len); }
485 336 OBSOL freebsd4_sendfile
486 337 STD { int kldsym(int fileid, int cmd, void *data); }
487 338 STD { int jail(struct jail *jail); }
489 340 STD { int sigprocmask(int how, const sigset_t *set, \
491 341 STD { int sigsuspend(const sigset_t *sigmask); }
492 342 STD { int sigaction(int sig, const struct sigaction *act, \
493 struct sigaction *oact); }
494 343 STD { int sigpending(sigset_t *set); }
495 344 STD { int sigreturn(ucontext_t *sigcntxp); }
496 345 STD { int sigtimedwait(const sigset_t *set,\
497 siginfo_t *info, const struct timespec *timeout); }
498 346 STD { int sigwaitinfo(const sigset_t *set,\
500 347 STD { int __acl_get_file(const char *path, \
501 acl_type_t type, struct acl *aclp); }
502 348 STD { int __acl_set_file(const char *path, \
503 acl_type_t type, struct acl *aclp); }
504 349 STD { int __acl_get_fd(int filedes, acl_type_t type, \
506 350 STD { int __acl_set_fd(int filedes, acl_type_t type, \
508 351 STD { int __acl_delete_file(const char *path, \
510 352 STD { int __acl_delete_fd(int filedes, acl_type_t type); }
511 353 STD { int __acl_aclcheck_file(const char *path, \
512 acl_type_t type, struct acl *aclp); }
513 354 STD { int __acl_aclcheck_fd(int filedes, acl_type_t type, \
515 355 STD { int extattrctl(const char *path, int cmd, \
516 const char *filename, int attrnamespace, \
517 const char *attrname); }
518 356 STD { int extattr_set_file(const char *path, \
519 int attrnamespace, const char *attrname, \
520 void *data, size_t nbytes); }
521 357 STD { int extattr_get_file(const char *path, \
522 int attrnamespace, const char *attrname, \
523 void *data, size_t nbytes); }
524 358 STD { int extattr_delete_file(const char *path, \
525 int attrnamespace, const char *attrname); }
526 359 STD { int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
527 360 STD { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
528 361 STD { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
529 362 STD { int kqueue(void); }
530 363 STD { int kevent(int fd, \
531 const struct kevent *changelist, int nchanges, \
532 struct kevent *eventlist, int nevents, \
533 const struct timespec *timeout); }
534 364 STD { int sctp_peeloff(int sd, caddr_t name ); }
535 ; 365-392 used by FreeBSD-current
562 391 STD { int lchflags(char *path, int flags); }
563 392 STD { int uuidgen(struct uuid *store, int count); }
564 393 STD { int sendfile(int fd, int s, off_t offset, size_t nbytes, \
565 struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
566 ; 394-439 used by FreeBSD-current
613 ; 440-449 reserved for FreeBSD-5.x growth
624 ; 450 DragonFly system calls
625 450 STD { int varsym_set(int level, const char *name, const char *data); }
626 451 STD { int varsym_get(int mask, const char *wild, char *buf, int bufsize); }
627 452 STD { int varsym_list(int level, char *buf, int maxsize, int *marker); }
628 453 OBSOL upc_register
629 454 OBSOL upc_control
630 455 OBSOL caps_sys_service
631 456 OBSOL caps_sys_client
632 457 OBSOL caps_sys_close
633 458 OBSOL caps_sys_put
634 459 OBSOL caps_sys_reply
635 460 OBSOL caps_sys_get
636 461 OBSOL caps_sys_wait
637 462 OBSOL caps_sys_abort
638 463 OBSOL caps_sys_getgen
639 464 OBSOL caps_sys_setgen
640 465 STD { int exec_sys_register(void *entry); }
641 466 STD { int exec_sys_unregister(int id); }
642 467 STD { int sys_checkpoint(int type, int fd, pid_t pid, int retval); }
643 468 STD { int mountctl(const char *path, int op, int fd, const void *ctl, int ctllen, void *buf, int buflen); }
644 469 STD { int umtx_sleep(volatile const int *ptr, int value, int timeout); }
645 470 STD { int umtx_wakeup(volatile const int *ptr, int count); }
646 471 STD { int jail_attach(int jid); }
647 472 STD { int set_tls_area(int which, struct tls_info *info, size_t infosize); }
648 473 STD { int get_tls_area(int which, struct tls_info *info, size_t infosize); }
649 474 STD { int closefrom(int fd); }
650 475 STD { int stat(const char *path, struct stat *ub); }
651 476 STD { int fstat(int fd, struct stat *sb); }
652 477 STD { int lstat(const char *path, struct stat *ub); }
653 478 STD { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
654 479 STD { int getdirentries(int fd, char *buf, u_int count, \
656 480 STD { int getdents(int fd, char *buf, size_t count); }
657 481 STD { int usched_set(pid_t pid, int cmd, void *data, \
659 482 STD { int extaccept(int s, int flags, caddr_t name, int *anamelen); }
660 483 STD { int extconnect(int s, int flags, caddr_t name, int namelen); }
662 485 STD { int mcontrol(void *addr, size_t len, int behav, off_t value); }
663 486 STD { int vmspace_create(void *id, int type, void *data); }
664 487 STD { int vmspace_destroy(void *id); }
665 488 STD { int vmspace_ctl(void *id, int cmd, \
666 struct trapframe *tframe, \
667 struct vextframe *vframe); }
668 489 STD { int vmspace_mmap(void *id, void *addr, size_t len, \
669 int prot, int flags, int fd, \
671 490 STD { int vmspace_munmap(void *id, void *addr, \
673 491 STD { int vmspace_mcontrol(void *id, void *addr, \
674 size_t len, int behav, off_t value); }
675 492 STD { ssize_t vmspace_pread(void *id, void *buf, \
676 size_t nbyte, int flags, off_t offset); }
677 493 STD { ssize_t vmspace_pwrite(void *id, const void *buf, \
678 size_t nbyte, int flags, off_t offset); }
679 494 STD { void extexit(int how, int status, void *addr); }
680 495 STD { int lwp_create(struct lwp_params *params); }
681 496 STD { lwpid_t lwp_gettid(void); }
682 497 STD { int lwp_kill(pid_t pid, lwpid_t tid, int signum); }
683 498 STD { int lwp_rtprio(int function, pid_t pid, lwpid_t tid, struct rtprio *rtp); }
684 499 STD { int pselect(int nd, fd_set *in, fd_set *ou, \
685 fd_set *ex, const struct timespec *ts, \
686 const sigset_t *sigmask); }
687 500 STD { int statvfs(const char *path, struct statvfs *buf); }
688 501 STD { int fstatvfs(int fd, struct statvfs *buf); }
689 502 STD { int fhstatvfs(const struct fhandle *u_fhp, struct statvfs *buf); }
690 503 STD { int getvfsstat(struct statfs *buf, \
691 struct statvfs *vbuf, long vbufsize, int flags); }
692 504 STD { int openat(int fd, char *path, int flags, int mode); }
693 ; XXX should be { int openat(int fd, const char *path, int flags, ...);}
694 ; but we're not ready for `const' or varargs.
695 ; XXX man page says `mode_t mode'.
696 505 STD { int fstatat(int fd, char *path, \
697 struct stat *sb, int flags); }
698 506 STD { int fchmodat(int fd, char *path, int mode, \
700 507 STD { int fchownat(int fd, char *path, int uid, int gid, \
702 508 STD { int unlinkat(int fd, char *path, int flags); }
703 509 STD { int faccessat(int fd, char *path, int amode, \
706 ; POSIX message queues system calls
707 510 STD { mqd_t mq_open(const char * name, int oflag, \
708 mode_t mode, struct mq_attr *attr); }
709 511 STD { int mq_close(mqd_t mqdes); }
710 512 STD { int mq_unlink(const char *name); }
711 513 STD { int mq_getattr(mqd_t mqdes, \
712 struct mq_attr *mqstat); }
713 514 STD { int mq_setattr(mqd_t mqdes, \
714 const struct mq_attr *mqstat, \
715 struct mq_attr *omqstat); }
716 515 STD { int mq_notify(mqd_t mqdes, \
717 const struct sigevent *notification); }
718 516 STD { int mq_send(mqd_t mqdes, const char *msg_ptr, \
719 size_t msg_len, unsigned msg_prio); }
720 517 STD { ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, \
721 size_t msg_len, unsigned *msg_prio); }
722 518 STD { int mq_timedsend(mqd_t mqdes, \
723 const char *msg_ptr, size_t msg_len, \
725 const struct timespec *abs_timeout); }
726 519 STD { ssize_t mq_timedreceive(mqd_t mqdes, \
727 char *msg_ptr, size_t msg_len, unsigned *msg_prio, \
728 const struct timespec *abs_timeout); }
729 520 STD { int ioprio_set(int which, int who, int prio); }
730 521 STD { int ioprio_get(int which, int who); }
731 522 STD { int chroot_kernel(char *path); }
732 523 STD { int renameat(int oldfd, char *old, int newfd, \
734 524 STD { int mkdirat(int fd, char *path, mode_t mode); }
735 525 STD { int mkfifoat(int fd, char *path, mode_t mode); }
736 526 STD { int mknodat(int fd, char *path, mode_t mode, \
738 527 STD { int readlinkat(int fd, char *path, char *buf, \
740 528 STD { int symlinkat(char *path1, int fd, char *path2); }
741 529 STD { int swapoff(char *name); }
742 530 STD { int vquotactl(const char *path, \
743 struct plistref *pref); }
744 531 STD { int linkat(int fd1, char *path1, int fd2, \
745 char *path2, int flags); }
746 532 STD { int eaccess(char *path, int flags); }
747 533 STD { int lpathconf(char *path, int name); }
748 534 STD { int vmm_guest_ctl(int op, struct vmm_guest_options *options); }
749 535 STD { int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); }