syscalls.master revision 146783
1203966Sjh $FreeBSD: head/sys/kern/syscalls.master 146783 2005-05-29 20:20:16Z rwatson $
2170811Sdelphij;	from: @(#)syscalls.master	8.2 (Berkeley) 1/13/94
3312811Skib;
4170811Sdelphij; System call name/number master file.
5170811Sdelphij; Processed to created init_sysent.c, syscalls.c and syscall.h.
6312811Skib
7312811Skib; Columns: number [M]type nargs name alt{name,tag,rtyp}/comments
8312811Skib;	number	system call number, must be in order
9312811Skib;	type	one of [M]STD, [M]OBSOL, [M]UNIMPL, [M]COMPAT, [M]CPT_NOA,
10170811Sdelphij;		[M]LIBCOMPAT, [M]NODEF, [M]NOARGS, [M]NOPROTO, [M]NOIMPL,
11170811Sdelphij;		[M]NOSTD, [M]COMPAT4
12170811Sdelphij;	name	psuedo-prototype of syscall routine
13170811Sdelphij;		If one of the following alts is different, then all appear:
14170811Sdelphij;	altname	name of system call if different
15170811Sdelphij;	alttag	name of args struct tag if different from [o]`name'"_args"
16170811Sdelphij;	altrtyp	return type if not int (bogus - syscalls always return int)
17170811Sdelphij;		for UNIMPL/OBSOL, name continues with comments
18170811Sdelphij
19170811Sdelphij; types:
20170811Sdelphij;	[M]	e.g. like MSTD -- means the system call is MP-safe.  If no
21170811Sdelphij;		M prefix is used, the syscall wrapper will obtain the Giant
22170811Sdelphij;		lock for the syscall.
23170811Sdelphij;	STD	always included
24170811Sdelphij;	COMPAT	included on COMPAT #ifdef
25170811Sdelphij;	COMPAT4	included on COMPAT4 #ifdef (FreeBSD 4 compat)
26170811Sdelphij;	LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h
27170811Sdelphij;	OBSOL	obsolete, not included in system, only specifies name
28170811Sdelphij;	UNIMPL	not implemented, placeholder only
29170811Sdelphij;	NOSTD	implemented but as a lkm that can be statically
30203966Sjh;			compiled in sysent entry will be filled with lkmsys
31203966Sjh;			so the SYSCALL_MODULE macro works
32203966Sjh;
33203966Sjh; Please copy any additions and changes to the following compatability tables:
34203966Sjh; sys/compat/freebsd32/syscalls.master
35203966Sjh
36203966Sjh; #ifdef's, etc. may be included, and are copied to the output files.
37203966Sjh
38203966Sjh#include <sys/param.h>
39203966Sjh#include <sys/sysent.h>
40203966Sjh#include <sys/sysproto.h>
41203966Sjh
42203966Sjh; Reserved/unimplemented system calls in the range 0-150 inclusive
43203966Sjh; are reserved for use in future Berkeley releases.
44203966Sjh; Additional system calls implemented in vendor and other
45203966Sjh; redistributions should be placed in the reserved range at the end
46203966Sjh; of the current calls.
47203966Sjh
48203966Sjh0	MSTD	{ int nosys(void); } syscall nosys_args int
49203966Sjh1	MSTD	{ void sys_exit(int rval); } exit sys_exit_args void
50203966Sjh2	MSTD	{ int fork(void); }
51203966Sjh3	MSTD	{ ssize_t read(int fd, void *buf, size_t nbyte); }
52203966Sjh4	MSTD	{ ssize_t write(int fd, const void *buf, size_t nbyte); }
53203966Sjh5	MSTD	{ int open(char *path, int flags, int mode); }
54203966Sjh; XXX should be		{ int open(const char *path, int flags, ...); }
55170811Sdelphij; but we're not ready for `const' or varargs.
56170811Sdelphij; XXX man page says `mode_t mode'.
57313096Skib6	MSTD	{ int close(int fd); }
58170811Sdelphij7	MSTD	{ int wait4(int pid, int *status, int options, \
59170811Sdelphij			    struct rusage *rusage); } wait4 wait_args int
60170811Sdelphij8	MCOMPAT	{ int creat(char *path, int mode); }
61170811Sdelphij9	MSTD	{ int link(char *path, char *link); }
62312811Skib10	MSTD	{ int unlink(char *path); }
63170811Sdelphij11	OBSOL	execv
64170927Sbrueffer12	MSTD	{ int chdir(char *path); }
65170927Sbrueffer13	MSTD	{ int fchdir(int fd); }
66170927Sbrueffer14	MSTD	{ int mknod(char *path, int mode, int dev); }
67170927Sbrueffer15	MSTD	{ int chmod(char *path, int mode); }
68170927Sbrueffer16	MSTD	{ int chown(char *path, int uid, int gid); }
69170927Sbrueffer17	MSTD	{ int obreak(char *nsize); } break obreak_args int
70170927Sbrueffer18	MCOMPAT4	{ int getfsstat(struct ostatfs *buf, long bufsize, int flags); }
71170927Sbrueffer19	MCOMPAT	{ long lseek(int fd, long offset, int whence); }
72170927Sbrueffer20	MSTD	{ pid_t getpid(void); }
73170927Sbrueffer21	STD	{ int mount(char *type, char *path, int flags, caddr_t data); }
74170927Sbrueffer; XXX `path' should have type `const char *' but we're not ready for that.
75170927Sbrueffer22	STD	{ int unmount(char *path, int flags); }
76170927Sbrueffer23	MSTD	{ int setuid(uid_t uid); }
77170811Sdelphij24	MSTD	{ uid_t getuid(void); }
78170811Sdelphij25	MSTD	{ uid_t geteuid(void); }
79170811Sdelphij26	MSTD	{ int ptrace(int req, pid_t pid, caddr_t addr, int data); }
80312811Skib27	MSTD	{ int recvmsg(int s, struct msghdr *msg, int flags); }
81170811Sdelphij28	MSTD	{ int sendmsg(int s, struct msghdr *msg, int flags); }
82312811Skib29	MSTD	{ int recvfrom(int s, caddr_t buf, size_t len, int flags, \
83312811Skib		    struct sockaddr * __restrict from, \
84312811Skib		    __socklen_t * __restrict fromlenaddr); }
85312811Skib30	MSTD	{ int accept(int s, struct sockaddr * __restrict name, \
86312811Skib		    __socklen_t * __restrict anamelen); }
87312811Skib31	MSTD	{ int getpeername(int fdes, struct sockaddr * __restrict asa, \
88312811Skib		    __socklen_t * __restrict alen); }
89312811Skib32	MSTD	{ int getsockname(int fdes, struct sockaddr * __restrict asa, \
90312811Skib		    __socklen_t * __restrict alen); }
91312811Skib33	MSTD	{ int access(char *path, int flags); }
92312811Skib34	MSTD	{ int chflags(char *path, int flags); }
93312811Skib35	MSTD	{ int fchflags(int fd, int flags); }
94312811Skib36	MSTD	{ int sync(void); }
95312811Skib37	MSTD	{ int kill(int pid, int signum); }
96312811Skib38	MCOMPAT	{ int stat(char *path, struct ostat *ub); }
97312811Skib39	MSTD	{ pid_t getppid(void); }
98312811Skib40	MCOMPAT	{ int lstat(char *path, struct ostat *ub); }
99312811Skib41	MSTD	{ int dup(u_int fd); }
100316237Sngie42	MSTD	{ int pipe(void); }
101312811Skib43	MSTD	{ gid_t getegid(void); }
102316237Sngie44	MSTD	{ int profil(caddr_t samples, size_t size, size_t offset, \
103312811Skib		    u_int scale); }
104312811Skib45	MSTD	{ int ktrace(const char *fname, int ops, int facs, int pid); }
105312811Skib46	MCOMPAT	{ int sigaction(int signum, struct osigaction *nsa, \
106312811Skib		    struct osigaction *osa); }
107312811Skib47	MSTD	{ gid_t getgid(void); }
108179762Sremko48	MCOMPAT	{ int sigprocmask(int how, osigset_t mask); }
109179762Sremko; XXX note nonstandard (bogus) calling convention - the libc stub passes
110179762Sremko; us the mask, not a pointer to it, and we return the old mask as the
111179762Sremko; (int) return value.
112179762Sremko49	MSTD	{ int getlogin(char *namebuf, u_int namelen); }
113312811Skib50	MSTD	{ int setlogin(char *namebuf); }
114179762Sremko51	MSTD	{ int acct(char *path); }
115203966Sjh52	MCOMPAT	{ int sigpending(void); }
116203966Sjh53	MSTD	{ int sigaltstack(stack_t *ss, stack_t *oss); }
117179762Sremko54	MSTD	{ int ioctl(int fd, u_long com, caddr_t data); }
118203966Sjh55	MSTD	{ int reboot(int opt); }
119203966Sjh56	MSTD	{ int revoke(char *path); }
120179762Sremko57	MSTD	{ int symlink(char *path, char *link); }
121203966Sjh58	MSTD	{ int readlink(char *path, char *buf, int count); }
122203966Sjh59	MSTD	{ int execve(char *fname, char **argv, char **envv); }
123313096Skib60	MSTD	{ int umask(int newmask); } umask umask_args int
124313096Skib61	MSTD	{ int chroot(char *path); }
125313096Skib62	MCOMPAT	{ int fstat(int fd, struct ostat *sb); }
126313096Skib63	MCOMPAT	{ int getkerninfo(int op, char *where, size_t *size, \
127179762Sremko		    int arg); } getkerninfo getkerninfo_args int
128203966Sjh64	MCOMPAT	{ int getpagesize(void); } getpagesize getpagesize_args int
129203966Sjh65	MSTD	{ int msync(void *addr, size_t len, int flags); }
130203966Sjh66	MSTD	{ int vfork(void); }
131203966Sjh67	OBSOL	vread
132203966Sjh68	OBSOL	vwrite
133179762Sremko69	MSTD	{ int sbrk(int incr); }
134203966Sjh70	MSTD	{ int sstk(int incr); }
135203966Sjh71	MCOMPAT	{ int mmap(void *addr, int len, int prot, int flags, int fd, \
136203966Sjh		    long pos); }
137203966Sjh72	MSTD	{ int ovadvise(int anom); } vadvise ovadvise_args int
138203164Sjh73	MSTD	{ int munmap(void *addr, size_t len); }
139203966Sjh74	MSTD	{ int mprotect(const void *addr, size_t len, int prot); }
140203966Sjh75	MSTD	{ int madvise(void *addr, size_t len, int behav); }
141196526Sdelphij76	OBSOL	vhangup
142170811Sdelphij77	OBSOL	vlimit
143170811Sdelphij78	MSTD	{ int mincore(const void *addr, size_t len, char *vec); }
144170811Sdelphij79	MSTD	{ int getgroups(u_int gidsetsize, gid_t *gidset); }
145170811Sdelphij80	MSTD	{ int setgroups(u_int gidsetsize, gid_t *gidset); }
146170811Sdelphij81	MSTD	{ int getpgrp(void); }
147170811Sdelphij82	MSTD	{ int setpgid(int pid, int pgid); }
148170811Sdelphij83	MSTD	{ int setitimer(u_int which, struct itimerval *itv, \
149312811Skib		    struct itimerval *oitv); }
150316237Sngie84	MCOMPAT	{ int wait(void); }
151170811Sdelphij85	MSTD	{ int swapon(char *name); }
152170811Sdelphij86	MSTD	{ int getitimer(u_int which, struct itimerval *itv); }
153170811Sdelphij87	MCOMPAT	{ int gethostname(char *hostname, u_int len); } \
154203967Sjh		    gethostname gethostname_args int
155312811Skib88	MCOMPAT	{ int sethostname(char *hostname, u_int len); } \
156312811Skib		    sethostname sethostname_args int
157312811Skib89	MSTD	{ int getdtablesize(void); }
158170811Sdelphij90	MSTD	{ int dup2(u_int from, u_int to); }
159170811Sdelphij91	UNIMPL	getdopt
160170811Sdelphij92	MSTD	{ int fcntl(int fd, int cmd, long arg); }
161170811Sdelphij; XXX should be	{ int fcntl(int fd, int cmd, ...); }
162170811Sdelphij; but we're not ready for varargs.
163170811Sdelphij93	MSTD	{ int select(int nd, fd_set *in, fd_set *ou, \
164170811Sdelphij		    fd_set *ex, struct timeval *tv); }
165170811Sdelphij94	UNIMPL	setdopt
166170811Sdelphij95	MSTD	{ int fsync(int fd); }
167170811Sdelphij96	MSTD	{ int setpriority(int which, int who, int prio); }
168170811Sdelphij97	MSTD	{ int socket(int domain, int type, int protocol); }
169312811Skib98	MSTD	{ int connect(int s, caddr_t name, int namelen); }
170170811Sdelphij99	MCPT_NOA { int accept(int s, caddr_t name, int *anamelen); } \
171170811Sdelphij		    accept accept_args int
172170811Sdelphij100	MSTD	{ int getpriority(int which, int who); }
173170811Sdelphij101	MCOMPAT	{ int send(int s, caddr_t buf, int len, int flags); }
174170811Sdelphij102	MCOMPAT	{ int recv(int s, caddr_t buf, int len, int flags); }
175170811Sdelphij103	MCOMPAT	{ int sigreturn(struct osigcontext *sigcntxp); }
176170811Sdelphij104	MSTD	{ int bind(int s, caddr_t name, int namelen); }
177170811Sdelphij105	MSTD	{ int setsockopt(int s, int level, int name, caddr_t val, \
178170811Sdelphij		    int valsize); }
179106	MSTD	{ int listen(int s, int backlog); }
180107	OBSOL	vtimes
181108	MCOMPAT	{ int sigvec(int signum, struct sigvec *nsv, \
182		    struct sigvec *osv); }
183109	MCOMPAT	{ int sigblock(int mask); }
184110	MCOMPAT	{ int sigsetmask(int mask); }
185111	MCOMPAT	{ int sigsuspend(osigset_t mask); }
186; XXX note nonstandard (bogus) calling convention - the libc stub passes
187; us the mask, not a pointer to it.
188112	MCOMPAT	{ int sigstack(struct sigstack *nss, struct sigstack *oss); }
189113	MCOMPAT	{ int recvmsg(int s, struct omsghdr *msg, int flags); }
190114	MCOMPAT	{ int sendmsg(int s, caddr_t msg, int flags); }
191115	OBSOL	vtrace
192116	MSTD	{ int gettimeofday(struct timeval *tp, struct timezone *tzp); }
193117	MSTD	{ int getrusage(int who, struct rusage *rusage); }
194118	MSTD	{ int getsockopt(int s, int level, int name, caddr_t val, \
195		    int *avalsize); }
196119	UNIMPL	resuba (BSD/OS 2.x)
197120	MSTD	{ int readv(int fd, struct iovec *iovp, u_int iovcnt); }
198121	MSTD	{ int writev(int fd, struct iovec *iovp, u_int iovcnt); }
199122	MSTD	{ int settimeofday(struct timeval *tv, struct timezone *tzp); }
200123	MSTD	{ int fchown(int fd, int uid, int gid); }
201124	MSTD	{ int fchmod(int fd, int mode); }
202125	MCPT_NOA { int recvfrom(int s, caddr_t buf, size_t len, int flags, \
203		    caddr_t from, int *fromlenaddr); } \
204		    recvfrom recvfrom_args int
205126	MSTD	{ int setreuid(int ruid, int euid); }
206127	MSTD	{ int setregid(int rgid, int egid); }
207128	MSTD	{ int rename(char *from, char *to); }
208129	MCOMPAT	{ int truncate(char *path, long length); }
209130	MCOMPAT	{ int ftruncate(int fd, long length); }
210131	MSTD	{ int flock(int fd, int how); }
211132	MSTD	{ int mkfifo(char *path, int mode); }
212133	MSTD	{ int sendto(int s, caddr_t buf, size_t len, int flags, \
213		    caddr_t to, int tolen); }
214134	MSTD	{ int shutdown(int s, int how); }
215135	MSTD	{ int socketpair(int domain, int type, int protocol, \
216		    int *rsv); }
217136	MSTD	{ int mkdir(char *path, int mode); }
218137	MSTD	{ int rmdir(char *path); }
219138	MSTD	{ int utimes(char *path, struct timeval *tptr); }
220139	OBSOL	4.2 sigreturn
221140	MSTD	{ int adjtime(struct timeval *delta, \
222		    struct timeval *olddelta); }
223141	MCOMPAT	{ int getpeername(int fdes, caddr_t asa, int *alen); }
224142	MCOMPAT	{ long gethostid(void); }
225143	MCOMPAT	{ int sethostid(long hostid); }
226144	MCOMPAT	{ int getrlimit(u_int which, struct orlimit *rlp); }
227145	MCOMPAT	{ int setrlimit(u_int which, struct orlimit *rlp); }
228146	MCOMPAT	{ int killpg(int pgid, int signum); }
229147	MSTD	{ int setsid(void); }
230148	MSTD	{ int quotactl(char *path, int cmd, int uid, caddr_t arg); }
231149	MCOMPAT	{ int quota(void); }
232150	MCPT_NOA { int getsockname(int fdec, caddr_t asa, int *alen); }\
233		    getsockname getsockname_args int
234
235; Syscalls 151-180 inclusive are reserved for vendor-specific
236; system calls.  (This includes various calls added for compatibity
237; with other Unix variants.)
238; Some of these calls are now supported by BSD...
239151	UNIMPL	sem_lock (BSD/OS 2.x)
240152	UNIMPL	sem_wakeup (BSD/OS 2.x)
241153	UNIMPL	asyncdaemon (BSD/OS 2.x)
242154	UNIMPL	nosys
243; 155 is initialized by the NFS code, if present.
244155	MNOIMPL	{ int nfssvc(int flag, caddr_t argp); }
245156	COMPAT	{ int getdirentries(int fd, char *buf, u_int count, \
246		    long *basep); }
247157	MCOMPAT4	{ int statfs(char *path, struct ostatfs *buf); }
248158	MCOMPAT4	{ int fstatfs(int fd, struct ostatfs *buf); }
249159	UNIMPL	nosys
250160	MSTD	{ int lgetfh(char *fname, struct fhandle *fhp); }
251161	MSTD	{ int getfh(char *fname, struct fhandle *fhp); }
252162	MSTD	{ int getdomainname(char *domainname, int len); }
253163	MSTD	{ int setdomainname(char *domainname, int len); }
254164	MSTD	{ int uname(struct utsname *name); }
255165	MSTD	{ int sysarch(int op, char *parms); }
256166	MSTD	{ int rtprio(int function, pid_t pid, struct rtprio *rtp); }
257167	UNIMPL	nosys
258168	UNIMPL	nosys
259; 169 is initialized by the SYSVSEM code if present or loaded
260169	MNOSTD	{ int semsys(int which, int a2, int a3, int a4, int a5); }
261; 169 is initialized by the SYSVMSG code if present or loaded
262; XXX should be	{ int semsys(int which, ...); }
263170	MNOSTD	{ int msgsys(int which, int a2, int a3, int a4, int a5, \
264		    int a6); }
265; 169 is initialized by the SYSVSHM code if present or loaded
266; XXX should be	{ int msgsys(int which, ...); }
267171	MNOSTD	{ int shmsys(int which, int a2, int a3, int a4); }
268; XXX should be	{ int shmsys(int which, ...); }
269172	UNIMPL	nosys
270173	MSTD	{ ssize_t pread(int fd, void *buf, size_t nbyte, \
271		    int pad, off_t offset); }
272174	MSTD	{ ssize_t pwrite(int fd, const void *buf, \
273		    size_t nbyte, int pad, off_t offset); }
274175	UNIMPL	nosys
275176	MSTD	{ int ntp_adjtime(struct timex *tp); }
276177	UNIMPL	sfork (BSD/OS 2.x)
277178	UNIMPL	getdescriptor (BSD/OS 2.x)
278179	UNIMPL	setdescriptor (BSD/OS 2.x)
279180	UNIMPL	nosys
280
281; Syscalls 181-199 are used by/reserved for BSD
282181	MSTD	{ int setgid(gid_t gid); }
283182	MSTD	{ int setegid(gid_t egid); }
284183	MSTD	{ int seteuid(uid_t euid); }
285184	UNIMPL	lfs_bmapv
286185	UNIMPL	lfs_markv
287186	UNIMPL	lfs_segclean
288187	UNIMPL	lfs_segwait
289188	MSTD	{ int stat(char *path, struct stat *ub); }
290189	MSTD	{ int fstat(int fd, struct stat *sb); }
291190	MSTD	{ int lstat(char *path, struct stat *ub); }
292191	MSTD	{ int pathconf(char *path, int name); }
293192	MSTD	{ int fpathconf(int fd, int name); }
294193	UNIMPL	nosys
295194	MSTD	{ int getrlimit(u_int which, struct rlimit *rlp); } \
296		    getrlimit __getrlimit_args int
297195	MSTD	{ int setrlimit(u_int which, struct rlimit *rlp); } \
298		    setrlimit __setrlimit_args int
299196	MSTD	{ int getdirentries(int fd, char *buf, u_int count, \
300		    long *basep); }
301197	MSTD	{ caddr_t mmap(caddr_t addr, size_t len, int prot, \
302		    int flags, int fd, int pad, off_t pos); }
303198	MSTD	{ int nosys(void); } __syscall __syscall_args int
304199	MSTD	{ off_t lseek(int fd, int pad, off_t offset, int whence); }
305200	MSTD	{ int truncate(char *path, int pad, off_t length); }
306201	MSTD	{ int ftruncate(int fd, int pad, off_t length); }
307202	MSTD	{ int __sysctl(int *name, u_int namelen, void *old, \
308		    size_t *oldlenp, void *new, size_t newlen); } \
309		    __sysctl sysctl_args int
310203	MSTD	{ int mlock(const void *addr, size_t len); }
311204	MSTD	{ int munlock(const void *addr, size_t len); }
312205	MSTD	{ int undelete(char *path); }
313206	MSTD	{ int futimes(int fd, struct timeval *tptr); }
314207	MSTD	{ int getpgid(pid_t pid); }
315208	UNIMPL	newreboot (NetBSD)
316209	MSTD	{ int poll(struct pollfd *fds, u_int nfds, int timeout); }
317
318;
319; The following are reserved for loadable syscalls
320;
321210	NODEF	lkmnosys lkmnosys nosys_args int
322211	NODEF	lkmnosys lkmnosys nosys_args int
323212	NODEF	lkmnosys lkmnosys nosys_args int
324213	NODEF	lkmnosys lkmnosys nosys_args int
325214	NODEF	lkmnosys lkmnosys nosys_args int
326215	NODEF	lkmnosys lkmnosys nosys_args int
327216	NODEF	lkmnosys lkmnosys nosys_args int
328217	NODEF	lkmnosys lkmnosys nosys_args int
329218	NODEF	lkmnosys lkmnosys nosys_args int
330219	NODEF	lkmnosys lkmnosys nosys_args int
331
332;
333; The following were introduced with NetBSD/4.4Lite-2
334; They are initialized by their respective modules/sysinits
335220	MNOSTD	{ int __semctl(int semid, int semnum, int cmd, \
336		    union semun *arg); }
337221	MNOSTD	{ int semget(key_t key, int nsems, int semflg); }
338222	MNOSTD	{ int semop(int semid, struct sembuf *sops, size_t nsops); }
339223	UNIMPL	semconfig
340224	MNOSTD	{ int msgctl(int msqid, int cmd, struct msqid_ds *buf); }
341225	MNOSTD	{ int msgget(key_t key, int msgflg); }
342226	MNOSTD	{ int msgsnd(int msqid, const void *msgp, size_t msgsz, \
343		    int msgflg); }
344227	MNOSTD	{ int msgrcv(int msqid, void *msgp, size_t msgsz, \
345		    long msgtyp, int msgflg); }
346228	MNOSTD	{ int shmat(int shmid, const void *shmaddr, int shmflg); }
347229	MNOSTD	{ int shmctl(int shmid, int cmd, struct shmid_ds *buf); }
348230	MNOSTD	{ int shmdt(const void *shmaddr); }
349231	MNOSTD	{ int shmget(key_t key, size_t size, int shmflg); }
350;
351232	MSTD	{ int clock_gettime(clockid_t clock_id, struct timespec *tp); }
352233	MSTD	{ int clock_settime(clockid_t clock_id, \
353		    const struct timespec *tp); }
354234	MSTD	{ int clock_getres(clockid_t clock_id, struct timespec *tp); }
355235	UNIMPL	timer_create
356236	UNIMPL	timer_delete
357237	UNIMPL	timer_settime
358238	UNIMPL	timer_gettime
359239	UNIMPL	timer_getoverrun
360240	MSTD	{ int nanosleep(const struct timespec *rqtp, \
361		    struct timespec *rmtp); }
362241	UNIMPL	nosys
363242	UNIMPL	nosys
364243	UNIMPL	nosys
365244	UNIMPL	nosys
366245	UNIMPL	nosys
367246	UNIMPL	nosys
368247	UNIMPL	nosys
369248	MSTD	{ int ntp_gettime(struct ntptimeval *ntvp); }
370249	UNIMPL	nosys
371; syscall numbers initially used in OpenBSD
372250	MSTD	{ int minherit(void *addr, size_t len, int inherit); }
373251	MSTD	{ int rfork(int flags); }
374252	MSTD	{ int openbsd_poll(struct pollfd *fds, u_int nfds, \
375		    int timeout); }
376253	MSTD	{ int issetugid(void); }
377254	MSTD	{ int lchown(char *path, int uid, int gid); }
378255	UNIMPL	nosys
379256	UNIMPL	nosys
380257	UNIMPL	nosys
381258	UNIMPL	nosys
382259	UNIMPL	nosys
383260	UNIMPL	nosys
384261	UNIMPL	nosys
385262	UNIMPL	nosys
386263	UNIMPL	nosys
387264	UNIMPL	nosys
388265	UNIMPL	nosys
389266	UNIMPL	nosys
390267	UNIMPL	nosys
391268	UNIMPL	nosys
392269	UNIMPL	nosys
393270	UNIMPL	nosys
394271	UNIMPL	nosys
395272	MSTD	{ int getdents(int fd, char *buf, size_t count); }
396273	UNIMPL	nosys
397274	MSTD	{ int lchmod(char *path, mode_t mode); }
398275	NOPROTO { int lchown(char *path, uid_t uid, gid_t gid); } \
399		    netbsd_lchown lchown_args int
400276	MSTD	{ int lutimes(char *path, struct timeval *tptr); }
401277	MNOPROTO { int msync(void *addr, size_t len, int flags); } \
402		    netbsd_msync msync_args int
403278	MSTD	{ int nstat(char *path, struct nstat *ub); }
404279	MSTD	{ int nfstat(int fd, struct nstat *sb); }
405280	MSTD	{ int nlstat(char *path, struct nstat *ub); }
406281	UNIMPL	nosys
407282	UNIMPL	nosys
408283	UNIMPL	nosys
409284	UNIMPL	nosys
410285	UNIMPL	nosys
411286	UNIMPL	nosys
412287	UNIMPL	nosys
413288	UNIMPL	nosys
414289	UNIMPL	nosys
415290	UNIMPL	nosys
416291	UNIMPL	nosys
417292	UNIMPL	nosys
418293	UNIMPL	nosys
419294	UNIMPL	nosys
420295	UNIMPL	nosys
421296	UNIMPL	nosys
422; XXX 297 is 300 in NetBSD 
423297	MCOMPAT4	{ int fhstatfs(const struct fhandle *u_fhp, \
424		    struct ostatfs *buf); }
425298	MSTD	{ int fhopen(const struct fhandle *u_fhp, int flags); }
426299	MSTD	{ int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
427; syscall numbers for FreeBSD
428300	MSTD	{ int modnext(int modid); }
429301	MSTD	{ int modstat(int modid, struct module_stat* stat); }
430302	MSTD	{ int modfnext(int modid); }
431303	MSTD	{ int modfind(const char *name); }
432304	MSTD	{ int kldload(const char *file); }
433305	MSTD	{ int kldunload(int fileid); }
434306	MSTD	{ int kldfind(const char *file); }
435307	MSTD	{ int kldnext(int fileid); }
436308	MSTD	{ int kldstat(int fileid, struct kld_file_stat* stat); }
437309	MSTD	{ int kldfirstmod(int fileid); }
438310	MSTD	{ int getsid(pid_t pid); }
439311	MSTD	{ int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
440312	MSTD	{ int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
441313	OBSOL	signanosleep
442314	NOSTD	{ int aio_return(struct aiocb *aiocbp); }
443315	NOSTD	{ int aio_suspend(struct aiocb * const * aiocbp, int nent, \
444		    const struct timespec *timeout); }
445316	NOSTD	{ int aio_cancel(int fd, struct aiocb *aiocbp); }
446317	NOSTD	{ int aio_error(struct aiocb *aiocbp); }
447318	NOSTD	{ int aio_read(struct aiocb *aiocbp); }
448319	NOSTD	{ int aio_write(struct aiocb *aiocbp); }
449320	NOSTD	{ int lio_listio(int mode, struct aiocb * const *acb_list, \
450		    int nent, struct sigevent *sig); }
451321	MSTD	{ int yield(void); }
452322	OBSOL	thr_sleep
453323	OBSOL	thr_wakeup
454324	MSTD	{ int mlockall(int how); }
455325	MSTD	{ int munlockall(void); }
456326	MSTD	{ int __getcwd(u_char *buf, u_int buflen); }
457
458327	MSTD	{ int sched_setparam (pid_t pid, \
459		    const struct sched_param *param); }
460328	MSTD	{ int sched_getparam (pid_t pid, struct sched_param *param); }
461
462329	MSTD	{ int sched_setscheduler (pid_t pid, int policy, \
463		    const struct sched_param *param); }
464330	MSTD	{ int sched_getscheduler (pid_t pid); }
465
466331	MSTD	{ int sched_yield (void); }
467332	MSTD	{ int sched_get_priority_max (int policy); }
468333	MSTD	{ int sched_get_priority_min (int policy); }
469334	MSTD	{ int sched_rr_get_interval (pid_t pid, \
470		    struct timespec *interval); }
471335	MSTD	{ int utrace(const void *addr, size_t len); }
472336	MCOMPAT4 { int sendfile(int fd, int s, off_t offset, size_t nbytes, \
473		    struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
474337	MSTD	{ int kldsym(int fileid, int cmd, void *data); }
475338	MSTD	{ int jail(struct jail *jail); }
476339	UNIMPL	pioctl
477340	MSTD	{ int sigprocmask(int how, const sigset_t *set, \
478		    sigset_t *oset); }
479341	MSTD	{ int sigsuspend(const sigset_t *sigmask); }
480342	MCOMPAT4 { int sigaction(int sig, const struct sigaction *act, \
481		    struct sigaction *oact); }
482343	MSTD	{ int sigpending(sigset_t *set); }
483344	MCOMPAT4 { int sigreturn(const struct ucontext4 *sigcntxp); }
484345	MSTD	{ int sigtimedwait(const sigset_t *set, \
485		    siginfo_t *info, const struct timespec *timeout); }
486346	MSTD	{ int sigwaitinfo(const sigset_t *set, siginfo_t *info); }
487347	MSTD	{ int __acl_get_file(const char *path, \
488		    acl_type_t type, struct acl *aclp); }
489348	MSTD	{ int __acl_set_file(const char *path, \
490		    acl_type_t type, struct acl *aclp); }
491349	MSTD	{ int __acl_get_fd(int filedes, acl_type_t type, \
492		    struct acl *aclp); }
493350	MSTD	{ int __acl_set_fd(int filedes, acl_type_t type, \
494		    struct acl *aclp); }
495351	MSTD	{ int __acl_delete_file(const char *path, acl_type_t type); }
496352	MSTD	{ int __acl_delete_fd(int filedes, acl_type_t type); }
497353	MSTD	{ int __acl_aclcheck_file(const char *path, \
498		    acl_type_t type, struct acl *aclp); }
499354	MSTD	{ int __acl_aclcheck_fd(int filedes, acl_type_t type, \
500		    struct acl *aclp); }
501355	STD	{ int extattrctl(const char *path, int cmd, \
502		    const char *filename, int attrnamespace, \
503		    const char *attrname); }
504356	STD	{ int extattr_set_file(const char *path, \
505		    int attrnamespace, const char *attrname, \
506		    void *data, size_t nbytes); }
507357	STD	{ ssize_t extattr_get_file(const char *path, \
508		    int attrnamespace, const char *attrname, \
509		    void *data, size_t nbytes); }
510358	STD	{ int extattr_delete_file(const char *path, \
511		    int attrnamespace, const char *attrname); }
512359	NOSTD	{ int aio_waitcomplete(struct aiocb **aiocbp, \
513		    struct timespec *timeout); }
514360	MSTD	{ int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
515361	MSTD	{ int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
516362	MSTD	{ int kqueue(void); }
517363	MSTD	{ int kevent(int fd, \
518		    struct kevent *changelist, int nchanges, \
519		    struct kevent *eventlist, int nevents, \
520		    const struct timespec *timeout); }
521364	UNIMPL	__cap_get_proc
522365	UNIMPL	__cap_set_proc
523366	UNIMPL	__cap_get_fd
524367	UNIMPL	__cap_get_file
525368	UNIMPL	__cap_set_fd
526369	UNIMPL	__cap_set_file
527370	NODEF	lkmressys lkmressys nosys_args int
528371	STD	{ int extattr_set_fd(int fd, int attrnamespace, \
529		    const char *attrname, void *data, \
530		    size_t nbytes); }
531372	STD	{ ssize_t extattr_get_fd(int fd, int attrnamespace, \
532		    const char *attrname, void *data, size_t nbytes); }
533373	STD	{ int extattr_delete_fd(int fd, int attrnamespace, \
534		    const char *attrname); }
535374	MSTD	{ int __setugid(int flag); }
536375	NOIMPL	{ int nfsclnt(int flag, caddr_t argp); }
537376	MSTD	{ int eaccess(char *path, int flags); }
538377	UNIMPL	afs_syscall
539378	STD	{ int nmount(struct iovec *iovp, unsigned int iovcnt, \
540		    int flags); }
541379	MSTD	{ int kse_exit(void); }
542380	MSTD	{ int kse_wakeup(struct kse_mailbox *mbx); }
543381	MSTD	{ int kse_create(struct kse_mailbox *mbx, \
544		    int newgroup); }
545382	MSTD	{ int kse_thr_interrupt(struct kse_thr_mailbox *tmbx, int cmd, \
546		    long data); }
547383	MSTD	{ int kse_release(struct timespec *timeout); }
548384	MSTD	{ int __mac_get_proc(struct mac *mac_p); }
549385	MSTD	{ int __mac_set_proc(struct mac *mac_p); }
550386	MSTD	{ int __mac_get_fd(int fd, struct mac *mac_p); }
551387	MSTD	{ int __mac_get_file(const char *path_p, \
552		    struct mac *mac_p); }
553388	MSTD	{ int __mac_set_fd(int fd, struct mac *mac_p); }
554389	MSTD	{ int __mac_set_file(const char *path_p, \
555		    struct mac *mac_p); }
556390	MSTD	{ int kenv(int what, const char *name, char *value, \
557		    int len); }
558391	MSTD	{ int lchflags(const char *path, int flags); }
559392	MSTD	{ int uuidgen(struct uuid *store, int count); }
560393	MSTD	{ int sendfile(int fd, int s, off_t offset, size_t nbytes, \
561		    struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
562394	MSTD	{ int mac_syscall(const char *policy, int call, \
563		    void *arg); }
564395	MSTD	{ int getfsstat(struct statfs *buf, long bufsize, \
565		    int flags); }
566396	MSTD	{ int statfs(char *path, struct statfs *buf); }
567397	MSTD	{ int fstatfs(int fd, struct statfs *buf); }
568398	MSTD	{ int fhstatfs(const struct fhandle *u_fhp, \
569		    struct statfs *buf); }
570399	UNIMPL	nosys
571400	MNOSTD	{ int ksem_close(semid_t id); }
572401	MNOSTD	{ int ksem_post(semid_t id); }
573402	MNOSTD	{ int ksem_wait(semid_t id); }
574403	MNOSTD	{ int ksem_trywait(semid_t id); }
575404	MNOSTD	{ int ksem_init(semid_t *idp, unsigned int value); }
576405	MNOSTD	{ int ksem_open(semid_t *idp, const char *name, \
577		    int oflag, mode_t mode, unsigned int value); }
578406	MNOSTD	{ int ksem_unlink(const char *name); }
579407	MNOSTD	{ int ksem_getvalue(semid_t id, int *val); }
580408	MNOSTD	{ int ksem_destroy(semid_t id); }
581409	MSTD	{ int __mac_get_pid(pid_t pid, struct mac *mac_p); }
582410	MSTD	{ int __mac_get_link(const char *path_p, \
583		    struct mac *mac_p); }
584411	MSTD	{ int __mac_set_link(const char *path_p, \
585		    struct mac *mac_p); }
586412	STD	{ int extattr_set_link(const char *path, \
587		    int attrnamespace, const char *attrname, \
588		    void *data, size_t nbytes); }
589413	STD	{ ssize_t extattr_get_link(const char *path, \
590		    int attrnamespace, const char *attrname, \
591		    void *data, size_t nbytes); }
592414	STD	{ int extattr_delete_link(const char *path, \
593		    int attrnamespace, const char *attrname); }
594415	MSTD	{ int __mac_execve(char *fname, char **argv, \
595		    char **envv, struct mac *mac_p); }
596416	MSTD	{ int sigaction(int sig, const struct sigaction *act, \
597		    struct sigaction *oact); }
598417	MSTD	{ int sigreturn(const struct __ucontext *sigcntxp); }
599418	UNIMPL	__xstat
600419	UNIMPL	__xfstat
601420	UNIMPL	__xlstat
602421	MSTD	{ int getcontext(struct __ucontext *ucp); }
603422	MSTD	{ int setcontext(const struct __ucontext *ucp); }
604423	MSTD	{ int swapcontext(struct __ucontext *oucp, \
605		    const struct __ucontext *ucp); }
606424	MSTD	{ int swapoff(const char *name); }
607425	MSTD	{ int __acl_get_link(const char *path, \
608		    acl_type_t type, struct acl *aclp); }
609426	MSTD	{ int __acl_set_link(const char *path, \
610		    acl_type_t type, struct acl *aclp); }
611427	MSTD	{ int __acl_delete_link(const char *path, \
612		    acl_type_t type); }
613428	MSTD	{ int __acl_aclcheck_link(const char *path, \
614		    acl_type_t type, struct acl *aclp); }
615429	MSTD	{ int sigwait(const sigset_t *set, int *sig); }
616430	MSTD	{ int thr_create(ucontext_t *ctx, long *id, int flags); }
617431	MSTD	{ void thr_exit(long *state); }
618432	MSTD	{ int thr_self(long *id); }
619433	MSTD	{ int thr_kill(long id, int sig); }
620434	MSTD	{ int _umtx_lock(struct umtx *umtx); }
621435	MSTD	{ int _umtx_unlock(struct umtx *umtx); }
622436	MSTD	{ int jail_attach(int jid); }
623437	STD	{ ssize_t extattr_list_fd(int fd, int attrnamespace, \
624		    void *data, size_t nbytes); }
625438	STD	{ ssize_t extattr_list_file(const char *path, \
626		    int attrnamespace, void *data, size_t nbytes); }
627439	STD	{ ssize_t extattr_list_link(const char *path, \
628		    int attrnamespace, void *data, size_t nbytes); }
629440	MSTD	{ int kse_switchin(struct kse_thr_mailbox *tmbx, \
630		    int flags); }
631441	MNOSTD	{ int ksem_timedwait(semid_t id, struct timespec *abstime); }
632442	MSTD	{ int thr_suspend(const struct timespec *timeout); }
633443	MSTD	{ int thr_wake(long id); }
634444	MSTD	{ int kldunloadf(int fileid, int flags); }
635445	MNOSTD	{ int audit(const void *record, u_int length); }
636446	MNOSTD	{ int auditon(int cmd, void *data, u_int length); }
637447	MNOSTD	{ int getauid(uid_t *auid); }
638448	MNOSTD	{ int setauid(uid_t *auid); }
639449	MNOSTD	{ int getaudit(struct auditinfo *auditinfo); }
640450	MNOSTD	{ int setaudit(struct auditinfo *auditinfo); }
641451	MNOSTD	{ int getaudit_addr(struct auditinfo_addr \
642		    *auditinfo_addr, u_int length); }
643452	MNOSTD	{ int setaudit_addr(struct auditinfo_addr \
644		    *auditinfo_addr, u_int length); }
645453	MNOSTD	{ int auditctl(int cmd, char *path); }
646454	MSTD	{ int _umtx_op(struct umtx *umtx, int op, long id, void *uaddr,\
647		    void *uaddr2); }
648455	MSTD	{ int thr_new(struct thr_param *param, int param_size); }
649
650; Please copy any additions and changes to the following compatability tables:
651; sys/compat/freebsd32/syscalls.master
652