Don't depend on POSIX namespace pollution with u_char from sys/types.h.
[dragonfly.git] / sys / kern / syscalls.master
CommitLineData
753fd850 1 $DragonFly: src/sys/kern/syscalls.master,v 1.38 2006/06/05 07:26:10 dillon Exp $
1de703da
MD
2
3; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
4; $FreeBSD: src/sys/kern/syscalls.master,v 1.72.2.10 2002/07/12 08:22:46 alfred Exp $
984263bc
MD
5;
6; System call name/number master file.
7; Processed to created init_sysent.c, syscalls.c and syscall.h.
8
9; Columns: number [MPSAFE] type nargs namespc name alt{name,tag,rtyp}/comments
10; number system call number, must be in order
11; MPSAFE optional field, specifies that syscall does not want the
12; BGL grabbed automatically (it is SMP safe).
13; type one of STD, OBSOL, UNIMPL, COMPAT, CPT_NOA, LIBCOMPAT,
14; NODEF, NOARGS, NOPROTO, NOIMPL
15; namespc one of POSIX, BSD, NOHIDE
16; name psuedo-prototype of syscall routine
17; If one of the following alts is different, then all appear:
18; altname name of system call if different
19; alttag name of args struct tag if different from [o]`name'"_args"
20; altrtyp return type if not int (bogus - syscalls always return int)
21; for UNIMPL/OBSOL, name continues with comments
22
23; types:
24; STD always included
25; COMPAT included on COMPAT #ifdef
26; LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h
27; OBSOL obsolete, not included in system, only specifies name
28; UNIMPL not implemented, placeholder only
29
30; #ifdef's, etc. may be included, and are copied to the output files.
31
32#include <sys/param.h>
33#include <sys/sysent.h>
34#include <sys/sysproto.h>
35
a6feb702
JS
36#ifdef COMPAT_43
37#include <emulation/43bsd/stat.h>
38#endif
39
f91a71dd
JS
40#include <emulation/dragonfly12/stat.h>
41
984263bc
MD
42; Reserved/unimplemented system calls in the range 0-150 inclusive
43; are reserved for use in future Berkeley releases.
44; Additional system calls implemented in vendor and other
45; redistributions should be placed in the reserved range at the end
46; of the current calls.
47
480 STD NOHIDE { int nosys(void); } syscall nosys_args int
753fd850 491 STD NOHIDE { void exit(int rval); }
984263bc 502 STD POSIX { int fork(void); }
f832287e
MD
513 MPSAFE STD POSIX { ssize_t read(int fd, void *buf, size_t nbyte); }
524 MPSAFE STD POSIX { ssize_t write(int fd, const void *buf, size_t nbyte); }
984263bc
MD
535 STD POSIX { 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'.
f832287e 576 MPSAFE STD POSIX { int close(int fd); }
984263bc
MD
587 STD BSD { int wait4(int pid, int *status, int options, \
59 struct rusage *rusage); } wait4 wait_args int
608 COMPAT BSD { int creat(char *path, int mode); }
619 STD POSIX { int link(char *path, char *link); }
6210 STD POSIX { int unlink(char *path); }
6311 OBSOL NOHIDE execv
6412 STD POSIX { int chdir(char *path); }
6513 STD BSD { int fchdir(int fd); }
6614 STD POSIX { int mknod(char *path, int mode, int dev); }
6715 STD POSIX { int chmod(char *path, int mode); }
6816 STD POSIX { int chown(char *path, int uid, int gid); }
6917 STD BSD { int obreak(char *nsize); } break obreak_args int
7018 STD BSD { int getfsstat(struct statfs *buf, long bufsize, \
71 int flags); }
7219 COMPAT POSIX { long lseek(int fd, long offset, int whence); }
7320 STD POSIX { pid_t getpid(void); }
7421 STD BSD { int mount(char *type, char *path, int flags, \
75 caddr_t data); }
76; XXX `path' should have type `const char *' but we're not ready for that.
7722 STD BSD { int unmount(char *path, int flags); }
7823 STD POSIX { int setuid(uid_t uid); }
7924 MPSAFE STD POSIX { uid_t getuid(void); }
8025 MPSAFE STD POSIX { uid_t geteuid(void); }
8126 STD BSD { int ptrace(int req, pid_t pid, caddr_t addr, \
82 int data); }
8327 STD BSD { int recvmsg(int s, struct msghdr *msg, int flags); }
8428 STD BSD { int sendmsg(int s, caddr_t msg, int flags); }
8529 STD BSD { int recvfrom(int s, caddr_t buf, size_t len, \
86 int flags, caddr_t from, int *fromlenaddr); }
8730 STD BSD { int accept(int s, caddr_t name, int *anamelen); }
8831 STD BSD { int getpeername(int fdes, caddr_t asa, int *alen); }
8932 STD BSD { int getsockname(int fdes, caddr_t asa, int *alen); }
9033 STD POSIX { int access(char *path, int flags); }
9134 STD BSD { int chflags(char *path, int flags); }
9235 STD BSD { int fchflags(int fd, int flags); }
9336 STD BSD { int sync(void); }
9437 STD POSIX { int kill(int pid, int signum); }
9538 COMPAT POSIX { int stat(char *path, struct ostat *ub); }
07c865ae 9639 STD POSIX { pid_t getppid(void); }
984263bc 9740 COMPAT POSIX { int lstat(char *path, struct ostat *ub); }
f832287e 9841 MPSAFE STD POSIX { int dup(u_int fd); }
984263bc 9942 STD POSIX { int pipe(void); }
cff4089b 10043 STD POSIX { gid_t getegid(void); }
984263bc
MD
10144 STD BSD { int profil(caddr_t samples, size_t size, \
102 size_t offset, u_int scale); }
10345 STD BSD { int ktrace(const char *fname, int ops, int facs, \
104 int pid); }
65957d54 10546 OBSOL NOHIDE freebsd3_sigaction
984263bc 10647 MPSAFE STD POSIX { gid_t getgid(void); }
65957d54 10748 OBSOL NOHIDE freebsd3_sigprocmask
984263bc
MD
108; XXX note nonstandard (bogus) calling convention - the libc stub passes
109; us the mask, not a pointer to it, and we return the old mask as the
110; (int) return value.
11149 STD BSD { int getlogin(char *namebuf, u_int namelen); }
11250 STD BSD { int setlogin(char *namebuf); }
11351 STD BSD { int acct(char *path); }
65957d54 11452 OBSOL NOHIDE freebsd3_sigpending
984263bc
MD
11553 STD BSD { int sigaltstack(stack_t *ss, stack_t *oss); }
11654 STD POSIX { int ioctl(int fd, u_long com, caddr_t data); }
11755 STD BSD { int reboot(int opt); }
11856 STD POSIX { int revoke(char *path); }
11957 STD POSIX { int symlink(char *path, char *link); }
12058 STD POSIX { int readlink(char *path, char *buf, int count); }
12159 STD POSIX { int execve(char *fname, char **argv, char **envv); }
12260 MPSAFE STD POSIX { int umask(int newmask); } umask umask_args int
12361 STD BSD { int chroot(char *path); }
12462 COMPAT POSIX { int fstat(int fd, struct ostat *sb); }
12563 COMPAT BSD { int getkerninfo(int op, char *where, size_t *size, \
126 int arg); } getkerninfo getkerninfo_args int
12764 COMPAT BSD { int getpagesize(void); } \
128 getpagesize getpagesize_args int
12965 STD BSD { int msync(void *addr, size_t len, int flags); }
13066 STD BSD { int vfork(void); }
13167 OBSOL NOHIDE vread
13268 OBSOL NOHIDE vwrite
13369 STD BSD { int sbrk(int incr); }
13470 STD BSD { int sstk(int incr); }
13571 COMPAT BSD { int mmap(void *addr, int len, int prot, \
136 int flags, int fd, long pos); }
13772 STD BSD { int ovadvise(int anom); } vadvise ovadvise_args int
13873 STD BSD { int munmap(void *addr, size_t len); }
13974 STD BSD { int mprotect(const void *addr, size_t len, int prot); }
14075 STD BSD { int madvise(void *addr, size_t len, int behav); }
14176 OBSOL NOHIDE vhangup
14277 OBSOL NOHIDE vlimit
14378 STD BSD { int mincore(const void *addr, size_t len, \
144 char *vec); }
14579 STD POSIX { int getgroups(u_int gidsetsize, gid_t *gidset); }
14680 STD POSIX { int setgroups(u_int gidsetsize, gid_t *gidset); }
14781 MPSAFE STD POSIX { int getpgrp(void); }
14882 STD POSIX { int setpgid(int pid, int pgid); }
14983 STD BSD { int setitimer(u_int which, struct itimerval *itv, \
150 struct itimerval *oitv); }
15184 COMPAT BSD { int wait(void); }
15285 STD BSD { int swapon(char *name); }
15386 STD BSD { int getitimer(u_int which, struct itimerval *itv); }
15487 COMPAT BSD { int gethostname(char *hostname, u_int len); } \
155 gethostname gethostname_args int
15688 COMPAT BSD { int sethostname(char *hostname, u_int len); } \
157 sethostname sethostname_args int
5b287bba 15889 MPSAFE STD BSD { int getdtablesize(void); }
f832287e 15990 MPSAFE STD POSIX { int dup2(u_int from, u_int to); }
984263bc 16091 UNIMPL BSD getdopt
f832287e 16192 MPSAFE STD POSIX { int fcntl(int fd, int cmd, long arg); }
984263bc
MD
162; XXX should be { int fcntl(int fd, int cmd, ...); }
163; but we're not ready for varargs.
164; XXX man page says `int arg' too.
16593 STD BSD { int select(int nd, fd_set *in, fd_set *ou, \
166 fd_set *ex, struct timeval *tv); }
16794 UNIMPL BSD setdopt
16895 STD POSIX { int fsync(int fd); }
16996 STD BSD { int setpriority(int which, int who, int prio); }
17097 STD BSD { int socket(int domain, int type, int protocol); }
17198 STD BSD { int connect(int s, caddr_t name, int namelen); }
17299 CPT_NOA BSD { int accept(int s, caddr_t name, int *anamelen); } \
173 accept accept_args int
174100 STD BSD { int getpriority(int which, int who); }
175101 COMPAT BSD { int send(int s, caddr_t buf, int len, int flags); }
176102 COMPAT BSD { int recv(int s, caddr_t buf, int len, int flags); }
65957d54 177103 OBSOL NOHIDE freebsd3_sigreturn
984263bc
MD
178104 STD BSD { int bind(int s, caddr_t name, int namelen); }
179105 STD BSD { int setsockopt(int s, int level, int name, \
180 caddr_t val, int valsize); }
181106 STD BSD { int listen(int s, int backlog); }
182107 OBSOL NOHIDE vtimes
183108 COMPAT BSD { int sigvec(int signum, struct sigvec *nsv, \
184 struct sigvec *osv); }
185109 COMPAT BSD { int sigblock(int mask); }
186110 COMPAT BSD { int sigsetmask(int mask); }
65957d54 187111 OBSOL NOHIDE freebsd3_sigsuspend
984263bc
MD
188; XXX note nonstandard (bogus) calling convention - the libc stub passes
189; us the mask, not a pointer to it.
190112 COMPAT BSD { int sigstack(struct sigstack *nss, \
191 struct sigstack *oss); }
192113 COMPAT BSD { int recvmsg(int s, struct omsghdr *msg, int flags); }
193114 COMPAT BSD { int sendmsg(int s, caddr_t msg, int flags); }
194115 OBSOL NOHIDE vtrace
195116 MPSAFE STD BSD { int gettimeofday(struct timeval *tp, \
196 struct timezone *tzp); }
197117 STD BSD { int getrusage(int who, struct rusage *rusage); }
198118 STD BSD { int getsockopt(int s, int level, int name, \
199 caddr_t val, int *avalsize); }
200119 UNIMPL NOHIDE resuba (BSD/OS 2.x)
f832287e
MD
201120 MPSAFE STD BSD { int readv(int fd, struct iovec *iovp, u_int iovcnt); }
202121 MPSAFE STD BSD { int writev(int fd, struct iovec *iovp, \
984263bc
MD
203 u_int iovcnt); }
204122 STD BSD { int settimeofday(struct timeval *tv, \
205 struct timezone *tzp); }
206123 STD BSD { int fchown(int fd, int uid, int gid); }
207124 STD BSD { int fchmod(int fd, int mode); }
208125 CPT_NOA BSD { int recvfrom(int s, caddr_t buf, size_t len, \
209 int flags, caddr_t from, int *fromlenaddr); } \
210 recvfrom recvfrom_args int
211126 STD BSD { int setreuid(int ruid, int euid); }
212127 STD BSD { int setregid(int rgid, int egid); }
213128 STD POSIX { int rename(char *from, char *to); }
214129 COMPAT BSD { int truncate(char *path, long length); }
215130 COMPAT BSD { int ftruncate(int fd, long length); }
216131 STD BSD { int flock(int fd, int how); }
217132 STD POSIX { int mkfifo(char *path, int mode); }
218133 STD BSD { int sendto(int s, caddr_t buf, size_t len, \
219 int flags, caddr_t to, int tolen); }
220134 STD BSD { int shutdown(int s, int how); }
221135 STD BSD { int socketpair(int domain, int type, int protocol, \
222 int *rsv); }
223136 STD POSIX { int mkdir(char *path, int mode); }
224137 STD POSIX { int rmdir(char *path); }
225138 STD BSD { int utimes(char *path, struct timeval *tptr); }
226139 OBSOL NOHIDE 4.2 sigreturn
227140 STD BSD { int adjtime(struct timeval *delta, \
228 struct timeval *olddelta); }
229141 COMPAT BSD { int getpeername(int fdes, caddr_t asa, int *alen); }
230142 COMPAT BSD { long gethostid(void); }
231143 COMPAT BSD { int sethostid(long hostid); }
6e8e767c
SS
232144 MPSAFE COMPAT BSD { int getrlimit(u_int which, struct orlimit *rlp); }
233145 MPSAFE COMPAT BSD { int setrlimit(u_int which, struct orlimit *rlp); }
984263bc
MD
234146 COMPAT BSD { int killpg(int pgid, int signum); }
235147 STD POSIX { int setsid(void); }
236148 STD BSD { int quotactl(char *path, int cmd, int uid, \
237 caddr_t arg); }
238149 COMPAT BSD { int quota(void); }
239150 CPT_NOA BSD { int getsockname(int fdec, caddr_t asa, int *alen); }\
240 getsockname getsockname_args int
241
242; Syscalls 151-180 inclusive are reserved for vendor-specific
243; system calls. (This includes various calls added for compatibity
244; with other Unix variants.)
245; Some of these calls are now supported by BSD...
246151 UNIMPL NOHIDE sem_lock (BSD/OS 2.x)
247152 UNIMPL NOHIDE sem_wakeup (BSD/OS 2.x)
248153 UNIMPL NOHIDE asyncdaemon (BSD/OS 2.x)
249154 UNIMPL NOHIDE nosys
250; 155 is initialized by the NFS code, if present.
251155 NOIMPL BSD { int nfssvc(int flag, caddr_t argp); }
252156 COMPAT BSD { int getdirentries(int fd, char *buf, u_int count, \
253 long *basep); }
254157 STD BSD { int statfs(char *path, struct statfs *buf); }
255158 STD BSD { int fstatfs(int fd, struct statfs *buf); }
256159 UNIMPL NOHIDE nosys
257160 UNIMPL NOHIDE nosys
258; 161 is initialized by the NFS code, if present.
259161 STD BSD { int getfh(char *fname, struct fhandle *fhp); }
260162 STD BSD { int getdomainname(char *domainname, int len); }
261163 STD BSD { int setdomainname(char *domainname, int len); }
cff4089b 262164 STD BSD { int uname(struct utsname *name); }
984263bc
MD
263165 STD BSD { int sysarch(int op, char *parms); }
264166 STD BSD { int rtprio(int function, pid_t pid, \
265 struct rtprio *rtp); }
266167 UNIMPL NOHIDE nosys
267168 UNIMPL NOHIDE nosys
268169 STD BSD { int semsys(int which, int a2, int a3, int a4, \
269 int a5); }
270; XXX should be { int semsys(int which, ...); }
271170 STD BSD { int msgsys(int which, int a2, int a3, int a4, \
272 int a5, int a6); }
273; XXX should be { int msgsys(int which, ...); }
274171 STD BSD { int shmsys(int which, int a2, int a3, int a4); }
275; XXX should be { int shmsys(int which, ...); }
276172 UNIMPL NOHIDE nosys
f832287e 277173 MPSAFE STD POSIX { ssize_t pread(int fd, void *buf, size_t nbyte, \
984263bc 278 int pad, off_t offset); }
f832287e 279174 MPSAFE STD POSIX { ssize_t pwrite(int fd, const void *buf, \
984263bc
MD
280 size_t nbyte, int pad, off_t offset); }
281175 UNIMPL NOHIDE nosys
282176 STD BSD { int ntp_adjtime(struct timex *tp); }
283177 UNIMPL NOHIDE sfork (BSD/OS 2.x)
284178 UNIMPL NOHIDE getdescriptor (BSD/OS 2.x)
285179 UNIMPL NOHIDE setdescriptor (BSD/OS 2.x)
286180 UNIMPL NOHIDE nosys
287
288; Syscalls 181-199 are used by/reserved for BSD
289181 STD POSIX { int setgid(gid_t gid); }
290182 STD BSD { int setegid(gid_t egid); }
291183 STD BSD { int seteuid(uid_t euid); }
292184 UNIMPL BSD lfs_bmapv
293185 UNIMPL BSD lfs_markv
294186 UNIMPL BSD lfs_segclean
295187 UNIMPL BSD lfs_segwait
f91a71dd
JS
296188 COMPAT_DF12 POSIX { int stat(const char *path, struct dfbsd12_stat *ub); }
297189 COMPAT_DF12 POSIX { int fstat(int fd, struct dfbsd12_stat *sb); }
298190 COMPAT_DF12 POSIX { int lstat(const char *path, struct dfbsd12_stat *ub); }
984263bc
MD
299191 STD POSIX { int pathconf(char *path, int name); }
300192 STD POSIX { int fpathconf(int fd, int name); }
301193 UNIMPL NOHIDE nosys
cff4089b 302194 STD BSD { int getrlimit(u_int which, \
984263bc
MD
303 struct rlimit *rlp); } \
304 getrlimit __getrlimit_args int
305195 STD BSD { int setrlimit(u_int which, \
306 struct rlimit *rlp); } \
307 setrlimit __setrlimit_args int
01f31ab3
JS
308196 COMPAT_DF12 BSD { int getdirentries(int fd, char *buf, \
309 u_int count, long *basep); }
984263bc
MD
310197 STD BSD { caddr_t mmap(caddr_t addr, size_t len, int prot, \
311 int flags, int fd, int pad, off_t pos); }
312198 STD NOHIDE { int nosys(void); } __syscall __syscall_args int
313199 STD POSIX { off_t lseek(int fd, int pad, off_t offset, \
314 int whence); }
315200 STD BSD { int truncate(char *path, int pad, off_t length); }
316201 STD BSD { int ftruncate(int fd, int pad, off_t length); }
317202 STD BSD { int __sysctl(int *name, u_int namelen, void *old, \
318 size_t *oldlenp, void *new, size_t newlen); } \
319 __sysctl sysctl_args int
320; properly, __sysctl should be a NOHIDE, but making an exception
321; here allows to avoid one in libc/sys/Makefile.inc.
322203 STD BSD { int mlock(const void *addr, size_t len); }
323204 STD BSD { int munlock(const void *addr, size_t len); }
324205 STD BSD { int undelete(char *path); }
325206 STD BSD { int futimes(int fd, struct timeval *tptr); }
326207 STD BSD { int getpgid(pid_t pid); }
327208 UNIMPL NOHIDE newreboot (NetBSD)
328209 STD BSD { int poll(struct pollfd *fds, u_int nfds, \
329 int timeout); }
330
331;
332; The following are reserved for loadable syscalls
333;
702d68a3
DRJ
334; 210 is used by the Checkpoint Module
335210 NODEF NOHIDE lkmnosys lkmnosys nosys_args int
984263bc
MD
336211 NODEF NOHIDE lkmnosys lkmnosys nosys_args int
337212 NODEF NOHIDE lkmnosys lkmnosys nosys_args int
338213 NODEF NOHIDE lkmnosys lkmnosys nosys_args int
339214 NODEF NOHIDE lkmnosys lkmnosys nosys_args int
340215 NODEF NOHIDE lkmnosys lkmnosys nosys_args int
341216 NODEF NOHIDE lkmnosys lkmnosys nosys_args int
342217 NODEF NOHIDE lkmnosys lkmnosys nosys_args int
343218 NODEF NOHIDE lkmnosys lkmnosys nosys_args int
344219 NODEF NOHIDE lkmnosys lkmnosys nosys_args int
345
346;
347; The following were introduced with NetBSD/4.4Lite-2
348;
349220 STD BSD { int __semctl(int semid, int semnum, int cmd, \
350 union semun *arg); }
351221 STD BSD { int semget(key_t key, int nsems, int semflg); }
352222 STD BSD { int semop(int semid, struct sembuf *sops, \
353 u_int nsops); }
354223 UNIMPL NOHIDE semconfig
355224 STD BSD { int msgctl(int msqid, int cmd, \
356 struct msqid_ds *buf); }
357225 STD BSD { int msgget(key_t key, int msgflg); }
358226 STD BSD { int msgsnd(int msqid, void *msgp, size_t msgsz, \
359 int msgflg); }
360227 STD BSD { int msgrcv(int msqid, void *msgp, size_t msgsz, \
361 long msgtyp, int msgflg); }
362228 STD BSD { int shmat(int shmid, void *shmaddr, int shmflg); }
363229 STD BSD { int shmctl(int shmid, int cmd, \
364 struct shmid_ds *buf); }
365230 STD BSD { int shmdt(void *shmaddr); }
366231 STD BSD { int shmget(key_t key, int size, int shmflg); }
367;
368232 STD POSIX { int clock_gettime(clockid_t clock_id, \
369 struct timespec *tp); }
370233 STD POSIX { int clock_settime(clockid_t clock_id, \
371 const struct timespec *tp); }
372234 STD POSIX { int clock_getres(clockid_t clock_id, \
373 struct timespec *tp); }
374235 UNIMPL NOHIDE timer_create
375236 UNIMPL NOHIDE timer_delete
376237 UNIMPL NOHIDE timer_settime
377238 UNIMPL NOHIDE timer_gettime
378239 UNIMPL NOHIDE timer_getoverrun
379240 STD POSIX { int nanosleep(const struct timespec *rqtp, \
380 struct timespec *rmtp); }
381241 UNIMPL NOHIDE nosys
382242 UNIMPL NOHIDE nosys
383243 UNIMPL NOHIDE nosys
384244 UNIMPL NOHIDE nosys
385245 UNIMPL NOHIDE nosys
386246 UNIMPL NOHIDE nosys
387247 UNIMPL NOHIDE nosys
388248 UNIMPL NOHIDE nosys
389249 UNIMPL NOHIDE nosys
390; syscall numbers initially used in OpenBSD
391250 STD BSD { int minherit(void *addr, size_t len, int inherit); }
392251 STD BSD { int rfork(int flags); }
393252 STD BSD { int openbsd_poll(struct pollfd *fds, u_int nfds, \
394 int timeout); }
395253 STD BSD { int issetugid(void); }
396254 STD BSD { int lchown(char *path, int uid, int gid); }
397255 UNIMPL NOHIDE nosys
398256 UNIMPL NOHIDE nosys
399257 UNIMPL NOHIDE nosys
400258 UNIMPL NOHIDE nosys
401259 UNIMPL NOHIDE nosys
402260 UNIMPL NOHIDE nosys
403261 UNIMPL NOHIDE nosys
404262 UNIMPL NOHIDE nosys
405263 UNIMPL NOHIDE nosys
406264 UNIMPL NOHIDE nosys
407265 UNIMPL NOHIDE nosys
408266 UNIMPL NOHIDE nosys
409267 UNIMPL NOHIDE nosys
410268 UNIMPL NOHIDE nosys
411269 UNIMPL NOHIDE nosys
412270 UNIMPL NOHIDE nosys
413271 UNIMPL NOHIDE nosys
01f31ab3 414272 COMPAT_DF12 BSD { int getdents(int fd, char *buf, size_t count); }
984263bc
MD
415273 UNIMPL NOHIDE nosys
416274 STD BSD { int lchmod(char *path, mode_t mode); }
417275 NOPROTO BSD { int lchown(char *path, uid_t uid, gid_t gid); } netbsd_lchown lchown_args int
418276 STD BSD { int lutimes(char *path, struct timeval *tptr); }
419277 NOPROTO BSD { int msync(void *addr, size_t len, int flags); } netbsd_msync msync_args int
48703120
JS
420278 OBSOL BSD { int nstat(char *path, struct nstat *ub); }
421279 OBSOL NOHIDE { int nfstat(int fd, struct nstat *sb); }
422280 OBSOL NOHIDE { int nlstat(char *path, struct nstat *ub); }
984263bc
MD
423281 UNIMPL NOHIDE nosys
424282 UNIMPL NOHIDE nosys
425283 UNIMPL NOHIDE nosys
426284 UNIMPL NOHIDE nosys
427285 UNIMPL NOHIDE nosys
428286 UNIMPL NOHIDE nosys
429287 UNIMPL NOHIDE nosys
430288 UNIMPL NOHIDE nosys
7f83ed38 431; 289 and 290 from NetBSD (OpenBSD: 267 and 268)
f832287e
MD
432289 MPSAFE STD BSD { ssize_t preadv(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
433290 MPSAFE STD BSD { ssize_t pwritev(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
984263bc
MD
434291 UNIMPL NOHIDE nosys
435292 UNIMPL NOHIDE nosys
436293 UNIMPL NOHIDE nosys
437294 UNIMPL NOHIDE nosys
438295 UNIMPL NOHIDE nosys
439296 UNIMPL NOHIDE nosys
440; XXX 297 is 300 in NetBSD
441297 STD BSD { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
442298 STD BSD { int fhopen(const struct fhandle *u_fhp, int flags); }
f91a71dd 443299 COMPAT_DF12 POSIX { int fhstat(const struct fhandle *u_fhp, struct dfbsd12_stat *sb); }
984263bc
MD
444; syscall numbers for FreeBSD
445300 STD BSD { int modnext(int modid); }
446301 STD BSD { int modstat(int modid, struct module_stat* stat); }
447302 STD BSD { int modfnext(int modid); }
448303 STD BSD { int modfind(const char *name); }
449304 STD BSD { int kldload(const char *file); }
450305 STD BSD { int kldunload(int fileid); }
451306 STD BSD { int kldfind(const char *file); }
452307 STD BSD { int kldnext(int fileid); }
453308 STD BSD { int kldstat(int fileid, struct kld_file_stat* stat); }
454309 STD BSD { int kldfirstmod(int fileid); }
455310 STD BSD { int getsid(pid_t pid); }
456311 STD BSD { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
457312 STD BSD { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
458313 OBSOL NOHIDE signanosleep
459314 STD BSD { int aio_return(struct aiocb *aiocbp); }
460315 STD BSD { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
461316 STD BSD { int aio_cancel(int fd, struct aiocb *aiocbp); }
462317 STD BSD { int aio_error(struct aiocb *aiocbp); }
463318 STD BSD { int aio_read(struct aiocb *aiocbp); }
464319 STD BSD { int aio_write(struct aiocb *aiocbp); }
465320 STD BSD { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
466321 STD BSD { int yield(void); }
467322 STD BSD { int thr_sleep(const struct timespec *timeout); }
468323 STD BSD { int thr_wakeup(pid_t pid); }
469324 STD BSD { int mlockall(int how); }
470325 STD BSD { int munlockall(void); }
471326 STD BSD { int __getcwd(u_char *buf, u_int buflen); }
472
473327 STD POSIX { int sched_setparam (pid_t pid, const struct sched_param *param); }
474328 STD POSIX { int sched_getparam (pid_t pid, struct sched_param *param); }
475
476329 STD POSIX { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
477330 STD POSIX { int sched_getscheduler (pid_t pid); }
478
479331 STD POSIX { int sched_yield (void); }
480332 STD POSIX { int sched_get_priority_max (int policy); }
481333 STD POSIX { int sched_get_priority_min (int policy); }
482334 STD POSIX { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
483335 STD BSD { int utrace(const void *addr, size_t len); }
75a872f8 484336 OBSOL NOHIDE freebsd4_sendfile
984263bc
MD
485337 STD BSD { int kldsym(int fileid, int cmd, void *data); }
486338 STD BSD { int jail(struct jail *jail); }
487339 UNIMPL BSD pioctl
488340 MPSAFE STD POSIX { int sigprocmask(int how, const sigset_t *set, \
489 sigset_t *oset); }
490341 STD POSIX { int sigsuspend(const sigset_t *sigmask); }
491342 STD POSIX { int sigaction(int sig, const struct sigaction *act, \
492 struct sigaction *oact); }
493343 STD POSIX { int sigpending(sigset_t *set); }
494344 STD BSD { int sigreturn(ucontext_t *sigcntxp); }
3a59f0f7
DX
495345 STD POSIX { int sigtimedwait(const sigset_t *set,\
496 siginfo_t *info, const struct timespec *timeout); }
497346 STD POSIX { int sigwaitinfo(const sigset_t *set,\
498 siginfo_t *info); }
984263bc
MD
499347 STD BSD { int __acl_get_file(const char *path, \
500 acl_type_t type, struct acl *aclp); }
501348 STD BSD { int __acl_set_file(const char *path, \
502 acl_type_t type, struct acl *aclp); }
503349 STD BSD { int __acl_get_fd(int filedes, acl_type_t type, \
504 struct acl *aclp); }
505350 STD BSD { int __acl_set_fd(int filedes, acl_type_t type, \
506 struct acl *aclp); }
507351 STD BSD { int __acl_delete_file(const char *path, \
508 acl_type_t type); }
509352 STD BSD { int __acl_delete_fd(int filedes, acl_type_t type); }
510353 STD BSD { int __acl_aclcheck_file(const char *path, \
511 acl_type_t type, struct acl *aclp); }
512354 STD BSD { int __acl_aclcheck_fd(int filedes, acl_type_t type, \
513 struct acl *aclp); }
514355 STD BSD { int extattrctl(const char *path, int cmd, \
515 const char *attrname, char *arg); }
516356 STD BSD { int extattr_set_file(const char *path, \
517 const char *attrname, struct iovec *iovp, \
518 unsigned iovcnt); }
519357 STD BSD { int extattr_get_file(const char *path, \
520 const char *attrname, struct iovec *iovp, \
521 unsigned iovcnt); }
522358 STD BSD { int extattr_delete_file(const char *path, \
523 const char *attrname); }
524359 STD BSD { int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
525360 STD BSD { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
526361 STD BSD { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
527362 STD BSD { int kqueue(void); }
528363 STD BSD { int kevent(int fd, \
529 const struct kevent *changelist, int nchanges, \
530 struct kevent *eventlist, int nevents, \
531 const struct timespec *timeout); }
78812139
EN
532364 STD BSD { int sctp_peeloff(int sd, caddr_t name ); }
533; 365-392 used by FreeBSD-current
984263bc
MD
534365 UNIMPL NOHIDE nosys
535366 UNIMPL NOHIDE nosys
536367 UNIMPL NOHIDE nosys
537368 UNIMPL NOHIDE nosys
538369 UNIMPL NOHIDE nosys
539370 UNIMPL NOHIDE nosys
540371 UNIMPL NOHIDE nosys
541372 UNIMPL NOHIDE nosys
542373 UNIMPL NOHIDE nosys
543374 UNIMPL NOHIDE nosys
544375 UNIMPL NOHIDE nosys
545376 UNIMPL NOHIDE nosys
546377 UNIMPL NOHIDE nosys
547378 UNIMPL NOHIDE nosys
548379 UNIMPL NOHIDE nosys
549380 UNIMPL NOHIDE nosys
550381 UNIMPL NOHIDE nosys
551382 UNIMPL NOHIDE nosys
552383 UNIMPL NOHIDE nosys
553384 UNIMPL NOHIDE nosys
554385 UNIMPL NOHIDE nosys
555386 UNIMPL NOHIDE nosys
556387 UNIMPL NOHIDE nosys
557388 UNIMPL NOHIDE nosys
558389 UNIMPL NOHIDE nosys
559390 UNIMPL NOHIDE nosys
560391 UNIMPL NOHIDE nosys
561392 UNIMPL NOHIDE nosys
562393 STD BSD { int sendfile(int fd, int s, off_t offset, size_t nbytes, \
563 struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
98a7f915
MD
564; 394-439 used by FreeBSD-current
565394 UNIMPL NOHIDE nosys
566395 UNIMPL NOHIDE nosys
567396 UNIMPL NOHIDE nosys
568397 UNIMPL NOHIDE nosys
569398 UNIMPL NOHIDE nosys
570399 UNIMPL NOHIDE nosys
571400 UNIMPL NOHIDE nosys
572401 UNIMPL NOHIDE nosys
573402 UNIMPL NOHIDE nosys
574403 UNIMPL NOHIDE nosys
575404 UNIMPL NOHIDE nosys
576405 UNIMPL NOHIDE nosys
577406 UNIMPL NOHIDE nosys
578407 UNIMPL NOHIDE nosys
579408 UNIMPL NOHIDE nosys
580409 UNIMPL NOHIDE nosys
581410 UNIMPL NOHIDE nosys
582411 UNIMPL NOHIDE nosys
583412 UNIMPL NOHIDE nosys
584413 UNIMPL NOHIDE nosys
585414 UNIMPL NOHIDE nosys
586415 UNIMPL NOHIDE nosys
587416 UNIMPL NOHIDE nosys
588417 UNIMPL NOHIDE nosys
589418 UNIMPL NOHIDE nosys
590419 UNIMPL NOHIDE nosys
591420 UNIMPL NOHIDE nosys
592421 UNIMPL NOHIDE nosys
593422 UNIMPL NOHIDE nosys
594423 UNIMPL NOHIDE nosys
595424 UNIMPL NOHIDE nosys
596425 UNIMPL NOHIDE nosys
597426 UNIMPL NOHIDE nosys
598427 UNIMPL NOHIDE nosys
599428 UNIMPL NOHIDE nosys
600429 UNIMPL NOHIDE nosys
601430 UNIMPL NOHIDE nosys
602431 UNIMPL NOHIDE nosys
603432 UNIMPL NOHIDE nosys
604433 UNIMPL NOHIDE nosys
605434 UNIMPL NOHIDE nosys
606435 UNIMPL NOHIDE nosys
607436 UNIMPL NOHIDE nosys
608437 UNIMPL NOHIDE nosys
609438 UNIMPL NOHIDE nosys
610439 UNIMPL NOHIDE nosys
611; 440-449 reserved for FreeBSD-5.x growth
612440 UNIMPL NOHIDE nosys
613441 UNIMPL NOHIDE nosys
614442 UNIMPL NOHIDE nosys
615443 UNIMPL NOHIDE nosys
616444 UNIMPL NOHIDE nosys
617445 UNIMPL NOHIDE nosys
618446 UNIMPL NOHIDE nosys
619447 UNIMPL NOHIDE nosys
620448 UNIMPL NOHIDE nosys
621449 UNIMPL NOHIDE nosys
622; 450 DragonFly system calls
623450 STD BSD { int varsym_set(int level, const char *name, const char *data); }
624451 STD BSD { int varsym_get(int mask, const char *wild, char *buf, int bufsize); }
0a004aa2 625452 STD BSD { int varsym_list(int level, char *buf, int maxsize, int *marker); }
a722be49
MD
626453 STD BSD { int upc_register(struct upcall *upc, void *ctxfunc, void *func, void *data); }
627454 STD BSD { int upc_control(int cmd, int upcid, void *data); }
1bc8e992
MD
628455 STD BSD { int caps_sys_service(const char *name, uid_t uid, gid_t gid, int upcid, int flags); }
629456 STD BSD { int caps_sys_client(const char *name, uid_t uid, gid_t gid, int upcid, int flags); }
630457 STD BSD { int caps_sys_close(int portid); }
631458 STD BSD { off_t caps_sys_put(int portid, void *msg, int msgsize); }
632459 STD BSD { int caps_sys_reply(int portid, void *msg, int msgsize, off_t msgcid); }
633460 STD BSD { int caps_sys_get(int portid, void *msg, int maxsize, struct caps_msgid *msgid, struct caps_cred *ccr); }
634461 STD BSD { int caps_sys_wait(int portid, void *msg, int maxsize, struct caps_msgid *msgid, struct caps_cred *ccr); }
635462 STD BSD { int caps_sys_abort(int portid, off_t msgcid, int flags); }
e30f9e2c
MD
636463 STD BSD { off_t caps_sys_getgen(int portid); }
637464 STD BSD { int caps_sys_setgen(int portid, off_t gen); }
29802dbb
MD
638465 STD BSD { int exec_sys_register(void *entry); }
639466 STD BSD { int exec_sys_unregister(int id); }
0ba6fbbf 640467 STD BSD { int sys_checkpoint(int type, int fd, pid_t pid, int retval); }
2281065e 641468 STD BSD { int mountctl(const char *path, int op, int fd, const void *ctl, int ctllen, void *buf, int buflen); }
76798859
MD
642469 STD BSD { int umtx_sleep(volatile const int *ptr, int value, int timeout); }
643470 STD BSD { int umtx_wakeup(volatile const int *ptr, int count); }
5b062a39 644471 STD BSD { int jail_attach(int jid); }
d32d80fe
JS
645472 STD BSD { int sys_set_tls_area(int which, struct tls_info *info, size_t infosize); }
646473 STD BSD { int sys_get_tls_area(int which, struct tls_info *info, size_t infosize); }
f832287e 647474 MPSAFE STD BSD { int closefrom(int fd); }
f91a71dd
JS
648475 STD POSIX { int stat(const char *path, struct stat *ub); }
649476 STD POSIX { int fstat(int fd, struct stat *sb); }
650477 STD POSIX { int lstat(const char *path, struct stat *ub); }
651478 STD BSD { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
01f31ab3
JS
652479 STD BSD { int getdirentries(int fd, char *buf, u_int count, \
653 long *basep); }
654480 STD BSD { int getdents(int fd, char *buf, size_t count); }
0b7a3518
DX
655481 STD BSD { int usched_set(pid_t pid, int cmd, void *data, \
656 int bytes); }