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