syscalls.master: Fix typo in comment.
[dragonfly.git] / sys / kern / syscalls.master
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 $
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    pseudo-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>
33 #include <sys/statvfs.h>
34
35 #ifdef COMPAT_43
36 #include <emulation/43bsd/stat.h>
37 #endif
38
39 #include <emulation/dragonfly12/stat.h>
40
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
47 0       STD     NOHIDE  { int nosys(void); } syscall nosys_args int
48 1       STD     NOHIDE  { void exit(int rval); }
49 2       STD     POSIX   { int fork(void); }
50 3       MPSAFE  STD     POSIX   { ssize_t read(int fd, void *buf, size_t nbyte); }
51 4       MPSAFE  STD     POSIX   { ssize_t write(int fd, const void *buf, size_t nbyte); }
52 5       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'.
56 6       MPSAFE  STD     POSIX   { int close(int fd); }
57 7       STD     BSD     { int wait4(int pid, int *status, int options, \
58                             struct rusage *rusage); } wait4 wait_args int
59 8       COMPAT  BSD     { int creat(char *path, int mode); }
60 9       STD     POSIX   { int link(char *path, char *link); }
61 10      STD     POSIX   { int unlink(char *path); }
62 11      OBSOL   NOHIDE  execv
63 12      STD     POSIX   { int chdir(char *path); }
64 13      STD     BSD     { int fchdir(int fd); }
65 14      STD     POSIX   { int mknod(char *path, int mode, int dev); }
66 15      STD     POSIX   { int chmod(char *path, int mode); }
67 16      STD     POSIX   { int chown(char *path, int uid, int gid); }
68 17      STD     BSD     { int obreak(char *nsize); } break obreak_args int
69 18      STD     BSD     { int getfsstat(struct statfs *buf, long bufsize, \
70                             int flags); }
71 19      COMPAT  POSIX   { long lseek(int fd, long offset, int whence); }
72 20      STD     POSIX   { pid_t getpid(void); }
73 21      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.
76 22      STD     BSD     { int unmount(char *path, int flags); }
77 23      STD     POSIX   { int setuid(uid_t uid); }
78 24      MPSAFE  STD     POSIX   { uid_t getuid(void); }
79 25      MPSAFE  STD     POSIX   { uid_t geteuid(void); }
80 26      STD     BSD     { int ptrace(int req, pid_t pid, caddr_t addr, \
81                             int data); }
82 27      STD     BSD     { int recvmsg(int s, struct msghdr *msg, int flags); }
83 28      STD     BSD     { int sendmsg(int s, caddr_t msg, int flags); }
84 29      STD     BSD     { int recvfrom(int s, caddr_t buf, size_t len, \
85                             int flags, caddr_t from, int *fromlenaddr); }
86 30      STD     BSD     { int accept(int s, caddr_t name, int *anamelen); }
87 31      STD     BSD     { int getpeername(int fdes, caddr_t asa, int *alen); }
88 32      STD     BSD     { int getsockname(int fdes, caddr_t asa, int *alen); }
89 33      STD     POSIX   { int access(char *path, int flags); }
90 34      STD     BSD     { int chflags(char *path, int flags); }
91 35      STD     BSD     { int fchflags(int fd, int flags); }
92 36      STD     BSD     { int sync(void); }
93 37      STD     POSIX   { int kill(int pid, int signum); }
94 38      COMPAT  POSIX   { int stat(char *path, struct ostat *ub); }
95 39      STD     POSIX   { pid_t getppid(void); }
96 40      COMPAT  POSIX   { int lstat(char *path, struct ostat *ub); }
97 41      MPSAFE  STD     POSIX   { int dup(u_int fd); }
98 42      STD     POSIX   { int pipe(void); }
99 43      STD     POSIX   { gid_t getegid(void); }
100 44      STD     BSD     { int profil(caddr_t samples, size_t size, \
101                             size_t offset, u_int scale); }
102 45      STD     BSD     { int ktrace(const char *fname, int ops, int facs, \
103                             int pid); }
104 46      OBSOL   NOHIDE  freebsd3_sigaction
105 47      MPSAFE  STD     POSIX   { gid_t getgid(void); }
106 48      OBSOL   NOHIDE  freebsd3_sigprocmask
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.
110 49      STD     BSD     { int getlogin(char *namebuf, u_int namelen); }
111 50      STD     BSD     { int setlogin(char *namebuf); }
112 51      STD     BSD     { int acct(char *path); }
113 52      OBSOL   NOHIDE  freebsd3_sigpending
114 53      STD     BSD     { int sigaltstack(stack_t *ss, stack_t *oss); }
115 54      STD     POSIX   { int ioctl(int fd, u_long com, caddr_t data); }
116 55      STD     BSD     { int reboot(int opt); }
117 56      STD     POSIX   { int revoke(char *path); }
118 57      STD     POSIX   { int symlink(char *path, char *link); }
119 58      STD     POSIX   { int readlink(char *path, char *buf, int count); }
120 59      STD     POSIX   { int execve(char *fname, char **argv, char **envv); }
121 60      MPSAFE  STD     POSIX   { int umask(int newmask); } umask umask_args int
122 61      STD     BSD     { int chroot(char *path); }
123 62      COMPAT  POSIX   { int fstat(int fd, struct ostat *sb); }
124 63      COMPAT  BSD     { int getkerninfo(int op, char *where, size_t *size, \
125                             int arg); } getkerninfo getkerninfo_args int
126 64      COMPAT  BSD     { int getpagesize(void); } \
127                             getpagesize getpagesize_args int
128 65      STD     BSD     { int msync(void *addr, size_t len, int flags); }
129 66      STD     BSD     { int vfork(void); }
130 67      OBSOL   NOHIDE  vread
131 68      OBSOL   NOHIDE  vwrite
132 69      STD     BSD     { int sbrk(int incr); }
133 70      STD     BSD     { int sstk(int incr); }
134 71      COMPAT  BSD     { int mmap(void *addr, int len, int prot, \
135                             int flags, int fd, long pos); }
136 72      STD     BSD     { int ovadvise(int anom); } vadvise ovadvise_args int
137 73      STD     BSD     { int munmap(void *addr, size_t len); }
138 74      STD     BSD     { int mprotect(const void *addr, size_t len, int prot); }
139 75      STD     BSD     { int madvise(void *addr, size_t len, int behav); }
140 76      OBSOL   NOHIDE  vhangup
141 77      OBSOL   NOHIDE  vlimit
142 78      STD     BSD     { int mincore(const void *addr, size_t len, \
143                             char *vec); }
144 79      STD     POSIX   { int getgroups(u_int gidsetsize, gid_t *gidset); }
145 80      STD     POSIX   { int setgroups(u_int gidsetsize, gid_t *gidset); }
146 81      MPSAFE  STD     POSIX   { int getpgrp(void); }
147 82      STD     POSIX   { int setpgid(int pid, int pgid); }
148 83      STD     BSD     { int setitimer(u_int which, struct itimerval *itv, \
149                             struct itimerval *oitv); }
150 84      COMPAT  BSD     { int wait(void); }
151 85      STD     BSD     { int swapon(char *name); }
152 86      STD     BSD     { int getitimer(u_int which, struct itimerval *itv); }
153 87      COMPAT  BSD     { int gethostname(char *hostname, u_int len); } \
154                             gethostname gethostname_args int
155 88      COMPAT  BSD     { int sethostname(char *hostname, u_int len); } \
156                             sethostname sethostname_args int
157 89      MPSAFE  STD     BSD     { int getdtablesize(void); }
158 90      MPSAFE  STD     POSIX   { int dup2(u_int from, u_int to); }
159 91      UNIMPL  BSD     getdopt
160 92      MPSAFE  STD     POSIX   { int fcntl(int fd, int cmd, long arg); }
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.
164 93      STD     BSD     { int select(int nd, fd_set *in, fd_set *ou, \
165                             fd_set *ex, struct timeval *tv); }
166 94      UNIMPL  BSD     setdopt
167 95      STD     POSIX   { int fsync(int fd); }
168 96      STD     BSD     { int setpriority(int which, int who, int prio); }
169 97      STD     BSD     { int socket(int domain, int type, int protocol); }
170 98      STD     BSD     { int connect(int s, caddr_t name, int namelen); }
171 99      CPT_NOA BSD     { int accept(int s, caddr_t name, int *anamelen); } \
172                             accept accept_args int
173 100     STD     BSD     { int getpriority(int which, int who); }
174 101     COMPAT  BSD     { int send(int s, caddr_t buf, int len, int flags); }
175 102     COMPAT  BSD     { int recv(int s, caddr_t buf, int len, int flags); }
176 103     OBSOL   NOHIDE  freebsd3_sigreturn
177 104     STD     BSD     { int bind(int s, caddr_t name, int namelen); }
178 105     STD     BSD     { int setsockopt(int s, int level, int name, \
179                             caddr_t val, int valsize); }
180 106     STD     BSD     { int listen(int s, int backlog); }
181 107     OBSOL   NOHIDE  vtimes
182 108     COMPAT  BSD     { int sigvec(int signum, struct sigvec *nsv, \
183                             struct sigvec *osv); }
184 109     COMPAT  BSD     { int sigblock(int mask); }
185 110     COMPAT  BSD     { int sigsetmask(int mask); }
186 111     OBSOL   NOHIDE  freebsd3_sigsuspend
187 ; XXX note nonstandard (bogus) calling convention - the libc stub passes
188 ; us the mask, not a pointer to it.
189 112     COMPAT  BSD     { int sigstack(struct sigstack *nss, \
190                             struct sigstack *oss); }
191 113     COMPAT  BSD     { int recvmsg(int s, struct omsghdr *msg, int flags); }
192 114     COMPAT  BSD     { int sendmsg(int s, caddr_t msg, int flags); }
193 115     OBSOL   NOHIDE  vtrace
194 116     MPSAFE  STD     BSD     { int gettimeofday(struct timeval *tp, \
195                             struct timezone *tzp); }
196 117     STD     BSD     { int getrusage(int who, struct rusage *rusage); }
197 118     STD     BSD     { int getsockopt(int s, int level, int name, \
198                             caddr_t val, int *avalsize); }
199 119     UNIMPL  NOHIDE  resuba (BSD/OS 2.x)
200 120     MPSAFE  STD     BSD     { int readv(int fd, struct iovec *iovp, u_int iovcnt); }
201 121     MPSAFE  STD     BSD     { int writev(int fd, struct iovec *iovp, \
202                             u_int iovcnt); }
203 122     STD     BSD     { int settimeofday(struct timeval *tv, \
204                             struct timezone *tzp); }
205 123     STD     BSD     { int fchown(int fd, int uid, int gid); }
206 124     STD     BSD     { int fchmod(int fd, int mode); }
207 125     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
210 126     STD     BSD     { int setreuid(int ruid, int euid); }
211 127     STD     BSD     { int setregid(int rgid, int egid); }
212 128     STD     POSIX   { int rename(char *from, char *to); }
213 129     COMPAT  BSD     { int truncate(char *path, long length); }
214 130     COMPAT  BSD     { int ftruncate(int fd, long length); }
215 131     STD     BSD     { int flock(int fd, int how); }
216 132     STD     POSIX   { int mkfifo(char *path, int mode); }
217 133     STD     BSD     { int sendto(int s, caddr_t buf, size_t len, \
218                             int flags, caddr_t to, int tolen); }
219 134     STD     BSD     { int shutdown(int s, int how); }
220 135     STD     BSD     { int socketpair(int domain, int type, int protocol, \
221                             int *rsv); }
222 136     STD     POSIX   { int mkdir(char *path, int mode); }
223 137     STD     POSIX   { int rmdir(char *path); }
224 138     STD     BSD     { int utimes(char *path, struct timeval *tptr); }
225 139     OBSOL   NOHIDE  4.2 sigreturn
226 140     STD     BSD     { int adjtime(struct timeval *delta, \
227                             struct timeval *olddelta); }
228 141     COMPAT  BSD     { int getpeername(int fdes, caddr_t asa, int *alen); }
229 142     COMPAT  BSD     { long gethostid(void); }
230 143     COMPAT  BSD     { int sethostid(long hostid); }
231 144     MPSAFE  COMPAT  BSD     { int getrlimit(u_int which, struct orlimit *rlp); }
232 145     MPSAFE  COMPAT  BSD     { int setrlimit(u_int which, struct orlimit *rlp); }
233 146     COMPAT  BSD     { int killpg(int pgid, int signum); }
234 147     STD     POSIX   { int setsid(void); }
235 148     STD     BSD     { int quotactl(char *path, int cmd, int uid, \
236                             caddr_t arg); }
237 149     COMPAT  BSD     { int quota(void); }
238 150     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...
245 151     UNIMPL  NOHIDE  sem_lock (BSD/OS 2.x)
246 152     UNIMPL  NOHIDE  sem_wakeup (BSD/OS 2.x)
247 153     UNIMPL  NOHIDE  asyncdaemon (BSD/OS 2.x)
248 154     UNIMPL  NOHIDE  nosys
249 ; 155 is initialized by the NFS code, if present.
250 155     NOIMPL  BSD     { int nfssvc(int flag, caddr_t argp); }
251 156     COMPAT  BSD     { int getdirentries(int fd, char *buf, u_int count, \
252                             long *basep); }
253 157     STD     BSD     { int statfs(char *path, struct statfs *buf); }
254 158     STD     BSD     { int fstatfs(int fd, struct statfs *buf); }
255 159     UNIMPL  NOHIDE  nosys
256 160     UNIMPL  NOHIDE  nosys
257 ; 161 is initialized by the NFS code, if present.
258 161     STD     BSD     { int getfh(char *fname, struct fhandle *fhp); }
259 162     STD     BSD     { int getdomainname(char *domainname, int len); }
260 163     STD     BSD     { int setdomainname(char *domainname, int len); }
261 164     STD     BSD     { int uname(struct utsname *name); }
262 165     STD     BSD     { int sysarch(int op, char *parms); }
263 166     STD     BSD     { int rtprio(int function, pid_t pid, \
264                             struct rtprio *rtp); }
265 167     UNIMPL  NOHIDE  nosys
266 168     UNIMPL  NOHIDE  nosys
267 169     STD     BSD     { int semsys(int which, int a2, int a3, int a4, \
268                             int a5); }
269 ; XXX should be         { int semsys(int which, ...); }
270 170     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, ...); }
273 171     STD     BSD     { int shmsys(int which, int a2, int a3, int a4); }
274 ; XXX should be         { int shmsys(int which, ...); }
275 172     UNIMPL  NOHIDE  nosys
276 173     MPSAFE  STD     POSIX   { ssize_t extpread(int fd, void *buf, \
277                             size_t nbyte, int flags, off_t offset); }
278 174     MPSAFE  STD     POSIX   { ssize_t extpwrite(int fd, const void *buf, \
279                             size_t nbyte, int flags, off_t offset); }
280 175     UNIMPL  NOHIDE  nosys
281 176     STD     BSD     { int ntp_adjtime(struct timex *tp); }
282 177     UNIMPL  NOHIDE  sfork (BSD/OS 2.x)
283 178     UNIMPL  NOHIDE  getdescriptor (BSD/OS 2.x)
284 179     UNIMPL  NOHIDE  setdescriptor (BSD/OS 2.x)
285 180     UNIMPL  NOHIDE  nosys
286
287 ; Syscalls 181-199 are used by/reserved for BSD
288 181     STD     POSIX   { int setgid(gid_t gid); }
289 182     STD     BSD     { int setegid(gid_t egid); }
290 183     STD     BSD     { int seteuid(uid_t euid); }
291 184     UNIMPL  BSD     lfs_bmapv
292 185     UNIMPL  BSD     lfs_markv
293 186     UNIMPL  BSD     lfs_segclean
294 187     UNIMPL  BSD     lfs_segwait
295 188     COMPAT_DF12     POSIX   { int stat(const char *path, struct dfbsd12_stat *ub); }
296 189     COMPAT_DF12     POSIX   { int fstat(int fd, struct dfbsd12_stat *sb); }
297 190     COMPAT_DF12     POSIX   { int lstat(const char *path, struct dfbsd12_stat *ub); }
298 191     STD     POSIX   { int pathconf(char *path, int name); }
299 192     STD     POSIX   { int fpathconf(int fd, int name); }
300 193     UNIMPL  NOHIDE  nosys
301 194     STD     BSD     { int getrlimit(u_int which, \
302                             struct rlimit *rlp); } \
303                             getrlimit __getrlimit_args int
304 195     STD     BSD     { int setrlimit(u_int which, \
305                             struct rlimit *rlp); } \
306                             setrlimit __setrlimit_args int
307 196     COMPAT_DF12     BSD     { int getdirentries(int fd, char *buf, \
308                                     u_int count, long *basep); }
309 197     STD     BSD     { caddr_t mmap(caddr_t addr, size_t len, int prot, \
310                             int flags, int fd, int pad, off_t pos); }
311 198     STD     NOHIDE  { int nosys(void); } __syscall __syscall_args int
312 199     STD     POSIX   { off_t lseek(int fd, int pad, off_t offset, \
313                             int whence); }
314 200     STD     BSD     { int truncate(char *path, int pad, off_t length); }
315 201     STD     BSD     { int ftruncate(int fd, int pad, off_t length); }
316 202     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.
321 203     STD     BSD     { int mlock(const void *addr, size_t len); }
322 204     STD     BSD     { int munlock(const void *addr, size_t len); }
323 205     STD     BSD     { int undelete(char *path); }
324 206     STD     BSD     { int futimes(int fd, struct timeval *tptr); }
325 207     STD     BSD     { int getpgid(pid_t pid); }
326 208     UNIMPL  NOHIDE  newreboot (NetBSD)
327 209     STD     BSD     { int poll(struct pollfd *fds, u_int nfds, \
328                             int timeout); }
329
330 ;
331 ; The following are reserved for loadable syscalls
332 ;
333 ; 210 is used by the Checkpoint Module
334 210     NODEF   NOHIDE  lkmnosys lkmnosys nosys_args int
335 211     NODEF   NOHIDE  lkmnosys lkmnosys nosys_args int
336 212     NODEF   NOHIDE  lkmnosys lkmnosys nosys_args int
337 213     NODEF   NOHIDE  lkmnosys lkmnosys nosys_args int
338 214     NODEF   NOHIDE  lkmnosys lkmnosys nosys_args int
339 215     NODEF   NOHIDE  lkmnosys lkmnosys nosys_args int
340 216     NODEF   NOHIDE  lkmnosys lkmnosys nosys_args int
341 217     NODEF   NOHIDE  lkmnosys lkmnosys nosys_args int
342 218     NODEF   NOHIDE  lkmnosys lkmnosys nosys_args int
343 219     NODEF   NOHIDE  lkmnosys lkmnosys nosys_args int
344
345 ;
346 ; The following were introduced with NetBSD/4.4Lite-2
347 ;
348 220     STD     BSD     { int __semctl(int semid, int semnum, int cmd, \
349                             union semun *arg); }
350 221     STD     BSD     { int semget(key_t key, int nsems, int semflg); }
351 222     STD     BSD     { int semop(int semid, struct sembuf *sops, \
352                             u_int nsops); }
353 223     UNIMPL  NOHIDE  semconfig
354 224     STD     BSD     { int msgctl(int msqid, int cmd, \
355                             struct msqid_ds *buf); }
356 225     STD     BSD     { int msgget(key_t key, int msgflg); }
357 226     STD     BSD     { int msgsnd(int msqid, void *msgp, size_t msgsz, \
358                             int msgflg); }
359 227     STD     BSD     { int msgrcv(int msqid, void *msgp, size_t msgsz, \
360                             long msgtyp, int msgflg); }
361 228     STD     BSD     { int shmat(int shmid, void *shmaddr, int shmflg); }
362 229     STD     BSD     { int shmctl(int shmid, int cmd, \
363                             struct shmid_ds *buf); }
364 230     STD     BSD     { int shmdt(void *shmaddr); }
365 231     STD     BSD     { int shmget(key_t key, int size, int shmflg); }
366 ;
367 232     STD     POSIX   { int clock_gettime(clockid_t clock_id, \
368                             struct timespec *tp); }
369 233     STD     POSIX   { int clock_settime(clockid_t clock_id, \
370                             const struct timespec *tp); }
371 234     STD     POSIX   { int clock_getres(clockid_t clock_id, \
372                             struct timespec *tp); }
373 235     UNIMPL  NOHIDE  timer_create
374 236     UNIMPL  NOHIDE  timer_delete
375 237     UNIMPL  NOHIDE  timer_settime
376 238     UNIMPL  NOHIDE  timer_gettime
377 239     UNIMPL  NOHIDE  timer_getoverrun
378 240     STD     POSIX   { int nanosleep(const struct timespec *rqtp, \
379                             struct timespec *rmtp); }
380 241     UNIMPL  NOHIDE  nosys
381 242     UNIMPL  NOHIDE  nosys
382 243     UNIMPL  NOHIDE  nosys
383 244     UNIMPL  NOHIDE  nosys
384 245     UNIMPL  NOHIDE  nosys
385 246     UNIMPL  NOHIDE  nosys
386 247     UNIMPL  NOHIDE  nosys
387 248     UNIMPL  NOHIDE  nosys
388 249     UNIMPL  NOHIDE  nosys
389 ; syscall numbers initially used in OpenBSD
390 250     STD     BSD     { int minherit(void *addr, size_t len, int inherit); }
391 251     STD     BSD     { int rfork(int flags); }
392 252     STD     BSD     { int openbsd_poll(struct pollfd *fds, u_int nfds, \
393                             int timeout); }
394 253     STD     BSD     { int issetugid(void); }
395 254     STD     BSD     { int lchown(char *path, int uid, int gid); }
396 255     UNIMPL  NOHIDE  nosys
397 256     UNIMPL  NOHIDE  nosys
398 257     UNIMPL  NOHIDE  nosys
399 258     UNIMPL  NOHIDE  nosys
400 259     UNIMPL  NOHIDE  nosys
401 260     UNIMPL  NOHIDE  nosys
402 261     UNIMPL  NOHIDE  nosys
403 262     UNIMPL  NOHIDE  nosys
404 263     UNIMPL  NOHIDE  nosys
405 264     UNIMPL  NOHIDE  nosys
406 265     UNIMPL  NOHIDE  nosys
407 266     UNIMPL  NOHIDE  nosys
408 267     UNIMPL  NOHIDE  nosys
409 268     UNIMPL  NOHIDE  nosys
410 269     UNIMPL  NOHIDE  nosys
411 270     UNIMPL  NOHIDE  nosys
412 271     UNIMPL  NOHIDE  nosys
413 272     COMPAT_DF12     BSD     { int getdents(int fd, char *buf, size_t count); }
414 273     UNIMPL  NOHIDE  nosys
415 274     STD     BSD     { int lchmod(char *path, mode_t mode); }
416 275     NOPROTO BSD     { int lchown(char *path, uid_t uid, gid_t gid); } netbsd_lchown lchown_args int
417 276     STD     BSD     { int lutimes(char *path, struct timeval *tptr); }
418 277     NOPROTO BSD     { int msync(void *addr, size_t len, int flags); } netbsd_msync msync_args int
419 278     OBSOL   BSD     { int nstat(char *path, struct nstat *ub); }
420 279     OBSOL   NOHIDE  { int nfstat(int fd, struct nstat *sb); }
421 280     OBSOL   NOHIDE  { int nlstat(char *path, struct nstat *ub); }
422 281     UNIMPL  NOHIDE  nosys
423 282     UNIMPL  NOHIDE  nosys
424 283     UNIMPL  NOHIDE  nosys
425 284     UNIMPL  NOHIDE  nosys
426 285     UNIMPL  NOHIDE  nosys
427 286     UNIMPL  NOHIDE  nosys
428 287     UNIMPL  NOHIDE  nosys
429 288     UNIMPL  NOHIDE  nosys
430 ; 289 and 290 from NetBSD (OpenBSD: 267 and 268)
431 289     MPSAFE  STD     BSD     { ssize_t extpreadv(int fd, struct iovec *iovp, \
432                                   u_int iovcnt, int flags, off_t offset); }
433 290     MPSAFE  STD     BSD     { ssize_t extpwritev(int fd, struct iovec *iovp,\
434                                   u_int iovcnt, int flags, off_t offset); }
435 291     UNIMPL  NOHIDE  nosys
436 292     UNIMPL  NOHIDE  nosys
437 293     UNIMPL  NOHIDE  nosys
438 294     UNIMPL  NOHIDE  nosys
439 295     UNIMPL  NOHIDE  nosys
440 296     UNIMPL  NOHIDE  nosys
441 ; XXX 297 is 300 in NetBSD 
442 297     STD     BSD     { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
443 298     STD     BSD     { int fhopen(const struct fhandle *u_fhp, int flags); }
444 299     COMPAT_DF12     POSIX   { int fhstat(const struct fhandle *u_fhp, struct dfbsd12_stat *sb); }
445 ; syscall numbers for FreeBSD
446 300     STD     BSD     { int modnext(int modid); }
447 301     STD     BSD     { int modstat(int modid, struct module_stat* stat); }
448 302     STD     BSD     { int modfnext(int modid); }
449 303     STD     BSD     { int modfind(const char *name); }
450 304     STD     BSD     { int kldload(const char *file); }
451 305     STD     BSD     { int kldunload(int fileid); }
452 306     STD     BSD     { int kldfind(const char *file); }
453 307     STD     BSD     { int kldnext(int fileid); }
454 308     STD     BSD     { int kldstat(int fileid, struct kld_file_stat* stat); }
455 309     STD     BSD     { int kldfirstmod(int fileid); }
456 310     STD     BSD     { int getsid(pid_t pid); }
457 311     STD     BSD     { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
458 312     STD     BSD     { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
459 313     OBSOL   NOHIDE  signanosleep
460 314     STD     BSD     { int aio_return(struct aiocb *aiocbp); }
461 315     STD     BSD     { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
462 316     STD     BSD     { int aio_cancel(int fd, struct aiocb *aiocbp); }
463 317     STD     BSD     { int aio_error(struct aiocb *aiocbp); }
464 318     STD     BSD     { int aio_read(struct aiocb *aiocbp); }
465 319     STD     BSD     { int aio_write(struct aiocb *aiocbp); }
466 320     STD     BSD     { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
467 321     STD     BSD     { int yield(void); }
468 322     STD     BSD     { int thr_sleep(const struct timespec *timeout); }
469 323     STD     BSD     { int thr_wakeup(pid_t pid); }
470 324     STD     BSD     { int mlockall(int how); }
471 325     STD     BSD     { int munlockall(void); }
472 326     STD     BSD     { int __getcwd(u_char *buf, u_int buflen); }
473
474 327     STD     POSIX   { int sched_setparam (pid_t pid, const struct sched_param *param); }
475 328     STD     POSIX   { int sched_getparam (pid_t pid, struct sched_param *param); }
476
477 329     STD     POSIX   { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
478 330     STD     POSIX   { int sched_getscheduler (pid_t pid); }
479
480 331     STD     POSIX   { int sched_yield (void); }
481 332     STD     POSIX   { int sched_get_priority_max (int policy); }
482 333     STD     POSIX   { int sched_get_priority_min (int policy); }
483 334     STD     POSIX   { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
484 335     STD     BSD     { int utrace(const void *addr, size_t len); }
485 336     OBSOL   NOHIDE  freebsd4_sendfile
486 337     STD     BSD     { int kldsym(int fileid, int cmd, void *data); }
487 338     STD     BSD     { int jail(struct jail *jail); }
488 339     UNIMPL  BSD     pioctl
489 340     MPSAFE  STD     POSIX   { int sigprocmask(int how, const sigset_t *set, \
490                             sigset_t *oset); }
491 341     STD     POSIX   { int sigsuspend(const sigset_t *sigmask); }
492 342     STD     POSIX   { int sigaction(int sig, const struct sigaction *act, \
493                             struct sigaction *oact); }
494 343     STD     POSIX   { int sigpending(sigset_t *set); }
495 344     STD     BSD     { int sigreturn(ucontext_t *sigcntxp); }
496 345     STD     POSIX   { int sigtimedwait(const sigset_t *set,\
497                              siginfo_t *info, const struct timespec *timeout); }
498 346     STD     POSIX   { int sigwaitinfo(const sigset_t *set,\
499                              siginfo_t *info); }
500 347     STD     BSD     { int __acl_get_file(const char *path, \
501                             acl_type_t type, struct acl *aclp); }
502 348     STD     BSD     { int __acl_set_file(const char *path, \
503                             acl_type_t type, struct acl *aclp); }
504 349     STD     BSD     { int __acl_get_fd(int filedes, acl_type_t type, \
505                             struct acl *aclp); }
506 350     STD     BSD     { int __acl_set_fd(int filedes, acl_type_t type, \
507                             struct acl *aclp); }
508 351     STD     BSD     { int __acl_delete_file(const char *path, \
509                             acl_type_t type); }
510 352     STD     BSD     { int __acl_delete_fd(int filedes, acl_type_t type); }
511 353     STD     BSD     { int __acl_aclcheck_file(const char *path, \
512                             acl_type_t type, struct acl *aclp); }
513 354     STD     BSD     { int __acl_aclcheck_fd(int filedes, acl_type_t type, \
514                             struct acl *aclp); }
515 355     STD     BSD     { int extattrctl(const char *path, int cmd, \
516                             const char *attrname, char *arg); }
517 356     STD     BSD     { int extattr_set_file(const char *path, \
518                             const char *attrname, struct iovec *iovp, \
519                             unsigned iovcnt); }
520 357     STD     BSD     { int extattr_get_file(const char *path, \
521                             const char *attrname, struct iovec *iovp, \
522                             unsigned iovcnt); }
523 358     STD     BSD     { int extattr_delete_file(const char *path, \
524                             const char *attrname); }
525 359     STD     BSD     { int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
526 360     STD     BSD     { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
527 361     STD     BSD     { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
528 362     STD     BSD     { int kqueue(void); }
529 363     STD     BSD     { int kevent(int fd, \
530                             const struct kevent *changelist, int nchanges, \
531                             struct kevent *eventlist, int nevents, \
532                             const struct timespec *timeout); }
533 364     STD     BSD     { int sctp_peeloff(int sd, caddr_t name ); }
534 ; 365-392 used by FreeBSD-current
535 365     UNIMPL  NOHIDE  nosys
536 366     UNIMPL  NOHIDE  nosys
537 367     UNIMPL  NOHIDE  nosys
538 368     UNIMPL  NOHIDE  nosys
539 369     UNIMPL  NOHIDE  nosys
540 370     UNIMPL  NOHIDE  nosys
541 371     UNIMPL  NOHIDE  nosys
542 372     UNIMPL  NOHIDE  nosys
543 373     UNIMPL  NOHIDE  nosys
544 374     UNIMPL  NOHIDE  nosys
545 375     UNIMPL  NOHIDE  nosys
546 376     UNIMPL  NOHIDE  nosys
547 377     UNIMPL  NOHIDE  nosys
548 378     UNIMPL  NOHIDE  nosys
549 379     UNIMPL  NOHIDE  nosys
550 380     UNIMPL  NOHIDE  nosys
551 381     UNIMPL  NOHIDE  nosys
552 382     UNIMPL  NOHIDE  nosys
553 383     UNIMPL  NOHIDE  nosys
554 384     UNIMPL  NOHIDE  nosys
555 385     UNIMPL  NOHIDE  nosys
556 386     UNIMPL  NOHIDE  nosys
557 387     UNIMPL  NOHIDE  nosys
558 388     UNIMPL  NOHIDE  nosys
559 389     UNIMPL  NOHIDE  nosys
560 390     UNIMPL  NOHIDE  nosys
561 391     STD     BSD     { int lchflags(char *path, int flags); }
562 392     STD     BSD     { int uuidgen(struct uuid *store, int count); }
563 393     STD     BSD     { int sendfile(int fd, int s, off_t offset, size_t nbytes, \
564                                 struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
565 ; 394-439 used by FreeBSD-current
566 394     UNIMPL  NOHIDE  nosys
567 395     UNIMPL  NOHIDE  nosys
568 396     UNIMPL  NOHIDE  nosys
569 397     UNIMPL  NOHIDE  nosys
570 398     UNIMPL  NOHIDE  nosys
571 399     UNIMPL  NOHIDE  nosys
572 400     UNIMPL  NOHIDE  nosys
573 401     UNIMPL  NOHIDE  nosys
574 402     UNIMPL  NOHIDE  nosys
575 403     UNIMPL  NOHIDE  nosys
576 404     UNIMPL  NOHIDE  nosys
577 405     UNIMPL  NOHIDE  nosys
578 406     UNIMPL  NOHIDE  nosys
579 407     UNIMPL  NOHIDE  nosys
580 408     UNIMPL  NOHIDE  nosys
581 409     UNIMPL  NOHIDE  nosys
582 410     UNIMPL  NOHIDE  nosys
583 411     UNIMPL  NOHIDE  nosys
584 412     UNIMPL  NOHIDE  nosys
585 413     UNIMPL  NOHIDE  nosys
586 414     UNIMPL  NOHIDE  nosys
587 415     UNIMPL  NOHIDE  nosys
588 416     UNIMPL  NOHIDE  nosys
589 417     UNIMPL  NOHIDE  nosys
590 418     UNIMPL  NOHIDE  nosys
591 419     UNIMPL  NOHIDE  nosys
592 420     UNIMPL  NOHIDE  nosys
593 421     UNIMPL  NOHIDE  nosys
594 422     UNIMPL  NOHIDE  nosys
595 423     UNIMPL  NOHIDE  nosys
596 424     UNIMPL  NOHIDE  nosys
597 425     UNIMPL  NOHIDE  nosys
598 426     UNIMPL  NOHIDE  nosys
599 427     UNIMPL  NOHIDE  nosys
600 428     UNIMPL  NOHIDE  nosys
601 429     UNIMPL  NOHIDE  nosys
602 430     UNIMPL  NOHIDE  nosys
603 431     UNIMPL  NOHIDE  nosys
604 432     UNIMPL  NOHIDE  nosys
605 433     UNIMPL  NOHIDE  nosys
606 434     UNIMPL  NOHIDE  nosys
607 435     UNIMPL  NOHIDE  nosys
608 436     UNIMPL  NOHIDE  nosys
609 437     UNIMPL  NOHIDE  nosys
610 438     UNIMPL  NOHIDE  nosys
611 439     UNIMPL  NOHIDE  nosys
612 ; 440-449 reserved for FreeBSD-5.x growth
613 440     UNIMPL  NOHIDE  nosys
614 441     UNIMPL  NOHIDE  nosys
615 442     UNIMPL  NOHIDE  nosys
616 443     UNIMPL  NOHIDE  nosys
617 444     UNIMPL  NOHIDE  nosys
618 445     UNIMPL  NOHIDE  nosys
619 446     UNIMPL  NOHIDE  nosys
620 447     UNIMPL  NOHIDE  nosys
621 448     UNIMPL  NOHIDE  nosys
622 449     UNIMPL  NOHIDE  nosys
623 ; 450 DragonFly system calls
624 450     MPSAFE  STD     BSD     { int varsym_set(int level, const char *name, const char *data); }
625 451     MPSAFE  STD     BSD     { int varsym_get(int mask, const char *wild, char *buf, int bufsize); }
626 452     MPSAFE  STD     BSD     { int varsym_list(int level, char *buf, int maxsize, int *marker); }
627 453     STD     BSD     { int upc_register(struct upcall *upc, void *ctxfunc, void *func, void *data); }
628 454     STD     BSD     { int upc_control(int cmd, int upcid, void *data); }
629 455     STD     BSD     { int caps_sys_service(const char *name, uid_t uid, gid_t gid, int upcid, int flags); }
630 456     STD     BSD     { int caps_sys_client(const char *name, uid_t uid, gid_t gid, int upcid, int flags); }
631 457     STD     BSD     { int caps_sys_close(int portid); }
632 458     STD     BSD     { off_t caps_sys_put(int portid, void *msg, int msgsize); }
633 459     STD     BSD     { int caps_sys_reply(int portid, void *msg, int msgsize, off_t msgcid); }
634 460     STD     BSD     { int caps_sys_get(int portid, void *msg, int maxsize, struct caps_msgid *msgid, struct caps_cred *ccr); }
635 461     STD     BSD     { int caps_sys_wait(int portid, void *msg, int maxsize, struct caps_msgid *msgid, struct caps_cred *ccr); }
636 462     STD     BSD     { int caps_sys_abort(int portid, off_t msgcid, int flags); }
637 463     STD     BSD     { off_t caps_sys_getgen(int portid); }
638 464     STD     BSD     { int caps_sys_setgen(int portid, off_t gen); }
639 465     STD     BSD     { int exec_sys_register(void *entry); }
640 466     STD     BSD     { int exec_sys_unregister(int id); }
641 467     STD     BSD     { int sys_checkpoint(int type, int fd, pid_t pid, int retval); }
642 468     STD     BSD     { int mountctl(const char *path, int op, int fd, const void *ctl, int ctllen, void *buf, int buflen); }
643 469     STD     BSD     { int umtx_sleep(volatile const int *ptr, int value, int timeout); }
644 470     STD     BSD     { int umtx_wakeup(volatile const int *ptr, int count); }
645 471     STD     BSD     { int jail_attach(int jid); }
646 472     MPSAFE  STD     BSD     { int set_tls_area(int which, struct tls_info *info, size_t infosize); }
647 473     MPSAFE  STD     BSD     { int get_tls_area(int which, struct tls_info *info, size_t infosize); }
648 474     MPSAFE  STD     BSD     { int closefrom(int fd); }
649 475     STD     POSIX   { int stat(const char *path, struct stat *ub); }
650 476     MPSAFE STD      POSIX   { int fstat(int fd, struct stat *sb); }
651 477     STD     POSIX   { int lstat(const char *path, struct stat *ub); }
652 478     STD     BSD     { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
653 479     STD     BSD     { int getdirentries(int fd, char *buf, u_int count, \
654                             long *basep); }
655 480     STD     BSD     { int getdents(int fd, char *buf, size_t count); }
656 481     STD     BSD     { int usched_set(pid_t pid, int cmd, void *data, \
657                                 int bytes); }
658 482     STD     BSD     { int extaccept(int s, int flags, caddr_t name, int *anamelen); }
659 483     STD     BSD     { int extconnect(int s, int flags, caddr_t name, int namelen); }
660 484     STD     BSD     { int syslink(int cmd, struct syslink_info *info, size_t bytes); }
661 485     STD     BSD     { int mcontrol(void *addr, size_t len, int behav, off_t value); }
662 486     STD     BSD     { int vmspace_create(void *id, int type, void *data); } 
663 487     STD     BSD     { int vmspace_destroy(void *id); }
664 488     STD     BSD     { int vmspace_ctl(void *id, int cmd,            \
665                                           struct trapframe *tframe,     \
666                                           struct vextframe *vframe); }
667 489     STD     BSD     { int vmspace_mmap(void *id, void *addr, size_t len, \
668                                           int prot, int flags, int fd, \
669                                           off_t offset); }
670 490     STD     BSD     { int vmspace_munmap(void *id, void *addr,      \
671                                           size_t len); }
672 491     STD     BSD     { int vmspace_mcontrol(void *id, void *addr,    \
673                                           size_t len, int behav, off_t value); } 
674 492     STD     BSD     { ssize_t vmspace_pread(void *id, void *buf, \
675                             size_t nbyte, int flags, off_t offset); }
676 493     STD     BSD     { ssize_t vmspace_pwrite(void *id, const void *buf, \
677                             size_t nbyte, int flags, off_t offset); }
678 494     STD     BSD     { void extexit(int how, int status, void *addr); }
679 495     STD     BSD     { int lwp_create(struct lwp_params *params); }
680 496     STD     BSD     { lwpid_t lwp_gettid(void); }
681 497     STD     BSD     { int lwp_kill(pid_t pid, lwpid_t tid, int signum); }
682 498     STD     BSD     { int lwp_rtprio(int function, pid_t pid, lwpid_t tid, struct rtprio *rtp); }
683 499     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); }
686 500     STD     BSD     { int statvfs(const char *path, struct statvfs *buf); }
687 501     STD     BSD     { int fstatvfs(int fd, struct statvfs *buf); }
688 502     STD     BSD     { int fhstatvfs(const struct fhandle *u_fhp, struct statvfs *buf); }
689 503     STD     BSD     { int getvfsstat(struct statfs *buf,          \
690                             struct statvfs *vbuf, long vbufsize, int flags); }
691 504     STD     POSIX   { int openat(int fd, char *path, int flags, int mode); }
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'.
695 505     STD     POSIX   { int fstatat(int fd, char *path,       \
696                                         struct stat *sb, int flags); }
697 506     STD     POSIX   { int fchmodat(int fd, char *path, int mode, \
698                                         int flags); }
699 507     STD     POSIX   { int fchownat(int fd, char *path, int uid, int gid, \
700                                         int flags); }
701 508     STD     POSIX   { int unlinkat(int fd, char *path, int flags); }
702 509     STD     POSIX   { int faccessat(int fd, char *path, int amode, \
703                                         int flags); }