syscalls.master revision 45311
11556Srgrimes	$Id: syscalls.master,v 1.56 1999/03/27 21:16:33 alc Exp $
21556Srgrimes;	from: @(#)syscalls.master	8.2 (Berkeley) 1/13/94
31556Srgrimes;
41556Srgrimes; System call name/number master file.
51556Srgrimes; Processed to created init_sysent.c, syscalls.c and syscall.h.
61556Srgrimes
71556Srgrimes; Columns: number type nargs namespc name alt{name,tag,rtyp}/comments
81556Srgrimes;	number	system call number, must be in order
91556Srgrimes;	type	one of STD, OBSOL, UNIMPL, COMPAT
101556Srgrimes;	namespc one of POSIX, BSD, NOHIDE
111556Srgrimes;	name	psuedo-prototype of syscall routine
121556Srgrimes;		If one of the following alts is different, then all appear:
131556Srgrimes;	altname	name of system call if different
141556Srgrimes;	alttag	name of args struct tag if different from [o]`name'"_args"
151556Srgrimes;	altrtyp	return type if not int (bogus - syscalls always return int)
161556Srgrimes;		for UNIMPL/OBSOL, name continues with comments
171556Srgrimes
181556Srgrimes; types:
191556Srgrimes;	STD	always included
201556Srgrimes;	COMPAT	included on COMPAT #ifdef
211556Srgrimes;	LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h
221556Srgrimes;	OBSOL	obsolete, not included in system, only specifies name
231556Srgrimes;	UNIMPL	not implemented, placeholder only
241556Srgrimes
251556Srgrimes; #ifdef's, etc. may be included, and are copied to the output files.
261556Srgrimes
271556Srgrimes#include <sys/param.h>
281556Srgrimes#include <sys/sysent.h>
291556Srgrimes#include <sys/sysproto.h>
301556Srgrimes
311556Srgrimes; Reserved/unimplemented system calls in the range 0-150 inclusive
321556Srgrimes; are reserved for use in future Berkeley releases.
331556Srgrimes; Additional system calls implemented in vendor and other
341556Srgrimes; redistributions should be placed in the reserved range at the end
351556Srgrimes; of the current calls.
361556Srgrimes
371556Srgrimes0	STD	NOHIDE	{ int nosys(void); } syscall nosys_args int
3820420Ssteve1	STD	NOHIDE	{ void exit(int rval); } exit rexit_args void
391556Srgrimes2	STD	POSIX	{ int fork(void); }
401556Srgrimes3	STD	POSIX	{ ssize_t read(int fd, void *buf, size_t nbyte); }
411556Srgrimes4	STD	POSIX	{ ssize_t write(int fd, const void *buf, size_t nbyte); }
421556Srgrimes5	STD	POSIX	{ int open(char *path, int flags, int mode); }
431556Srgrimes; XXX should be		{ int open(const char *path, int flags, ...); }
4436049Scharnier; but we're not ready for `const' or varargs.
4536049Scharnier; XXX man page says `mode_t mode'.
4636049Scharnier6	STD	POSIX	{ int close(int fd); }
471556Srgrimes7	STD	BSD	{ int wait4(int pid, int *status, int options, \
4892974Sobrien			    struct rusage *rusage); } wait4 wait_args int
4992974Sobrien8	COMPAT	BSD	{ int creat(char *path, int mode); }
501556Srgrimes9	STD	POSIX	{ int link(char *path, char *link); }
511556Srgrimes10	STD	POSIX	{ int unlink(char *path); }
521556Srgrimes11	OBSOL	NOHIDE	execv
531556Srgrimes12	STD	POSIX	{ int chdir(char *path); }
541556Srgrimes13	STD	BSD	{ int fchdir(int fd); }
5531664Seivind14	STD	POSIX	{ int mknod(char *path, int mode, int dev); }
561556Srgrimes15	STD	POSIX	{ int chmod(char *path, int mode); }
571556Srgrimes16	STD	POSIX	{ int chown(char *path, int uid, int gid); }
581556Srgrimes17	STD	BSD	{ int obreak(char *nsize); } break obreak_args int
591556Srgrimes18	STD	BSD	{ int getfsstat(struct statfs *buf, long bufsize, \
6090644Simp			    int flags); }
6177409Simp19	COMPAT	POSIX	{ long lseek(int fd, long offset, int whence); }
6290644Simp20	STD	POSIX	{ pid_t getpid(void); }
631556Srgrimes21	STD	BSD	{ int mount(char *type, char *path, int flags, \
641556Srgrimes			    caddr_t data); }
651556Srgrimes; XXX 4.4lite2 uses `char *type' but we're not ready for that.
6650544Smharo; XXX `path' should have type `const char *' but we're not ready for that.
671556Srgrimes22	STD	BSD	{ int unmount(char *path, int flags); }
681556Srgrimes23	STD	POSIX	{ int setuid(uid_t uid); }
691556Srgrimes24	STD	POSIX	{ uid_t getuid(void); }
701556Srgrimes25	STD	POSIX	{ uid_t geteuid(void); }
7192935Sobrien26	STD	BSD	{ int ptrace(int req, pid_t pid, caddr_t addr, \
721556Srgrimes			    int data); }
7390110Simp27	STD	BSD	{ int recvmsg(int s, struct msghdr *msg, int flags); }
7490110Simp28	STD	BSD	{ int sendmsg(int s, caddr_t msg, int flags); }
7590110Simp29	STD	BSD	{ int recvfrom(int s, caddr_t buf, size_t len, \
7690110Simp			    int flags, caddr_t from, int *fromlenaddr); }
771556Srgrimes30	STD	BSD	{ int accept(int s, caddr_t name, int *anamelen); }
781556Srgrimes31	STD	BSD	{ int getpeername(int fdes, caddr_t asa, int *alen); }
7990110Simp32	STD	BSD	{ int getsockname(int fdes, caddr_t asa, int *alen); }
801556Srgrimes33	STD	POSIX	{ int access(char *path, int flags); }
8191085Smarkm34	STD	BSD	{ int chflags(char *path, int flags); }
8291085Smarkm35	STD	BSD	{ int fchflags(int fd, int flags); }
8390114Simp36	STD	BSD	{ int sync(void); }
841556Srgrimes37	STD	POSIX	{ int kill(int pid, int signum); }
851556Srgrimes38	COMPAT	POSIX	{ int stat(char *path, struct ostat *ub); }
8677409Simp39	STD	POSIX	{ pid_t getppid(void); }
871556Srgrimes40	COMPAT	POSIX	{ int lstat(char *path, struct ostat *ub); }
8892935Sobrien41	STD	POSIX	{ int dup(u_int fd); }
891556Srgrimes42	STD	POSIX	{ int pipe(void); }
901556Srgrimes43	STD	POSIX	{ gid_t getegid(void); }
9114154Swosch44	STD	BSD	{ int profil(caddr_t samples, size_t size, \
9292935Sobrien			    size_t offset, u_int scale); }
931556Srgrimes45	STD	BSD	{ int ktrace(char *fname, int ops, int facs, \
941556Srgrimes			    int pid); }
951556Srgrimes46	STD	POSIX	{ int sigaction(int signum, struct sigaction *nsa, \
9692935Sobrien			    struct sigaction *osa); }
971556Srgrimes47	STD	POSIX	{ gid_t getgid(void); }
9892935Sobrien48	STD	POSIX	{ int sigprocmask(int how, sigset_t mask); }
9992935Sobrien; XXX note nonstandard (bogus) calling convention - the libc stub passes
10092935Sobrien; us the mask, not a pointer to it, and we return the old mask as the
10192935Sobrien; (int) return value.
10250544Smharo49	STD	BSD	{ int getlogin(char *namebuf, u_int namelen); }
10350544Smharo50	STD	BSD	{ int setlogin(char *namebuf); }
10450544Smharo51	STD	BSD	{ int acct(char *path); }
1051556Srgrimes52	STD	POSIX	{ int sigpending(void); }
1061556Srgrimes53	STD	BSD	{ int sigaltstack(struct sigaltstack *nss, \
1071556Srgrimes			    struct sigaltstack *oss); }
10814305Swosch54	STD	POSIX	{ int ioctl(int fd, u_long com, caddr_t data); }
1091556Srgrimes55	STD	BSD	{ int reboot(int opt); }
1101556Srgrimes56	STD	POSIX	{ int revoke(char *path); }
1111556Srgrimes57	STD	POSIX	{ int symlink(char *path, char *link); }
1121556Srgrimes58	STD	POSIX	{ int readlink(char *path, char *buf, int count); }
1131556Srgrimes59	STD	POSIX	{ int execve(char *fname, char **argv, char **envv); }
1141556Srgrimes60	STD	POSIX	{ int umask(int newmask); } umask umask_args int
1151556Srgrimes61	STD	BSD	{ int chroot(char *path); }
1161556Srgrimes62	COMPAT	POSIX	{ int fstat(int fd, struct ostat *sb); }
1171556Srgrimes63	COMPAT	BSD	{ int getkerninfo(int op, char *where, size_t *size, \
1181556Srgrimes			    int arg); } getkerninfo getkerninfo_args int
1191556Srgrimes64	COMPAT	BSD	{ int getpagesize(void); } \
1201556Srgrimes			    getpagesize getpagesize_args int
1211556Srgrimes65	STD	BSD	{ int msync(void *addr, size_t len, int flags); }
1221556Srgrimes66	STD	BSD	{ int vfork(void); }
1231556Srgrimes67	OBSOL	NOHIDE	vread
1241556Srgrimes68	OBSOL	NOHIDE	vwrite
12536785Simp69	STD	BSD	{ int sbrk(int incr); }
12636785Simp70	STD	BSD	{ int sstk(int incr); }
1271556Srgrimes71	COMPAT	BSD	{ int mmap(void *addr, int len, int prot, \
1281556Srgrimes			    int flags, int fd, long pos); }
1291556Srgrimes72	STD	BSD	{ int ovadvise(int anom); } vadvise ovadvise_args int
13036383Ssteve73	STD	BSD	{ int munmap(void *addr, size_t len); }
13136383Ssteve74	STD	BSD	{ int mprotect(const void *addr, size_t len, int prot); }
13236383Ssteve75	STD	BSD	{ int madvise(void *addr, size_t len, int behav); }
13336383Ssteve76	OBSOL	NOHIDE	vhangup
1341556Srgrimes77	OBSOL	NOHIDE	vlimit
13511298Sbde78	STD	BSD	{ int mincore(const void *addr, size_t len, \
13611298Sbde			    char *vec); }
13711298Sbde79	STD	POSIX	{ int getgroups(u_int gidsetsize, gid_t *gidset); }
13811298Sbde80	STD	POSIX	{ int setgroups(u_int gidsetsize, gid_t *gidset); }
13911298Sbde81	STD	POSIX	{ int getpgrp(void); }
14011298Sbde82	STD	POSIX	{ int setpgid(int pid, int pgid); }
14111298Sbde83	STD	BSD	{ int setitimer(u_int which, struct itimerval *itv, \
14211298Sbde			    struct itimerval *oitv); }
14311298Sbde84	COMPAT	BSD	{ int wait(void); }
14411298Sbde85	STD	BSD	{ int swapon(char *name); }
14577409Simp86	STD	BSD	{ int getitimer(u_int which, struct itimerval *itv); }
1461556Srgrimes87	COMPAT	BSD	{ int gethostname(char *hostname, u_int len); } \
1471556Srgrimes			    gethostname gethostname_args int
1481556Srgrimes88	COMPAT	BSD	{ int sethostname(char *hostname, u_int len); } \
14976878Skris			    sethostname sethostname_args int
1501556Srgrimes89	STD	BSD	{ int getdtablesize(void); }
1511556Srgrimes90	STD	POSIX	{ int dup2(u_int from, u_int to); }
1521556Srgrimes91	UNIMPL	BSD	getdopt
1531556Srgrimes92	STD	POSIX	{ int fcntl(int fd, int cmd, long arg); }
1541556Srgrimes; XXX should be		{ int fcntl(int fd, int cmd, ...); }
1551556Srgrimes; but we're not ready for varargs.
1561556Srgrimes; XXX man page says `int arg' too.
1571556Srgrimes93	STD	BSD	{ int select(int nd, fd_set *in, fd_set *ou, \
15890110Simp			    fd_set *ex, struct timeval *tv); }
1591556Srgrimes94	UNIMPL	BSD	setdopt
1601556Srgrimes95	STD	POSIX	{ int fsync(int fd); }
16129933Swosch96	STD	BSD	{ int setpriority(int which, int who, int prio); }
1621556Srgrimes97	STD	BSD	{ int socket(int domain, int type, int protocol); }
1631556Srgrimes98	STD	BSD	{ int connect(int s, caddr_t name, int namelen); }
1641556Srgrimes99	CPT_NOA	BSD	{ int accept(int s, caddr_t name, int *anamelen); } \
1651556Srgrimes			    accept accept_args int
1661556Srgrimes100	STD	BSD	{ int getpriority(int which, int who); }
1671556Srgrimes101	COMPAT	BSD	{ int send(int s, caddr_t buf, int len, int flags); }
1681556Srgrimes102	COMPAT	BSD	{ int recv(int s, caddr_t buf, int len, int flags); }
1691556Srgrimes103	STD	BSD	{ int sigreturn(struct sigcontext *sigcntxp); }
17014166Swosch104	STD	BSD	{ int bind(int s, caddr_t name, int namelen); }
17114166Swosch105	STD	BSD	{ int setsockopt(int s, int level, int name, \
17214166Swosch			    caddr_t val, int valsize); }
17314305Swosch106	STD	BSD	{ int listen(int s, int backlog); }
17414305Swosch107	OBSOL	NOHIDE	vtimes
17514166Swosch108	COMPAT	BSD	{ int sigvec(int signum, struct sigvec *nsv, \
17630106Swosch			    struct sigvec *osv); }
17730106Swosch109	COMPAT	BSD	{ int sigblock(int mask); }
1781556Srgrimes110	COMPAT	BSD	{ int sigsetmask(int mask); }
17992935Sobrien111	STD	POSIX	{ int sigsuspend(sigset_t mask); }
18092935Sobrien; XXX note nonstandard (bogus) calling convention - the libc stub passes
18192935Sobrien; us the mask, not a pointer to it.
18292935Sobrien112	COMPAT	BSD	{ int sigstack(struct sigstack *nss, \
18392935Sobrien			    struct sigstack *oss); }
18430106Swosch113	COMPAT	BSD	{ int recvmsg(int s, struct omsghdr *msg, int flags); }
1851556Srgrimes114	COMPAT	BSD	{ int sendmsg(int s, caddr_t msg, int flags); }
1861556Srgrimes115	OBSOL	NOHIDE	vtrace
1871556Srgrimes116	STD	BSD	{ int gettimeofday(struct timeval *tp, \
18830106Swosch			    struct timezone *tzp); }
1891556Srgrimes117	STD	BSD	{ int getrusage(int who, struct rusage *rusage); }
19076878Skris118	STD	BSD	{ int getsockopt(int s, int level, int name, \
19176878Skris			    caddr_t val, int *avalsize); }
1921556Srgrimes119	UNIMPL	NOHIDE	resuba (BSD/OS 2.x)
1931556Srgrimes120	STD	BSD	{ int readv(int fd, struct iovec *iovp, u_int iovcnt); }
1941556Srgrimes121	STD	BSD	{ int writev(int fd, struct iovec *iovp, \
19529933Swosch			    u_int iovcnt); }
19629933Swosch122	STD	BSD	{ int settimeofday(struct timeval *tv, \
19729933Swosch			    struct timezone *tzp); }
19830106Swosch123	STD	BSD	{ int fchown(int fd, int uid, int gid); }
19930106Swosch124	STD	BSD	{ int fchmod(int fd, int mode); }
2001556Srgrimes125	CPT_NOA	BSD	{ int recvfrom(int s, caddr_t buf, size_t len, \
20130106Swosch			    int flags, caddr_t from, int *fromlenaddr); } \
2021556Srgrimes			    recvfrom recvfrom_args int
2031556Srgrimes126	STD	BSD	{ int setreuid(int ruid, int euid); }
20450544Smharo127	STD	BSD	{ int setregid(int rgid, int egid); }
20550544Smharo128	STD	POSIX	{ int rename(char *from, char *to); }
20650544Smharo129	COMPAT	BSD	{ int truncate(char *path, long length); }
2071556Srgrimes130	COMPAT	BSD	{ int ftruncate(int fd, long length); }
20850544Smharo131	STD	BSD	{ int flock(int fd, int how); }
2091556Srgrimes132	STD	POSIX	{ int mkfifo(char *path, int mode); }
21031664Seivind133	STD	BSD	{ int sendto(int s, caddr_t buf, size_t len, \
21131664Seivind			    int flags, caddr_t to, int tolen); }
21277409Simp134	STD	BSD	{ int shutdown(int s, int how); }
21331664Seivind135	STD	BSD	{ int socketpair(int domain, int type, int protocol, \
21431664Seivind			    int *rsv); }
21531664Seivind136	STD	POSIX	{ int mkdir(char *path, int mode); }
21631664Seivind137	STD	POSIX	{ int rmdir(char *path); }
21731664Seivind138	STD	BSD	{ int utimes(char *path, struct timeval *tptr); }
21831664Seivind139	OBSOL	NOHIDE	4.2 sigreturn
21931664Seivind140	STD	BSD	{ int adjtime(struct timeval *delta, \
22031664Seivind			    struct timeval *olddelta); }
22131664Seivind141	COMPAT	BSD	{ int getpeername(int fdes, caddr_t asa, int *alen); }
22231664Seivind142	COMPAT	BSD	{ long gethostid(void); }
22331664Seivind143	COMPAT	BSD	{ int sethostid(long hostid); }
2241556Srgrimes144	COMPAT	BSD	{ int getrlimit(u_int which, struct ogetrlimit *rlp); }
2251556Srgrimes145	COMPAT	BSD	{ int setrlimit(u_int which, struct ogetrlimit *rlp); }
2261556Srgrimes146	COMPAT	BSD	{ int killpg(int pgid, int signum); }
2271556Srgrimes147	STD	POSIX	{ int setsid(void); }
2281556Srgrimes148	STD	BSD	{ int quotactl(char *path, int cmd, int uid, \
2291556Srgrimes			    caddr_t arg); }
2301556Srgrimes149	COMPAT	BSD	{ int quota(void); }
2311556Srgrimes150	CPT_NOA	BSD	{ int getsockname(int fdec, caddr_t asa, int *alen); }\
2321556Srgrimes			    getsockname getsockname_args int
23362963Sdwmalone
2341556Srgrimes; Syscalls 151-180 inclusive are reserved for vendor-specific
2351556Srgrimes; system calls.  (This includes various calls added for compatibity
2361556Srgrimes; with other Unix variants.)
2371556Srgrimes; Some of these calls are now supported by BSD...
2381556Srgrimes151	UNIMPL	NOHIDE	sem_lock (BSD/OS 2.x)
2391556Srgrimes152	UNIMPL	NOHIDE	sem_wakeup (BSD/OS 2.x)
2401556Srgrimes153	UNIMPL	NOHIDE	asyncdaemon (BSD/OS 2.x)
2411556Srgrimes154	UNIMPL	NOHIDE	nosys
24290110Simp; 155 is initialized by the NFS code, if present.
2431556Srgrimes155	NOIMPL	BSD	{ int nfssvc(int flag, caddr_t argp); }
2441556Srgrimes156	COMPAT	BSD	{ int getdirentries(int fd, char *buf, u_int count, \
2451556Srgrimes			    long *basep); }
2461556Srgrimes157	STD	BSD	{ int statfs(char *path, struct statfs *buf); }
24723525Sguido158	STD	BSD	{ int fstatfs(int fd, struct statfs *buf); }
24890114Simp159	UNIMPL	NOHIDE	nosys
2491556Srgrimes160	UNIMPL	NOHIDE	nosys
2501556Srgrimes; 161 is initialized by the NFS code, if present.
2511556Srgrimes161	NOIMPL	BSD	{ int getfh(char *fname, struct fhandle *fhp); }
2521556Srgrimes162	STD	BSD	{ int getdomainname(char *domainname, int len); }
2531556Srgrimes163	STD	BSD	{ int setdomainname(char *domainname, int len); }
25423525Sguido164	STD	BSD	{ int uname(struct utsname *name); }
25523525Sguido165	STD	BSD	{ int sysarch(int op, char *parms); }
25623525Sguido166	STD	BSD	{ int rtprio(int function, pid_t pid, \
25776878Skris			    struct rtprio *rtp); }
25823525Sguido167	UNIMPL	NOHIDE	nosys
25923525Sguido168	UNIMPL	NOHIDE	nosys
26023525Sguido169	STD	BSD	{ int semsys(int which, int a2, int a3, int a4, \
26123525Sguido			    int a5); }
26223525Sguido; XXX should be		{ int semsys(int which, ...); }
26323525Sguido170	STD	BSD	{ int msgsys(int which, int a2, int a3, int a4, \
26423525Sguido			    int a5, int a6); }
26523525Sguido; XXX should be		{ int msgsys(int which, ...); }
26623525Sguido171	STD	BSD	{ int shmsys(int which, int a2, int a3, int a4); }
26723525Sguido; XXX should be		{ int shmsys(int which, ...); }
2681556Srgrimes172	UNIMPL	NOHIDE	nosys
2691556Srgrimes173	STD	POSIX	{ ssize_t pread(int fd, void *buf, size_t nbyte, \
2701556Srgrimes			    int pad, off_t offset); }
2711556Srgrimes174	STD	POSIX	{ ssize_t pwrite(int fd, const void *buf, \
27276878Skris			    size_t nbyte, int pad, off_t offset); }
27376878Skris175	UNIMPL	NOHIDE	nosys
2741556Srgrimes176	STD	BSD	{ int ntp_adjtime(struct timex *tp); }
2751556Srgrimes177	UNIMPL	NOHIDE	sfork (BSD/OS 2.x)
2761556Srgrimes178	UNIMPL	NOHIDE	getdescriptor (BSD/OS 2.x)
2771556Srgrimes179	UNIMPL	NOHIDE	setdescriptor (BSD/OS 2.x)
2781556Srgrimes180	UNIMPL	NOHIDE	nosys
2791556Srgrimes
2801556Srgrimes; Syscalls 180-199 are used by/reserved for BSD
2811556Srgrimes181	STD	POSIX	{ int setgid(gid_t gid); }
2821556Srgrimes182	STD	BSD	{ int setegid(gid_t egid); }
2831556Srgrimes183	STD	BSD	{ int seteuid(uid_t euid); }
2841556Srgrimes184	UNIMPL	BSD	lfs_bmapv
2851556Srgrimes185	UNIMPL	BSD	lfs_markv
2861556Srgrimes186	UNIMPL	BSD	lfs_segclean
28723525Sguido187	UNIMPL	BSD	lfs_segwait
28823525Sguido188	STD	POSIX	{ int stat(char *path, struct stat *ub); }
28937245Sbde189	STD	POSIX	{ int fstat(int fd, struct stat *sb); }
29037245Sbde190	STD	POSIX	{ int lstat(char *path, struct stat *ub); }
29123525Sguido191	STD	POSIX	{ int pathconf(char *path, int name); }
29223525Sguido192	STD	POSIX	{ int fpathconf(int fd, int name); }
29323525Sguido193	UNIMPL	NOHIDE	nosys
29423525Sguido194	STD	BSD	{ int getrlimit(u_int which, \
29523525Sguido			    struct orlimit *rlp); } \
29623525Sguido			    getrlimit __getrlimit_args int
29723525Sguido195	STD	BSD	{ int setrlimit(u_int which, \
2981556Srgrimes			    struct orlimit *rlp); } \
29923525Sguido			    setrlimit __setrlimit_args int
30063680Ssada196	STD	BSD	{ int getdirentries(int fd, char *buf, u_int count, \
30163680Ssada			    long *basep); }
30263680Ssada197	STD	BSD	{ caddr_t mmap(caddr_t addr, size_t len, int prot, \
30363680Ssada			    int flags, int fd, long pad, off_t pos); }
30463680Ssada198	STD	NOHIDE	{ int nosys(void); } __syscall __syscall_args int
30563680Ssada199	STD	POSIX	{ off_t lseek(int fd, int pad, off_t offset, \
30663680Ssada			    int whence); }
30763680Ssada200	STD	BSD	{ int truncate(char *path, int pad, off_t length); }
30876878Skris201	STD	BSD	{ int ftruncate(int fd, int pad, off_t length); }
30963680Ssada202	STD	BSD	{ int __sysctl(int *name, u_int namelen, void *old, \
31063680Ssada			    size_t *oldlenp, void *new, size_t newlen); } \
3111556Srgrimes			    __sysctl sysctl_args int
3121556Srgrimes; properly, __sysctl should be a NOHIDE, but making an exception
3131556Srgrimes; here allows to avoid one in libc/sys/Makefile.inc.
3141556Srgrimes203	STD	BSD	{ int mlock(const void *addr, size_t len); }
3151556Srgrimes204	STD	BSD	{ int munlock(const void *addr, size_t len); }
3161556Srgrimes205	STD	BSD	{ int undelete(char *path); }
3171556Srgrimes206	STD	BSD	{ int futimes(int fd, struct timeval *tptr); }
3181556Srgrimes207	STD	BSD	{ int getpgid(pid_t pid); }
3191556Srgrimes208	UNIMPL	NOHIDE	newreboot (NetBSD)
3201556Srgrimes209	STD	BSD	{ int poll(struct pollfd *fds, u_int nfds, \
3211556Srgrimes			    int timeout); }
3221556Srgrimes
3231556Srgrimes;
3241556Srgrimes; The following are reserved for loadable syscalls
3251556Srgrimes;
3261556Srgrimes210	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
32750544Smharo211	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
32850544Smharo212	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
3291556Srgrimes213	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
3301556Srgrimes214	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
3311556Srgrimes215	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
3321556Srgrimes216	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
33390110Simp217	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
3341556Srgrimes218	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
3351556Srgrimes219	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
3361556Srgrimes
33740301Sdes;
33879452Sbrian; The following were introduced with NetBSD/4.4Lite-2
33979452Sbrian;
3401556Srgrimes220	STD	BSD	{ int __semctl(int semid, int semnum, int cmd, \
3411556Srgrimes			    union semun *arg); }
3421556Srgrimes221	STD	BSD	{ int semget(key_t key, int nsems, int semflg); }
3431556Srgrimes222	STD	BSD	{ int semop(int semid, struct sembuf *sops, \
3441556Srgrimes			    u_int nsops); }
3451556Srgrimes223	STD	BSD	{ int semconfig(int flag); }
3461556Srgrimes224	STD	BSD	{ int msgctl(int msqid, int cmd, \
3471556Srgrimes			    struct msqid_ds *buf); }
3481556Srgrimes225	STD	BSD	{ int msgget(key_t key, int msgflg); }
3491556Srgrimes226	STD	BSD	{ int msgsnd(int msqid, void *msgp, size_t msgsz, \
3501556Srgrimes			    int msgflg); }
3511556Srgrimes227	STD	BSD	{ int msgrcv(int msqid, void *msgp, size_t msgsz, \
3521556Srgrimes			    long msgtyp, int msgflg); }
3531556Srgrimes228	STD	BSD	{ int shmat(int shmid, void *shmaddr, int shmflg); }
3541556Srgrimes229	STD	BSD	{ int shmctl(int shmid, int cmd, \
3551556Srgrimes			    struct shmid_ds *buf); }
3561556Srgrimes230	STD	BSD	{ int shmdt(void *shmaddr); }
35779452Sbrian231	STD	BSD	{ int shmget(key_t key, int size, int shmflg); }
3581556Srgrimes;
3591556Srgrimes232	STD	POSIX	{ int clock_gettime(clockid_t clock_id, \
3601556Srgrimes			    struct timespec *tp); }
3611556Srgrimes233	STD	POSIX	{ int clock_settime(clockid_t clock_id, \
3621556Srgrimes			    const struct timespec *tp); }
3631556Srgrimes234	STD	POSIX	{ int clock_getres(clockid_t clock_id, \
3641556Srgrimes			    struct timespec *tp); }
3651556Srgrimes235	UNIMPL	NOHIDE	timer_create
3661556Srgrimes236	UNIMPL	NOHIDE	timer_delete
3671556Srgrimes237	UNIMPL	NOHIDE	timer_settime
3681556Srgrimes238	UNIMPL	NOHIDE	timer_gettime
3691556Srgrimes239	UNIMPL	NOHIDE	timer_getoverrun
3701556Srgrimes240	STD	POSIX	{ int nanosleep(const struct timespec *rqtp, \
3711556Srgrimes			    struct timespec *rmtp); }
3721556Srgrimes241	UNIMPL	NOHIDE	nosys
3731556Srgrimes242	UNIMPL	NOHIDE	nosys
3741556Srgrimes243	UNIMPL	NOHIDE	nosys
3751556Srgrimes244	UNIMPL	NOHIDE	nosys
3761556Srgrimes245	UNIMPL	NOHIDE	nosys
3771556Srgrimes246	UNIMPL	NOHIDE	nosys
37890110Simp247	UNIMPL	NOHIDE	nosys
3791556Srgrimes248	UNIMPL	NOHIDE	nosys
38050544Smharo249	UNIMPL	NOHIDE	nosys
38114305Swosch; syscall numbers initially used in OpenBSD
38250544Smharo250	STD	BSD	{ int minherit(void *addr, size_t len, int inherit); }
38350544Smharo251	STD	BSD	{ int rfork(int flags); }
38450544Smharo252	STD	BSD	{ int openbsd_poll(struct pollfd *fds, u_int nfds, \
3851556Srgrimes			    int timeout); }
386253	STD	BSD	{ int issetugid(void); }
387254	STD	BSD	{ int lchown(char *path, int uid, int gid); }
388255	UNIMPL	NOHIDE	nosys
389256	UNIMPL	NOHIDE	nosys
390257	UNIMPL	NOHIDE	nosys
391258	UNIMPL	NOHIDE	nosys
392259	UNIMPL	NOHIDE	nosys
393260	UNIMPL	NOHIDE	nosys
394261	UNIMPL	NOHIDE	nosys
395262	UNIMPL	NOHIDE	nosys
396263	UNIMPL	NOHIDE	nosys
397264	UNIMPL	NOHIDE	nosys
398265	UNIMPL	NOHIDE	nosys
399266	UNIMPL	NOHIDE	nosys
400267	UNIMPL	NOHIDE	nosys
401268	UNIMPL	NOHIDE	nosys
402269	UNIMPL	NOHIDE	nosys
403270	UNIMPL	NOHIDE	nosys
404271	UNIMPL	NOHIDE	nosys
405272	STD	BSD	{ int getdents(int fd, char *buf, size_t count); }
406273	UNIMPL	NOHIDE	nosys
407274	STD	BSD	{ int lchmod(char *path, mode_t mode); }
408275	NOPROTO BSD	{ int lchown(char *path, uid_t uid, gid_t gid); } netbsd_lchown netbsd_lchown int
409276	STD	BSD	{ int lutimes(char *path, struct timeval *tptr); }
410277	NOPROTO	BSD	{ int msync(void *addr, size_t len, int flags); } netbsd_msync netbsd_msync int
411278	STD	BSD	{ int nstat(char *path, struct nstat *ub); }
412279	STD	BSD	{ int nfstat(int fd, struct nstat *sb); }
413280	STD	BSD	{ int nlstat(char *path, struct nstat *ub); }
414281	UNIMPL	NOHIDE	nosys
415282	UNIMPL	NOHIDE	nosys
416283	UNIMPL	NOHIDE	nosys
417284	UNIMPL	NOHIDE	nosys
418285	UNIMPL	NOHIDE	nosys
419286	UNIMPL	NOHIDE	nosys
420287	UNIMPL	NOHIDE	nosys
421288	UNIMPL	NOHIDE	nosys
422289	UNIMPL	NOHIDE	nosys
423290	UNIMPL	NOHIDE	nosys
424291	UNIMPL	NOHIDE	nosys
425292	UNIMPL	NOHIDE	nosys
426293	UNIMPL	NOHIDE	nosys
427294	UNIMPL	NOHIDE	nosys
428295	UNIMPL	NOHIDE	nosys
429296	UNIMPL	NOHIDE	nosys
430297	UNIMPL	NOHIDE	nosys
431298	UNIMPL	NOHIDE	nosys
432299	UNIMPL	NOHIDE	nosys
433; syscall numbers for FreeBSD
434300	STD	BSD	{ int modnext(int modid); }
435301	STD	BSD	{ int modstat(int modid, struct module_stat* stat); }
436302	STD	BSD	{ int modfnext(int modid); }
437303	STD	BSD	{ int modfind(char *name); }
438304	STD	BSD	{ int kldload(const char *file); }
439305	STD	BSD	{ int kldunload(int fileid); }
440306	STD	BSD	{ int kldfind(const char *file); }
441307	STD	BSD	{ int kldnext(int fileid); }
442308	STD	BSD	{ int kldstat(int fileid, struct kld_file_stat* stat); }
443309	STD	BSD	{ int kldfirstmod(int fileid); }
444310	STD	BSD	{ int getsid(pid_t pid); }
445311	UNIMPL	NOHIDE	setresuid
446312	UNIMPL	NOHIDE	setresgid
447313	OBSOL	NOHIDE	signanosleep
448314     STD     BSD     { int aio_return(struct aiocb *aiocbp); }
449315     STD     BSD     { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
450316     STD     BSD     { int aio_cancel(int fd, struct aiocb *aiocbp); }
451317     STD     BSD     { int aio_error(struct aiocb *aiocbp); }
452318     STD     BSD     { int aio_read(struct aiocb *aiocbp); }
453319     STD     BSD     { int aio_write(struct aiocb *aiocbp); }
454320     STD     BSD     { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
455321     STD     BSD     { int yield(void); }
456322     STD     BSD     { int thr_sleep(const struct timespec *timeout); }
457323     STD     BSD     { int thr_wakeup(pid_t pid); }
458324     STD     BSD     { int mlockall(int how); }
459325     STD     BSD     { int munlockall(void); }
460326     STD     BSD     { int __getcwd(u_char *buf, u_int buflen); }
461
462327     STD     POSIX   { int sched_setparam (pid_t pid, const struct sched_param *param); }
463328     STD     POSIX   { int sched_getparam (pid_t pid, struct sched_param *param); }
464
465329     STD     POSIX   { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
466330     STD     POSIX   { int sched_getscheduler (pid_t pid); }
467
468331     STD     POSIX   { int sched_yield (void); }
469332     STD     POSIX   { int sched_get_priority_max (int policy); }
470333     STD     POSIX   { int sched_get_priority_min (int policy); }
471334     STD     POSIX   { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
472335	STD	BSD	{ int utrace(caddr_t addr, size_t len); }
473336	STD	BSD	{ int sendfile(int fd, int s, off_t offset, size_t nbytes, \
474				struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
475337	STD	BSD	{ int kldsym(int fileid, int cmd, void *data); }
476