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