Use the _SELECT_DECLARED method to include the select() prototype instead
[dragonfly.git] / sys / kern / syscalls.master
CommitLineData
9ba76b73 1 $DragonFly: src/sys/kern/syscalls.master,v 1.39 2006/06/13 08:12:03 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
9ba76b73
MD
277173 MPSAFE STD POSIX { ssize_t __pread(int fd, void *buf, \
278 size_t nbyte, int flags, off_t offset); }
279174 MPSAFE STD POSIX { ssize_t __pwrite(int fd, const void *buf, \
280 size_t nbyte, int flags, off_t offset); }
984263bc
MD
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)
9ba76b73
MD
432289 MPSAFE STD BSD { ssize_t __preadv(int fd, struct iovec *iovp, \
433 u_int iovcnt, int flags, off_t offset); }
434290 MPSAFE STD BSD { ssize_t __pwritev(int fd, struct iovec *iovp,\
435 u_int iovcnt, int flags, off_t offset); }
984263bc
MD
436291 UNIMPL NOHIDE nosys
437292 UNIMPL NOHIDE nosys
438293 UNIMPL NOHIDE nosys
439294 UNIMPL NOHIDE nosys
440295 UNIMPL NOHIDE nosys
441296 UNIMPL NOHIDE nosys
442; XXX 297 is 300 in NetBSD
443297 STD BSD { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
444298 STD BSD { int fhopen(const struct fhandle *u_fhp, int flags); }
f91a71dd 445299 COMPAT_DF12 POSIX { int fhstat(const struct fhandle *u_fhp, struct dfbsd12_stat *sb); }
984263bc
MD
446; syscall numbers for FreeBSD
447300 STD BSD { int modnext(int modid); }
448301 STD BSD { int modstat(int modid, struct module_stat* stat); }
449302 STD BSD { int modfnext(int modid); }
450303 STD BSD { int modfind(const char *name); }
451304 STD BSD { int kldload(const char *file); }
452305 STD BSD { int kldunload(int fileid); }
453306 STD BSD { int kldfind(const char *file); }
454307 STD BSD { int kldnext(int fileid); }
455308 STD BSD { int kldstat(int fileid, struct kld_file_stat* stat); }
456309 STD BSD { int kldfirstmod(int fileid); }
457310 STD BSD { int getsid(pid_t pid); }
458311 STD BSD { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
459312 STD BSD { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
460313 OBSOL NOHIDE signanosleep
461314 STD BSD { int aio_return(struct aiocb *aiocbp); }
462315 STD BSD { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
463316 STD BSD { int aio_cancel(int fd, struct aiocb *aiocbp); }
464317 STD BSD { int aio_error(struct aiocb *aiocbp); }
465318 STD BSD { int aio_read(struct aiocb *aiocbp); }
466319 STD BSD { int aio_write(struct aiocb *aiocbp); }
467320 STD BSD { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
468321 STD BSD { int yield(void); }
469322 STD BSD { int thr_sleep(const struct timespec *timeout); }
470323 STD BSD { int thr_wakeup(pid_t pid); }
471324 STD BSD { int mlockall(int how); }
472325 STD BSD { int munlockall(void); }
473326 STD BSD { int __getcwd(u_char *buf, u_int buflen); }
474
475327 STD POSIX { int sched_setparam (pid_t pid, const struct sched_param *param); }
476328 STD POSIX { int sched_getparam (pid_t pid, struct sched_param *param); }
477
478329 STD POSIX { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
479330 STD POSIX { int sched_getscheduler (pid_t pid); }
480
481331 STD POSIX { int sched_yield (void); }
482332 STD POSIX { int sched_get_priority_max (int policy); }
483333 STD POSIX { int sched_get_priority_min (int policy); }
484334 STD POSIX { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
485335 STD BSD { int utrace(const void *addr, size_t len); }
75a872f8 486336 OBSOL NOHIDE freebsd4_sendfile
984263bc
MD
487337 STD BSD { int kldsym(int fileid, int cmd, void *data); }
488338 STD BSD { int jail(struct jail *jail); }
489339 UNIMPL BSD pioctl
490340 MPSAFE STD POSIX { int sigprocmask(int how, const sigset_t *set, \
491 sigset_t *oset); }
492341 STD POSIX { int sigsuspend(const sigset_t *sigmask); }
493342 STD POSIX { int sigaction(int sig, const struct sigaction *act, \
494 struct sigaction *oact); }
495343 STD POSIX { int sigpending(sigset_t *set); }
496344 STD BSD { int sigreturn(ucontext_t *sigcntxp); }
3a59f0f7
DX
497345 STD POSIX { int sigtimedwait(const sigset_t *set,\
498 siginfo_t *info, const struct timespec *timeout); }
499346 STD POSIX { int sigwaitinfo(const sigset_t *set,\
500 siginfo_t *info); }
984263bc
MD
501347 STD BSD { int __acl_get_file(const char *path, \
502 acl_type_t type, struct acl *aclp); }
503348 STD BSD { int __acl_set_file(const char *path, \
504 acl_type_t type, struct acl *aclp); }
505349 STD BSD { int __acl_get_fd(int filedes, acl_type_t type, \
506 struct acl *aclp); }
507350 STD BSD { int __acl_set_fd(int filedes, acl_type_t type, \
508 struct acl *aclp); }
509351 STD BSD { int __acl_delete_file(const char *path, \
510 acl_type_t type); }
511352 STD BSD { int __acl_delete_fd(int filedes, acl_type_t type); }
512353 STD BSD { int __acl_aclcheck_file(const char *path, \
513 acl_type_t type, struct acl *aclp); }
514354 STD BSD { int __acl_aclcheck_fd(int filedes, acl_type_t type, \
515 struct acl *aclp); }
516355 STD BSD { int extattrctl(const char *path, int cmd, \
517 const char *attrname, char *arg); }
518356 STD BSD { int extattr_set_file(const char *path, \
519 const char *attrname, struct iovec *iovp, \
520 unsigned iovcnt); }
521357 STD BSD { int extattr_get_file(const char *path, \
522 const char *attrname, struct iovec *iovp, \
523 unsigned iovcnt); }
524358 STD BSD { int extattr_delete_file(const char *path, \
525 const char *attrname); }
526359 STD BSD { int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
527360 STD BSD { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
528361 STD BSD { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
529362 STD BSD { int kqueue(void); }
530363 STD BSD { int kevent(int fd, \
531 const struct kevent *changelist, int nchanges, \
532 struct kevent *eventlist, int nevents, \
533 const struct timespec *timeout); }
78812139
EN
534364 STD BSD { int sctp_peeloff(int sd, caddr_t name ); }
535; 365-392 used by FreeBSD-current
984263bc
MD
536365 UNIMPL NOHIDE nosys
537366 UNIMPL NOHIDE nosys
538367 UNIMPL NOHIDE nosys
539368 UNIMPL NOHIDE nosys
540369 UNIMPL NOHIDE nosys
541370 UNIMPL NOHIDE nosys
542371 UNIMPL NOHIDE nosys
543372 UNIMPL NOHIDE nosys
544373 UNIMPL NOHIDE nosys
545374 UNIMPL NOHIDE nosys
546375 UNIMPL NOHIDE nosys
547376 UNIMPL NOHIDE nosys
548377 UNIMPL NOHIDE nosys
549378 UNIMPL NOHIDE nosys
550379 UNIMPL NOHIDE nosys
551380 UNIMPL NOHIDE nosys
552381 UNIMPL NOHIDE nosys
553382 UNIMPL NOHIDE nosys
554383 UNIMPL NOHIDE nosys
555384 UNIMPL NOHIDE nosys
556385 UNIMPL NOHIDE nosys
557386 UNIMPL NOHIDE nosys
558387 UNIMPL NOHIDE nosys
559388 UNIMPL NOHIDE nosys
560389 UNIMPL NOHIDE nosys
561390 UNIMPL NOHIDE nosys
562391 UNIMPL NOHIDE nosys
563392 UNIMPL NOHIDE nosys
564393 STD BSD { int sendfile(int fd, int s, off_t offset, size_t nbytes, \
565 struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
98a7f915
MD
566; 394-439 used by FreeBSD-current
567394 UNIMPL NOHIDE nosys
568395 UNIMPL NOHIDE nosys
569396 UNIMPL NOHIDE nosys
570397 UNIMPL NOHIDE nosys
571398 UNIMPL NOHIDE nosys
572399 UNIMPL NOHIDE nosys
573400 UNIMPL NOHIDE nosys
574401 UNIMPL NOHIDE nosys
575402 UNIMPL NOHIDE nosys
576403 UNIMPL NOHIDE nosys
577404 UNIMPL NOHIDE nosys
578405 UNIMPL NOHIDE nosys
579406 UNIMPL NOHIDE nosys
580407 UNIMPL NOHIDE nosys
581408 UNIMPL NOHIDE nosys
582409 UNIMPL NOHIDE nosys
583410 UNIMPL NOHIDE nosys
584411 UNIMPL NOHIDE nosys
585412 UNIMPL NOHIDE nosys
586413 UNIMPL NOHIDE nosys
587414 UNIMPL NOHIDE nosys
588415 UNIMPL NOHIDE nosys
589416 UNIMPL NOHIDE nosys
590417 UNIMPL NOHIDE nosys
591418 UNIMPL NOHIDE nosys
592419 UNIMPL NOHIDE nosys
593420 UNIMPL NOHIDE nosys
594421 UNIMPL NOHIDE nosys
595422 UNIMPL NOHIDE nosys
596423 UNIMPL NOHIDE nosys
597424 UNIMPL NOHIDE nosys
598425 UNIMPL NOHIDE nosys
599426 UNIMPL NOHIDE nosys
600427 UNIMPL NOHIDE nosys
601428 UNIMPL NOHIDE nosys
602429 UNIMPL NOHIDE nosys
603430 UNIMPL NOHIDE nosys
604431 UNIMPL NOHIDE nosys
605432 UNIMPL NOHIDE nosys
606433 UNIMPL NOHIDE nosys
607434 UNIMPL NOHIDE nosys
608435 UNIMPL NOHIDE nosys
609436 UNIMPL NOHIDE nosys
610437 UNIMPL NOHIDE nosys
611438 UNIMPL NOHIDE nosys
612439 UNIMPL NOHIDE nosys
613; 440-449 reserved for FreeBSD-5.x growth
614440 UNIMPL NOHIDE nosys
615441 UNIMPL NOHIDE nosys
616442 UNIMPL NOHIDE nosys
617443 UNIMPL NOHIDE nosys
618444 UNIMPL NOHIDE nosys
619445 UNIMPL NOHIDE nosys
620446 UNIMPL NOHIDE nosys
621447 UNIMPL NOHIDE nosys
622448 UNIMPL NOHIDE nosys
623449 UNIMPL NOHIDE nosys
624; 450 DragonFly system calls
625450 STD BSD { int varsym_set(int level, const char *name, const char *data); }
626451 STD BSD { int varsym_get(int mask, const char *wild, char *buf, int bufsize); }
0a004aa2 627452 STD BSD { int varsym_list(int level, char *buf, int maxsize, int *marker); }
a722be49
MD
628453 STD BSD { int upc_register(struct upcall *upc, void *ctxfunc, void *func, void *data); }
629454 STD BSD { int upc_control(int cmd, int upcid, void *data); }
1bc8e992
MD
630455 STD BSD { int caps_sys_service(const char *name, uid_t uid, gid_t gid, int upcid, int flags); }
631456 STD BSD { int caps_sys_client(const char *name, uid_t uid, gid_t gid, int upcid, int flags); }
632457 STD BSD { int caps_sys_close(int portid); }
633458 STD BSD { off_t caps_sys_put(int portid, void *msg, int msgsize); }
634459 STD BSD { int caps_sys_reply(int portid, void *msg, int msgsize, off_t msgcid); }
635460 STD BSD { int caps_sys_get(int portid, void *msg, int maxsize, struct caps_msgid *msgid, struct caps_cred *ccr); }
636461 STD BSD { int caps_sys_wait(int portid, void *msg, int maxsize, struct caps_msgid *msgid, struct caps_cred *ccr); }
637462 STD BSD { int caps_sys_abort(int portid, off_t msgcid, int flags); }
e30f9e2c
MD
638463 STD BSD { off_t caps_sys_getgen(int portid); }
639464 STD BSD { int caps_sys_setgen(int portid, off_t gen); }
29802dbb
MD
640465 STD BSD { int exec_sys_register(void *entry); }
641466 STD BSD { int exec_sys_unregister(int id); }
0ba6fbbf 642467 STD BSD { int sys_checkpoint(int type, int fd, pid_t pid, int retval); }
2281065e 643468 STD BSD { int mountctl(const char *path, int op, int fd, const void *ctl, int ctllen, void *buf, int buflen); }
76798859
MD
644469 STD BSD { int umtx_sleep(volatile const int *ptr, int value, int timeout); }
645470 STD BSD { int umtx_wakeup(volatile const int *ptr, int count); }
5b062a39 646471 STD BSD { int jail_attach(int jid); }
d32d80fe
JS
647472 STD BSD { int sys_set_tls_area(int which, struct tls_info *info, size_t infosize); }
648473 STD BSD { int sys_get_tls_area(int which, struct tls_info *info, size_t infosize); }
f832287e 649474 MPSAFE STD BSD { int closefrom(int fd); }
f91a71dd
JS
650475 STD POSIX { int stat(const char *path, struct stat *ub); }
651476 STD POSIX { int fstat(int fd, struct stat *sb); }
652477 STD POSIX { int lstat(const char *path, struct stat *ub); }
653478 STD BSD { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
01f31ab3
JS
654479 STD BSD { int getdirentries(int fd, char *buf, u_int count, \
655 long *basep); }
656480 STD BSD { int getdents(int fd, char *buf, size_t count); }
0b7a3518
DX
657481 STD BSD { int usched_set(pid_t pid, int cmd, void *data, \
658 int bytes); }