syscalls.master revision 106312
10Sduke $FreeBSD: head/sys/kern/syscalls.master 106312 2002-11-01 21:00:02Z rwatson $
22362Sohair;	from: @(#)syscalls.master	8.2 (Berkeley) 1/13/94
30Sduke;
40Sduke; System call name/number master file.
50Sduke; Processed to created init_sysent.c, syscalls.c and syscall.h.
60Sduke
70Sduke; Columns: number [M]type nargs namespc name alt{name,tag,rtyp}/comments
80Sduke;	number	system call number, must be in order
90Sduke;	type	one of [M]STD, [M]OBSOL, [M]UNIMPL, [M]COMPAT, [M]CPT_NOA,
100Sduke;		[M]LIBCOMPAT, [M]NODEF,  [M]NOARGS,  [M]NOPROTO,  [M]NOIMPL,
110Sduke;		[M]NOSTD, [M]COMPAT4
120Sduke;	namespc one of POSIX, BSD, NOHIDE
130Sduke;	name	psuedo-prototype of syscall routine
140Sduke;		If one of the following alts is different, then all appear:
150Sduke;	altname	name of system call if different
160Sduke;	alttag	name of args struct tag if different from [o]`name'"_args"
170Sduke;	altrtyp	return type if not int (bogus - syscalls always return int)
180Sduke;		for UNIMPL/OBSOL, name continues with comments
192362Sohair
202362Sohair; types:
212362Sohair;	[M]	e.g. like MSTD -- means the system call is MP-safe.  If no
220Sduke;		M prefix is used, the syscall wrapper will obtain the Giant
230Sduke;		lock for the syscall.
240Sduke;	STD	always included
250Sduke;	COMPAT	included on COMPAT #ifdef
260Sduke;	COMPAT4	included on COMPAT4 #ifdef (FreeBSD 4 compat)
270Sduke;	LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h
280Sduke;	OBSOL	obsolete, not included in system, only specifies name
290Sduke;	UNIMPL	not implemented, placeholder only
300Sduke;	NOSTD	implemented but as a lkm that can be statically
310Sduke;			compiled in sysent entry will be filled with lkmsys
320Sduke;			so the SYSCALL_MODULE macro works
330Sduke;
340Sduke; Please copy any additions and changes to the following compatability tables:
350Sduke; sys/ia64/ia32/syscalls.master  (take a best guess)
360Sduke; [other 64 bit platforms with an alternate 32 bit syscall table go here too]
370Sduke; #ifdef's, etc. may be included, and are copied to the output files.
380Sduke
390Sduke#include <sys/param.h>
400Sduke#include <sys/sysent.h>
410Sduke#include <sys/sysproto.h>
420Sduke
430Sduke; Reserved/unimplemented system calls in the range 0-150 inclusive
440Sduke; are reserved for use in future Berkeley releases.
450Sduke; Additional system calls implemented in vendor and other
460Sduke; redistributions should be placed in the reserved range at the end
470Sduke; of the current calls.
480Sduke
490Sduke0	STD	NOHIDE	{ int nosys(void); } syscall nosys_args int
500Sduke1	MSTD	NOHIDE	{ void sys_exit(int rval); } exit sys_exit_args void
510Sduke2	MSTD	POSIX	{ int fork(void); }
520Sduke3	MSTD	POSIX	{ ssize_t read(int fd, void *buf, size_t nbyte); }
530Sduke4	MSTD	POSIX	{ ssize_t write(int fd, const void *buf, size_t nbyte); }
540Sduke5	STD	POSIX	{ int open(char *path, int flags, int mode); }
550Sduke; XXX should be		{ int open(const char *path, int flags, ...); }
560Sduke; but we're not ready for `const' or varargs.
570Sduke; XXX man page says `mode_t mode'.
580Sduke6	MSTD	POSIX	{ int close(int fd); }
590Sduke7	MSTD	BSD	{ int wait4(int pid, int *status, int options, \
600Sduke			    struct rusage *rusage); } wait4 wait_args int
610Sduke8	COMPAT	BSD	{ int creat(char *path, int mode); }
620Sduke9	STD	POSIX	{ int link(char *path, char *link); }
630Sduke10	STD	POSIX	{ int unlink(char *path); }
640Sduke11	OBSOL	NOHIDE	execv
650Sduke12	STD	POSIX	{ int chdir(char *path); }
660Sduke13	STD	BSD	{ int fchdir(int fd); }
670Sduke14	STD	POSIX	{ int mknod(char *path, int mode, int dev); }
680Sduke15	STD	POSIX	{ int chmod(char *path, int mode); }
690Sduke16	STD	POSIX	{ int chown(char *path, int uid, int gid); }
700Sduke17	MSTD	BSD	{ int obreak(char *nsize); } break obreak_args int
710Sduke18	STD	BSD	{ int getfsstat(struct statfs *buf, long bufsize, \
720Sduke			    int flags); }
730Sduke19	COMPAT	POSIX	{ long lseek(int fd, long offset, int whence); }
740Sduke20	MSTD	POSIX	{ pid_t getpid(void); }
750Sduke21	STD	BSD	{ int mount(char *type, char *path, int flags, \
760Sduke			    caddr_t data); }
770Sduke; XXX `path' should have type `const char *' but we're not ready for that.
780Sduke22	STD	BSD	{ int unmount(char *path, int flags); }
790Sduke23	MSTD	POSIX	{ int setuid(uid_t uid); }
800Sduke24	MSTD	POSIX	{ uid_t getuid(void); }
810Sduke25	MSTD	POSIX	{ uid_t geteuid(void); }
820Sduke26	STD	BSD	{ int ptrace(int req, pid_t pid, caddr_t addr, \
830Sduke			    int data); }
840Sduke27	MSTD	BSD	{ int recvmsg(int s, struct msghdr *msg, int flags); }
850Sduke28	MSTD	BSD	{ int sendmsg(int s, caddr_t msg, int flags); }
860Sduke29	MSTD	BSD	{ int recvfrom(int s, caddr_t buf, size_t len, \
870Sduke			    int flags, caddr_t from, int *fromlenaddr); }
880Sduke30	MSTD	BSD	{ int accept(int s, caddr_t name, int *anamelen); }
890Sduke31	MSTD	BSD	{ int getpeername(int fdes, caddr_t asa, int *alen); }
900Sduke32	MSTD	BSD	{ int getsockname(int fdes, caddr_t asa, int *alen); }
910Sduke33	STD	POSIX	{ int access(char *path, int flags); }
920Sduke34	STD	BSD	{ int chflags(char *path, int flags); }
930Sduke35	STD	BSD	{ int fchflags(int fd, int flags); }
940Sduke36	STD	BSD	{ int sync(void); }
950Sduke37	MSTD	POSIX	{ int kill(int pid, int signum); }
960Sduke38	COMPAT	POSIX	{ int stat(char *path, struct ostat *ub); }
970Sduke39	MSTD	POSIX	{ pid_t getppid(void); }
980Sduke40	COMPAT	POSIX	{ int lstat(char *path, struct ostat *ub); }
990Sduke41	STD	POSIX	{ int dup(u_int fd); }
1000Sduke42	STD	POSIX	{ int pipe(void); }
1010Sduke43	MSTD	POSIX	{ gid_t getegid(void); }
1020Sduke44	MSTD	BSD	{ int profil(caddr_t samples, size_t size, \
1030Sduke			    size_t offset, u_int scale); }
1040Sduke45	STD	BSD	{ int ktrace(const char *fname, int ops, int facs, \
1050Sduke			    int pid); }
1060Sduke46	MCOMPAT	POSIX	{ int sigaction(int signum, struct osigaction *nsa, \
1070Sduke			    struct osigaction *osa); }
1080Sduke47	MSTD	POSIX	{ gid_t getgid(void); }
1090Sduke48	MCOMPAT	POSIX	{ int sigprocmask(int how, osigset_t mask); }
1100Sduke; XXX note nonstandard (bogus) calling convention - the libc stub passes
1110Sduke; us the mask, not a pointer to it, and we return the old mask as the
1120Sduke; (int) return value.
1130Sduke49	MSTD	BSD	{ int getlogin(char *namebuf, u_int namelen); }
1140Sduke50	MSTD	BSD	{ int setlogin(char *namebuf); }
1150Sduke51	MSTD	BSD	{ int acct(char *path); }
1160Sduke52	MCOMPAT	POSIX	{ int sigpending(void); }
1170Sduke53	MSTD	BSD	{ int sigaltstack(stack_t *ss, stack_t *oss); }
1180Sduke54	MSTD	POSIX	{ int ioctl(int fd, u_long com, caddr_t data); }
1190Sduke55	MSTD	BSD	{ int reboot(int opt); }
1200Sduke56	STD	POSIX	{ int revoke(char *path); }
1210Sduke57	STD	POSIX	{ int symlink(char *path, char *link); }
1220Sduke58	STD	POSIX	{ int readlink(char *path, char *buf, int count); }
1230Sduke59	MSTD	POSIX	{ int execve(char *fname, char **argv, char **envv); }
1240Sduke60	MSTD	POSIX	{ int umask(int newmask); } umask umask_args int
1250Sduke61	STD	BSD	{ int chroot(char *path); }
1260Sduke62	MCOMPAT	POSIX	{ int fstat(int fd, struct ostat *sb); }
1270Sduke63	MCOMPAT	BSD	{ int getkerninfo(int op, char *where, size_t *size, \
1280Sduke			    int arg); } getkerninfo getkerninfo_args int
1290Sduke64	MCOMPAT	BSD	{ int getpagesize(void); } \
1300Sduke			    getpagesize getpagesize_args int
1310Sduke65	STD	BSD	{ int msync(void *addr, size_t len, int flags); }
1320Sduke66	MSTD	BSD	{ int vfork(void); }
1330Sduke67	OBSOL	NOHIDE	vread
1340Sduke68	OBSOL	NOHIDE	vwrite
1350Sduke69	MSTD	BSD	{ int sbrk(int incr); }
1360Sduke70	MSTD	BSD	{ int sstk(int incr); }
1370Sduke71	MCOMPAT	BSD	{ int mmap(void *addr, int len, int prot, \
1380Sduke			    int flags, int fd, long pos); }
1390Sduke72	MSTD	BSD	{ int ovadvise(int anom); } vadvise ovadvise_args int
1400Sduke73	MSTD	BSD	{ int munmap(void *addr, size_t len); }
1410Sduke74	MSTD	BSD	{ int mprotect(const void *addr, size_t len, int prot); }
1420Sduke75	MSTD	BSD	{ int madvise(void *addr, size_t len, int behav); }
1430Sduke76	OBSOL	NOHIDE	vhangup
1440Sduke77	OBSOL	NOHIDE	vlimit
1450Sduke78	MSTD	BSD	{ int mincore(const void *addr, size_t len, \
1460Sduke			    char *vec); }
1470Sduke79	MSTD	POSIX	{ int getgroups(u_int gidsetsize, gid_t *gidset); }
1480Sduke80	MSTD	POSIX	{ int setgroups(u_int gidsetsize, gid_t *gidset); }
1490Sduke81	MSTD	POSIX	{ int getpgrp(void); }
1500Sduke82	MSTD	POSIX	{ int setpgid(int pid, int pgid); }
1510Sduke83	MSTD	BSD	{ int setitimer(u_int which, struct itimerval *itv, \
1520Sduke			    struct itimerval *oitv); }
1530Sduke84	MCOMPAT	BSD	{ int wait(void); }
1540Sduke85	MSTD	BSD	{ int swapon(char *name); }
1550Sduke86	MSTD	BSD	{ int getitimer(u_int which, struct itimerval *itv); }
1560Sduke87	MCOMPAT	BSD	{ int gethostname(char *hostname, u_int len); } \
1570Sduke			    gethostname gethostname_args int
1580Sduke88	MCOMPAT	BSD	{ int sethostname(char *hostname, u_int len); } \
1590Sduke			    sethostname sethostname_args int
1600Sduke89	MSTD	BSD	{ int getdtablesize(void); }
1610Sduke90	MSTD	POSIX	{ int dup2(u_int from, u_int to); }
1620Sduke91	UNIMPL	BSD	getdopt
1630Sduke92	MSTD	POSIX	{ int fcntl(int fd, int cmd, long arg); }
1640Sduke; XXX should be		{ int fcntl(int fd, int cmd, ...); }
1650Sduke; but we're not ready for varargs.
1660Sduke93	MSTD	BSD	{ int select(int nd, fd_set *in, fd_set *ou, \
1670Sduke			    fd_set *ex, struct timeval *tv); }
1680Sduke94	UNIMPL	BSD	setdopt
1690Sduke95	STD	POSIX	{ int fsync(int fd); }
1700Sduke96	MSTD	BSD	{ int setpriority(int which, int who, int prio); }
1710Sduke97	MSTD	BSD	{ int socket(int domain, int type, int protocol); }
1720Sduke98	MSTD	BSD	{ int connect(int s, caddr_t name, int namelen); }
1730Sduke99	MCPT_NOA BSD	{ int accept(int s, caddr_t name, int *anamelen); } \
1740Sduke			    accept accept_args int
1750Sduke100	MSTD	BSD	{ int getpriority(int which, int who); }
1760Sduke101	MCOMPAT	BSD	{ int send(int s, caddr_t buf, int len, int flags); }
1770Sduke102	MCOMPAT	BSD	{ int recv(int s, caddr_t buf, int len, int flags); }
1780Sduke103	MCOMPAT	BSD	{ int sigreturn(struct osigcontext *sigcntxp); }
1790Sduke104	MSTD	BSD	{ int bind(int s, caddr_t name, int namelen); }
1800Sduke105	MSTD	BSD	{ int setsockopt(int s, int level, int name, \
1810Sduke			    caddr_t val, int valsize); }
1820Sduke106	MSTD	BSD	{ int listen(int s, int backlog); }
1830Sduke107	OBSOL	NOHIDE	vtimes
1840Sduke108	MCOMPAT	BSD	{ int sigvec(int signum, struct sigvec *nsv, \
1850Sduke			    struct sigvec *osv); }
1860Sduke109	MCOMPAT	BSD	{ int sigblock(int mask); }
1870Sduke110	MCOMPAT	BSD	{ int sigsetmask(int mask); }
1880Sduke111	MCOMPAT	POSIX	{ int sigsuspend(osigset_t mask); }
1890Sduke; XXX note nonstandard (bogus) calling convention - the libc stub passes
1900Sduke; us the mask, not a pointer to it.
1910Sduke112	MCOMPAT	BSD	{ int sigstack(struct sigstack *nss, \
1920Sduke			    struct sigstack *oss); }
1930Sduke113	MCOMPAT	BSD	{ int recvmsg(int s, struct omsghdr *msg, int flags); }
1940Sduke114	MCOMPAT	BSD	{ int sendmsg(int s, caddr_t msg, int flags); }
1950Sduke115	OBSOL	NOHIDE	vtrace
1960Sduke116	MSTD	BSD	{ int gettimeofday(struct timeval *tp, \
1970Sduke			    struct timezone *tzp); }
1980Sduke117	MSTD	BSD	{ int getrusage(int who, struct rusage *rusage); }
1990Sduke118	MSTD	BSD	{ int getsockopt(int s, int level, int name, \
2000Sduke			    caddr_t val, int *avalsize); }
2010Sduke119	UNIMPL	NOHIDE	resuba (BSD/OS 2.x)
2020Sduke120	MSTD	BSD	{ int readv(int fd, struct iovec *iovp, u_int iovcnt); }
2030Sduke121	MSTD	BSD	{ int writev(int fd, struct iovec *iovp, \
2040Sduke			    u_int iovcnt); }
2050Sduke122	MSTD	BSD	{ int settimeofday(struct timeval *tv, \
2060Sduke			    struct timezone *tzp); }
2070Sduke123	STD	BSD	{ int fchown(int fd, int uid, int gid); }
2080Sduke124	STD	BSD	{ int fchmod(int fd, int mode); }
2090Sduke125	MCPT_NOA BSD	{ int recvfrom(int s, caddr_t buf, size_t len, \
2100Sduke			    int flags, caddr_t from, int *fromlenaddr); } \
2110Sduke			    recvfrom recvfrom_args int
2120Sduke126	MSTD	BSD	{ int setreuid(int ruid, int euid); }
2130Sduke127	MSTD	BSD	{ int setregid(int rgid, int egid); }
2140Sduke128	STD	POSIX	{ int rename(char *from, char *to); }
2150Sduke129	COMPAT	BSD	{ int truncate(char *path, long length); }
2160Sduke130	COMPAT	BSD	{ int ftruncate(int fd, long length); }
2170Sduke131	MSTD	BSD	{ int flock(int fd, int how); }
2180Sduke132	STD	POSIX	{ int mkfifo(char *path, int mode); }
2190Sduke133	MSTD	BSD	{ int sendto(int s, caddr_t buf, size_t len, \
2200Sduke			    int flags, caddr_t to, int tolen); }
2210Sduke134	MSTD	BSD	{ int shutdown(int s, int how); }
2220Sduke135	MSTD	BSD	{ int socketpair(int domain, int type, int protocol, \
2230Sduke			    int *rsv); }
2240Sduke136	STD	POSIX	{ int mkdir(char *path, int mode); }
2250Sduke137	STD	POSIX	{ int rmdir(char *path); }
2260Sduke138	STD	BSD	{ int utimes(char *path, struct timeval *tptr); }
2270Sduke139	OBSOL	NOHIDE	4.2 sigreturn
2280Sduke140	MSTD	BSD	{ int adjtime(struct timeval *delta, \
2290Sduke			    struct timeval *olddelta); }
2300Sduke141	MCOMPAT	BSD	{ int getpeername(int fdes, caddr_t asa, int *alen); }
2310Sduke142	MCOMPAT	BSD	{ long gethostid(void); }
2320Sduke143	MCOMPAT	BSD	{ int sethostid(long hostid); }
2330Sduke144	MCOMPAT	BSD	{ int getrlimit(u_int which, struct orlimit *rlp); }
2340Sduke145	MCOMPAT	BSD	{ int setrlimit(u_int which, struct orlimit *rlp); }
2350Sduke146	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			    u_int 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, 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, void *shmaddr, int shmflg); }
365229	MNOSTD	BSD	{ int shmctl(int shmid, int cmd, \
366			    struct shmid_ds *buf); }
367230	MNOSTD	BSD	{ int shmdt(void *shmaddr); }
368231	MNOSTD	BSD	{ int shmget(key_t key, int 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	UNIMPL	NOHIDE	sigtimedwait
498346	UNIMPL	NOHIDE	sigwaitinfo
499347	MSTD	BSD	{ int __acl_get_file(const char *path, \
500			    acl_type_t type, struct acl *aclp); }
501348	MSTD	BSD	{ int __acl_set_file(const char *path, \
502			    acl_type_t type, struct acl *aclp); }
503349	MSTD	BSD	{ int __acl_get_fd(int filedes, acl_type_t type, \
504			    struct acl *aclp); }
505350	MSTD	BSD	{ int __acl_set_fd(int filedes, acl_type_t type, \
506			    struct acl *aclp); }
507351	MSTD	BSD	{ int __acl_delete_file(const char *path, \
508			    acl_type_t type); }
509352	MSTD	BSD	{ int __acl_delete_fd(int filedes, acl_type_t type); }
510353	MSTD	BSD	{ int __acl_aclcheck_file(const char *path, \
511			    acl_type_t type, struct acl *aclp); }
512354	MSTD	BSD	{ int __acl_aclcheck_fd(int filedes, acl_type_t type, \
513			    struct acl *aclp); }
514355	STD	BSD	{ int extattrctl(const char *path, int cmd, \
515			    const char *filename, int attrnamespace, \
516			    const char *attrname); }
517356	STD	BSD	{ int extattr_set_file(const char *path, \
518			    int attrnamespace, const char *attrname, \
519			    void *data, size_t nbytes); }
520357	STD	BSD	{ ssize_t extattr_get_file(const char *path, \
521			    int attrnamespace, const char *attrname, \
522			    void *data, size_t nbytes); }
523358	STD	BSD	{ int extattr_delete_file(const char *path, \
524			    int attrnamespace, const char *attrname); }
525359	NOSTD	BSD	{ int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
526360	MSTD	BSD	{ int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
527361	MSTD	BSD	{ int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
528362	MSTD	BSD	{ int kqueue(void); }
529363	MSTD	BSD	{ int kevent(int fd, \
530			    const struct kevent *changelist, int nchanges, \
531			    struct kevent *eventlist, int nevents, \
532			    const struct timespec *timeout); }
533364	UNIMPL	BSD	__cap_get_proc
534365	UNIMPL	BSD	__cap_set_proc
535366	UNIMPL	BSD	__cap_get_fd
536367	UNIMPL	BSD	__cap_get_file
537368	UNIMPL	BSD	__cap_set_fd
538369	UNIMPL	BSD	__cap_set_file
539370	NODEF	NOHIDE	lkmressys lkmressys nosys_args int
540371	STD	BSD	{ int extattr_set_fd(int fd, int attrnamespace, \
541			    const char *attrname, void *data, \
542			    size_t nbytes); }
543372	STD	BSD	{ ssize_t extattr_get_fd(int fd, int attrnamespace, \
544			    const char *attrname, void *data, size_t nbytes); }
545373	STD	BSD	{ int extattr_delete_fd(int fd, int attrnamespace, \
546			    const char *attrname); }
547374	MSTD	BSD	{ int __setugid(int flag); }
548375	NOIMPL	BSD	{ int nfsclnt(int flag, caddr_t argp); }
549376	STD	BSD	{ int eaccess(char *path, int flags); }
550377	UNIMPL	BSD	afs_syscall
551378	STD	BSD	{ int nmount(struct iovec *iovp, unsigned int iovcnt, \
552			    int flags); }
553379	STD	BSD	{ int kse_exit(void); }
554380	STD	BSD	{ int kse_wakeup(struct kse_mailbox *mbx); }
555381	STD	BSD	{ int kse_create(struct kse_mailbox *mbx, \
556			    int newgroup); }
557382	STD	BSD	{ int kse_thr_interrupt(struct kse_thr_mailbox *tmbx); }
558383	MSTD	BSD	{ int kse_release(void); }
559384	MSTD	BSD	{ int __mac_get_proc(struct mac *mac_p); }
560385	MSTD	BSD	{ int __mac_set_proc(struct mac *mac_p); }
561386	MSTD	BSD	{ int __mac_get_fd(int fd, struct mac *mac_p); }
562387	MSTD	BSD	{ int __mac_get_file(const char *path_p, \
563			    struct mac *mac_p); }
564388	MSTD	BSD	{ int __mac_set_fd(int fd, struct mac *mac_p); }
565389	MSTD	BSD	{ int __mac_set_file(const char *path_p, \
566			    struct mac *mac_p); }
567390	STD	BSD	{ int kenv(int what, const char *name, char *value, \
568			    int len); }
569391	STD	BSD	{ int lchflags(const char *path, int flags); }
570392	STD	BSD	{ int uuidgen(struct uuid *store, int count); }
571393	MSTD	BSD	{ int sendfile(int fd, int s, off_t offset, size_t nbytes, \
572				struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
573394	MSTD	BSD	{ int mac_syscall(const char *policy, int call, \
574				void *arg); }
575395	UNIMPL	NOHIDE	nosys
576396	UNIMPL	NOHIDE	nosys
577397	UNIMPL	NOHIDE	nosys
578398	UNIMPL	NOHIDE	nosys
579399	UNIMPL	NOHIDE	nosys
580400	MNOSTD	BSD	{ int ksem_close(semid_t id); }
581401	MNOSTD	BSD	{ int ksem_post(semid_t id); }
582402	MNOSTD	BSD	{ int ksem_wait(semid_t id); }
583403	MNOSTD	BSD	{ int ksem_trywait(semid_t id); }
584404	MNOSTD	BSD	{ int ksem_init(semid_t *idp, unsigned int value); }
585405	MNOSTD	BSD	{ int ksem_open(semid_t *idp, const char *name, \
586				int oflag, mode_t mode, unsigned int value); }
587406	MNOSTD	BSD	{ int ksem_unlink(const char *name); }
588407	MNOSTD	BSD	{ int ksem_getvalue(semid_t id, int *val); }
589408	MNOSTD	BSD	{ int ksem_destroy(semid_t id); }
590409	MSTD	BSD	{ int __mac_get_pid(pid_t pid, struct mac *mac_p); }
591410	MSTD	BSD	{ int __mac_get_link(const char *path_p, \
592			    struct mac *mac_p); }
593411	MSTD	BSD	{ int __mac_set_link(const char *path_p, \
594			    struct mac *mac_p); }
595412	STD	BSD	{ int extattr_set_link(const char *path, \
596			    int attrnamespace, const char *attrname, \
597			    void *data, size_t nbytes); }
598413	STD	BSD	{ ssize_t extattr_get_link(const char *path, \
599			    int attrnamespace, const char *attrname, \
600			    void *data, size_t nbytes); }
601414	STD	BSD	{ int extattr_delete_link(const char *path, \
602			    int attrnamespace, const char *attrname); }
603415	UNIMPL	BSD	__mac_execve
604416	MSTD	POSIX	{ int sigaction(int sig, const struct sigaction *act, \
605			    struct sigaction *oact); }
606417	MSTD	BSD	{ int sigreturn(const struct __ucontext *sigcntxp); }
607418	UNIMPL	BSD	__xstat
608419	UNIMPL	BSD	__xfstat
609420	UNIMPL	BSD	__xlstat
610
611; Please copy any additions and changes to the following compatability tables:
612; sys/ia64/ia32/syscalls.master  (take a best guess)
613; [other 64 bit platforms with an alternate 32 bit syscall table go here too]
614