add fchownat(2) system call
[dragonfly.git] / sys / kern / syscalls.master
CommitLineData
1de703da
MD
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 $
984263bc
MD
3;
4; System call name/number master file.
5; Processed to created init_sysent.c, syscalls.c and syscall.h.
6
7; Columns: number [MPSAFE] type nargs namespc name alt{name,tag,rtyp}/comments
8; number system call number, must be in order
9; MPSAFE optional field, specifies that syscall does not want the
10; BGL grabbed automatically (it is SMP safe).
11; type one of STD, OBSOL, UNIMPL, COMPAT, CPT_NOA, LIBCOMPAT,
12; NODEF, NOARGS, NOPROTO, NOIMPL
13; namespc one of POSIX, BSD, NOHIDE
14; name psuedo-prototype of syscall routine
15; If one of the following alts is different, then all appear:
16; altname name of system call if different
17; alttag name of args struct tag if different from [o]`name'"_args"
18; altrtyp return type if not int (bogus - syscalls always return int)
19; for UNIMPL/OBSOL, name continues with comments
20
21; types:
22; STD always included
23; COMPAT included on COMPAT #ifdef
24; LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h
25; OBSOL obsolete, not included in system, only specifies name
26; UNIMPL not implemented, placeholder only
27
28; #ifdef's, etc. may be included, and are copied to the output files.
29
30#include <sys/param.h>
31#include <sys/sysent.h>
32#include <sys/sysproto.h>
d9fad06e 33#include <sys/statvfs.h>
984263bc 34
a6feb702
JS
35#ifdef COMPAT_43
36#include <emulation/43bsd/stat.h>
37#endif
38
f91a71dd
JS
39#include <emulation/dragonfly12/stat.h>
40
984263bc
MD
41; Reserved/unimplemented system calls in the range 0-150 inclusive
42; are reserved for use in future Berkeley releases.
43; Additional system calls implemented in vendor and other
44; redistributions should be placed in the reserved range at the end
45; of the current calls.
46
470 STD NOHIDE { int nosys(void); } syscall nosys_args int
753fd850 481 STD NOHIDE { void exit(int rval); }
984263bc 492 STD POSIX { int fork(void); }
f832287e
MD
503 MPSAFE STD POSIX { ssize_t read(int fd, void *buf, size_t nbyte); }
514 MPSAFE STD POSIX { ssize_t write(int fd, const void *buf, size_t nbyte); }
984263bc
MD
525 STD POSIX { int open(char *path, int flags, int mode); }
53; XXX should be { int open(const char *path, int flags, ...); }
54; but we're not ready for `const' or varargs.
55; XXX man page says `mode_t mode'.
f832287e 566 MPSAFE STD POSIX { int close(int fd); }
984263bc
MD
577 STD BSD { int wait4(int pid, int *status, int options, \
58 struct rusage *rusage); } wait4 wait_args int
598 COMPAT BSD { int creat(char *path, int mode); }
609 STD POSIX { int link(char *path, char *link); }
6110 STD POSIX { int unlink(char *path); }
6211 OBSOL NOHIDE execv
6312 STD POSIX { int chdir(char *path); }
6413 STD BSD { int fchdir(int fd); }
6514 STD POSIX { int mknod(char *path, int mode, int dev); }
6615 STD POSIX { int chmod(char *path, int mode); }
6716 STD POSIX { int chown(char *path, int uid, int gid); }
6817 STD BSD { int obreak(char *nsize); } break obreak_args int
6918 STD BSD { int getfsstat(struct statfs *buf, long bufsize, \
70 int flags); }
7119 COMPAT POSIX { long lseek(int fd, long offset, int whence); }
7220 STD POSIX { pid_t getpid(void); }
7321 STD BSD { int mount(char *type, char *path, int flags, \
74 caddr_t data); }
75; XXX `path' should have type `const char *' but we're not ready for that.
7622 STD BSD { int unmount(char *path, int flags); }
7723 STD POSIX { int setuid(uid_t uid); }
7824 MPSAFE STD POSIX { uid_t getuid(void); }
7925 MPSAFE STD POSIX { uid_t geteuid(void); }
8026 STD BSD { int ptrace(int req, pid_t pid, caddr_t addr, \
81 int data); }
8227 STD BSD { int recvmsg(int s, struct msghdr *msg, int flags); }
8328 STD BSD { int sendmsg(int s, caddr_t msg, int flags); }
8429 STD BSD { int recvfrom(int s, caddr_t buf, size_t len, \
85 int flags, caddr_t from, int *fromlenaddr); }
8630 STD BSD { int accept(int s, caddr_t name, int *anamelen); }
8731 STD BSD { int getpeername(int fdes, caddr_t asa, int *alen); }
8832 STD BSD { int getsockname(int fdes, caddr_t asa, int *alen); }
8933 STD POSIX { int access(char *path, int flags); }
9034 STD BSD { int chflags(char *path, int flags); }
9135 STD BSD { int fchflags(int fd, int flags); }
9236 STD BSD { int sync(void); }
9337 STD POSIX { int kill(int pid, int signum); }
9438 COMPAT POSIX { int stat(char *path, struct ostat *ub); }
07c865ae 9539 STD POSIX { pid_t getppid(void); }
984263bc 9640 COMPAT POSIX { int lstat(char *path, struct ostat *ub); }
f832287e 9741 MPSAFE STD POSIX { int dup(u_int fd); }
984263bc 9842 STD POSIX { int pipe(void); }
cff4089b 9943 STD POSIX { gid_t getegid(void); }
984263bc
MD
10044 STD BSD { int profil(caddr_t samples, size_t size, \
101 size_t offset, u_int scale); }
10245 STD BSD { int ktrace(const char *fname, int ops, int facs, \
103 int pid); }
65957d54 10446 OBSOL NOHIDE freebsd3_sigaction
984263bc 10547 MPSAFE STD POSIX { gid_t getgid(void); }
65957d54 10648 OBSOL NOHIDE freebsd3_sigprocmask
984263bc
MD
107; XXX note nonstandard (bogus) calling convention - the libc stub passes
108; us the mask, not a pointer to it, and we return the old mask as the
109; (int) return value.
11049 STD BSD { int getlogin(char *namebuf, u_int namelen); }
11150 STD BSD { int setlogin(char *namebuf); }
11251 STD BSD { int acct(char *path); }
65957d54 11352 OBSOL NOHIDE freebsd3_sigpending
984263bc
MD
11453 STD BSD { int sigaltstack(stack_t *ss, stack_t *oss); }
11554 STD POSIX { int ioctl(int fd, u_long com, caddr_t data); }
11655 STD BSD { int reboot(int opt); }
11756 STD POSIX { int revoke(char *path); }
11857 STD POSIX { int symlink(char *path, char *link); }
11958 STD POSIX { int readlink(char *path, char *buf, int count); }
12059 STD POSIX { int execve(char *fname, char **argv, char **envv); }
12160 MPSAFE STD POSIX { int umask(int newmask); } umask umask_args int
12261 STD BSD { int chroot(char *path); }
12362 COMPAT POSIX { int fstat(int fd, struct ostat *sb); }
12463 COMPAT BSD { int getkerninfo(int op, char *where, size_t *size, \
125 int arg); } getkerninfo getkerninfo_args int
12664 COMPAT BSD { int getpagesize(void); } \
127 getpagesize getpagesize_args int
12865 STD BSD { int msync(void *addr, size_t len, int flags); }
12966 STD BSD { int vfork(void); }
13067 OBSOL NOHIDE vread
13168 OBSOL NOHIDE vwrite
13269 STD BSD { int sbrk(int incr); }
13370 STD BSD { int sstk(int incr); }
13471 COMPAT BSD { int mmap(void *addr, int len, int prot, \
135 int flags, int fd, long pos); }
13672 STD BSD { int ovadvise(int anom); } vadvise ovadvise_args int
13773 STD BSD { int munmap(void *addr, size_t len); }
13874 STD BSD { int mprotect(const void *addr, size_t len, int prot); }
13975 STD BSD { int madvise(void *addr, size_t len, int behav); }
14076 OBSOL NOHIDE vhangup
14177 OBSOL NOHIDE vlimit
14278 STD BSD { int mincore(const void *addr, size_t len, \
143 char *vec); }
14479 STD POSIX { int getgroups(u_int gidsetsize, gid_t *gidset); }
14580 STD POSIX { int setgroups(u_int gidsetsize, gid_t *gidset); }
14681 MPSAFE STD POSIX { int getpgrp(void); }
14782 STD POSIX { int setpgid(int pid, int pgid); }
14883 STD BSD { int setitimer(u_int which, struct itimerval *itv, \
149 struct itimerval *oitv); }
15084 COMPAT BSD { int wait(void); }
15185 STD BSD { int swapon(char *name); }
15286 STD BSD { int getitimer(u_int which, struct itimerval *itv); }
15387 COMPAT BSD { int gethostname(char *hostname, u_int len); } \
154 gethostname gethostname_args int
15588 COMPAT BSD { int sethostname(char *hostname, u_int len); } \
156 sethostname sethostname_args int
5b287bba 15789 MPSAFE STD BSD { int getdtablesize(void); }
f832287e 15890 MPSAFE STD POSIX { int dup2(u_int from, u_int to); }
984263bc 15991 UNIMPL BSD getdopt
f832287e 16092 MPSAFE STD POSIX { int fcntl(int fd, int cmd, long arg); }
984263bc
MD
161; XXX should be { int fcntl(int fd, int cmd, ...); }
162; but we're not ready for varargs.
163; XXX man page says `int arg' too.
16493 STD BSD { int select(int nd, fd_set *in, fd_set *ou, \
165 fd_set *ex, struct timeval *tv); }
16694 UNIMPL BSD setdopt
16795 STD POSIX { int fsync(int fd); }
16896 STD BSD { int setpriority(int which, int who, int prio); }
16997 STD BSD { int socket(int domain, int type, int protocol); }
17098 STD BSD { int connect(int s, caddr_t name, int namelen); }
17199 CPT_NOA BSD { int accept(int s, caddr_t name, int *anamelen); } \
172 accept accept_args int
173100 STD BSD { int getpriority(int which, int who); }
174101 COMPAT BSD { int send(int s, caddr_t buf, int len, int flags); }
175102 COMPAT BSD { int recv(int s, caddr_t buf, int len, int flags); }
65957d54 176103 OBSOL NOHIDE freebsd3_sigreturn
984263bc
MD
177104 STD BSD { int bind(int s, caddr_t name, int namelen); }
178105 STD BSD { int setsockopt(int s, int level, int name, \
179 caddr_t val, int valsize); }
180106 STD BSD { int listen(int s, int backlog); }
181107 OBSOL NOHIDE vtimes
182108 COMPAT BSD { int sigvec(int signum, struct sigvec *nsv, \
183 struct sigvec *osv); }
184109 COMPAT BSD { int sigblock(int mask); }
185110 COMPAT BSD { int sigsetmask(int mask); }
65957d54 186111 OBSOL NOHIDE freebsd3_sigsuspend
984263bc
MD
187; XXX note nonstandard (bogus) calling convention - the libc stub passes
188; us the mask, not a pointer to it.
189112 COMPAT BSD { int sigstack(struct sigstack *nss, \
190 struct sigstack *oss); }
191113 COMPAT BSD { int recvmsg(int s, struct omsghdr *msg, int flags); }
192114 COMPAT BSD { int sendmsg(int s, caddr_t msg, int flags); }
193115 OBSOL NOHIDE vtrace
194116 MPSAFE STD BSD { int gettimeofday(struct timeval *tp, \
195 struct timezone *tzp); }
196117 STD BSD { int getrusage(int who, struct rusage *rusage); }
197118 STD BSD { int getsockopt(int s, int level, int name, \
198 caddr_t val, int *avalsize); }
199119 UNIMPL NOHIDE resuba (BSD/OS 2.x)
f832287e
MD
200120 MPSAFE STD BSD { int readv(int fd, struct iovec *iovp, u_int iovcnt); }
201121 MPSAFE STD BSD { int writev(int fd, struct iovec *iovp, \
984263bc
MD
202 u_int iovcnt); }
203122 STD BSD { int settimeofday(struct timeval *tv, \
204 struct timezone *tzp); }
205123 STD BSD { int fchown(int fd, int uid, int gid); }
206124 STD BSD { int fchmod(int fd, int mode); }
207125 CPT_NOA BSD { int recvfrom(int s, caddr_t buf, size_t len, \
208 int flags, caddr_t from, int *fromlenaddr); } \
209 recvfrom recvfrom_args int
210126 STD BSD { int setreuid(int ruid, int euid); }
211127 STD BSD { int setregid(int rgid, int egid); }
212128 STD POSIX { int rename(char *from, char *to); }
213129 COMPAT BSD { int truncate(char *path, long length); }
214130 COMPAT BSD { int ftruncate(int fd, long length); }
215131 STD BSD { int flock(int fd, int how); }
216132 STD POSIX { int mkfifo(char *path, int mode); }
217133 STD BSD { int sendto(int s, caddr_t buf, size_t len, \
218 int flags, caddr_t to, int tolen); }
219134 STD BSD { int shutdown(int s, int how); }
220135 STD BSD { int socketpair(int domain, int type, int protocol, \
221 int *rsv); }
222136 STD POSIX { int mkdir(char *path, int mode); }
223137 STD POSIX { int rmdir(char *path); }
224138 STD BSD { int utimes(char *path, struct timeval *tptr); }
225139 OBSOL NOHIDE 4.2 sigreturn
226140 STD BSD { int adjtime(struct timeval *delta, \
227 struct timeval *olddelta); }
228141 COMPAT BSD { int getpeername(int fdes, caddr_t asa, int *alen); }
229142 COMPAT BSD { long gethostid(void); }
230143 COMPAT BSD { int sethostid(long hostid); }
6e8e767c
SS
231144 MPSAFE COMPAT BSD { int getrlimit(u_int which, struct orlimit *rlp); }
232145 MPSAFE COMPAT BSD { int setrlimit(u_int which, struct orlimit *rlp); }
984263bc
MD
233146 COMPAT BSD { int killpg(int pgid, int signum); }
234147 STD POSIX { int setsid(void); }
235148 STD BSD { int quotactl(char *path, int cmd, int uid, \
236 caddr_t arg); }
237149 COMPAT BSD { int quota(void); }
238150 CPT_NOA BSD { int getsockname(int fdec, caddr_t asa, int *alen); }\
239 getsockname getsockname_args int
240
241; Syscalls 151-180 inclusive are reserved for vendor-specific
242; system calls. (This includes various calls added for compatibity
243; with other Unix variants.)
244; Some of these calls are now supported by BSD...
245151 UNIMPL NOHIDE sem_lock (BSD/OS 2.x)
246152 UNIMPL NOHIDE sem_wakeup (BSD/OS 2.x)
247153 UNIMPL NOHIDE asyncdaemon (BSD/OS 2.x)
248154 UNIMPL NOHIDE nosys
249; 155 is initialized by the NFS code, if present.
250155 NOIMPL BSD { int nfssvc(int flag, caddr_t argp); }
251156 COMPAT BSD { int getdirentries(int fd, char *buf, u_int count, \
252 long *basep); }
253157 STD BSD { int statfs(char *path, struct statfs *buf); }
254158 STD BSD { int fstatfs(int fd, struct statfs *buf); }
255159 UNIMPL NOHIDE nosys
256160 UNIMPL NOHIDE nosys
257; 161 is initialized by the NFS code, if present.
258161 STD BSD { int getfh(char *fname, struct fhandle *fhp); }
259162 STD BSD { int getdomainname(char *domainname, int len); }
260163 STD BSD { int setdomainname(char *domainname, int len); }
cff4089b 261164 STD BSD { int uname(struct utsname *name); }
984263bc
MD
262165 STD BSD { int sysarch(int op, char *parms); }
263166 STD BSD { int rtprio(int function, pid_t pid, \
264 struct rtprio *rtp); }
265167 UNIMPL NOHIDE nosys
266168 UNIMPL NOHIDE nosys
267169 STD BSD { int semsys(int which, int a2, int a3, int a4, \
268 int a5); }
269; XXX should be { int semsys(int which, ...); }
270170 STD BSD { int msgsys(int which, int a2, int a3, int a4, \
271 int a5, int a6); }
272; XXX should be { int msgsys(int which, ...); }
273171 STD BSD { int shmsys(int which, int a2, int a3, int a4); }
274; XXX should be { int shmsys(int which, ...); }
275172 UNIMPL NOHIDE nosys
b09fd398 276173 MPSAFE STD POSIX { ssize_t extpread(int fd, void *buf, \
9ba76b73 277 size_t nbyte, int flags, off_t offset); }
b09fd398 278174 MPSAFE STD POSIX { ssize_t extpwrite(int fd, const void *buf, \
9ba76b73 279 size_t nbyte, int flags, off_t offset); }
984263bc
MD
280175 UNIMPL NOHIDE nosys
281176 STD BSD { int ntp_adjtime(struct timex *tp); }
282177 UNIMPL NOHIDE sfork (BSD/OS 2.x)
283178 UNIMPL NOHIDE getdescriptor (BSD/OS 2.x)
284179 UNIMPL NOHIDE setdescriptor (BSD/OS 2.x)
285180 UNIMPL NOHIDE nosys
286
287; Syscalls 181-199 are used by/reserved for BSD
288181 STD POSIX { int setgid(gid_t gid); }
289182 STD BSD { int setegid(gid_t egid); }
290183 STD BSD { int seteuid(uid_t euid); }
291184 UNIMPL BSD lfs_bmapv
292185 UNIMPL BSD lfs_markv
293186 UNIMPL BSD lfs_segclean
294187 UNIMPL BSD lfs_segwait
f91a71dd
JS
295188 COMPAT_DF12 POSIX { int stat(const char *path, struct dfbsd12_stat *ub); }
296189 COMPAT_DF12 POSIX { int fstat(int fd, struct dfbsd12_stat *sb); }
297190 COMPAT_DF12 POSIX { int lstat(const char *path, struct dfbsd12_stat *ub); }
984263bc
MD
298191 STD POSIX { int pathconf(char *path, int name); }
299192 STD POSIX { int fpathconf(int fd, int name); }
300193 UNIMPL NOHIDE nosys
cff4089b 301194 STD BSD { int getrlimit(u_int which, \
984263bc
MD
302 struct rlimit *rlp); } \
303 getrlimit __getrlimit_args int
304195 STD BSD { int setrlimit(u_int which, \
305 struct rlimit *rlp); } \
306 setrlimit __setrlimit_args int
01f31ab3
JS
307196 COMPAT_DF12 BSD { int getdirentries(int fd, char *buf, \
308 u_int count, long *basep); }
984263bc
MD
309197 STD BSD { caddr_t mmap(caddr_t addr, size_t len, int prot, \
310 int flags, int fd, int pad, off_t pos); }
311198 STD NOHIDE { int nosys(void); } __syscall __syscall_args int
312199 STD POSIX { off_t lseek(int fd, int pad, off_t offset, \
313 int whence); }
314200 STD BSD { int truncate(char *path, int pad, off_t length); }
315201 STD BSD { int ftruncate(int fd, int pad, off_t length); }
316202 STD BSD { int __sysctl(int *name, u_int namelen, void *old, \
317 size_t *oldlenp, void *new, size_t newlen); } \
318 __sysctl sysctl_args int
319; properly, __sysctl should be a NOHIDE, but making an exception
320; here allows to avoid one in libc/sys/Makefile.inc.
321203 STD BSD { int mlock(const void *addr, size_t len); }
322204 STD BSD { int munlock(const void *addr, size_t len); }
323205 STD BSD { int undelete(char *path); }
324206 STD BSD { int futimes(int fd, struct timeval *tptr); }
325207 STD BSD { int getpgid(pid_t pid); }
326208 UNIMPL NOHIDE newreboot (NetBSD)
327209 STD BSD { int poll(struct pollfd *fds, u_int nfds, \
328 int timeout); }
329
330;
331; The following are reserved for loadable syscalls
332;
702d68a3
DRJ
333; 210 is used by the Checkpoint Module
334210 NODEF NOHIDE lkmnosys lkmnosys nosys_args int
984263bc
MD
335211 NODEF NOHIDE lkmnosys lkmnosys nosys_args int
336212 NODEF NOHIDE lkmnosys lkmnosys nosys_args int
337213 NODEF NOHIDE lkmnosys lkmnosys nosys_args int
338214 NODEF NOHIDE lkmnosys lkmnosys nosys_args int
339215 NODEF NOHIDE lkmnosys lkmnosys nosys_args int
340216 NODEF NOHIDE lkmnosys lkmnosys nosys_args int
341217 NODEF NOHIDE lkmnosys lkmnosys nosys_args int
342218 NODEF NOHIDE lkmnosys lkmnosys nosys_args int
343219 NODEF NOHIDE lkmnosys lkmnosys nosys_args int
344
345;
346; The following were introduced with NetBSD/4.4Lite-2
347;
348220 STD BSD { int __semctl(int semid, int semnum, int cmd, \
349 union semun *arg); }
350221 STD BSD { int semget(key_t key, int nsems, int semflg); }
351222 STD BSD { int semop(int semid, struct sembuf *sops, \
352 u_int nsops); }
353223 UNIMPL NOHIDE semconfig
354224 STD BSD { int msgctl(int msqid, int cmd, \
355 struct msqid_ds *buf); }
356225 STD BSD { int msgget(key_t key, int msgflg); }
357226 STD BSD { int msgsnd(int msqid, void *msgp, size_t msgsz, \
358 int msgflg); }
359227 STD BSD { int msgrcv(int msqid, void *msgp, size_t msgsz, \
360 long msgtyp, int msgflg); }
361228 STD BSD { int shmat(int shmid, void *shmaddr, int shmflg); }
362229 STD BSD { int shmctl(int shmid, int cmd, \
363 struct shmid_ds *buf); }
364230 STD BSD { int shmdt(void *shmaddr); }
365231 STD BSD { int shmget(key_t key, int size, int shmflg); }
366;
367232 STD POSIX { int clock_gettime(clockid_t clock_id, \
368 struct timespec *tp); }
369233 STD POSIX { int clock_settime(clockid_t clock_id, \
370 const struct timespec *tp); }
371234 STD POSIX { int clock_getres(clockid_t clock_id, \
372 struct timespec *tp); }
373235 UNIMPL NOHIDE timer_create
374236 UNIMPL NOHIDE timer_delete
375237 UNIMPL NOHIDE timer_settime
376238 UNIMPL NOHIDE timer_gettime
377239 UNIMPL NOHIDE timer_getoverrun
378240 STD POSIX { int nanosleep(const struct timespec *rqtp, \
379 struct timespec *rmtp); }
380241 UNIMPL NOHIDE nosys
381242 UNIMPL NOHIDE nosys
382243 UNIMPL NOHIDE nosys
383244 UNIMPL NOHIDE nosys
384245 UNIMPL NOHIDE nosys
385246 UNIMPL NOHIDE nosys
386247 UNIMPL NOHIDE nosys
387248 UNIMPL NOHIDE nosys
388249 UNIMPL NOHIDE nosys
389; syscall numbers initially used in OpenBSD
390250 STD BSD { int minherit(void *addr, size_t len, int inherit); }
391251 STD BSD { int rfork(int flags); }
392252 STD BSD { int openbsd_poll(struct pollfd *fds, u_int nfds, \
393 int timeout); }
394253 STD BSD { int issetugid(void); }
395254 STD BSD { int lchown(char *path, int uid, int gid); }
396255 UNIMPL NOHIDE nosys
397256 UNIMPL NOHIDE nosys
398257 UNIMPL NOHIDE nosys
399258 UNIMPL NOHIDE nosys
400259 UNIMPL NOHIDE nosys
401260 UNIMPL NOHIDE nosys
402261 UNIMPL NOHIDE nosys
403262 UNIMPL NOHIDE nosys
404263 UNIMPL NOHIDE nosys
405264 UNIMPL NOHIDE nosys
406265 UNIMPL NOHIDE nosys
407266 UNIMPL NOHIDE nosys
408267 UNIMPL NOHIDE nosys
409268 UNIMPL NOHIDE nosys
410269 UNIMPL NOHIDE nosys
411270 UNIMPL NOHIDE nosys
412271 UNIMPL NOHIDE nosys
01f31ab3 413272 COMPAT_DF12 BSD { int getdents(int fd, char *buf, size_t count); }
984263bc
MD
414273 UNIMPL NOHIDE nosys
415274 STD BSD { int lchmod(char *path, mode_t mode); }
416275 NOPROTO BSD { int lchown(char *path, uid_t uid, gid_t gid); } netbsd_lchown lchown_args int
417276 STD BSD { int lutimes(char *path, struct timeval *tptr); }
418277 NOPROTO BSD { int msync(void *addr, size_t len, int flags); } netbsd_msync msync_args int
48703120
JS
419278 OBSOL BSD { int nstat(char *path, struct nstat *ub); }
420279 OBSOL NOHIDE { int nfstat(int fd, struct nstat *sb); }
421280 OBSOL NOHIDE { int nlstat(char *path, struct nstat *ub); }
984263bc
MD
422281 UNIMPL NOHIDE nosys
423282 UNIMPL NOHIDE nosys
424283 UNIMPL NOHIDE nosys
425284 UNIMPL NOHIDE nosys
426285 UNIMPL NOHIDE nosys
427286 UNIMPL NOHIDE nosys
428287 UNIMPL NOHIDE nosys
429288 UNIMPL NOHIDE nosys
7f83ed38 430; 289 and 290 from NetBSD (OpenBSD: 267 and 268)
b09fd398 431289 MPSAFE STD BSD { ssize_t extpreadv(int fd, struct iovec *iovp, \
9ba76b73 432 u_int iovcnt, int flags, off_t offset); }
b09fd398 433290 MPSAFE STD BSD { ssize_t extpwritev(int fd, struct iovec *iovp,\
9ba76b73 434 u_int iovcnt, int flags, off_t offset); }
984263bc
MD
435291 UNIMPL NOHIDE nosys
436292 UNIMPL NOHIDE nosys
437293 UNIMPL NOHIDE nosys
438294 UNIMPL NOHIDE nosys
439295 UNIMPL NOHIDE nosys
440296 UNIMPL NOHIDE nosys
441; XXX 297 is 300 in NetBSD
442297 STD BSD { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
443298 STD BSD { int fhopen(const struct fhandle *u_fhp, int flags); }
f91a71dd 444299 COMPAT_DF12 POSIX { int fhstat(const struct fhandle *u_fhp, struct dfbsd12_stat *sb); }
984263bc
MD
445; syscall numbers for FreeBSD
446300 STD BSD { int modnext(int modid); }
447301 STD BSD { int modstat(int modid, struct module_stat* stat); }
448302 STD BSD { int modfnext(int modid); }
449303 STD BSD { int modfind(const char *name); }
450304 STD BSD { int kldload(const char *file); }
451305 STD BSD { int kldunload(int fileid); }
452306 STD BSD { int kldfind(const char *file); }
453307 STD BSD { int kldnext(int fileid); }
454308 STD BSD { int kldstat(int fileid, struct kld_file_stat* stat); }
455309 STD BSD { int kldfirstmod(int fileid); }
456310 STD BSD { int getsid(pid_t pid); }
457311 STD BSD { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
458312 STD BSD { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
459313 OBSOL NOHIDE signanosleep
460314 STD BSD { int aio_return(struct aiocb *aiocbp); }
461315 STD BSD { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
462316 STD BSD { int aio_cancel(int fd, struct aiocb *aiocbp); }
463317 STD BSD { int aio_error(struct aiocb *aiocbp); }
464318 STD BSD { int aio_read(struct aiocb *aiocbp); }
465319 STD BSD { int aio_write(struct aiocb *aiocbp); }
466320 STD BSD { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
467321 STD BSD { int yield(void); }
468322 STD BSD { int thr_sleep(const struct timespec *timeout); }
469323 STD BSD { int thr_wakeup(pid_t pid); }
470324 STD BSD { int mlockall(int how); }
471325 STD BSD { int munlockall(void); }
472326 STD BSD { int __getcwd(u_char *buf, u_int buflen); }
473
474327 STD POSIX { int sched_setparam (pid_t pid, const struct sched_param *param); }
475328 STD POSIX { int sched_getparam (pid_t pid, struct sched_param *param); }
476
477329 STD POSIX { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
478330 STD POSIX { int sched_getscheduler (pid_t pid); }
479
480331 STD POSIX { int sched_yield (void); }
481332 STD POSIX { int sched_get_priority_max (int policy); }
482333 STD POSIX { int sched_get_priority_min (int policy); }
483334 STD POSIX { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
484335 STD BSD { int utrace(const void *addr, size_t len); }
75a872f8 485336 OBSOL NOHIDE freebsd4_sendfile
984263bc
MD
486337 STD BSD { int kldsym(int fileid, int cmd, void *data); }
487338 STD BSD { int jail(struct jail *jail); }
488339 UNIMPL BSD pioctl
489340 MPSAFE STD POSIX { int sigprocmask(int how, const sigset_t *set, \
490 sigset_t *oset); }
491341 STD POSIX { int sigsuspend(const sigset_t *sigmask); }
492342 STD POSIX { int sigaction(int sig, const struct sigaction *act, \
493 struct sigaction *oact); }
494343 STD POSIX { int sigpending(sigset_t *set); }
495344 STD BSD { int sigreturn(ucontext_t *sigcntxp); }
3a59f0f7
DX
496345 STD POSIX { int sigtimedwait(const sigset_t *set,\
497 siginfo_t *info, const struct timespec *timeout); }
498346 STD POSIX { int sigwaitinfo(const sigset_t *set,\
499 siginfo_t *info); }
984263bc
MD
500347 STD BSD { int __acl_get_file(const char *path, \
501 acl_type_t type, struct acl *aclp); }
502348 STD BSD { int __acl_set_file(const char *path, \
503 acl_type_t type, struct acl *aclp); }
504349 STD BSD { int __acl_get_fd(int filedes, acl_type_t type, \
505 struct acl *aclp); }
506350 STD BSD { int __acl_set_fd(int filedes, acl_type_t type, \
507 struct acl *aclp); }
508351 STD BSD { int __acl_delete_file(const char *path, \
509 acl_type_t type); }
510352 STD BSD { int __acl_delete_fd(int filedes, acl_type_t type); }
511353 STD BSD { int __acl_aclcheck_file(const char *path, \
512 acl_type_t type, struct acl *aclp); }
513354 STD BSD { int __acl_aclcheck_fd(int filedes, acl_type_t type, \
514 struct acl *aclp); }
515355 STD BSD { int extattrctl(const char *path, int cmd, \
516 const char *attrname, char *arg); }
517356 STD BSD { int extattr_set_file(const char *path, \
518 const char *attrname, struct iovec *iovp, \
519 unsigned iovcnt); }
520357 STD BSD { int extattr_get_file(const char *path, \
521 const char *attrname, struct iovec *iovp, \
522 unsigned iovcnt); }
523358 STD BSD { int extattr_delete_file(const char *path, \
524 const char *attrname); }
525359 STD BSD { int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
526360 STD BSD { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
527361 STD BSD { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
528362 STD BSD { int kqueue(void); }
529363 STD BSD { int kevent(int fd, \
530 const struct kevent *changelist, int nchanges, \
531 struct kevent *eventlist, int nevents, \
532 const struct timespec *timeout); }
78812139
EN
533364 STD BSD { int sctp_peeloff(int sd, caddr_t name ); }
534; 365-392 used by FreeBSD-current
984263bc
MD
535365 UNIMPL NOHIDE nosys
536366 UNIMPL NOHIDE nosys
537367 UNIMPL NOHIDE nosys
538368 UNIMPL NOHIDE nosys
539369 UNIMPL NOHIDE nosys
540370 UNIMPL NOHIDE nosys
541371 UNIMPL NOHIDE nosys
542372 UNIMPL NOHIDE nosys
543373 UNIMPL NOHIDE nosys
544374 UNIMPL NOHIDE nosys
545375 UNIMPL NOHIDE nosys
546376 UNIMPL NOHIDE nosys
547377 UNIMPL NOHIDE nosys
548378 UNIMPL NOHIDE nosys
549379 UNIMPL NOHIDE nosys
550380 UNIMPL NOHIDE nosys
551381 UNIMPL NOHIDE nosys
552382 UNIMPL NOHIDE nosys
553383 UNIMPL NOHIDE nosys
554384 UNIMPL NOHIDE nosys
555385 UNIMPL NOHIDE nosys
556386 UNIMPL NOHIDE nosys
557387 UNIMPL NOHIDE nosys
558388 UNIMPL NOHIDE nosys
559389 UNIMPL NOHIDE nosys
560390 UNIMPL NOHIDE nosys
23720161 561391 STD BSD { int lchflags(char *path, int flags); }
2a0783db 562392 STD BSD { int uuidgen(struct uuid *store, int count); }
984263bc
MD
563393 STD BSD { int sendfile(int fd, int s, off_t offset, size_t nbytes, \
564 struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
98a7f915
MD
565; 394-439 used by FreeBSD-current
566394 UNIMPL NOHIDE nosys
567395 UNIMPL NOHIDE nosys
568396 UNIMPL NOHIDE nosys
569397 UNIMPL NOHIDE nosys
570398 UNIMPL NOHIDE nosys
571399 UNIMPL NOHIDE nosys
572400 UNIMPL NOHIDE nosys
573401 UNIMPL NOHIDE nosys
574402 UNIMPL NOHIDE nosys
575403 UNIMPL NOHIDE nosys
576404 UNIMPL NOHIDE nosys
577405 UNIMPL NOHIDE nosys
578406 UNIMPL NOHIDE nosys
579407 UNIMPL NOHIDE nosys
580408 UNIMPL NOHIDE nosys
581409 UNIMPL NOHIDE nosys
582410 UNIMPL NOHIDE nosys
583411 UNIMPL NOHIDE nosys
584412 UNIMPL NOHIDE nosys
585413 UNIMPL NOHIDE nosys
586414 UNIMPL NOHIDE nosys
587415 UNIMPL NOHIDE nosys
588416 UNIMPL NOHIDE nosys
589417 UNIMPL NOHIDE nosys
590418 UNIMPL NOHIDE nosys
591419 UNIMPL NOHIDE nosys
592420 UNIMPL NOHIDE nosys
593421 UNIMPL NOHIDE nosys
594422 UNIMPL NOHIDE nosys
595423 UNIMPL NOHIDE nosys
596424 UNIMPL NOHIDE nosys
597425 UNIMPL NOHIDE nosys
598426 UNIMPL NOHIDE nosys
599427 UNIMPL NOHIDE nosys
600428 UNIMPL NOHIDE nosys
601429 UNIMPL NOHIDE nosys
602430 UNIMPL NOHIDE nosys
603431 UNIMPL NOHIDE nosys
604432 UNIMPL NOHIDE nosys
605433 UNIMPL NOHIDE nosys
606434 UNIMPL NOHIDE nosys
607435 UNIMPL NOHIDE nosys
608436 UNIMPL NOHIDE nosys
609437 UNIMPL NOHIDE nosys
610438 UNIMPL NOHIDE nosys
611439 UNIMPL NOHIDE nosys
612; 440-449 reserved for FreeBSD-5.x growth
613440 UNIMPL NOHIDE nosys
614441 UNIMPL NOHIDE nosys
615442 UNIMPL NOHIDE nosys
616443 UNIMPL NOHIDE nosys
617444 UNIMPL NOHIDE nosys
618445 UNIMPL NOHIDE nosys
619446 UNIMPL NOHIDE nosys
620447 UNIMPL NOHIDE nosys
621448 UNIMPL NOHIDE nosys
622449 UNIMPL NOHIDE nosys
623; 450 DragonFly system calls
a62e8e0b
MD
624450 MPSAFE STD BSD { int varsym_set(int level, const char *name, const char *data); }
625451 MPSAFE STD BSD { int varsym_get(int mask, const char *wild, char *buf, int bufsize); }
626452 MPSAFE STD BSD { int varsym_list(int level, char *buf, int maxsize, int *marker); }
a722be49
MD
627453 STD BSD { int upc_register(struct upcall *upc, void *ctxfunc, void *func, void *data); }
628454 STD BSD { int upc_control(int cmd, int upcid, void *data); }
1bc8e992
MD
629455 STD BSD { int caps_sys_service(const char *name, uid_t uid, gid_t gid, int upcid, int flags); }
630456 STD BSD { int caps_sys_client(const char *name, uid_t uid, gid_t gid, int upcid, int flags); }
631457 STD BSD { int caps_sys_close(int portid); }
632458 STD BSD { off_t caps_sys_put(int portid, void *msg, int msgsize); }
633459 STD BSD { int caps_sys_reply(int portid, void *msg, int msgsize, off_t msgcid); }
634460 STD BSD { int caps_sys_get(int portid, void *msg, int maxsize, struct caps_msgid *msgid, struct caps_cred *ccr); }
635461 STD BSD { int caps_sys_wait(int portid, void *msg, int maxsize, struct caps_msgid *msgid, struct caps_cred *ccr); }
636462 STD BSD { int caps_sys_abort(int portid, off_t msgcid, int flags); }
e30f9e2c
MD
637463 STD BSD { off_t caps_sys_getgen(int portid); }
638464 STD BSD { int caps_sys_setgen(int portid, off_t gen); }
29802dbb
MD
639465 STD BSD { int exec_sys_register(void *entry); }
640466 STD BSD { int exec_sys_unregister(int id); }
0ba6fbbf 641467 STD BSD { int sys_checkpoint(int type, int fd, pid_t pid, int retval); }
2281065e 642468 STD BSD { int mountctl(const char *path, int op, int fd, const void *ctl, int ctllen, void *buf, int buflen); }
76798859
MD
643469 STD BSD { int umtx_sleep(volatile const int *ptr, int value, int timeout); }
644470 STD BSD { int umtx_wakeup(volatile const int *ptr, int count); }
5b062a39 645471 STD BSD { int jail_attach(int jid); }
923e4699
MD
646472 MPSAFE STD BSD { int set_tls_area(int which, struct tls_info *info, size_t infosize); }
647473 MPSAFE STD BSD { int get_tls_area(int which, struct tls_info *info, size_t infosize); }
f832287e 648474 MPSAFE STD BSD { int closefrom(int fd); }
f91a71dd 649475 STD POSIX { int stat(const char *path, struct stat *ub); }
2ad080fe 650476 MPSAFE STD POSIX { int fstat(int fd, struct stat *sb); }
f91a71dd
JS
651477 STD POSIX { int lstat(const char *path, struct stat *ub); }
652478 STD BSD { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
01f31ab3
JS
653479 STD BSD { int getdirentries(int fd, char *buf, u_int count, \
654 long *basep); }
655480 STD BSD { int getdents(int fd, char *buf, size_t count); }
0b7a3518
DX
656481 STD BSD { int usched_set(pid_t pid, int cmd, void *data, \
657 int bytes); }
b09fd398
MD
658482 STD BSD { int extaccept(int s, int flags, caddr_t name, int *anamelen); }
659483 STD BSD { int extconnect(int s, int flags, caddr_t name, int namelen); }
63db58ad 660484 STD BSD { int syslink(int cmd, struct syslink_info *info, size_t bytes); }
0daa37a5
MD
661485 STD BSD { int mcontrol(void *addr, size_t len, int behav, off_t value); }
662486 STD BSD { int vmspace_create(void *id, int type, void *data); }
663487 STD BSD { int vmspace_destroy(void *id); }
4e7c41c5
MD
664488 STD BSD { int vmspace_ctl(void *id, int cmd, \
665 struct trapframe *tframe, \
666 struct vextframe *vframe); }
0daa37a5
MD
667489 STD BSD { int vmspace_mmap(void *id, void *addr, size_t len, \
668 int prot, int flags, int fd, \
669 off_t offset); }
670490 STD BSD { int vmspace_munmap(void *id, void *addr, \
671 size_t len); }
672491 STD BSD { int vmspace_mcontrol(void *id, void *addr, \
673 size_t len, int behav, off_t value); }
021a4ed4
MD
674492 STD BSD { ssize_t vmspace_pread(void *id, void *buf, \
675 size_t nbyte, int flags, off_t offset); }
676493 STD BSD { ssize_t vmspace_pwrite(void *id, const void *buf, \
677 size_t nbyte, int flags, off_t offset); }
d5f340eb 678494 STD BSD { void extexit(int how, int status, void *addr); }
91bd9c1e 679495 STD BSD { int lwp_create(struct lwp_params *params); }
f9366a82
SS
680496 STD BSD { lwpid_t lwp_gettid(void); }
681497 STD BSD { int lwp_kill(pid_t pid, lwpid_t tid, int signum); }
649d3bd2 682498 STD BSD { int lwp_rtprio(int function, pid_t pid, lwpid_t tid, struct rtprio *rtp); }
ae7cb1b5
NT
683499 STD BSD { int pselect(int nd, fd_set *in, fd_set *ou, \
684 fd_set *ex, const struct timespec *ts, \
685 const sigset_t *sigmask); }
d9fad06e
MD
686500 STD BSD { int statvfs(const char *path, struct statvfs *buf); }
687501 STD BSD { int fstatvfs(int fd, struct statvfs *buf); }
688502 STD BSD { int fhstatvfs(const struct fhandle *u_fhp, struct statvfs *buf); }
00fe9d48
MD
689503 STD BSD { int getvfsstat(struct statfs *buf, \
690 struct statvfs *vbuf, long vbufsize, int flags); }
d10ffba1 691504 STD POSIX { int openat(int fd, char *path, int flags, int mode); }
83a11774
NT
692; XXX should be { int openat(int fd, const char *path, int flags, ...);}
693; but we're not ready for `const' or varargs.
694; XXX man page says `mode_t mode'.
e101a3f4
NT
695505 STD POSIX { int fstatat(int fd, char *path, \
696 struct stat *sb, int flags); }
8cde3c79
NT
697506 STD POSIX { int fchmodat(int fd, char *path, int mode, \
698 int flags); }
32013176
NT
699507 STD POSIX { int fchownat(int fd, char *path, int uid, int gid, \
700 int flags); }