syscalls.master revision 121298
1 $FreeBSD: head/sys/kern/syscalls.master 121298 2003-10-21 07:03:27Z scottl $
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 namespc 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;	namespc one of POSIX, BSD, NOHIDE
13;	name	psuedo-prototype of syscall routine
14;		If one of the following alts is different, then all appear:
15;	altname	name of system call if different
16;	alttag	name of args struct tag if different from [o]`name'"_args"
17;	altrtyp	return type if not int (bogus - syscalls always return int)
18;		for UNIMPL/OBSOL, name continues with comments
19
20; types:
21;	[M]	e.g. like MSTD -- means the system call is MP-safe.  If no
22;		M prefix is used, the syscall wrapper will obtain the Giant
23;		lock for the syscall.
24;	STD	always included
25;	COMPAT	included on COMPAT #ifdef
26;	COMPAT4	included on COMPAT4 #ifdef (FreeBSD 4 compat)
27;	LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h
28;	OBSOL	obsolete, not included in system, only specifies name
29;	UNIMPL	not implemented, placeholder only
30;	NOSTD	implemented but as a lkm that can be statically
31;			compiled in sysent entry will be filled with lkmsys
32;			so the SYSCALL_MODULE macro works
33;
34; Please copy any additions and changes to the following compatability tables:
35; sys/ia64/ia32/syscalls.master  (take a best guess)
36; [other 64 bit platforms with an alternate 32 bit syscall table go here too]
37; #ifdef's, etc. may be included, and are copied to the output files.
38
39#include <sys/param.h>
40#include <sys/sysent.h>
41#include <sys/sysproto.h>
42
43; Reserved/unimplemented system calls in the range 0-150 inclusive
44; are reserved for use in future Berkeley releases.
45; Additional system calls implemented in vendor and other
46; redistributions should be placed in the reserved range at the end
47; of the current calls.
48
490	STD	NOHIDE	{ int nosys(void); } syscall nosys_args int
501	MSTD	NOHIDE	{ void sys_exit(int rval); } exit sys_exit_args void
512	MSTD	POSIX	{ int fork(void); }
523	MSTD	POSIX	{ ssize_t read(int fd, void *buf, size_t nbyte); }
534	MSTD	POSIX	{ ssize_t write(int fd, const void *buf, size_t nbyte); }
545	STD	POSIX	{ int open(char *path, int flags, int mode); }
55; XXX should be		{ int open(const char *path, int flags, ...); }
56; but we're not ready for `const' or varargs.
57; XXX man page says `mode_t mode'.
586	MSTD	POSIX	{ int close(int fd); }
597	MSTD	BSD	{ int wait4(int pid, int *status, int options, \
60			    struct rusage *rusage); } wait4 wait_args int
618	COMPAT	BSD	{ int creat(char *path, int mode); }
629	STD	POSIX	{ int link(char *path, char *link); }
6310	STD	POSIX	{ int unlink(char *path); }
6411	OBSOL	NOHIDE	execv
6512	STD	POSIX	{ int chdir(char *path); }
6613	STD	BSD	{ int fchdir(int fd); }
6714	STD	POSIX	{ int mknod(char *path, int mode, int dev); }
6815	STD	POSIX	{ int chmod(char *path, int mode); }
6916	STD	POSIX	{ int chown(char *path, int uid, int gid); }
7017	MSTD	BSD	{ int obreak(char *nsize); } break obreak_args int
7118	STD	BSD	{ int getfsstat(struct statfs *buf, long bufsize, \
72			    int flags); }
7319	COMPAT	POSIX	{ long lseek(int fd, long offset, int whence); }
7420	MSTD	POSIX	{ pid_t getpid(void); }
7521	STD	BSD	{ int mount(char *type, char *path, int flags, \
76			    caddr_t data); }
77; XXX `path' should have type `const char *' but we're not ready for that.
7822	STD	BSD	{ int unmount(char *path, int flags); }
7923	MSTD	POSIX	{ int setuid(uid_t uid); }
8024	MSTD	POSIX	{ uid_t getuid(void); }
8125	MSTD	POSIX	{ uid_t geteuid(void); }
8226	STD	BSD	{ int ptrace(int req, pid_t pid, caddr_t addr, \
83			    int data); }
8427	MSTD	BSD	{ int recvmsg(int s, struct msghdr *msg, int flags); }
8528	MSTD	BSD	{ int sendmsg(int s, caddr_t msg, int flags); }
8629	MSTD	BSD	{ int recvfrom(int s, caddr_t buf, size_t len, \
87			    int flags, caddr_t from, int *fromlenaddr); }
8830	MSTD	BSD	{ int accept(int s, caddr_t name, int *anamelen); }
8931	MSTD	BSD	{ int getpeername(int fdes, caddr_t asa, int *alen); }
9032	MSTD	BSD	{ int getsockname(int fdes, caddr_t asa, int *alen); }
9133	STD	POSIX	{ int access(char *path, int flags); }
9234	STD	BSD	{ int chflags(char *path, int flags); }
9335	STD	BSD	{ int fchflags(int fd, int flags); }
9436	STD	BSD	{ int sync(void); }
9537	MSTD	POSIX	{ int kill(int pid, int signum); }
9638	COMPAT	POSIX	{ int stat(char *path, struct ostat *ub); }
9739	MSTD	POSIX	{ pid_t getppid(void); }
9840	COMPAT	POSIX	{ int lstat(char *path, struct ostat *ub); }
9941	MSTD	POSIX	{ int dup(u_int fd); }
10042	MSTD	POSIX	{ int pipe(void); }
10143	MSTD	POSIX	{ gid_t getegid(void); }
10244	MSTD	BSD	{ int profil(caddr_t samples, size_t size, \
103			    size_t offset, u_int scale); }
10445	STD	BSD	{ int ktrace(const char *fname, int ops, int facs, \
105			    int pid); }
10646	MCOMPAT	POSIX	{ int sigaction(int signum, struct osigaction *nsa, \
107			    struct osigaction *osa); }
10847	MSTD	POSIX	{ gid_t getgid(void); }
10948	MCOMPAT	POSIX	{ int sigprocmask(int how, osigset_t mask); }
110; XXX note nonstandard (bogus) calling convention - the libc stub passes
111; us the mask, not a pointer to it, and we return the old mask as the
112; (int) return value.
11349	MSTD	BSD	{ int getlogin(char *namebuf, u_int namelen); }
11450	MSTD	BSD	{ int setlogin(char *namebuf); }
11551	MSTD	BSD	{ int acct(char *path); }
11652	MCOMPAT	POSIX	{ int sigpending(void); }
11753	MSTD	BSD	{ int sigaltstack(stack_t *ss, stack_t *oss); }
11854	MSTD	POSIX	{ int ioctl(int fd, u_long com, caddr_t data); }
11955	MSTD	BSD	{ int reboot(int opt); }
12056	STD	POSIX	{ int revoke(char *path); }
12157	STD	POSIX	{ int symlink(char *path, char *link); }
12258	STD	POSIX	{ int readlink(char *path, char *buf, int count); }
12359	MSTD	POSIX	{ int execve(char *fname, char **argv, char **envv); }
12460	MSTD	POSIX	{ int umask(int newmask); } umask umask_args int
12561	STD	BSD	{ int chroot(char *path); }
12662	MCOMPAT	POSIX	{ int fstat(int fd, struct ostat *sb); }
12763	MCOMPAT	BSD	{ int getkerninfo(int op, char *where, size_t *size, \
128			    int arg); } getkerninfo getkerninfo_args int
12964	MCOMPAT	BSD	{ int getpagesize(void); } \
130			    getpagesize getpagesize_args int
13165	MSTD	BSD	{ int msync(void *addr, size_t len, int flags); }
13266	MSTD	BSD	{ int vfork(void); }
13367	OBSOL	NOHIDE	vread
13468	OBSOL	NOHIDE	vwrite
13569	MSTD	BSD	{ int sbrk(int incr); }
13670	MSTD	BSD	{ int sstk(int incr); }
13771	MCOMPAT	BSD	{ int mmap(void *addr, int len, int prot, \
138			    int flags, int fd, long pos); }
13972	MSTD	BSD	{ int ovadvise(int anom); } vadvise ovadvise_args int
14073	MSTD	BSD	{ int munmap(void *addr, size_t len); }
14174	MSTD	BSD	{ int mprotect(const void *addr, size_t len, int prot); }
14275	MSTD	BSD	{ int madvise(void *addr, size_t len, int behav); }
14376	OBSOL	NOHIDE	vhangup
14477	OBSOL	NOHIDE	vlimit
14578	MSTD	BSD	{ int mincore(const void *addr, size_t len, \
146			    char *vec); }
14779	MSTD	POSIX	{ int getgroups(u_int gidsetsize, gid_t *gidset); }
14880	MSTD	POSIX	{ int setgroups(u_int gidsetsize, gid_t *gidset); }
14981	MSTD	POSIX	{ int getpgrp(void); }
15082	MSTD	POSIX	{ int setpgid(int pid, int pgid); }
15183	MSTD	BSD	{ int setitimer(u_int which, struct itimerval *itv, \
152			    struct itimerval *oitv); }
15384	MCOMPAT	BSD	{ int wait(void); }
15485	MSTD	BSD	{ int swapon(char *name); }
15586	MSTD	BSD	{ int getitimer(u_int which, struct itimerval *itv); }
15687	MCOMPAT	BSD	{ int gethostname(char *hostname, u_int len); } \
157			    gethostname gethostname_args int
15888	MCOMPAT	BSD	{ int sethostname(char *hostname, u_int len); } \
159			    sethostname sethostname_args int
16089	MSTD	BSD	{ int getdtablesize(void); }
16190	MSTD	POSIX	{ int dup2(u_int from, u_int to); }
16291	UNIMPL	BSD	getdopt
16392	MSTD	POSIX	{ int fcntl(int fd, int cmd, long arg); }
164; XXX should be		{ int fcntl(int fd, int cmd, ...); }
165; but we're not ready for varargs.
16693	MSTD	BSD	{ int select(int nd, fd_set *in, fd_set *ou, \
167			    fd_set *ex, struct timeval *tv); }
16894	UNIMPL	BSD	setdopt
16995	STD	POSIX	{ int fsync(int fd); }
17096	MSTD	BSD	{ int setpriority(int which, int who, int prio); }
17197	MSTD	BSD	{ int socket(int domain, int type, int protocol); }
17298	MSTD	BSD	{ int connect(int s, caddr_t name, int namelen); }
17399	MCPT_NOA BSD	{ int accept(int s, caddr_t name, int *anamelen); } \
174			    accept accept_args int
175100	MSTD	BSD	{ int getpriority(int which, int who); }
176101	MCOMPAT	BSD	{ int send(int s, caddr_t buf, int len, int flags); }
177102	MCOMPAT	BSD	{ int recv(int s, caddr_t buf, int len, int flags); }
178103	MCOMPAT	BSD	{ int sigreturn(struct osigcontext *sigcntxp); }
179104	MSTD	BSD	{ int bind(int s, caddr_t name, int namelen); }
180105	MSTD	BSD	{ int setsockopt(int s, int level, int name, \
181			    caddr_t val, int valsize); }
182106	MSTD	BSD	{ int listen(int s, int backlog); }
183107	OBSOL	NOHIDE	vtimes
184108	MCOMPAT	BSD	{ int sigvec(int signum, struct sigvec *nsv, \
185			    struct sigvec *osv); }
186109	MCOMPAT	BSD	{ int sigblock(int mask); }
187110	MCOMPAT	BSD	{ int sigsetmask(int mask); }
188111	MCOMPAT	POSIX	{ int sigsuspend(osigset_t mask); }
189; XXX note nonstandard (bogus) calling convention - the libc stub passes
190; us the mask, not a pointer to it.
191112	MCOMPAT	BSD	{ int sigstack(struct sigstack *nss, \
192			    struct sigstack *oss); }
193113	MCOMPAT	BSD	{ int recvmsg(int s, struct omsghdr *msg, int flags); }
194114	MCOMPAT	BSD	{ int sendmsg(int s, caddr_t msg, int flags); }
195115	OBSOL	NOHIDE	vtrace
196116	MSTD	BSD	{ int gettimeofday(struct timeval *tp, \
197			    struct timezone *tzp); }
198117	MSTD	BSD	{ int getrusage(int who, struct rusage *rusage); }
199118	MSTD	BSD	{ int getsockopt(int s, int level, int name, \
200			    caddr_t val, int *avalsize); }
201119	UNIMPL	NOHIDE	resuba (BSD/OS 2.x)
202120	MSTD	BSD	{ int readv(int fd, struct iovec *iovp, u_int iovcnt); }
203121	MSTD	BSD	{ int writev(int fd, struct iovec *iovp, \
204			    u_int iovcnt); }
205122	MSTD	BSD	{ int settimeofday(struct timeval *tv, \
206			    struct timezone *tzp); }
207123	STD	BSD	{ int fchown(int fd, int uid, int gid); }
208124	STD	BSD	{ int fchmod(int fd, int mode); }
209125	MCPT_NOA BSD	{ int recvfrom(int s, caddr_t buf, size_t len, \
210			    int flags, caddr_t from, int *fromlenaddr); } \
211			    recvfrom recvfrom_args int
212126	MSTD	BSD	{ int setreuid(int ruid, int euid); }
213127	MSTD	BSD	{ int setregid(int rgid, int egid); }
214128	STD	POSIX	{ int rename(char *from, char *to); }
215129	COMPAT	BSD	{ int truncate(char *path, long length); }
216130	COMPAT	BSD	{ int ftruncate(int fd, long length); }
217131	MSTD	BSD	{ int flock(int fd, int how); }
218132	STD	POSIX	{ int mkfifo(char *path, int mode); }
219133	MSTD	BSD	{ int sendto(int s, caddr_t buf, size_t len, \
220			    int flags, caddr_t to, int tolen); }
221134	MSTD	BSD	{ int shutdown(int s, int how); }
222135	MSTD	BSD	{ int socketpair(int domain, int type, int protocol, \
223			    int *rsv); }
224136	STD	POSIX	{ int mkdir(char *path, int mode); }
225137	STD	POSIX	{ int rmdir(char *path); }
226138	STD	BSD	{ int utimes(char *path, struct timeval *tptr); }
227139	OBSOL	NOHIDE	4.2 sigreturn
228140	MSTD	BSD	{ int adjtime(struct timeval *delta, \
229			    struct timeval *olddelta); }
230141	MCOMPAT	BSD	{ int getpeername(int fdes, caddr_t asa, int *alen); }
231142	MCOMPAT	BSD	{ long gethostid(void); }
232143	MCOMPAT	BSD	{ int sethostid(long hostid); }
233144	MCOMPAT	BSD	{ int getrlimit(u_int which, struct orlimit *rlp); }
234145	MCOMPAT	BSD	{ int setrlimit(u_int which, struct orlimit *rlp); }
235146	MCOMPAT	BSD	{ int killpg(int pgid, int signum); }
236147	MSTD	POSIX	{ int setsid(void); }
237148	STD	BSD	{ int quotactl(char *path, int cmd, int uid, \
238			    caddr_t arg); }
239149	MCOMPAT	BSD	{ int quota(void); }
240150	MCPT_NOA BSD	{ int getsockname(int fdec, caddr_t asa, int *alen); }\
241			    getsockname getsockname_args int
242
243; Syscalls 151-180 inclusive are reserved for vendor-specific
244; system calls.  (This includes various calls added for compatibity
245; with other Unix variants.)
246; Some of these calls are now supported by BSD...
247151	UNIMPL	NOHIDE	sem_lock (BSD/OS 2.x)
248152	UNIMPL	NOHIDE	sem_wakeup (BSD/OS 2.x)
249153	UNIMPL	NOHIDE	asyncdaemon (BSD/OS 2.x)
250154	UNIMPL	NOHIDE	nosys
251; 155 is initialized by the NFS code, if present.
252155	MNOIMPL	BSD	{ int nfssvc(int flag, caddr_t argp); }
253156	COMPAT	BSD	{ int getdirentries(int fd, char *buf, u_int count, \
254			    long *basep); }
255157	STD	BSD	{ int statfs(char *path, struct statfs *buf); }
256158	STD	BSD	{ int fstatfs(int fd, struct statfs *buf); }
257159	UNIMPL	NOHIDE	nosys
258160	UNIMPL	NOHIDE	nosys
259161	STD	BSD	{ int getfh(char *fname, struct fhandle *fhp); }
260162	MSTD	BSD	{ int getdomainname(char *domainname, int len); }
261163	MSTD	BSD	{ int setdomainname(char *domainname, int len); }
262164	MSTD	BSD	{ int uname(struct utsname *name); }
263165	STD	BSD	{ int sysarch(int op, char *parms); }
264166	MSTD	BSD	{ int rtprio(int function, pid_t pid, \
265			    struct rtprio *rtp); }
266167	UNIMPL	NOHIDE	nosys
267168	UNIMPL	NOHIDE	nosys
268; 169 is initialized by the SYSVSEM code if present or loaded
269169	MNOSTD	BSD	{ int semsys(int which, int a2, int a3, int a4, \
270			    int a5); }
271; 169 is initialized by the SYSVMSG code if present or loaded
272; XXX should be		{ int semsys(int which, ...); }
273170	MNOSTD	BSD	{ int msgsys(int which, int a2, int a3, int a4, \
274			    int a5, int a6); }
275; 169 is initialized by the SYSVSHM code if present or loaded
276; XXX should be		{ int msgsys(int which, ...); }
277171	MNOSTD	BSD	{ int shmsys(int which, int a2, int a3, int a4); }
278; XXX should be		{ int shmsys(int which, ...); }
279172	UNIMPL	NOHIDE	nosys
280173	MSTD	POSIX	{ ssize_t pread(int fd, void *buf, size_t nbyte, \
281			    int pad, off_t offset); }
282174	MSTD	POSIX	{ ssize_t pwrite(int fd, const void *buf, \
283			    size_t nbyte, int pad, off_t offset); }
284175	UNIMPL	NOHIDE	nosys
285176	MSTD	BSD	{ int ntp_adjtime(struct timex *tp); }
286177	UNIMPL	NOHIDE	sfork (BSD/OS 2.x)
287178	UNIMPL	NOHIDE	getdescriptor (BSD/OS 2.x)
288179	UNIMPL	NOHIDE	setdescriptor (BSD/OS 2.x)
289180	UNIMPL	NOHIDE	nosys
290
291; Syscalls 181-199 are used by/reserved for BSD
292181	MSTD	POSIX	{ int setgid(gid_t gid); }
293182	MSTD	BSD	{ int setegid(gid_t egid); }
294183	MSTD	BSD	{ int seteuid(uid_t euid); }
295184	UNIMPL	BSD	lfs_bmapv
296185	UNIMPL	BSD	lfs_markv
297186	UNIMPL	BSD	lfs_segclean
298187	UNIMPL	BSD	lfs_segwait
299188	STD	POSIX	{ int stat(char *path, struct stat *ub); }
300189	MSTD	POSIX	{ int fstat(int fd, struct stat *sb); }
301190	STD	POSIX	{ int lstat(char *path, struct stat *ub); }
302191	STD	POSIX	{ int pathconf(char *path, int name); }
303192	MSTD	POSIX	{ int fpathconf(int fd, int name); }
304193	UNIMPL	NOHIDE	nosys
305194	MSTD	BSD	{ int getrlimit(u_int which, \
306			    struct rlimit *rlp); } \
307			    getrlimit __getrlimit_args int
308195	MSTD	BSD	{ int setrlimit(u_int which, \
309			    struct rlimit *rlp); } \
310			    setrlimit __setrlimit_args int
311196	STD	BSD	{ int getdirentries(int fd, char *buf, u_int count, \
312			    long *basep); }
313197	MSTD	BSD	{ caddr_t mmap(caddr_t addr, size_t len, int prot, \
314			    int flags, int fd, int pad, off_t pos); }
315198	STD	NOHIDE	{ int nosys(void); } __syscall __syscall_args int
316199	STD	POSIX	{ off_t lseek(int fd, int pad, off_t offset, \
317			    int whence); }
318200	STD	BSD	{ int truncate(char *path, int pad, off_t length); }
319201	STD	BSD	{ int ftruncate(int fd, int pad, off_t length); }
320202	MSTD	BSD	{ int __sysctl(int *name, u_int namelen, void *old, \
321			    size_t *oldlenp, void *new, size_t newlen); } \
322			    __sysctl sysctl_args int
323; properly, __sysctl should be a NOHIDE, but making an exception
324; here allows to avoid one in libc/sys/Makefile.inc.
325203	MSTD	BSD	{ int mlock(const void *addr, size_t len); }
326204	MSTD	BSD	{ int munlock(const void *addr, size_t len); }
327205	STD	BSD	{ int undelete(char *path); }
328206	STD	BSD	{ int futimes(int fd, struct timeval *tptr); }
329207	MSTD	BSD	{ int getpgid(pid_t pid); }
330208	UNIMPL	NOHIDE	newreboot (NetBSD)
331209	MSTD	BSD	{ int poll(struct pollfd *fds, u_int nfds, \
332			    int timeout); }
333
334;
335; The following are reserved for loadable syscalls
336;
337210	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
338211	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
339212	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
340213	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
341214	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
342215	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
343216	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
344217	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
345218	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
346219	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
347
348;
349; The following were introduced with NetBSD/4.4Lite-2
350; They are initialized by thier respective modules/sysinits
351220	MNOSTD	BSD	{ int __semctl(int semid, int semnum, int cmd, \
352			    union semun *arg); }
353221	MNOSTD	BSD	{ int semget(key_t key, int nsems, int semflg); }
354222	MNOSTD	BSD	{ int semop(int semid, struct sembuf *sops, \
355			    size_t nsops); }
356223	UNIMPL	NOHIDE	semconfig
357224	MNOSTD	BSD	{ int msgctl(int msqid, int cmd, \
358			    struct msqid_ds *buf); }
359225	MNOSTD	BSD	{ int msgget(key_t key, int msgflg); }
360226	MNOSTD	BSD	{ int msgsnd(int msqid, const void *msgp, size_t msgsz, \
361			    int msgflg); }
362227	MNOSTD	BSD	{ int msgrcv(int msqid, void *msgp, size_t msgsz, \
363			    long msgtyp, int msgflg); }
364228	MNOSTD	BSD	{ int shmat(int shmid, const void *shmaddr, int shmflg); }
365229	MNOSTD	BSD	{ int shmctl(int shmid, int cmd, \
366			    struct shmid_ds *buf); }
367230	MNOSTD	BSD	{ int shmdt(const void *shmaddr); }
368231	MNOSTD	BSD	{ int shmget(key_t key, size_t size, int shmflg); }
369;
370232	MSTD	POSIX	{ int clock_gettime(clockid_t clock_id, \
371			    struct timespec *tp); }
372233	MSTD	POSIX	{ int clock_settime(clockid_t clock_id, \
373			    const struct timespec *tp); }
374234	MSTD	POSIX	{ int clock_getres(clockid_t clock_id, \
375			    struct timespec *tp); }
376235	UNIMPL	NOHIDE	timer_create
377236	UNIMPL	NOHIDE	timer_delete
378237	UNIMPL	NOHIDE	timer_settime
379238	UNIMPL	NOHIDE	timer_gettime
380239	UNIMPL	NOHIDE	timer_getoverrun
381240	MSTD	POSIX	{ int nanosleep(const struct timespec *rqtp, \
382			    struct timespec *rmtp); }
383241	UNIMPL	NOHIDE	nosys
384242	UNIMPL	NOHIDE	nosys
385243	UNIMPL	NOHIDE	nosys
386244	UNIMPL	NOHIDE	nosys
387245	UNIMPL	NOHIDE	nosys
388246	UNIMPL	NOHIDE	nosys
389247	UNIMPL	NOHIDE	nosys
390248	UNIMPL	NOHIDE	nosys
391249	UNIMPL	NOHIDE	nosys
392; syscall numbers initially used in OpenBSD
393250	MSTD	BSD	{ int minherit(void *addr, size_t len, int inherit); }
394251	MSTD	BSD	{ int rfork(int flags); }
395252	MSTD	BSD	{ int openbsd_poll(struct pollfd *fds, u_int nfds, \
396			    int timeout); }
397253	STD	BSD	{ int issetugid(void); }
398254	STD	BSD	{ int lchown(char *path, int uid, int gid); }
399255	UNIMPL	NOHIDE	nosys
400256	UNIMPL	NOHIDE	nosys
401257	UNIMPL	NOHIDE	nosys
402258	UNIMPL	NOHIDE	nosys
403259	UNIMPL	NOHIDE	nosys
404260	UNIMPL	NOHIDE	nosys
405261	UNIMPL	NOHIDE	nosys
406262	UNIMPL	NOHIDE	nosys
407263	UNIMPL	NOHIDE	nosys
408264	UNIMPL	NOHIDE	nosys
409265	UNIMPL	NOHIDE	nosys
410266	UNIMPL	NOHIDE	nosys
411267	UNIMPL	NOHIDE	nosys
412268	UNIMPL	NOHIDE	nosys
413269	UNIMPL	NOHIDE	nosys
414270	UNIMPL	NOHIDE	nosys
415271	UNIMPL	NOHIDE	nosys
416272	STD	BSD	{ int getdents(int fd, char *buf, size_t count); }
417273	UNIMPL	NOHIDE	nosys
418274	STD	BSD	{ int lchmod(char *path, mode_t mode); }
419275	NOPROTO BSD	{ int lchown(char *path, uid_t uid, gid_t gid); } netbsd_lchown lchown_args int
420276	STD	BSD	{ int lutimes(char *path, struct timeval *tptr); }
421277	MNOPROTO BSD	{ int msync(void *addr, size_t len, int flags); } netbsd_msync msync_args int
422278	STD	BSD	{ int nstat(char *path, struct nstat *ub); }
423279	MSTD	BSD	{ int nfstat(int fd, struct nstat *sb); }
424280	STD	BSD	{ int nlstat(char *path, struct nstat *ub); }
425281	UNIMPL	NOHIDE	nosys
426282	UNIMPL	NOHIDE	nosys
427283	UNIMPL	NOHIDE	nosys
428284	UNIMPL	NOHIDE	nosys
429285	UNIMPL	NOHIDE	nosys
430286	UNIMPL	NOHIDE	nosys
431287	UNIMPL	NOHIDE	nosys
432288	UNIMPL	NOHIDE	nosys
433289	UNIMPL	NOHIDE	nosys
434290	UNIMPL	NOHIDE	nosys
435291	UNIMPL	NOHIDE	nosys
436292	UNIMPL	NOHIDE	nosys
437293	UNIMPL	NOHIDE	nosys
438294	UNIMPL	NOHIDE	nosys
439295	UNIMPL	NOHIDE	nosys
440296	UNIMPL	NOHIDE	nosys
441; XXX 297 is 300 in NetBSD 
442297	STD	BSD	{ int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
443298	STD	BSD	{ int fhopen(const struct fhandle *u_fhp, int flags); }
444299	STD	BSD 	{ int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
445; syscall numbers for FreeBSD
446300	MSTD	BSD	{ int modnext(int modid); }
447301	MSTD	BSD	{ int modstat(int modid, struct module_stat* stat); }
448302	MSTD	BSD	{ int modfnext(int modid); }
449303	MSTD	BSD	{ int modfind(const char *name); }
450304	MSTD	BSD	{ int kldload(const char *file); }
451305	MSTD	BSD	{ int kldunload(int fileid); }
452306	MSTD	BSD	{ int kldfind(const char *file); }
453307	MSTD	BSD	{ int kldnext(int fileid); }
454308	MSTD	BSD	{ int kldstat(int fileid, struct kld_file_stat* stat); }
455309	MSTD	BSD	{ int kldfirstmod(int fileid); }
456310	MSTD	BSD	{ int getsid(pid_t pid); }
457311	MSTD	BSD	{ int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
458312	MSTD	BSD	{ int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
459313	OBSOL	NOHIDE	signanosleep
460314     NOSTD   BSD     { int aio_return(struct aiocb *aiocbp); }
461315     NOSTD   BSD     { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
462316     NOSTD   BSD     { int aio_cancel(int fd, struct aiocb *aiocbp); }
463317     NOSTD   BSD     { int aio_error(struct aiocb *aiocbp); }
464318     NOSTD   BSD     { int aio_read(struct aiocb *aiocbp); }
465319     NOSTD   BSD     { int aio_write(struct aiocb *aiocbp); }
466320     NOSTD   BSD     { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
467321     MSTD	BSD     { int yield(void); }
468322	OBSOL	NOHIDE	thr_sleep
469323	OBSOL	NOHIDE	thr_wakeup
470324     MSTD	BSD     { int mlockall(int how); }
471325     MSTD	BSD     { int munlockall(void); }
472326     STD     BSD     { int __getcwd(u_char *buf, u_int buflen); }
473
474327     MSTD     POSIX   { int sched_setparam (pid_t pid, const struct sched_param *param); }
475328     MSTD     POSIX   { int sched_getparam (pid_t pid, struct sched_param *param); }
476
477329     MSTD     POSIX   { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
478330     MSTD     POSIX   { int sched_getscheduler (pid_t pid); }
479
480331     MSTD     POSIX   { int sched_yield (void); }
481332     MSTD     POSIX   { int sched_get_priority_max (int policy); }
482333     MSTD     POSIX   { int sched_get_priority_min (int policy); }
483334     MSTD     POSIX   { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
484335	STD	BSD	{ int utrace(const void *addr, size_t len); }
485336	MCOMPAT4	BSD	{ int sendfile(int fd, int s, off_t offset, size_t nbytes, \
486				struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
487337	STD	BSD	{ int kldsym(int fileid, int cmd, void *data); }
488338	MSTD	BSD	{ int jail(struct jail *jail); }
489339	UNIMPL	BSD	pioctl
490340	MSTD	POSIX	{ int sigprocmask(int how, const sigset_t *set, \
491			    sigset_t *oset); }
492341	MSTD	POSIX	{ int sigsuspend(const sigset_t *sigmask); }
493342	MCOMPAT4 POSIX	{ int sigaction(int sig, const struct sigaction *act, \
494			    struct sigaction *oact); }
495343	MSTD	POSIX	{ int sigpending(sigset_t *set); }
496344	MCOMPAT4 BSD	{ int sigreturn(const struct ucontext4 *sigcntxp); }
497345	MSTD	NOHIDE	{ int sigtimedwait(const sigset_t *set, \
498			    siginfo_t *info, const struct timespec *timeout); }
499346	MSTD	NOHIDE	{ int sigwaitinfo(const sigset_t *set, \
500			    siginfo_t *info); }
501347	MSTD	BSD	{ int __acl_get_file(const char *path, \
502			    acl_type_t type, struct acl *aclp); }
503348	MSTD	BSD	{ int __acl_set_file(const char *path, \
504			    acl_type_t type, struct acl *aclp); }
505349	MSTD	BSD	{ int __acl_get_fd(int filedes, acl_type_t type, \
506			    struct acl *aclp); }
507350	MSTD	BSD	{ int __acl_set_fd(int filedes, acl_type_t type, \
508			    struct acl *aclp); }
509351	MSTD	BSD	{ int __acl_delete_file(const char *path, \
510			    acl_type_t type); }
511352	MSTD	BSD	{ int __acl_delete_fd(int filedes, acl_type_t type); }
512353	MSTD	BSD	{ int __acl_aclcheck_file(const char *path, \
513			    acl_type_t type, struct acl *aclp); }
514354	MSTD	BSD	{ int __acl_aclcheck_fd(int filedes, acl_type_t type, \
515			    struct acl *aclp); }
516355	STD	BSD	{ int extattrctl(const char *path, int cmd, \
517			    const char *filename, int attrnamespace, \
518			    const char *attrname); }
519356	STD	BSD	{ int extattr_set_file(const char *path, \
520			    int attrnamespace, const char *attrname, \
521			    void *data, size_t nbytes); }
522357	STD	BSD	{ ssize_t extattr_get_file(const char *path, \
523			    int attrnamespace, const char *attrname, \
524			    void *data, size_t nbytes); }
525358	STD	BSD	{ int extattr_delete_file(const char *path, \
526			    int attrnamespace, const char *attrname); }
527359	NOSTD	BSD	{ int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
528360	MSTD	BSD	{ int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
529361	MSTD	BSD	{ int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
530362	MSTD	BSD	{ int kqueue(void); }
531363	MSTD	BSD	{ int kevent(int fd, \
532			    const struct kevent *changelist, int nchanges, \
533			    struct kevent *eventlist, int nevents, \
534			    const struct timespec *timeout); }
535364	UNIMPL	BSD	__cap_get_proc
536365	UNIMPL	BSD	__cap_set_proc
537366	UNIMPL	BSD	__cap_get_fd
538367	UNIMPL	BSD	__cap_get_file
539368	UNIMPL	BSD	__cap_set_fd
540369	UNIMPL	BSD	__cap_set_file
541370	NODEF	NOHIDE	lkmressys lkmressys nosys_args int
542371	STD	BSD	{ int extattr_set_fd(int fd, int attrnamespace, \
543			    const char *attrname, void *data, \
544			    size_t nbytes); }
545372	STD	BSD	{ ssize_t extattr_get_fd(int fd, int attrnamespace, \
546			    const char *attrname, void *data, size_t nbytes); }
547373	STD	BSD	{ int extattr_delete_fd(int fd, int attrnamespace, \
548			    const char *attrname); }
549374	MSTD	BSD	{ int __setugid(int flag); }
550375	NOIMPL	BSD	{ int nfsclnt(int flag, caddr_t argp); }
551376	STD	BSD	{ int eaccess(char *path, int flags); }
552377	UNIMPL	BSD	afs_syscall
553378	STD	BSD	{ int nmount(struct iovec *iovp, unsigned int iovcnt, \
554			    int flags); }
555379	MSTD	BSD	{ int kse_exit(void); }
556380	MSTD	BSD	{ int kse_wakeup(struct kse_mailbox *mbx); }
557381	STD	BSD	{ int kse_create(struct kse_mailbox *mbx, \
558			    int newgroup); }
559382	MSTD	BSD	{ int kse_thr_interrupt(struct kse_thr_mailbox *tmbx, int cmd, long data); }
560383	MSTD	BSD	{ int kse_release(struct timespec *timeout); }
561384	MSTD	BSD	{ int __mac_get_proc(struct mac *mac_p); }
562385	MSTD	BSD	{ int __mac_set_proc(struct mac *mac_p); }
563386	MSTD	BSD	{ int __mac_get_fd(int fd, struct mac *mac_p); }
564387	MSTD	BSD	{ int __mac_get_file(const char *path_p, \
565			    struct mac *mac_p); }
566388	MSTD	BSD	{ int __mac_set_fd(int fd, struct mac *mac_p); }
567389	MSTD	BSD	{ int __mac_set_file(const char *path_p, \
568			    struct mac *mac_p); }
569390	STD	BSD	{ int kenv(int what, const char *name, char *value, \
570			    int len); }
571391	STD	BSD	{ int lchflags(const char *path, int flags); }
572392	STD	BSD	{ int uuidgen(struct uuid *store, int count); }
573393	MSTD	BSD	{ int sendfile(int fd, int s, off_t offset, size_t nbytes, \
574				struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
575394	MSTD	BSD	{ int mac_syscall(const char *policy, int call, \
576				void *arg); }
577395	UNIMPL	NOHIDE	nosys
578396	UNIMPL	NOHIDE	nosys
579397	UNIMPL	NOHIDE	nosys
580398	UNIMPL	NOHIDE	nosys
581399	UNIMPL	NOHIDE	nosys
582400	MNOSTD	BSD	{ int ksem_close(semid_t id); }
583401	MNOSTD	BSD	{ int ksem_post(semid_t id); }
584402	MNOSTD	BSD	{ int ksem_wait(semid_t id); }
585403	MNOSTD	BSD	{ int ksem_trywait(semid_t id); }
586404	MNOSTD	BSD	{ int ksem_init(semid_t *idp, unsigned int value); }
587405	MNOSTD	BSD	{ int ksem_open(semid_t *idp, const char *name, \
588				int oflag, mode_t mode, unsigned int value); }
589406	MNOSTD	BSD	{ int ksem_unlink(const char *name); }
590407	MNOSTD	BSD	{ int ksem_getvalue(semid_t id, int *val); }
591408	MNOSTD	BSD	{ int ksem_destroy(semid_t id); }
592409	MSTD	BSD	{ int __mac_get_pid(pid_t pid, struct mac *mac_p); }
593410	MSTD	BSD	{ int __mac_get_link(const char *path_p, \
594			    struct mac *mac_p); }
595411	MSTD	BSD	{ int __mac_set_link(const char *path_p, \
596			    struct mac *mac_p); }
597412	STD	BSD	{ int extattr_set_link(const char *path, \
598			    int attrnamespace, const char *attrname, \
599			    void *data, size_t nbytes); }
600413	STD	BSD	{ ssize_t extattr_get_link(const char *path, \
601			    int attrnamespace, const char *attrname, \
602			    void *data, size_t nbytes); }
603414	STD	BSD	{ int extattr_delete_link(const char *path, \
604			    int attrnamespace, const char *attrname); }
605415	MSTD	BSD	{ int __mac_execve(char *fname, char **argv, \
606			    char **envv, struct mac *mac_p); }
607416	MSTD	POSIX	{ int sigaction(int sig, const struct sigaction *act, \
608			    struct sigaction *oact); }
609417	MSTD	BSD	{ int sigreturn(const struct __ucontext *sigcntxp); }
610418	UNIMPL	BSD	__xstat
611419	UNIMPL	BSD	__xfstat
612420	UNIMPL	BSD	__xlstat
613421	MSTD	BSD	{ int getcontext(struct __ucontext *ucp); }
614422	MSTD	BSD	{ int setcontext(const struct __ucontext *ucp); }
615423	MSTD	BSD	{ int swapcontext(struct __ucontext *oucp, \
616			    const struct __ucontext *ucp); }
617424	MSTD	BSD	{ int swapoff(const char *name); }
618425	MSTD	BSD	{ int __acl_get_link(const char *path, \
619			    acl_type_t type, struct acl *aclp); }
620426	MSTD	BSD	{ int __acl_set_link(const char *path, \
621			    acl_type_t type, struct acl *aclp); }
622427	MSTD	BSD	{ int __acl_delete_link(const char *path, \
623			    acl_type_t type); }
624428	MSTD	BSD	{ int __acl_aclcheck_link(const char *path, \
625			    acl_type_t type, struct acl *aclp); }
626429	MSTD	NOHIDE	{ int sigwait(const sigset_t *set, int *sig); }
627430	MSTD	BSD	{ int thr_create(ucontext_t *ctx, thr_id_t *id, int flags); }
628431	MSTD	BSD	{ void thr_exit(void); }
629432	MSTD	BSD	{ int thr_self(thr_id_t *id); }
630433	MSTD	BSD	{ int thr_kill(thr_id_t id, int sig); }
631434	MSTD	BSD	{ int _umtx_lock(struct umtx *umtx); }
632435	MSTD	BSD	{ int _umtx_unlock(struct umtx *umtx); }
633436	MSTD	BSD	{ int jail_attach(int jid); }
634437	STD	BSD	{ ssize_t extattr_list_fd(int fd, int attrnamespace, \
635			    void *data, size_t nbytes); }
636438	STD	BSD	{ ssize_t extattr_list_file(const char *path, \
637			    int attrnamespace, void *data, size_t nbytes); }
638439	STD	BSD	{ ssize_t extattr_list_link(const char *path, \
639			    int attrnamespace, void *data, size_t nbytes); }
640
641; Please copy any additions and changes to the following compatability tables:
642; sys/ia64/ia32/syscalls.master  (take a best guess)
643; [other 64 bit platforms with an alternate 32 bit syscall table go here too]
644