]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/kern/syscalls.master
This commit was generated by cvs2svn to compensate for changes in r146515,
[FreeBSD/FreeBSD.git] / sys / kern / syscalls.master
1  $FreeBSD$
2 ;       from: @(#)syscalls.master       8.2 (Berkeley) 1/13/94
3 ;
4 ; System call name/number master file.
5 ; Processed to created init_sysent.c, syscalls.c and syscall.h.
6
7 ; Columns: number [M]type nargs name alt{name,tag,rtyp}/comments
8 ;       number  system call number, must be in order
9 ;       type    one of [M]STD, [M]OBSOL, [M]UNIMPL, [M]COMPAT, [M]CPT_NOA,
10 ;               [M]LIBCOMPAT, [M]NODEF,  [M]NOARGS,  [M]NOPROTO,  [M]NOIMPL,
11 ;               [M]NOSTD, [M]COMPAT4
12 ;       name    psuedo-prototype of syscall routine
13 ;               If one of the following alts is different, then all appear:
14 ;       altname name of system call if different
15 ;       alttag  name of args struct tag if different from [o]`name'"_args"
16 ;       altrtyp return type if not int (bogus - syscalls always return int)
17 ;               for UNIMPL/OBSOL, name continues with comments
18
19 ; types:
20 ;       [M]     e.g. like MSTD -- means the system call is MP-safe.  If no
21 ;               M prefix is used, the syscall wrapper will obtain the Giant
22 ;               lock for the syscall.
23 ;       STD     always included
24 ;       COMPAT  included on COMPAT #ifdef
25 ;       COMPAT4 included on COMPAT4 #ifdef (FreeBSD 4 compat)
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 ;       NOSTD   implemented but as a lkm that can be statically
30 ;                       compiled in sysent entry will be filled with lkmsys
31 ;                       so the SYSCALL_MODULE macro works
32 ;
33 ; Please copy any additions and changes to the following compatability tables:
34 ; sys/compat/freebsd32/syscalls.master
35
36 ; #ifdef's, etc. may be included, and are copied to the output files.
37
38 #include <sys/param.h>
39 #include <sys/sysent.h>
40 #include <sys/sysproto.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       MSTD    { int nosys(void); } syscall nosys_args int
49 1       MSTD    { void sys_exit(int rval); } exit sys_exit_args void
50 2       MSTD    { int fork(void); }
51 3       MSTD    { ssize_t read(int fd, void *buf, size_t nbyte); }
52 4       MSTD    { ssize_t write(int fd, const void *buf, size_t nbyte); }
53 5       MSTD    { 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       MSTD    { int close(int fd); }
58 7       MSTD    { int wait4(int pid, int *status, int options, \
59                             struct rusage *rusage); } wait4 wait_args int
60 8       MCOMPAT { int creat(char *path, int mode); }
61 9       MSTD    { int link(char *path, char *link); }
62 10      MSTD    { int unlink(char *path); }
63 11      OBSOL   execv
64 12      MSTD    { int chdir(char *path); }
65 13      MSTD    { int fchdir(int fd); }
66 14      MSTD    { int mknod(char *path, int mode, int dev); }
67 15      MSTD    { int chmod(char *path, int mode); }
68 16      MSTD    { int chown(char *path, int uid, int gid); }
69 17      MSTD    { int obreak(char *nsize); } break obreak_args int
70 18      COMPAT4 { int getfsstat(struct ostatfs *buf, long bufsize, int flags); }
71 19      COMPAT  { long lseek(int fd, long offset, int whence); }
72 20      MSTD    { pid_t getpid(void); }
73 21      STD     { int mount(char *type, char *path, int flags, caddr_t data); }
74 ; XXX `path' should have type `const char *' but we're not ready for that.
75 22      STD     { int unmount(char *path, int flags); }
76 23      MSTD    { int setuid(uid_t uid); }
77 24      MSTD    { uid_t getuid(void); }
78 25      MSTD    { uid_t geteuid(void); }
79 26      MSTD    { int ptrace(int req, pid_t pid, caddr_t addr, int data); }
80 27      MSTD    { int recvmsg(int s, struct msghdr *msg, int flags); }
81 28      MSTD    { int sendmsg(int s, struct msghdr *msg, int flags); }
82 29      MSTD    { int recvfrom(int s, caddr_t buf, size_t len, int flags, \
83                     struct sockaddr * __restrict from, \
84                     __socklen_t * __restrict fromlenaddr); }
85 30      MSTD    { int accept(int s, struct sockaddr * __restrict name, \
86                     __socklen_t * __restrict anamelen); }
87 31      MSTD    { int getpeername(int fdes, struct sockaddr * __restrict asa, \
88                     __socklen_t * __restrict alen); }
89 32      MSTD    { int getsockname(int fdes, struct sockaddr * __restrict asa, \
90                     __socklen_t * __restrict alen); }
91 33      MSTD    { int access(char *path, int flags); }
92 34      MSTD    { int chflags(char *path, int flags); }
93 35      MSTD    { int fchflags(int fd, int flags); }
94 36      MSTD    { int sync(void); }
95 37      MSTD    { int kill(int pid, int signum); }
96 38      COMPAT  { int stat(char *path, struct ostat *ub); }
97 39      MSTD    { pid_t getppid(void); }
98 40      COMPAT  { int lstat(char *path, struct ostat *ub); }
99 41      MSTD    { int dup(u_int fd); }
100 42      MSTD    { int pipe(void); }
101 43      MSTD    { gid_t getegid(void); }
102 44      MSTD    { int profil(caddr_t samples, size_t size, size_t offset, \
103                     u_int scale); }
104 45      MSTD    { int ktrace(const char *fname, int ops, int facs, int pid); }
105 46      MCOMPAT { int sigaction(int signum, struct osigaction *nsa, \
106                     struct osigaction *osa); }
107 47      MSTD    { gid_t getgid(void); }
108 48      MCOMPAT { int sigprocmask(int how, osigset_t mask); }
109 ; XXX note nonstandard (bogus) calling convention - the libc stub passes
110 ; us the mask, not a pointer to it, and we return the old mask as the
111 ; (int) return value.
112 49      MSTD    { int getlogin(char *namebuf, u_int namelen); }
113 50      MSTD    { int setlogin(char *namebuf); }
114 51      MSTD    { int acct(char *path); }
115 52      MCOMPAT { int sigpending(void); }
116 53      MSTD    { int sigaltstack(stack_t *ss, stack_t *oss); }
117 54      MSTD    { int ioctl(int fd, u_long com, caddr_t data); }
118 55      MSTD    { int reboot(int opt); }
119 56      MSTD    { int revoke(char *path); }
120 57      MSTD    { int symlink(char *path, char *link); }
121 58      MSTD    { int readlink(char *path, char *buf, int count); }
122 59      MSTD    { int execve(char *fname, char **argv, char **envv); }
123 60      MSTD    { int umask(int newmask); } umask umask_args int
124 61      MSTD    { int chroot(char *path); }
125 62      MCOMPAT { int fstat(int fd, struct ostat *sb); }
126 63      MCOMPAT { int getkerninfo(int op, char *where, size_t *size, \
127                     int arg); } getkerninfo getkerninfo_args int
128 64      MCOMPAT { int getpagesize(void); } getpagesize getpagesize_args int
129 65      MSTD    { int msync(void *addr, size_t len, int flags); }
130 66      MSTD    { int vfork(void); }
131 67      OBSOL   vread
132 68      OBSOL   vwrite
133 69      MSTD    { int sbrk(int incr); }
134 70      MSTD    { int sstk(int incr); }
135 71      MCOMPAT { int mmap(void *addr, int len, int prot, int flags, int fd, \
136                     long pos); }
137 72      MSTD    { int ovadvise(int anom); } vadvise ovadvise_args int
138 73      MSTD    { int munmap(void *addr, size_t len); }
139 74      MSTD    { int mprotect(const void *addr, size_t len, int prot); }
140 75      MSTD    { int madvise(void *addr, size_t len, int behav); }
141 76      OBSOL   vhangup
142 77      OBSOL   vlimit
143 78      MSTD    { int mincore(const void *addr, size_t len, char *vec); }
144 79      MSTD    { int getgroups(u_int gidsetsize, gid_t *gidset); }
145 80      MSTD    { int setgroups(u_int gidsetsize, gid_t *gidset); }
146 81      MSTD    { int getpgrp(void); }
147 82      MSTD    { int setpgid(int pid, int pgid); }
148 83      MSTD    { int setitimer(u_int which, struct itimerval *itv, \
149                     struct itimerval *oitv); }
150 84      MCOMPAT { int wait(void); }
151 85      MSTD    { int swapon(char *name); }
152 86      MSTD    { int getitimer(u_int which, struct itimerval *itv); }
153 87      MCOMPAT { int gethostname(char *hostname, u_int len); } \
154                     gethostname gethostname_args int
155 88      MCOMPAT { int sethostname(char *hostname, u_int len); } \
156                     sethostname sethostname_args int
157 89      MSTD    { int getdtablesize(void); }
158 90      MSTD    { int dup2(u_int from, u_int to); }
159 91      UNIMPL  getdopt
160 92      MSTD    { 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 93      MSTD    { int select(int nd, fd_set *in, fd_set *ou, \
164                     fd_set *ex, struct timeval *tv); }
165 94      UNIMPL  setdopt
166 95      MSTD    { int fsync(int fd); }
167 96      MSTD    { int setpriority(int which, int who, int prio); }
168 97      MSTD    { int socket(int domain, int type, int protocol); }
169 98      MSTD    { int connect(int s, caddr_t name, int namelen); }
170 99      MCPT_NOA { int accept(int s, caddr_t name, int *anamelen); } \
171                     accept accept_args int
172 100     MSTD    { int getpriority(int which, int who); }
173 101     MCOMPAT { int send(int s, caddr_t buf, int len, int flags); }
174 102     MCOMPAT { int recv(int s, caddr_t buf, int len, int flags); }
175 103     MCOMPAT { int sigreturn(struct osigcontext *sigcntxp); }
176 104     MSTD    { int bind(int s, caddr_t name, int namelen); }
177 105     MSTD    { int setsockopt(int s, int level, int name, caddr_t val, \
178                     int valsize); }
179 106     MSTD    { int listen(int s, int backlog); }
180 107     OBSOL   vtimes
181 108     MCOMPAT { int sigvec(int signum, struct sigvec *nsv, \
182                     struct sigvec *osv); }
183 109     MCOMPAT { int sigblock(int mask); }
184 110     MCOMPAT { int sigsetmask(int mask); }
185 111     MCOMPAT { int sigsuspend(osigset_t mask); }
186 ; XXX note nonstandard (bogus) calling convention - the libc stub passes
187 ; us the mask, not a pointer to it.
188 112     MCOMPAT { int sigstack(struct sigstack *nss, struct sigstack *oss); }
189 113     MCOMPAT { int recvmsg(int s, struct omsghdr *msg, int flags); }
190 114     MCOMPAT { int sendmsg(int s, caddr_t msg, int flags); }
191 115     OBSOL   vtrace
192 116     MSTD    { int gettimeofday(struct timeval *tp, struct timezone *tzp); }
193 117     MSTD    { int getrusage(int who, struct rusage *rusage); }
194 118     MSTD    { int getsockopt(int s, int level, int name, caddr_t val, \
195                     int *avalsize); }
196 119     UNIMPL  resuba (BSD/OS 2.x)
197 120     MSTD    { int readv(int fd, struct iovec *iovp, u_int iovcnt); }
198 121     MSTD    { int writev(int fd, struct iovec *iovp, u_int iovcnt); }
199 122     MSTD    { int settimeofday(struct timeval *tv, struct timezone *tzp); }
200 123     MSTD    { int fchown(int fd, int uid, int gid); }
201 124     MSTD    { int fchmod(int fd, int mode); }
202 125     MCPT_NOA { int recvfrom(int s, caddr_t buf, size_t len, int flags, \
203                     caddr_t from, int *fromlenaddr); } \
204                     recvfrom recvfrom_args int
205 126     MSTD    { int setreuid(int ruid, int euid); }
206 127     MSTD    { int setregid(int rgid, int egid); }
207 128     MSTD    { int rename(char *from, char *to); }
208 129     COMPAT  { int truncate(char *path, long length); }
209 130     COMPAT  { int ftruncate(int fd, long length); }
210 131     MSTD    { int flock(int fd, int how); }
211 132     MSTD    { int mkfifo(char *path, int mode); }
212 133     MSTD    { int sendto(int s, caddr_t buf, size_t len, int flags, \
213                     caddr_t to, int tolen); }
214 134     MSTD    { int shutdown(int s, int how); }
215 135     MSTD    { int socketpair(int domain, int type, int protocol, \
216                     int *rsv); }
217 136     MSTD    { int mkdir(char *path, int mode); }
218 137     MSTD    { int rmdir(char *path); }
219 138     MSTD    { int utimes(char *path, struct timeval *tptr); }
220 139     OBSOL   4.2 sigreturn
221 140     MSTD    { int adjtime(struct timeval *delta, \
222                     struct timeval *olddelta); }
223 141     MCOMPAT { int getpeername(int fdes, caddr_t asa, int *alen); }
224 142     MCOMPAT { long gethostid(void); }
225 143     MCOMPAT { int sethostid(long hostid); }
226 144     MCOMPAT { int getrlimit(u_int which, struct orlimit *rlp); }
227 145     MCOMPAT { int setrlimit(u_int which, struct orlimit *rlp); }
228 146     MCOMPAT { int killpg(int pgid, int signum); }
229 147     MSTD    { int setsid(void); }
230 148     STD     { int quotactl(char *path, int cmd, int uid, caddr_t arg); }
231 149     MCOMPAT { int quota(void); }
232 150     MCPT_NOA { int getsockname(int fdec, caddr_t asa, int *alen); }\
233                     getsockname getsockname_args int
234
235 ; Syscalls 151-180 inclusive are reserved for vendor-specific
236 ; system calls.  (This includes various calls added for compatibity
237 ; with other Unix variants.)
238 ; Some of these calls are now supported by BSD...
239 151     UNIMPL  sem_lock (BSD/OS 2.x)
240 152     UNIMPL  sem_wakeup (BSD/OS 2.x)
241 153     UNIMPL  asyncdaemon (BSD/OS 2.x)
242 154     UNIMPL  nosys
243 ; 155 is initialized by the NFS code, if present.
244 155     MNOIMPL { int nfssvc(int flag, caddr_t argp); }
245 156     COMPAT  { int getdirentries(int fd, char *buf, u_int count, \
246                     long *basep); }
247 157     COMPAT4 { int statfs(char *path, struct ostatfs *buf); }
248 158     COMPAT4 { int fstatfs(int fd, struct ostatfs *buf); }
249 159     UNIMPL  nosys
250 160     MSTD    { int lgetfh(char *fname, struct fhandle *fhp); }
251 161     MSTD    { int getfh(char *fname, struct fhandle *fhp); }
252 162     MSTD    { int getdomainname(char *domainname, int len); }
253 163     MSTD    { int setdomainname(char *domainname, int len); }
254 164     MSTD    { int uname(struct utsname *name); }
255 165     MSTD    { int sysarch(int op, char *parms); }
256 166     MSTD    { int rtprio(int function, pid_t pid, struct rtprio *rtp); }
257 167     UNIMPL  nosys
258 168     UNIMPL  nosys
259 ; 169 is initialized by the SYSVSEM code if present or loaded
260 169     MNOSTD  { int semsys(int which, int a2, int a3, int a4, int a5); }
261 ; 169 is initialized by the SYSVMSG code if present or loaded
262 ; XXX should be { int semsys(int which, ...); }
263 170     MNOSTD  { int msgsys(int which, int a2, int a3, int a4, int a5, \
264                     int a6); }
265 ; 169 is initialized by the SYSVSHM code if present or loaded
266 ; XXX should be { int msgsys(int which, ...); }
267 171     MNOSTD  { int shmsys(int which, int a2, int a3, int a4); }
268 ; XXX should be { int shmsys(int which, ...); }
269 172     UNIMPL  nosys
270 173     MSTD    { ssize_t pread(int fd, void *buf, size_t nbyte, \
271                     int pad, off_t offset); }
272 174     MSTD    { ssize_t pwrite(int fd, const void *buf, \
273                     size_t nbyte, int pad, off_t offset); }
274 175     UNIMPL  nosys
275 176     MSTD    { int ntp_adjtime(struct timex *tp); }
276 177     UNIMPL  sfork (BSD/OS 2.x)
277 178     UNIMPL  getdescriptor (BSD/OS 2.x)
278 179     UNIMPL  setdescriptor (BSD/OS 2.x)
279 180     UNIMPL  nosys
280
281 ; Syscalls 181-199 are used by/reserved for BSD
282 181     MSTD    { int setgid(gid_t gid); }
283 182     MSTD    { int setegid(gid_t egid); }
284 183     MSTD    { int seteuid(uid_t euid); }
285 184     UNIMPL  lfs_bmapv
286 185     UNIMPL  lfs_markv
287 186     UNIMPL  lfs_segclean
288 187     UNIMPL  lfs_segwait
289 188     MSTD    { int stat(char *path, struct stat *ub); }
290 189     MSTD    { int fstat(int fd, struct stat *sb); }
291 190     MSTD    { int lstat(char *path, struct stat *ub); }
292 191     MSTD    { int pathconf(char *path, int name); }
293 192     MSTD    { int fpathconf(int fd, int name); }
294 193     UNIMPL  nosys
295 194     MSTD    { int getrlimit(u_int which, struct rlimit *rlp); } \
296                     getrlimit __getrlimit_args int
297 195     MSTD    { int setrlimit(u_int which, struct rlimit *rlp); } \
298                     setrlimit __setrlimit_args int
299 196     MSTD    { int getdirentries(int fd, char *buf, u_int count, \
300                     long *basep); }
301 197     MSTD    { caddr_t mmap(caddr_t addr, size_t len, int prot, \
302                     int flags, int fd, int pad, off_t pos); }
303 198     MSTD    { int nosys(void); } __syscall __syscall_args int
304 199     MSTD    { off_t lseek(int fd, int pad, off_t offset, int whence); }
305 200     MSTD    { int truncate(char *path, int pad, off_t length); }
306 201     MSTD    { int ftruncate(int fd, int pad, off_t length); }
307 202     MSTD    { int __sysctl(int *name, u_int namelen, void *old, \
308                     size_t *oldlenp, void *new, size_t newlen); } \
309                     __sysctl sysctl_args int
310 203     MSTD    { int mlock(const void *addr, size_t len); }
311 204     MSTD    { int munlock(const void *addr, size_t len); }
312 205     MSTD    { int undelete(char *path); }
313 206     MSTD    { int futimes(int fd, struct timeval *tptr); }
314 207     MSTD    { int getpgid(pid_t pid); }
315 208     UNIMPL  newreboot (NetBSD)
316 209     MSTD    { int poll(struct pollfd *fds, u_int nfds, int timeout); }
317
318 ;
319 ; The following are reserved for loadable syscalls
320 ;
321 210     NODEF   lkmnosys lkmnosys nosys_args int
322 211     NODEF   lkmnosys lkmnosys nosys_args int
323 212     NODEF   lkmnosys lkmnosys nosys_args int
324 213     NODEF   lkmnosys lkmnosys nosys_args int
325 214     NODEF   lkmnosys lkmnosys nosys_args int
326 215     NODEF   lkmnosys lkmnosys nosys_args int
327 216     NODEF   lkmnosys lkmnosys nosys_args int
328 217     NODEF   lkmnosys lkmnosys nosys_args int
329 218     NODEF   lkmnosys lkmnosys nosys_args int
330 219     NODEF   lkmnosys lkmnosys nosys_args int
331
332 ;
333 ; The following were introduced with NetBSD/4.4Lite-2
334 ; They are initialized by their respective modules/sysinits
335 220     MNOSTD  { int __semctl(int semid, int semnum, int cmd, \
336                     union semun *arg); }
337 221     MNOSTD  { int semget(key_t key, int nsems, int semflg); }
338 222     MNOSTD  { int semop(int semid, struct sembuf *sops, size_t nsops); }
339 223     UNIMPL  semconfig
340 224     MNOSTD  { int msgctl(int msqid, int cmd, struct msqid_ds *buf); }
341 225     MNOSTD  { int msgget(key_t key, int msgflg); }
342 226     MNOSTD  { int msgsnd(int msqid, const void *msgp, size_t msgsz, \
343                     int msgflg); }
344 227     MNOSTD  { int msgrcv(int msqid, void *msgp, size_t msgsz, \
345                     long msgtyp, int msgflg); }
346 228     MNOSTD  { int shmat(int shmid, const void *shmaddr, int shmflg); }
347 229     MNOSTD  { int shmctl(int shmid, int cmd, struct shmid_ds *buf); }
348 230     MNOSTD  { int shmdt(const void *shmaddr); }
349 231     MNOSTD  { int shmget(key_t key, size_t size, int shmflg); }
350 ;
351 232     MSTD    { int clock_gettime(clockid_t clock_id, struct timespec *tp); }
352 233     MSTD    { int clock_settime(clockid_t clock_id, \
353                     const struct timespec *tp); }
354 234     MSTD    { int clock_getres(clockid_t clock_id, struct timespec *tp); }
355 235     UNIMPL  timer_create
356 236     UNIMPL  timer_delete
357 237     UNIMPL  timer_settime
358 238     UNIMPL  timer_gettime
359 239     UNIMPL  timer_getoverrun
360 240     MSTD    { int nanosleep(const struct timespec *rqtp, \
361                     struct timespec *rmtp); }
362 241     UNIMPL  nosys
363 242     UNIMPL  nosys
364 243     UNIMPL  nosys
365 244     UNIMPL  nosys
366 245     UNIMPL  nosys
367 246     UNIMPL  nosys
368 247     UNIMPL  nosys
369 248     STD     { int ntp_gettime(struct ntptimeval *ntvp); }
370 249     UNIMPL  nosys
371 ; syscall numbers initially used in OpenBSD
372 250     MSTD    { int minherit(void *addr, size_t len, int inherit); }
373 251     MSTD    { int rfork(int flags); }
374 252     MSTD    { int openbsd_poll(struct pollfd *fds, u_int nfds, \
375                     int timeout); }
376 253     MSTD    { int issetugid(void); }
377 254     MSTD    { int lchown(char *path, int uid, int gid); }
378 255     UNIMPL  nosys
379 256     UNIMPL  nosys
380 257     UNIMPL  nosys
381 258     UNIMPL  nosys
382 259     UNIMPL  nosys
383 260     UNIMPL  nosys
384 261     UNIMPL  nosys
385 262     UNIMPL  nosys
386 263     UNIMPL  nosys
387 264     UNIMPL  nosys
388 265     UNIMPL  nosys
389 266     UNIMPL  nosys
390 267     UNIMPL  nosys
391 268     UNIMPL  nosys
392 269     UNIMPL  nosys
393 270     UNIMPL  nosys
394 271     UNIMPL  nosys
395 272     MSTD    { int getdents(int fd, char *buf, size_t count); }
396 273     UNIMPL  nosys
397 274     MSTD    { int lchmod(char *path, mode_t mode); }
398 275     NOPROTO { int lchown(char *path, uid_t uid, gid_t gid); } \
399                     netbsd_lchown lchown_args int
400 276     MSTD    { int lutimes(char *path, struct timeval *tptr); }
401 277     MNOPROTO { int msync(void *addr, size_t len, int flags); } \
402                     netbsd_msync msync_args int
403 278     MSTD    { int nstat(char *path, struct nstat *ub); }
404 279     MSTD    { int nfstat(int fd, struct nstat *sb); }
405 280     MSTD    { int nlstat(char *path, struct nstat *ub); }
406 281     UNIMPL  nosys
407 282     UNIMPL  nosys
408 283     UNIMPL  nosys
409 284     UNIMPL  nosys
410 285     UNIMPL  nosys
411 286     UNIMPL  nosys
412 287     UNIMPL  nosys
413 288     UNIMPL  nosys
414 289     UNIMPL  nosys
415 290     UNIMPL  nosys
416 291     UNIMPL  nosys
417 292     UNIMPL  nosys
418 293     UNIMPL  nosys
419 294     UNIMPL  nosys
420 295     UNIMPL  nosys
421 296     UNIMPL  nosys
422 ; XXX 297 is 300 in NetBSD 
423 297     COMPAT4 { int fhstatfs(const struct fhandle *u_fhp, \
424                     struct ostatfs *buf); }
425 298     STD     { int fhopen(const struct fhandle *u_fhp, int flags); }
426 299     STD     { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
427 ; syscall numbers for FreeBSD
428 300     MSTD    { int modnext(int modid); }
429 301     MSTD    { int modstat(int modid, struct module_stat* stat); }
430 302     MSTD    { int modfnext(int modid); }
431 303     MSTD    { int modfind(const char *name); }
432 304     MSTD    { int kldload(const char *file); }
433 305     MSTD    { int kldunload(int fileid); }
434 306     MSTD    { int kldfind(const char *file); }
435 307     MSTD    { int kldnext(int fileid); }
436 308     MSTD    { int kldstat(int fileid, struct kld_file_stat* stat); }
437 309     MSTD    { int kldfirstmod(int fileid); }
438 310     MSTD    { int getsid(pid_t pid); }
439 311     MSTD    { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
440 312     MSTD    { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
441 313     OBSOL   signanosleep
442 314     NOSTD   { int aio_return(struct aiocb *aiocbp); }
443 315     NOSTD   { int aio_suspend(struct aiocb * const * aiocbp, int nent, \
444                     const struct timespec *timeout); }
445 316     NOSTD   { int aio_cancel(int fd, struct aiocb *aiocbp); }
446 317     NOSTD   { int aio_error(struct aiocb *aiocbp); }
447 318     NOSTD   { int aio_read(struct aiocb *aiocbp); }
448 319     NOSTD   { int aio_write(struct aiocb *aiocbp); }
449 320     NOSTD   { int lio_listio(int mode, struct aiocb * const *acb_list, \
450                     int nent, struct sigevent *sig); }
451 321     MSTD    { int yield(void); }
452 322     OBSOL   thr_sleep
453 323     OBSOL   thr_wakeup
454 324     MSTD    { int mlockall(int how); }
455 325     MSTD    { int munlockall(void); }
456 326     MSTD    { int __getcwd(u_char *buf, u_int buflen); }
457
458 327     MSTD    { int sched_setparam (pid_t pid, \
459                     const struct sched_param *param); }
460 328     MSTD    { int sched_getparam (pid_t pid, struct sched_param *param); }
461
462 329     MSTD    { int sched_setscheduler (pid_t pid, int policy, \
463                     const struct sched_param *param); }
464 330     MSTD    { int sched_getscheduler (pid_t pid); }
465
466 331     MSTD    { int sched_yield (void); }
467 332     MSTD    { int sched_get_priority_max (int policy); }
468 333     MSTD    { int sched_get_priority_min (int policy); }
469 334     MSTD    { int sched_rr_get_interval (pid_t pid, \
470                     struct timespec *interval); }
471 335     MSTD    { int utrace(const void *addr, size_t len); }
472 336     MCOMPAT4 { int sendfile(int fd, int s, off_t offset, size_t nbytes, \
473                     struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
474 337     MSTD    { int kldsym(int fileid, int cmd, void *data); }
475 338     MSTD    { int jail(struct jail *jail); }
476 339     UNIMPL  pioctl
477 340     MSTD    { int sigprocmask(int how, const sigset_t *set, \
478                     sigset_t *oset); }
479 341     MSTD    { int sigsuspend(const sigset_t *sigmask); }
480 342     MCOMPAT4 { int sigaction(int sig, const struct sigaction *act, \
481                     struct sigaction *oact); }
482 343     MSTD    { int sigpending(sigset_t *set); }
483 344     MCOMPAT4 { int sigreturn(const struct ucontext4 *sigcntxp); }
484 345     MSTD    { int sigtimedwait(const sigset_t *set, \
485                     siginfo_t *info, const struct timespec *timeout); }
486 346     MSTD    { int sigwaitinfo(const sigset_t *set, siginfo_t *info); }
487 347     MSTD    { int __acl_get_file(const char *path, \
488                     acl_type_t type, struct acl *aclp); }
489 348     MSTD    { int __acl_set_file(const char *path, \
490                     acl_type_t type, struct acl *aclp); }
491 349     MSTD    { int __acl_get_fd(int filedes, acl_type_t type, \
492                     struct acl *aclp); }
493 350     MSTD    { int __acl_set_fd(int filedes, acl_type_t type, \
494                     struct acl *aclp); }
495 351     MSTD    { int __acl_delete_file(const char *path, acl_type_t type); }
496 352     MSTD    { int __acl_delete_fd(int filedes, acl_type_t type); }
497 353     MSTD    { int __acl_aclcheck_file(const char *path, \
498                     acl_type_t type, struct acl *aclp); }
499 354     MSTD    { int __acl_aclcheck_fd(int filedes, acl_type_t type, \
500                     struct acl *aclp); }
501 355     STD     { int extattrctl(const char *path, int cmd, \
502                     const char *filename, int attrnamespace, \
503                     const char *attrname); }
504 356     STD     { int extattr_set_file(const char *path, \
505                     int attrnamespace, const char *attrname, \
506                     void *data, size_t nbytes); }
507 357     STD     { ssize_t extattr_get_file(const char *path, \
508                     int attrnamespace, const char *attrname, \
509                     void *data, size_t nbytes); }
510 358     STD     { int extattr_delete_file(const char *path, \
511                     int attrnamespace, const char *attrname); }
512 359     NOSTD   { int aio_waitcomplete(struct aiocb **aiocbp, \
513                     struct timespec *timeout); }
514 360     MSTD    { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
515 361     MSTD    { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
516 362     MSTD    { int kqueue(void); }
517 363     MSTD    { int kevent(int fd, \
518                     struct kevent *changelist, int nchanges, \
519                     struct kevent *eventlist, int nevents, \
520                     const struct timespec *timeout); }
521 364     UNIMPL  __cap_get_proc
522 365     UNIMPL  __cap_set_proc
523 366     UNIMPL  __cap_get_fd
524 367     UNIMPL  __cap_get_file
525 368     UNIMPL  __cap_set_fd
526 369     UNIMPL  __cap_set_file
527 370     NODEF   lkmressys lkmressys nosys_args int
528 371     STD     { int extattr_set_fd(int fd, int attrnamespace, \
529                     const char *attrname, void *data, \
530                     size_t nbytes); }
531 372     STD     { ssize_t extattr_get_fd(int fd, int attrnamespace, \
532                     const char *attrname, void *data, size_t nbytes); }
533 373     STD     { int extattr_delete_fd(int fd, int attrnamespace, \
534                     const char *attrname); }
535 374     MSTD    { int __setugid(int flag); }
536 375     NOIMPL  { int nfsclnt(int flag, caddr_t argp); }
537 376     MSTD    { int eaccess(char *path, int flags); }
538 377     UNIMPL  afs_syscall
539 378     STD     { int nmount(struct iovec *iovp, unsigned int iovcnt, \
540                     int flags); }
541 379     MSTD    { int kse_exit(void); }
542 380     MSTD    { int kse_wakeup(struct kse_mailbox *mbx); }
543 381     MSTD    { int kse_create(struct kse_mailbox *mbx, \
544                     int newgroup); }
545 382     MSTD    { int kse_thr_interrupt(struct kse_thr_mailbox *tmbx, int cmd, \
546                     long data); }
547 383     MSTD    { int kse_release(struct timespec *timeout); }
548 384     MSTD    { int __mac_get_proc(struct mac *mac_p); }
549 385     MSTD    { int __mac_set_proc(struct mac *mac_p); }
550 386     MSTD    { int __mac_get_fd(int fd, struct mac *mac_p); }
551 387     MSTD    { int __mac_get_file(const char *path_p, \
552                     struct mac *mac_p); }
553 388     MSTD    { int __mac_set_fd(int fd, struct mac *mac_p); }
554 389     MSTD    { int __mac_set_file(const char *path_p, \
555                     struct mac *mac_p); }
556 390     STD     { int kenv(int what, const char *name, char *value, \
557                     int len); }
558 391     MSTD    { int lchflags(const char *path, int flags); }
559 392     MSTD    { int uuidgen(struct uuid *store, int count); }
560 393     MSTD    { int sendfile(int fd, int s, off_t offset, size_t nbytes, \
561                     struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
562 394     MSTD    { int mac_syscall(const char *policy, int call, \
563                     void *arg); }
564 395     MSTD    { int getfsstat(struct statfs *buf, long bufsize, \
565                     int flags); }
566 396     MSTD    { int statfs(char *path, struct statfs *buf); }
567 397     MSTD    { int fstatfs(int fd, struct statfs *buf); }
568 398     STD     { int fhstatfs(const struct fhandle *u_fhp, \
569                     struct statfs *buf); }
570 399     UNIMPL  nosys
571 400     MNOSTD  { int ksem_close(semid_t id); }
572 401     MNOSTD  { int ksem_post(semid_t id); }
573 402     MNOSTD  { int ksem_wait(semid_t id); }
574 403     MNOSTD  { int ksem_trywait(semid_t id); }
575 404     MNOSTD  { int ksem_init(semid_t *idp, unsigned int value); }
576 405     MNOSTD  { int ksem_open(semid_t *idp, const char *name, \
577                     int oflag, mode_t mode, unsigned int value); }
578 406     MNOSTD  { int ksem_unlink(const char *name); }
579 407     MNOSTD  { int ksem_getvalue(semid_t id, int *val); }
580 408     MNOSTD  { int ksem_destroy(semid_t id); }
581 409     MSTD    { int __mac_get_pid(pid_t pid, struct mac *mac_p); }
582 410     MSTD    { int __mac_get_link(const char *path_p, \
583                     struct mac *mac_p); }
584 411     MSTD    { int __mac_set_link(const char *path_p, \
585                     struct mac *mac_p); }
586 412     STD     { int extattr_set_link(const char *path, \
587                     int attrnamespace, const char *attrname, \
588                     void *data, size_t nbytes); }
589 413     STD     { ssize_t extattr_get_link(const char *path, \
590                     int attrnamespace, const char *attrname, \
591                     void *data, size_t nbytes); }
592 414     STD     { int extattr_delete_link(const char *path, \
593                     int attrnamespace, const char *attrname); }
594 415     MSTD    { int __mac_execve(char *fname, char **argv, \
595                     char **envv, struct mac *mac_p); }
596 416     MSTD    { int sigaction(int sig, const struct sigaction *act, \
597                     struct sigaction *oact); }
598 417     MSTD    { int sigreturn(const struct __ucontext *sigcntxp); }
599 418     UNIMPL  __xstat
600 419     UNIMPL  __xfstat
601 420     UNIMPL  __xlstat
602 421     MSTD    { int getcontext(struct __ucontext *ucp); }
603 422     MSTD    { int setcontext(const struct __ucontext *ucp); }
604 423     MSTD    { int swapcontext(struct __ucontext *oucp, \
605                     const struct __ucontext *ucp); }
606 424     MSTD    { int swapoff(const char *name); }
607 425     MSTD    { int __acl_get_link(const char *path, \
608                     acl_type_t type, struct acl *aclp); }
609 426     MSTD    { int __acl_set_link(const char *path, \
610                     acl_type_t type, struct acl *aclp); }
611 427     MSTD    { int __acl_delete_link(const char *path, \
612                     acl_type_t type); }
613 428     MSTD    { int __acl_aclcheck_link(const char *path, \
614                     acl_type_t type, struct acl *aclp); }
615 429     MSTD    { int sigwait(const sigset_t *set, int *sig); }
616 430     MSTD    { int thr_create(ucontext_t *ctx, long *id, int flags); }
617 431     MSTD    { void thr_exit(long *state); }
618 432     MSTD    { int thr_self(long *id); }
619 433     MSTD    { int thr_kill(long id, int sig); }
620 434     MSTD    { int _umtx_lock(struct umtx *umtx); }
621 435     MSTD    { int _umtx_unlock(struct umtx *umtx); }
622 436     MSTD    { int jail_attach(int jid); }
623 437     STD     { ssize_t extattr_list_fd(int fd, int attrnamespace, \
624                     void *data, size_t nbytes); }
625 438     STD     { ssize_t extattr_list_file(const char *path, \
626                     int attrnamespace, void *data, size_t nbytes); }
627 439     STD     { ssize_t extattr_list_link(const char *path, \
628                     int attrnamespace, void *data, size_t nbytes); }
629 440     MSTD    { int kse_switchin(struct kse_thr_mailbox *tmbx, \
630                     int flags); }
631 441     MNOSTD  { int ksem_timedwait(semid_t id, struct timespec *abstime); }
632 442     MSTD    { int thr_suspend(const struct timespec *timeout); }
633 443     MSTD    { int thr_wake(long id); }
634 444     MSTD    { int kldunloadf(int fileid, int flags); }
635 445     MNOSTD  { int audit(const void *record, u_int length); }
636 446     MNOSTD  { int auditon(int cmd, void *data, u_int length); }
637 447     MNOSTD  { int getauid(uid_t *auid); }
638 448     MNOSTD  { int setauid(uid_t *auid); }
639 449     MNOSTD  { int getaudit(struct auditinfo *auditinfo); }
640 450     MNOSTD  { int setaudit(struct auditinfo *auditinfo); }
641 451     MNOSTD  { int getaudit_addr(struct auditinfo_addr \
642                     *auditinfo_addr, u_int length); }
643 452     MNOSTD  { int setaudit_addr(struct auditinfo_addr \
644                     *auditinfo_addr, u_int length); }
645 453     MNOSTD  { int auditctl(int cmd, char *path); }
646 454     MSTD    { int _umtx_op(struct umtx *umtx, int op, long id, void *uaddr,\
647                     void *uaddr2); }
648 455     MSTD    { int thr_new(struct thr_param *param, int param_size); }
649
650 ; Please copy any additions and changes to the following compatability tables:
651 ; sys/compat/freebsd32/syscalls.master