2 ; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94
4 ; System call name/number master file.
5 ; Processed to created init_sysent.c, syscalls.c and syscall.h.
7 ; Columns: number audit [M]type name alt{name,tag,rtyp}/comments
8 ; number system call number, must be in order
9 ; audit the audit event associated with the system call
10 ; A value of AUE_NULL means no auditing, but it also means that
11 ; there is no audit event for the call at this time. For the
12 ; case where the event exists, but we don't want auditing, the
13 ; event should be #defined to AUE_NULL in audit_kevents.h.
14 ; type one of [M]STD, [M]OBSOL, [M]UNIMPL, [M]COMPAT, [M]CPT_NOA,
15 ; [M]LIBCOMPAT, [M]NODEF, [M]NOARGS, [M]NOPROTO, [M]NOIMPL,
16 ; [M]NOSTD, [M]COMPAT4
17 ; name psuedo-prototype of syscall routine
18 ; If one of the following alts is different, then all appear:
19 ; altname name of system call if different
20 ; alttag name of args struct tag if different from [o]`name'"_args"
21 ; altrtyp return type if not int (bogus - syscalls always return int)
22 ; for UNIMPL/OBSOL, name continues with comments
25 ; [M] e.g. like MSTD -- means the system call is MP-safe. If no
26 ; M prefix is used, the syscall wrapper will obtain the Giant
27 ; lock for the syscall.
29 ; COMPAT included on COMPAT #ifdef
30 ; COMPAT4 included on COMPAT4 #ifdef (FreeBSD 4 compat)
31 ; LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h
32 ; OBSOL obsolete, not included in system, only specifies name
33 ; UNIMPL not implemented, placeholder only
34 ; NOSTD implemented but as a lkm that can be statically
35 ; compiled in sysent entry will be filled with lkmsys
36 ; so the SYSCALL_MODULE macro works
38 ; Please copy any additions and changes to the following compatability tables:
39 ; sys/compat/freebsd32/syscalls.master
41 ; #ifdef's, etc. may be included, and are copied to the output files.
43 #include <sys/param.h>
44 #include <sys/sysent.h>
45 #include <sys/sysproto.h>
47 ; Reserved/unimplemented system calls in the range 0-150 inclusive
48 ; are reserved for use in future Berkeley releases.
49 ; Additional system calls implemented in vendor and other
50 ; redistributions should be placed in the reserved range at the end
51 ; of the current calls.
53 0 AUE_NULL MSTD { int nosys(void); } syscall nosys_args int
54 1 AUE_EXIT MSTD { void sys_exit(int rval); } exit \
56 2 AUE_FORK MSTD { int fork(void); }
57 3 AUE_NULL MSTD { ssize_t read(int fd, void *buf, \
59 4 AUE_NULL MSTD { ssize_t write(int fd, const void *buf, \
61 5 AUE_OPEN_RWTC MSTD { int open(char *path, int flags, int mode); }
62 ; XXX should be { int open(const char *path, int flags, ...); }
63 ; but we're not ready for `const' or varargs.
64 ; XXX man page says `mode_t mode'.
65 6 AUE_CLOSE MSTD { int close(int fd); }
66 7 AUE_WAIT4 MSTD { int wait4(int pid, int *status, \
67 int options, struct rusage *rusage); } \
69 8 AUE_O_CREAT MCOMPAT { int creat(char *path, int mode); }
70 9 AUE_LINK MSTD { int link(char *path, char *link); }
71 10 AUE_UNLINK MSTD { int unlink(char *path); }
72 11 AUE_NULL OBSOL execv
73 12 AUE_CHDIR MSTD { int chdir(char *path); }
74 13 AUE_FCHDIR MSTD { int fchdir(int fd); }
75 14 AUE_MKNOD MSTD { int mknod(char *path, int mode, int dev); }
76 15 AUE_CHMOD MSTD { int chmod(char *path, int mode); }
77 16 AUE_CHOWN MSTD { int chown(char *path, int uid, int gid); }
78 17 AUE_NULL MSTD { int obreak(char *nsize); } break \
80 18 AUE_GETFSSTAT MCOMPAT4 { int getfsstat(struct ostatfs *buf, \
81 long bufsize, int flags); }
82 19 AUE_LSEEK MCOMPAT { long lseek(int fd, long offset, \
84 20 AUE_GETPID MSTD { pid_t getpid(void); }
85 21 AUE_MOUNT STD { int mount(char *type, char *path, \
86 int flags, caddr_t data); }
87 ; XXX `path' should have type `const char *' but we're not ready for that.
88 22 AUE_UMOUNT STD { int unmount(char *path, int flags); }
89 23 AUE_SETUID MSTD { int setuid(uid_t uid); }
90 24 AUE_GETUID MSTD { uid_t getuid(void); }
91 25 AUE_GETEUID MSTD { uid_t geteuid(void); }
92 26 AUE_PTRACE MSTD { int ptrace(int req, pid_t pid, \
93 caddr_t addr, int data); }
94 27 AUE_RECVMSG MSTD { int recvmsg(int s, struct msghdr *msg, \
96 28 AUE_SENDMSG MSTD { int sendmsg(int s, struct msghdr *msg, \
98 29 AUE_RECVFROM MSTD { int recvfrom(int s, caddr_t buf, \
99 size_t len, int flags, \
100 struct sockaddr * __restrict from, \
101 __socklen_t * __restrict fromlenaddr); }
102 30 AUE_ACCEPT MSTD { int accept(int s, \
103 struct sockaddr * __restrict name, \
104 __socklen_t * __restrict anamelen); }
105 31 AUE_GETPEERNAME MSTD { int getpeername(int fdes, \
106 struct sockaddr * __restrict asa, \
107 __socklen_t * __restrict alen); }
108 32 AUE_GETSOCKNAME MSTD { int getsockname(int fdes, \
109 struct sockaddr * __restrict asa, \
110 __socklen_t * __restrict alen); }
111 33 AUE_ACCESS MSTD { int access(char *path, int flags); }
112 34 AUE_CHFLAGS MSTD { int chflags(char *path, int flags); }
113 35 AUE_FCHFLAGS MSTD { int fchflags(int fd, int flags); }
114 36 AUE_SYNC MSTD { int sync(void); }
115 37 AUE_KILL MSTD { int kill(int pid, int signum); }
116 38 AUE_STAT MCOMPAT { int stat(char *path, struct ostat *ub); }
117 39 AUE_GETPPID MSTD { pid_t getppid(void); }
118 40 AUE_LSTAT MCOMPAT { int lstat(char *path, struct ostat *ub); }
119 41 AUE_DUP MSTD { int dup(u_int fd); }
120 42 AUE_PIPE MSTD { int pipe(void); }
121 43 AUE_GETEGID MSTD { gid_t getegid(void); }
122 44 AUE_PROFILE MSTD { int profil(caddr_t samples, size_t size, \
123 size_t offset, u_int scale); }
124 45 AUE_KTRACE MSTD { int ktrace(const char *fname, int ops, \
125 int facs, int pid); }
126 46 AUE_SIGACTION MCOMPAT { int sigaction(int signum, \
127 struct osigaction *nsa, \
128 struct osigaction *osa); }
129 47 AUE_GETGID MSTD { gid_t getgid(void); }
130 48 AUE_SIGPROCMASK MCOMPAT { int sigprocmask(int how, osigset_t mask); }
131 ; XXX note nonstandard (bogus) calling convention - the libc stub passes
132 ; us the mask, not a pointer to it, and we return the old mask as the
133 ; (int) return value.
134 49 AUE_GETLOGIN MSTD { int getlogin(char *namebuf, u_int \
136 50 AUE_SETLOGIN MSTD { int setlogin(char *namebuf); }
137 51 AUE_ACCT MSTD { int acct(char *path); }
138 52 AUE_SIGPENDING MCOMPAT { int sigpending(void); }
139 53 AUE_SIGPENDING MSTD { int sigaltstack(stack_t *ss, \
141 54 AUE_IOCTL MSTD { int ioctl(int fd, u_long com, \
143 55 AUE_REBOOT MSTD { int reboot(int opt); }
144 56 AUE_REVOKE MSTD { int revoke(char *path); }
145 57 AUE_SYMLINK MSTD { int symlink(char *path, char *link); }
146 58 AUE_READLINK MSTD { int readlink(char *path, char *buf, \
148 59 AUE_EXECVE MSTD { int execve(char *fname, char **argv, \
150 60 AUE_UMASK MSTD { int umask(int newmask); } umask umask_args \
152 61 AUE_CHROOT MSTD { int chroot(char *path); }
153 62 AUE_FSTAT MCOMPAT { int fstat(int fd, struct ostat *sb); }
154 63 AUE_NULL MCOMPAT { int getkerninfo(int op, char *where, \
155 size_t *size, int arg); } getkerninfo \
157 64 AUE_O_GETPAGESIZE MCOMPAT { int getpagesize(void); } getpagesize \
159 65 AUE_MSYNC MSTD { int msync(void *addr, size_t len, \
161 66 AUE_VFORK MSTD { int vfork(void); }
162 67 AUE_NULL OBSOL vread
163 68 AUE_NULL OBSOL vwrite
164 69 AUE_SBRK MSTD { int sbrk(int incr); }
165 70 AUE_SSTK MSTD { int sstk(int incr); }
166 71 AUE_MMAP MCOMPAT { int mmap(void *addr, int len, int prot, \
167 int flags, int fd, long pos); }
168 72 AUE_O_VADVISE MSTD { int ovadvise(int anom); } vadvise \
170 73 AUE_MUNMAP MSTD { int munmap(void *addr, size_t len); }
171 74 AUE_MPROTECT MSTD { int mprotect(const void *addr, size_t len, \
173 75 AUE_MADVISE MSTD { int madvise(void *addr, size_t len, \
175 76 AUE_NULL OBSOL vhangup
176 77 AUE_NULL OBSOL vlimit
177 78 AUE_MINCORE MSTD { int mincore(const void *addr, size_t len, \
179 79 AUE_GETGROUPS MSTD { int getgroups(u_int gidsetsize, \
181 80 AUE_SETGROUPS MSTD { int setgroups(u_int gidsetsize, \
183 81 AUE_GETPGRP MSTD { int getpgrp(void); }
184 82 AUE_SETPGRP MSTD { int setpgid(int pid, int pgid); }
185 83 AUE_SETITIMER MSTD { int setitimer(u_int which, struct \
186 itimerval *itv, struct itimerval *oitv); }
187 84 AUE_WAIT4 MCOMPAT { int wait(void); }
188 85 AUE_SWAPON MSTD { int swapon(char *name); }
189 86 AUE_GETITIMER MSTD { int getitimer(u_int which, \
190 struct itimerval *itv); }
191 87 AUE_SYSCTL MCOMPAT { int gethostname(char *hostname, \
192 u_int len); } gethostname \
194 88 AUE_SYSCTL MCOMPAT { int sethostname(char *hostname, \
195 u_int len); } sethostname \
197 89 AUE_GETDTABLESIZE MSTD { int getdtablesize(void); }
198 90 AUE_DUP2 MSTD { int dup2(u_int from, u_int to); }
199 91 AUE_NULL UNIMPL getdopt
200 92 AUE_FCNTL MSTD { int fcntl(int fd, int cmd, long arg); }
201 ; XXX should be { int fcntl(int fd, int cmd, ...); }
202 ; but we're not ready for varargs.
203 93 AUE_SELECT MSTD { int select(int nd, fd_set *in, fd_set *ou, \
204 fd_set *ex, struct timeval *tv); }
205 94 AUE_NULL UNIMPL setdopt
206 95 AUE_FSYNC MSTD { int fsync(int fd); }
207 96 AUE_SETPRIORITY MSTD { int setpriority(int which, int who, \
209 97 AUE_SOCKET MSTD { int socket(int domain, int type, \
211 98 AUE_CONNECT MSTD { int connect(int s, caddr_t name, \
213 99 AUE_ACCEPT MCPT_NOA { int accept(int s, caddr_t name, \
214 int *anamelen); } accept accept_args int
215 100 AUE_GETPRIORITY MSTD { int getpriority(int which, int who); }
216 101 AUE_SEND MCOMPAT { int send(int s, caddr_t buf, int len, \
218 102 AUE_RECV MCOMPAT { int recv(int s, caddr_t buf, int len, \
220 103 AUE_SIGRETURN MCOMPAT { int sigreturn( \
221 struct osigcontext *sigcntxp); }
222 104 AUE_BIND MSTD { int bind(int s, caddr_t name, \
224 105 AUE_SETSOCKOPT MSTD { int setsockopt(int s, int level, int name, \
225 caddr_t val, int valsize); }
226 106 AUE_LISTEN MSTD { int listen(int s, int backlog); }
227 107 AUE_NULL OBSOL vtimes
228 108 AUE_NULL MCOMPAT { int sigvec(int signum, struct sigvec *nsv, \
229 struct sigvec *osv); }
230 109 AUE_NULL MCOMPAT { int sigblock(int mask); }
231 110 AUE_NULL MCOMPAT { int sigsetmask(int mask); }
232 111 AUE_NULL MCOMPAT { int sigsuspend(osigset_t mask); }
233 ; XXX note nonstandard (bogus) calling convention - the libc stub passes
234 ; us the mask, not a pointer to it.
235 112 AUE_NULL MCOMPAT { int sigstack(struct sigstack *nss, \
236 struct sigstack *oss); }
237 113 AUE_RECVMSG MCOMPAT { int recvmsg(int s, struct omsghdr *msg, \
239 114 AUE_SENDMSG MCOMPAT { int sendmsg(int s, caddr_t msg, \
241 115 AUE_NULL OBSOL vtrace
242 116 AUE_GETTIMEOFDAY MSTD { int gettimeofday(struct timeval *tp, \
243 struct timezone *tzp); }
244 117 AUE_GETRUSAGE MSTD { int getrusage(int who, \
245 struct rusage *rusage); }
246 118 AUE_GETSOCKOPT MSTD { int getsockopt(int s, int level, int name, \
247 caddr_t val, int *avalsize); }
248 119 AUE_NULL UNIMPL resuba (BSD/OS 2.x)
249 120 AUE_READV MSTD { int readv(int fd, struct iovec *iovp, \
251 121 AUE_WRITEV MSTD { int writev(int fd, struct iovec *iovp, \
253 122 AUE_SETTIMEOFDAY MSTD { int settimeofday(struct timeval *tv, \
254 struct timezone *tzp); }
255 123 AUE_FCHOWN MSTD { int fchown(int fd, int uid, int gid); }
256 124 AUE_FCHMOD MSTD { int fchmod(int fd, int mode); }
257 125 AUE_RECVFROM MCPT_NOA { int recvfrom(int s, caddr_t buf, \
258 size_t len, int flags, caddr_t from, int \
259 *fromlenaddr); } recvfrom recvfrom_args \
261 126 AUE_SETREUID MSTD { int setreuid(int ruid, int euid); }
262 127 AUE_SETREGID MSTD { int setregid(int rgid, int egid); }
263 128 AUE_RENAME MSTD { int rename(char *from, char *to); }
264 129 AUE_TRUNCATE MCOMPAT { int truncate(char *path, long length); }
265 130 AUE_FTRUNCATE MCOMPAT { int ftruncate(int fd, long length); }
266 131 AUE_FLOCK MSTD { int flock(int fd, int how); }
267 132 AUE_MKFIFO MSTD { int mkfifo(char *path, int mode); }
268 133 AUE_SENDTO MSTD { int sendto(int s, caddr_t buf, size_t len, \
269 int flags, caddr_t to, int tolen); }
270 134 AUE_SHUTDOWN MSTD { int shutdown(int s, int how); }
271 135 AUE_SOCKETPAIR MSTD { int socketpair(int domain, int type, \
272 int protocol, int *rsv); }
273 136 AUE_MKDIR MSTD { int mkdir(char *path, int mode); }
274 137 AUE_RMDIR MSTD { int rmdir(char *path); }
275 138 AUE_UTIMES MSTD { int utimes(char *path, \
276 struct timeval *tptr); }
277 139 AUE_NULL OBSOL 4.2 sigreturn
278 140 AUE_ADJTIME MSTD { int adjtime(struct timeval *delta, \
279 struct timeval *olddelta); }
280 141 AUE_GETPEERNAME MCOMPAT { int getpeername(int fdes, caddr_t asa, \
282 142 AUE_SYSCTL MCOMPAT { long gethostid(void); }
283 143 AUE_SYSCTL MCOMPAT { int sethostid(long hostid); }
284 144 AUE_GETRLIMIT MCOMPAT { int getrlimit(u_int which, struct \
286 145 AUE_SETRLIMIT MCOMPAT { int setrlimit(u_int which, \
287 struct orlimit *rlp); }
288 146 AUE_KILLPG MCOMPAT { int killpg(int pgid, int signum); }
289 147 AUE_SETSID MSTD { int setsid(void); }
290 148 AUE_QUOTACTL MSTD { int quotactl(char *path, int cmd, int uid, \
292 149 AUE_O_QUOTA MCOMPAT { int quota(void); }
293 150 AUE_GETSOCKNAME MCPT_NOA { int getsockname(int fdec, \
294 caddr_t asa, int *alen); } getsockname \
297 ; Syscalls 151-180 inclusive are reserved for vendor-specific
298 ; system calls. (This includes various calls added for compatibity
299 ; with other Unix variants.)
300 ; Some of these calls are now supported by BSD...
301 151 AUE_NULL UNIMPL sem_lock (BSD/OS 2.x)
302 152 AUE_NULL UNIMPL sem_wakeup (BSD/OS 2.x)
303 153 AUE_NULL UNIMPL asyncdaemon (BSD/OS 2.x)
304 154 AUE_NULL UNIMPL nosys
305 ; 155 is initialized by the NFS code, if present.
306 155 AUE_NFSSVC MNOIMPL { int nfssvc(int flag, caddr_t argp); }
307 156 AUE_GETDIRENTRIES COMPAT { int getdirentries(int fd, char *buf, \
308 u_int count, long *basep); }
309 157 AUE_STATFS MCOMPAT4 { int statfs(char *path, \
310 struct ostatfs *buf); }
311 158 AUE_FSTATFS MCOMPAT4 { int fstatfs(int fd, \
312 struct ostatfs *buf); }
313 159 AUE_NULL UNIMPL nosys
314 160 AUE_LGETFH MSTD { int lgetfh(char *fname, \
315 struct fhandle *fhp); }
316 161 AUE_NFS_GETFH MSTD { int getfh(char *fname, \
317 struct fhandle *fhp); }
318 162 AUE_SYSCTL MSTD { int getdomainname(char *domainname, \
320 163 AUE_SYSCTL MSTD { int setdomainname(char *domainname, \
322 164 AUE_NULL MSTD { int uname(struct utsname *name); }
323 165 AUE_NULL MSTD { int sysarch(int op, char *parms); }
324 166 AUE_NULL MSTD { int rtprio(int function, pid_t pid, \
325 struct rtprio *rtp); }
326 167 AUE_NULL UNIMPL nosys
327 168 AUE_NULL UNIMPL nosys
328 ; 169 is initialized by the SYSVSEM code if present or loaded
329 169 AUE_SEMSYS MNOSTD { int semsys(int which, int a2, int a3, \
331 ; 169 is initialized by the SYSVMSG code if present or loaded
332 ; XXX should be { int semsys(int which, ...); }
333 170 AUE_MSGSYS MNOSTD { int msgsys(int which, int a2, int a3, \
334 int a4, int a5, int a6); }
335 ; 169 is initialized by the SYSVSHM code if present or loaded
336 ; XXX should be { int msgsys(int which, ...); }
337 171 AUE_SHMSYS MNOSTD { int shmsys(int which, int a2, int a3, \
339 ; XXX should be { int shmsys(int which, ...); }
340 172 AUE_NULL UNIMPL nosys
341 173 AUE_PREAD MSTD { ssize_t pread(int fd, void *buf, \
342 size_t nbyte, int pad, off_t offset); }
343 174 AUE_PWRITE MSTD { ssize_t pwrite(int fd, const void *buf, \
344 size_t nbyte, int pad, off_t offset); }
345 175 AUE_NULL UNIMPL nosys
346 176 AUE_ADJTIME MSTD { int ntp_adjtime(struct timex *tp); }
347 177 AUE_NULL UNIMPL sfork (BSD/OS 2.x)
348 178 AUE_NULL UNIMPL getdescriptor (BSD/OS 2.x)
349 179 AUE_NULL UNIMPL setdescriptor (BSD/OS 2.x)
350 180 AUE_NULL UNIMPL nosys
352 ; Syscalls 181-199 are used by/reserved for BSD
353 181 AUE_SETGID MSTD { int setgid(gid_t gid); }
354 182 AUE_SETEGID MSTD { int setegid(gid_t egid); }
355 183 AUE_SETEUID MSTD { int seteuid(uid_t euid); }
356 184 AUE_NULL UNIMPL lfs_bmapv
357 185 AUE_NULL UNIMPL lfs_markv
358 186 AUE_NULL UNIMPL lfs_segclean
359 187 AUE_NULL UNIMPL lfs_segwait
360 188 AUE_STAT MSTD { int stat(char *path, struct stat *ub); }
361 189 AUE_FSTAT MSTD { int fstat(int fd, struct stat *sb); }
362 190 AUE_LSTAT MSTD { int lstat(char *path, struct stat *ub); }
363 191 AUE_PATHCONF MSTD { int pathconf(char *path, int name); }
364 192 AUE_FPATHCONF MSTD { int fpathconf(int fd, int name); }
365 193 AUE_NULL UNIMPL nosys
366 194 AUE_GETRLIMIT MSTD { int getrlimit(u_int which, \
367 struct rlimit *rlp); } getrlimit \
369 195 AUE_SETRLIMIT MSTD { int setrlimit(u_int which, \
370 struct rlimit *rlp); } setrlimit \
372 196 AUE_GETDIRENTRIES MSTD { int getdirentries(int fd, char *buf, \
373 u_int count, long *basep); }
374 197 AUE_MMAP MSTD { caddr_t mmap(caddr_t addr, size_t len, \
375 int prot, int flags, int fd, int pad, \
377 198 AUE_NULL MSTD { int nosys(void); } __syscall \
379 199 AUE_LSEEK MSTD { off_t lseek(int fd, int pad, off_t offset, \
381 200 AUE_TRUNCATE MSTD { int truncate(char *path, int pad, \
383 201 AUE_FTRUNCATE MSTD { int ftruncate(int fd, int pad, \
385 202 AUE_SYSCTL MSTD { int __sysctl(int *name, u_int namelen, \
386 void *old, size_t *oldlenp, void *new, \
387 size_t newlen); } __sysctl sysctl_args int
388 203 AUE_MLOCK MSTD { int mlock(const void *addr, size_t len); }
389 204 AUE_MUNLOCK MSTD { int munlock(const void *addr, size_t len); }
390 205 AUE_UNDELETE MSTD { int undelete(char *path); }
391 206 AUE_FUTIMES MSTD { int futimes(int fd, struct timeval *tptr); }
392 207 AUE_GETPGID MSTD { int getpgid(pid_t pid); }
393 208 AUE_NULL UNIMPL newreboot (NetBSD)
394 209 AUE_POLL MSTD { int poll(struct pollfd *fds, u_int nfds, \
398 ; The following are reserved for loadable syscalls
400 210 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int
401 211 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int
402 212 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int
403 213 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int
404 214 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int
405 215 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int
406 216 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int
407 217 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int
408 218 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int
409 219 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int
412 ; The following were introduced with NetBSD/4.4Lite-2
413 220 AUE_SEMCTL MNOSTD { int __semctl(int semid, int semnum, \
414 int cmd, union semun *arg); }
415 221 AUE_SEMGET MNOSTD { int semget(key_t key, int nsems, \
417 222 AUE_SEMOP MNOSTD { int semop(int semid, struct sembuf *sops, \
419 223 AUE_NULL UNIMPL semconfig
420 224 AUE_MSGCTL MNOSTD { int msgctl(int msqid, int cmd, \
421 struct msqid_ds *buf); }
422 225 AUE_MSGGET MNOSTD { int msgget(key_t key, int msgflg); }
423 226 AUE_MSGSND MNOSTD { int msgsnd(int msqid, const void *msgp, \
424 size_t msgsz, int msgflg); }
425 227 AUE_MSGRCV MNOSTD { int msgrcv(int msqid, void *msgp, \
426 size_t msgsz, long msgtyp, int msgflg); }
427 228 AUE_SHMAT MNOSTD { int shmat(int shmid, const void *shmaddr, \
429 229 AUE_SHMCTL MNOSTD { int shmctl(int shmid, int cmd, \
430 struct shmid_ds *buf); }
431 230 AUE_SHMDT MNOSTD { int shmdt(const void *shmaddr); }
432 231 AUE_SHMGET MNOSTD { int shmget(key_t key, size_t size, \
435 232 AUE_NULL MSTD { int clock_gettime(clockid_t clock_id, \
436 struct timespec *tp); }
437 233 AUE_NULL MSTD { int clock_settime(clockid_t clock_id, \
438 const struct timespec *tp); }
439 234 AUE_NULL MSTD { int clock_getres(clockid_t clock_id, \
440 struct timespec *tp); }
441 235 AUE_NULL MSTD { int ktimer_create(clockid_t clock_id, \
442 struct sigevent *evp, int *timerid); }
443 236 AUE_NULL MSTD { int ktimer_delete(int timerid); }
444 237 AUE_NULL MSTD { int ktimer_settime(int timerid, int flags, \
445 const struct itimerspec *value, \
446 struct itimerspec *ovalue); }
447 238 AUE_NULL MSTD { int ktimer_gettime(int timerid, struct \
448 itimerspec *value); }
449 239 AUE_NULL MSTD { int ktimer_getoverrun(int timerid); }
450 240 AUE_NULL MSTD { int nanosleep(const struct timespec *rqtp, \
451 struct timespec *rmtp); }
452 241 AUE_NULL UNIMPL nosys
453 242 AUE_NULL UNIMPL nosys
454 243 AUE_NULL UNIMPL nosys
455 244 AUE_NULL UNIMPL nosys
456 245 AUE_NULL UNIMPL nosys
457 246 AUE_NULL UNIMPL nosys
458 247 AUE_NULL UNIMPL nosys
459 248 AUE_NULL MSTD { int ntp_gettime(struct ntptimeval *ntvp); }
460 249 AUE_NULL UNIMPL nosys
461 ; syscall numbers initially used in OpenBSD
462 250 AUE_MINHERIT MSTD { int minherit(void *addr, size_t len, \
464 251 AUE_RFORK MSTD { int rfork(int flags); }
465 252 AUE_POLL MSTD { int openbsd_poll(struct pollfd *fds, \
466 u_int nfds, int timeout); }
467 253 AUE_ISSETUGID MSTD { int issetugid(void); }
468 254 AUE_LCHOWN MSTD { int lchown(char *path, int uid, int gid); }
469 255 AUE_NULL MNOSTD { int aio_read(struct aiocb *aiocbp); }
470 256 AUE_NULL MNOSTD { int aio_write(struct aiocb *aiocbp); }
471 257 AUE_NULL MNOSTD { int lio_listio(int mode, \
472 struct aiocb * const *acb_list, \
473 int nent, struct sigevent *sig); }
474 258 AUE_NULL UNIMPL nosys
475 259 AUE_NULL UNIMPL nosys
476 260 AUE_NULL UNIMPL nosys
477 261 AUE_NULL UNIMPL nosys
478 262 AUE_NULL UNIMPL nosys
479 263 AUE_NULL UNIMPL nosys
480 264 AUE_NULL UNIMPL nosys
481 265 AUE_NULL UNIMPL nosys
482 266 AUE_NULL UNIMPL nosys
483 267 AUE_NULL UNIMPL nosys
484 268 AUE_NULL UNIMPL nosys
485 269 AUE_NULL UNIMPL nosys
486 270 AUE_NULL UNIMPL nosys
487 271 AUE_NULL UNIMPL nosys
488 272 AUE_O_GETDENTS MSTD { int getdents(int fd, char *buf, \
490 273 AUE_NULL UNIMPL nosys
491 274 AUE_LCHMOD MSTD { int lchmod(char *path, mode_t mode); }
492 275 AUE_LCHOWN MNOPROTO { int lchown(char *path, uid_t uid, \
493 gid_t gid); } netbsd_lchown lchown_args \
495 276 AUE_LUTIMES MSTD { int lutimes(char *path, \
496 struct timeval *tptr); }
497 277 AUE_MSYNC MNOPROTO { int msync(void *addr, size_t len, \
498 int flags); } netbsd_msync msync_args int
499 278 AUE_STAT MSTD { int nstat(char *path, struct nstat *ub); }
500 279 AUE_FSTAT MSTD { int nfstat(int fd, struct nstat *sb); }
501 280 AUE_LSTAT MSTD { int nlstat(char *path, struct nstat *ub); }
502 281 AUE_NULL UNIMPL nosys
503 282 AUE_NULL UNIMPL nosys
504 283 AUE_NULL UNIMPL nosys
505 284 AUE_NULL UNIMPL nosys
506 285 AUE_NULL UNIMPL nosys
507 286 AUE_NULL UNIMPL nosys
508 287 AUE_NULL UNIMPL nosys
509 288 AUE_NULL UNIMPL nosys
510 ; 289 and 290 from NetBSD (OpenBSD: 267 and 268)
511 289 AUE_NULL MSTD { ssize_t preadv(int fd, struct iovec *iovp, \
512 u_int iovcnt, off_t offset); }
513 290 AUE_NULL MSTD { ssize_t pwritev(int fd, struct iovec *iovp, \
514 u_int iovcnt, off_t offset); }
515 291 AUE_NULL UNIMPL nosys
516 292 AUE_NULL UNIMPL nosys
517 293 AUE_NULL UNIMPL nosys
518 294 AUE_NULL UNIMPL nosys
519 295 AUE_NULL UNIMPL nosys
520 296 AUE_NULL UNIMPL nosys
521 ; XXX 297 is 300 in NetBSD
522 297 AUE_FHSTATFS MCOMPAT4 { int fhstatfs( \
523 const struct fhandle *u_fhp, \
524 struct ostatfs *buf); }
525 298 AUE_FHOPEN MSTD { int fhopen(const struct fhandle *u_fhp, \
527 299 AUE_FHSTAT MSTD { int fhstat(const struct fhandle *u_fhp, \
529 ; syscall numbers for FreeBSD
530 300 AUE_NULL MSTD { int modnext(int modid); }
531 301 AUE_NULL MSTD { int modstat(int modid, \
532 struct module_stat *stat); }
533 302 AUE_NULL MSTD { int modfnext(int modid); }
534 303 AUE_NULL MSTD { int modfind(const char *name); }
535 304 AUE_MODLOAD MSTD { int kldload(const char *file); }
536 305 AUE_MODUNLOAD MSTD { int kldunload(int fileid); }
537 306 AUE_NULL MSTD { int kldfind(const char *file); }
538 307 AUE_NULL MSTD { int kldnext(int fileid); }
539 308 AUE_NULL MSTD { int kldstat(int fileid, struct \
540 kld_file_stat* stat); }
541 309 AUE_NULL MSTD { int kldfirstmod(int fileid); }
542 310 AUE_GETSID MSTD { int getsid(pid_t pid); }
543 311 AUE_SETRESUID MSTD { int setresuid(uid_t ruid, uid_t euid, \
545 312 AUE_SETRESGID MSTD { int setresgid(gid_t rgid, gid_t egid, \
547 313 AUE_NULL OBSOL signanosleep
548 314 AUE_NULL MNOSTD { int aio_return(struct aiocb *aiocbp); }
549 315 AUE_NULL MNOSTD { int aio_suspend( \
550 struct aiocb * const * aiocbp, int nent, \
551 const struct timespec *timeout); }
552 316 AUE_NULL MNOSTD { int aio_cancel(int fd, \
553 struct aiocb *aiocbp); }
554 317 AUE_NULL MNOSTD { int aio_error(struct aiocb *aiocbp); }
555 318 AUE_NULL MNOSTD { int oaio_read(struct oaiocb *aiocbp); }
556 319 AUE_NULL MNOSTD { int oaio_write(struct oaiocb *aiocbp); }
557 320 AUE_NULL MNOSTD { int olio_listio(int mode, \
558 struct oaiocb * const *acb_list, \
559 int nent, struct osigevent *sig); }
560 321 AUE_NULL MSTD { int yield(void); }
561 322 AUE_NULL OBSOL thr_sleep
562 323 AUE_NULL OBSOL thr_wakeup
563 324 AUE_MLOCKALL MSTD { int mlockall(int how); }
564 325 AUE_MUNLOCKALL MSTD { int munlockall(void); }
565 326 AUE_NULL MSTD { int __getcwd(u_char *buf, u_int buflen); }
567 327 AUE_NULL MSTD { int sched_setparam (pid_t pid, \
568 const struct sched_param *param); }
569 328 AUE_NULL MSTD { int sched_getparam (pid_t pid, struct \
570 sched_param *param); }
572 329 AUE_NULL MSTD { int sched_setscheduler (pid_t pid, int \
573 policy, const struct sched_param \
575 330 AUE_NULL MSTD { int sched_getscheduler (pid_t pid); }
577 331 AUE_NULL MSTD { int sched_yield (void); }
578 332 AUE_NULL MSTD { int sched_get_priority_max (int policy); }
579 333 AUE_NULL MSTD { int sched_get_priority_min (int policy); }
580 334 AUE_NULL MSTD { int sched_rr_get_interval (pid_t pid, \
581 struct timespec *interval); }
582 335 AUE_NULL MSTD { int utrace(const void *addr, size_t len); }
583 336 AUE_SENDFILE MCOMPAT4 { int sendfile(int fd, int s, \
584 off_t offset, size_t nbytes, \
585 struct sf_hdtr *hdtr, off_t *sbytes, \
587 337 AUE_NULL MSTD { int kldsym(int fileid, int cmd, \
589 338 AUE_JAIL MSTD { int jail(struct jail *jail); }
590 339 AUE_NULL UNIMPL pioctl
591 340 AUE_SIGPROCMASK MSTD { int sigprocmask(int how, \
592 const sigset_t *set, sigset_t *oset); }
593 341 AUE_SIGSUSPEND MSTD { int sigsuspend(const sigset_t *sigmask); }
594 342 AUE_SIGACTION MCOMPAT4 { int sigaction(int sig, const \
595 struct sigaction *act, \
596 struct sigaction *oact); }
597 343 AUE_SIGPENDING MSTD { int sigpending(sigset_t *set); }
598 344 AUE_SIGRETURN MCOMPAT4 { int sigreturn( \
599 const struct ucontext4 *sigcntxp); }
600 345 AUE_SIGWAIT MSTD { int sigtimedwait(const sigset_t *set, \
602 const struct timespec *timeout); }
603 346 AUE_NULL MSTD { int sigwaitinfo(const sigset_t *set, \
605 347 AUE_NULL MSTD { int __acl_get_file(const char *path, \
606 acl_type_t type, struct acl *aclp); }
607 348 AUE_NULL MSTD { int __acl_set_file(const char *path, \
608 acl_type_t type, struct acl *aclp); }
609 349 AUE_NULL MSTD { int __acl_get_fd(int filedes, \
610 acl_type_t type, struct acl *aclp); }
611 350 AUE_NULL MSTD { int __acl_set_fd(int filedes, \
612 acl_type_t type, struct acl *aclp); }
613 351 AUE_NULL MSTD { int __acl_delete_file(const char *path, \
615 352 AUE_NULL MSTD { int __acl_delete_fd(int filedes, \
617 353 AUE_NULL MSTD { int __acl_aclcheck_file(const char *path, \
618 acl_type_t type, struct acl *aclp); }
619 354 AUE_NULL MSTD { int __acl_aclcheck_fd(int filedes, \
620 acl_type_t type, struct acl *aclp); }
621 355 AUE_NULL MSTD { int extattrctl(const char *path, int cmd, \
622 const char *filename, int attrnamespace, \
623 const char *attrname); }
624 356 AUE_NULL MSTD { int extattr_set_file(const char *path, \
625 int attrnamespace, const char *attrname, \
626 void *data, size_t nbytes); }
627 357 AUE_NULL MSTD { ssize_t extattr_get_file(const char *path, \
628 int attrnamespace, const char *attrname, \
629 void *data, size_t nbytes); }
630 358 AUE_NULL MSTD { int extattr_delete_file(const char *path, \
632 const char *attrname); }
633 359 AUE_NULL MNOSTD { int aio_waitcomplete( \
634 struct aiocb **aiocbp, \
635 struct timespec *timeout); }
636 360 AUE_GETRESUID MSTD { int getresuid(uid_t *ruid, uid_t *euid, \
638 361 AUE_GETRESGID MSTD { int getresgid(gid_t *rgid, gid_t *egid, \
640 362 AUE_NULL MSTD { int kqueue(void); }
641 363 AUE_NULL MSTD { int kevent(int fd, \
642 struct kevent *changelist, int nchanges, \
643 struct kevent *eventlist, int nevents, \
644 const struct timespec *timeout); }
645 364 AUE_NULL UNIMPL __cap_get_proc
646 365 AUE_NULL UNIMPL __cap_set_proc
647 366 AUE_NULL UNIMPL __cap_get_fd
648 367 AUE_NULL UNIMPL __cap_get_file
649 368 AUE_NULL UNIMPL __cap_set_fd
650 369 AUE_NULL UNIMPL __cap_set_file
651 370 AUE_NULL NODEF lkmressys lkmressys nosys_args int
652 371 AUE_NULL MSTD { int extattr_set_fd(int fd, \
653 int attrnamespace, const char *attrname, \
654 void *data, size_t nbytes); }
655 372 AUE_NULL MSTD { ssize_t extattr_get_fd(int fd, \
656 int attrnamespace, const char *attrname, \
657 void *data, size_t nbytes); }
658 373 AUE_NULL MSTD { int extattr_delete_fd(int fd, \
660 const char *attrname); }
661 374 AUE_NULL MSTD { int __setugid(int flag); }
662 375 AUE_NULL NOIMPL { int nfsclnt(int flag, caddr_t argp); }
663 376 AUE_EACCESS MSTD { int eaccess(char *path, int flags); }
664 377 AUE_NULL UNIMPL afs_syscall
665 378 AUE_NMOUNT STD { int nmount(struct iovec *iovp, \
666 unsigned int iovcnt, int flags); }
667 379 AUE_NULL MSTD { int kse_exit(void); }
668 380 AUE_NULL MSTD { int kse_wakeup(struct kse_mailbox *mbx); }
669 381 AUE_NULL MSTD { int kse_create(struct kse_mailbox *mbx, \
671 382 AUE_NULL MSTD { int kse_thr_interrupt( \
672 struct kse_thr_mailbox *tmbx, int cmd, \
674 383 AUE_NULL MSTD { int kse_release(struct timespec *timeout); }
675 384 AUE_NULL MSTD { int __mac_get_proc(struct mac *mac_p); }
676 385 AUE_NULL MSTD { int __mac_set_proc(struct mac *mac_p); }
677 386 AUE_NULL MSTD { int __mac_get_fd(int fd, \
678 struct mac *mac_p); }
679 387 AUE_NULL MSTD { int __mac_get_file(const char *path_p, \
680 struct mac *mac_p); }
681 388 AUE_NULL MSTD { int __mac_set_fd(int fd, \
682 struct mac *mac_p); }
683 389 AUE_NULL MSTD { int __mac_set_file(const char *path_p, \
684 struct mac *mac_p); }
685 390 AUE_NULL MSTD { int kenv(int what, const char *name, \
686 char *value, int len); }
687 391 AUE_LCHFLAGS MSTD { int lchflags(const char *path, int flags); }
688 392 AUE_NULL MSTD { int uuidgen(struct uuid *store, \
690 393 AUE_SENDFILE MSTD { int sendfile(int fd, int s, off_t offset, \
691 size_t nbytes, struct sf_hdtr *hdtr, \
692 off_t *sbytes, int flags); }
693 394 AUE_NULL MSTD { int mac_syscall(const char *policy, \
694 int call, void *arg); }
695 395 AUE_GETFSSTAT MSTD { int getfsstat(struct statfs *buf, \
696 long bufsize, int flags); }
697 396 AUE_STATFS MSTD { int statfs(char *path, \
698 struct statfs *buf); }
699 397 AUE_FSTATFS MSTD { int fstatfs(int fd, struct statfs *buf); }
700 398 AUE_NULL MSTD { int fhstatfs(const struct fhandle *u_fhp, \
701 struct statfs *buf); }
702 399 AUE_NULL UNIMPL nosys
703 400 AUE_NULL MNOSTD { int ksem_close(semid_t id); }
704 401 AUE_NULL MNOSTD { int ksem_post(semid_t id); }
705 402 AUE_NULL MNOSTD { int ksem_wait(semid_t id); }
706 403 AUE_NULL MNOSTD { int ksem_trywait(semid_t id); }
707 404 AUE_NULL MNOSTD { int ksem_init(semid_t *idp, \
708 unsigned int value); }
709 405 AUE_NULL MNOSTD { int ksem_open(semid_t *idp, \
710 const char *name, int oflag, \
711 mode_t mode, unsigned int value); }
712 406 AUE_NULL MNOSTD { int ksem_unlink(const char *name); }
713 407 AUE_NULL MNOSTD { int ksem_getvalue(semid_t id, int *val); }
714 408 AUE_NULL MNOSTD { int ksem_destroy(semid_t id); }
715 409 AUE_NULL MSTD { int __mac_get_pid(pid_t pid, \
716 struct mac *mac_p); }
717 410 AUE_NULL MSTD { int __mac_get_link(const char *path_p, \
718 struct mac *mac_p); }
719 411 AUE_NULL MSTD { int __mac_set_link(const char *path_p, \
720 struct mac *mac_p); }
721 412 AUE_NULL MSTD { int extattr_set_link(const char *path, \
722 int attrnamespace, const char *attrname, \
723 void *data, size_t nbytes); }
724 413 AUE_NULL MSTD { ssize_t extattr_get_link(const char *path, \
725 int attrnamespace, const char *attrname, \
726 void *data, size_t nbytes); }
727 414 AUE_NULL MSTD { int extattr_delete_link(const char *path, \
729 const char *attrname); }
730 415 AUE_NULL MSTD { int __mac_execve(char *fname, char **argv, \
731 char **envv, struct mac *mac_p); }
732 416 AUE_SIGACTION MSTD { int sigaction(int sig, \
733 const struct sigaction *act, \
734 struct sigaction *oact); }
735 417 AUE_SIGRETURN MSTD { int sigreturn( \
736 const struct __ucontext *sigcntxp); }
737 418 AUE_NULL UNIMPL __xstat
738 419 AUE_NULL UNIMPL __xfstat
739 420 AUE_NULL UNIMPL __xlstat
740 421 AUE_NULL MSTD { int getcontext(struct __ucontext *ucp); }
741 422 AUE_NULL MSTD { int setcontext( \
742 const struct __ucontext *ucp); }
743 423 AUE_NULL MSTD { int swapcontext(struct __ucontext *oucp, \
744 const struct __ucontext *ucp); }
745 424 AUE_SWAPOFF MSTD { int swapoff(const char *name); }
746 425 AUE_NULL MSTD { int __acl_get_link(const char *path, \
747 acl_type_t type, struct acl *aclp); }
748 426 AUE_NULL MSTD { int __acl_set_link(const char *path, \
749 acl_type_t type, struct acl *aclp); }
750 427 AUE_NULL MSTD { int __acl_delete_link(const char *path, \
752 428 AUE_NULL MSTD { int __acl_aclcheck_link(const char *path, \
753 acl_type_t type, struct acl *aclp); }
754 429 AUE_SIGWAIT MSTD { int sigwait(const sigset_t *set, \
756 430 AUE_NULL MSTD { int thr_create(ucontext_t *ctx, long *id, \
758 431 AUE_NULL MSTD { void thr_exit(long *state); }
759 432 AUE_NULL MSTD { int thr_self(long *id); }
760 433 AUE_NULL MSTD { int thr_kill(long id, int sig); }
761 434 AUE_NULL MSTD { int _umtx_lock(struct umtx *umtx); }
762 435 AUE_NULL MSTD { int _umtx_unlock(struct umtx *umtx); }
763 436 AUE_NULL MSTD { int jail_attach(int jid); }
764 437 AUE_NULL MSTD { ssize_t extattr_list_fd(int fd, \
765 int attrnamespace, void *data, \
767 438 AUE_NULL MSTD { ssize_t extattr_list_file( \
768 const char *path, int attrnamespace, \
769 void *data, size_t nbytes); }
770 439 AUE_NULL MSTD { ssize_t extattr_list_link( \
771 const char *path, int attrnamespace, \
772 void *data, size_t nbytes); }
773 440 AUE_NULL MSTD { int kse_switchin( \
774 struct kse_thr_mailbox *tmbx, \
776 441 AUE_NULL MNOSTD { int ksem_timedwait(semid_t id, \
777 const struct timespec *abstime); }
778 442 AUE_NULL MSTD { int thr_suspend( \
779 const struct timespec *timeout); }
780 443 AUE_NULL MSTD { int thr_wake(long id); }
781 444 AUE_NULL MSTD { int kldunloadf(int fileid, int flags); }
782 445 AUE_AUDIT MSTD { int audit(const void *record, \
784 446 AUE_AUDITON MSTD { int auditon(int cmd, void *data, \
786 447 AUE_GETAUID MSTD { int getauid(uid_t *auid); }
787 448 AUE_SETAUID MSTD { int setauid(uid_t *auid); }
788 449 AUE_GETAUDIT MSTD { int getaudit(struct auditinfo *auditinfo); }
789 450 AUE_SETAUDIT MSTD { int setaudit(struct auditinfo *auditinfo); }
790 451 AUE_GETAUDIT_ADDR MSTD { int getaudit_addr( \
791 struct auditinfo_addr *auditinfo_addr, \
793 452 AUE_SETAUDIT_ADDR MSTD { int setaudit_addr( \
794 struct auditinfo_addr *auditinfo_addr, \
796 453 AUE_AUDITCTL MSTD { int auditctl(char *path); }
797 454 AUE_NULL MSTD { int _umtx_op(struct umtx *umtx, int op, \
798 long id, void *uaddr, void *uaddr2); }
799 455 AUE_NULL MSTD { int thr_new(struct thr_param *param, \
801 456 AUE_NULL MSTD { int sigqueue(pid_t pid, int signum, void *value); }
802 457 AUE_NULL MNOSTD { int kmq_open(const char *path, int flags, \
803 mode_t mode, const struct mq_attr *attr); }
804 458 AUE_NULL MNOSTD { int kmq_setattr(int mqd, \
805 const struct mq_attr *attr, \
806 struct mq_attr *oattr); }
807 459 AUE_NULL MNOSTD { int kmq_timedreceive(int mqd, \
808 char *msg_ptr, size_t msg_len, \
809 unsigned *msg_prio, \
810 const struct timespec *abs_timeout); }
811 460 AUE_NULL MNOSTD { int kmq_timedsend(int mqd, \
812 const char *msg_ptr, size_t msg_len,\
814 const struct timespec *abs_timeout);}
815 461 AUE_NULL MNOSTD { int kmq_notify(int mqd, \
816 const struct sigevent *sigev); }
817 462 AUE_NULL MNOSTD { int kmq_unlink(const char *path); }
818 463 AUE_NULL MSTD { int abort2(const char *why, int nargs, void **args); }
819 464 AUE_NULL MSTD { int thr_set_name(long id, const char *name); }
820 ; Please copy any additions and changes to the following compatability tables:
821 ; sys/compat/freebsd32/syscalls.master