syscalls.master revision 69449
150477Speter $FreeBSD: head/sys/kern/syscalls.master 69449 2000-12-01 08:57:47Z alfred $
21817Sdg;	from: @(#)syscalls.master	8.2 (Berkeley) 1/13/94
31817Sdg;
41541Srgrimes; System call name/number master file.
51541Srgrimes; Processed to created init_sysent.c, syscalls.c and syscall.h.
61541Srgrimes
758963Salfred; Columns: number [MPSAFE] type nargs namespc name alt{name,tag,rtyp}/comments
81541Srgrimes;	number	system call number, must be in order
958963Salfred;   MPSAFE	optional field, specifies that syscall does not want the
1058963Salfred;		BGL grabbed automatically (it is SMP safe).
1149641Snik;	type	one of STD, OBSOL, UNIMPL, COMPAT, CPT_NOA, LIBCOMPAT,
1269449Salfred;		NODEF, NOARGS, NOPROTO, NOIMPL, NOSTD
132696Swollman;	namespc one of POSIX, BSD, NOHIDE
1411294Sswallace;	name	psuedo-prototype of syscall routine
1510905Sbde;		If one of the following alts is different, then all appear:
161541Srgrimes;	altname	name of system call if different
1710905Sbde;	alttag	name of args struct tag if different from [o]`name'"_args"
1810905Sbde;	altrtyp	return type if not int (bogus - syscalls always return int)
191541Srgrimes;		for UNIMPL/OBSOL, name continues with comments
201541Srgrimes
211541Srgrimes; types:
221541Srgrimes;	STD	always included
231541Srgrimes;	COMPAT	included on COMPAT #ifdef
241541Srgrimes;	LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h
251541Srgrimes;	OBSOL	obsolete, not included in system, only specifies name
261541Srgrimes;	UNIMPL	not implemented, placeholder only
2769449Salfred;	NOSTD	implemented but as a lkm that can be statically
2869449Salfred;			compiled in sysent entry will be filled with lkmsys
2969449Salfred;			so the SYSCALL_MODULE macro works
301541Srgrimes
311541Srgrimes; #ifdef's, etc. may be included, and are copied to the output files.
321541Srgrimes
3311294Sswallace#include <sys/param.h>
3411294Sswallace#include <sys/sysent.h>
3511294Sswallace#include <sys/sysproto.h>
3611294Sswallace
371541Srgrimes; Reserved/unimplemented system calls in the range 0-150 inclusive
381541Srgrimes; are reserved for use in future Berkeley releases.
391541Srgrimes; Additional system calls implemented in vendor and other
401541Srgrimes; redistributions should be placed in the reserved range at the end
411541Srgrimes; of the current calls.
421541Srgrimes
4311294Sswallace0	STD	NOHIDE	{ int nosys(void); } syscall nosys_args int
4464001Speter1	STD	NOHIDE	{ void sys_exit(int rval); } exit sys_exit_args void
4511294Sswallace2	STD	POSIX	{ int fork(void); }
4638515Sdfr3	STD	POSIX	{ ssize_t read(int fd, void *buf, size_t nbyte); }
4738515Sdfr4	STD	POSIX	{ ssize_t write(int fd, const void *buf, size_t nbyte); }
4811294Sswallace5	STD	POSIX	{ int open(char *path, int flags, int mode); }
4912216Sbde; XXX should be		{ int open(const char *path, int flags, ...); }
5012216Sbde; but we're not ready for `const' or varargs.
5112216Sbde; XXX man page says `mode_t mode'.
5211294Sswallace6	STD	POSIX	{ int close(int fd); }
5311294Sswallace7	STD	BSD	{ int wait4(int pid, int *status, int options, \
5411294Sswallace			    struct rusage *rusage); } wait4 wait_args int
5511294Sswallace8	COMPAT	BSD	{ int creat(char *path, int mode); }
5611294Sswallace9	STD	POSIX	{ int link(char *path, char *link); }
5711294Sswallace10	STD	POSIX	{ int unlink(char *path); }
5811294Sswallace11	OBSOL	NOHIDE	execv
5911294Sswallace12	STD	POSIX	{ int chdir(char *path); }
6011294Sswallace13	STD	BSD	{ int fchdir(int fd); }
6111294Sswallace14	STD	POSIX	{ int mknod(char *path, int mode, int dev); }
6211294Sswallace15	STD	POSIX	{ int chmod(char *path, int mode); }
6311294Sswallace16	STD	POSIX	{ int chown(char *path, int uid, int gid); }
6411294Sswallace17	STD	BSD	{ int obreak(char *nsize); } break obreak_args int
6511294Sswallace18	STD	BSD	{ int getfsstat(struct statfs *buf, long bufsize, \
6611294Sswallace			    int flags); }
6711294Sswallace19	COMPAT	POSIX	{ long lseek(int fd, long offset, int whence); }
6811294Sswallace20	STD	POSIX	{ pid_t getpid(void); }
6922521Sdyson21	STD	BSD	{ int mount(char *type, char *path, int flags, \
7011294Sswallace			    caddr_t data); }
7112216Sbde; XXX 4.4lite2 uses `char *type' but we're not ready for that.
7212216Sbde; XXX `path' should have type `const char *' but we're not ready for that.
7311294Sswallace22	STD	BSD	{ int unmount(char *path, int flags); }
7411294Sswallace23	STD	POSIX	{ int setuid(uid_t uid); }
7558963Salfred24	MPSAFE	STD	POSIX	{ uid_t getuid(void); }
7658963Salfred25	MPSAFE	STD	POSIX	{ uid_t geteuid(void); }
7711294Sswallace26	STD	BSD	{ int ptrace(int req, pid_t pid, caddr_t addr, \
7811294Sswallace			    int data); }
7911294Sswallace27	STD	BSD	{ int recvmsg(int s, struct msghdr *msg, int flags); }
8011294Sswallace28	STD	BSD	{ int sendmsg(int s, caddr_t msg, int flags); }
8111294Sswallace29	STD	BSD	{ int recvfrom(int s, caddr_t buf, size_t len, \
8211294Sswallace			    int flags, caddr_t from, int *fromlenaddr); }
8311294Sswallace30	STD	BSD	{ int accept(int s, caddr_t name, int *anamelen); }
8411294Sswallace31	STD	BSD	{ int getpeername(int fdes, caddr_t asa, int *alen); }
8511294Sswallace32	STD	BSD	{ int getsockname(int fdes, caddr_t asa, int *alen); }
8611294Sswallace33	STD	POSIX	{ int access(char *path, int flags); }
8711294Sswallace34	STD	BSD	{ int chflags(char *path, int flags); }
8811294Sswallace35	STD	BSD	{ int fchflags(int fd, int flags); }
8911294Sswallace36	STD	BSD	{ int sync(void); }
9011294Sswallace37	STD	POSIX	{ int kill(int pid, int signum); }
9111294Sswallace38	COMPAT	POSIX	{ int stat(char *path, struct ostat *ub); }
9211294Sswallace39	STD	POSIX	{ pid_t getppid(void); }
9311294Sswallace40	COMPAT	POSIX	{ int lstat(char *path, struct ostat *ub); }
9411294Sswallace41	STD	POSIX	{ int dup(u_int fd); }
9511294Sswallace42	STD	POSIX	{ int pipe(void); }
9611294Sswallace43	STD	POSIX	{ gid_t getegid(void); }
9738515Sdfr44	STD	BSD	{ int profil(caddr_t samples, size_t size, \
9838515Sdfr			    size_t offset, u_int scale); }
9947103Sbde45	STD	BSD	{ int ktrace(const char *fname, int ops, int facs, \
10011294Sswallace			    int pid); }
10152149Smarcel46	COMPAT	POSIX	{ int sigaction(int signum, struct osigaction *nsa, \
10251790Smarcel			    struct osigaction *osa); }
10358963Salfred47	MPSAFE	STD	POSIX	{ gid_t getgid(void); }
10458963Salfred48	MPSAFE	COMPAT	POSIX	{ int sigprocmask(int how, osigset_t mask); }
10521776Sbde; XXX note nonstandard (bogus) calling convention - the libc stub passes
10621776Sbde; us the mask, not a pointer to it, and we return the old mask as the
10721776Sbde; (int) return value.
10811294Sswallace49	STD	BSD	{ int getlogin(char *namebuf, u_int namelen); }
10911294Sswallace50	STD	BSD	{ int setlogin(char *namebuf); }
11011294Sswallace51	STD	BSD	{ int acct(char *path); }
11152149Smarcel52	COMPAT	POSIX	{ int sigpending(void); }
11251790Smarcel53	STD	BSD	{ int sigaltstack(stack_t *ss, stack_t *oss); }
11311294Sswallace54	STD	POSIX	{ int ioctl(int fd, u_long com, caddr_t data); }
11411294Sswallace55	STD	BSD	{ int reboot(int opt); }
11511294Sswallace56	STD	POSIX	{ int revoke(char *path); }
11611294Sswallace57	STD	POSIX	{ int symlink(char *path, char *link); }
11711294Sswallace58	STD	POSIX	{ int readlink(char *path, char *buf, int count); }
11811294Sswallace59	STD	POSIX	{ int execve(char *fname, char **argv, char **envv); }
11958963Salfred60	MPSAFE	STD	POSIX	{ int umask(int newmask); } umask umask_args int
12011294Sswallace61	STD	BSD	{ int chroot(char *path); }
12111294Sswallace62	COMPAT	POSIX	{ int fstat(int fd, struct ostat *sb); }
12238515Sdfr63	COMPAT	BSD	{ int getkerninfo(int op, char *where, size_t *size, \
12311294Sswallace			    int arg); } getkerninfo getkerninfo_args int
12411294Sswallace64	COMPAT	BSD	{ int getpagesize(void); } \
12511294Sswallace			    getpagesize getpagesize_args int
12632166Salex65	STD	BSD	{ int msync(void *addr, size_t len, int flags); }
12714219Speter66	STD	BSD	{ int vfork(void); }
12811294Sswallace67	OBSOL	NOHIDE	vread
12911294Sswallace68	OBSOL	NOHIDE	vwrite
13011294Sswallace69	STD	BSD	{ int sbrk(int incr); }
13111294Sswallace70	STD	BSD	{ int sstk(int incr); }
13232166Salex71	COMPAT	BSD	{ int mmap(void *addr, int len, int prot, \
13311294Sswallace			    int flags, int fd, long pos); }
13411294Sswallace72	STD	BSD	{ int ovadvise(int anom); } vadvise ovadvise_args int
13532166Salex73	STD	BSD	{ int munmap(void *addr, size_t len); }
13632166Salex74	STD	BSD	{ int mprotect(const void *addr, size_t len, int prot); }
13732166Salex75	STD	BSD	{ int madvise(void *addr, size_t len, int behav); }
13811294Sswallace76	OBSOL	NOHIDE	vhangup
13911294Sswallace77	OBSOL	NOHIDE	vlimit
14033040Sbde78	STD	BSD	{ int mincore(const void *addr, size_t len, \
14133040Sbde			    char *vec); }
14211294Sswallace79	STD	POSIX	{ int getgroups(u_int gidsetsize, gid_t *gidset); }
14311294Sswallace80	STD	POSIX	{ int setgroups(u_int gidsetsize, gid_t *gidset); }
14458963Salfred81	MPSAFE	STD	POSIX	{ int getpgrp(void); }
14511294Sswallace82	STD	POSIX	{ int setpgid(int pid, int pgid); }
14611294Sswallace83	STD	BSD	{ int setitimer(u_int which, struct itimerval *itv, \
14711294Sswallace			    struct itimerval *oitv); }
14811330Sswallace84	COMPAT	BSD	{ int wait(void); }
14911294Sswallace85	STD	BSD	{ int swapon(char *name); }
15011294Sswallace86	STD	BSD	{ int getitimer(u_int which, struct itimerval *itv); }
15111294Sswallace87	COMPAT	BSD	{ int gethostname(char *hostname, u_int len); } \
15211294Sswallace			    gethostname gethostname_args int
15311294Sswallace88	COMPAT	BSD	{ int sethostname(char *hostname, u_int len); } \
15411294Sswallace			    sethostname sethostname_args int
15511294Sswallace89	STD	BSD	{ int getdtablesize(void); }
15611294Sswallace90	STD	POSIX	{ int dup2(u_int from, u_int to); }
15711294Sswallace91	UNIMPL	BSD	getdopt
15836735Sdfr92	STD	POSIX	{ int fcntl(int fd, int cmd, long arg); }
15912216Sbde; XXX should be		{ int fcntl(int fd, int cmd, ...); }
16012216Sbde; but we're not ready for varargs.
16112216Sbde; XXX man page says `int arg' too.
16217702Ssmpatel93	STD	BSD	{ int select(int nd, fd_set *in, fd_set *ou, \
16311294Sswallace			    fd_set *ex, struct timeval *tv); }
16411294Sswallace94	UNIMPL	BSD	setdopt
16511294Sswallace95	STD	POSIX	{ int fsync(int fd); }
16611294Sswallace96	STD	BSD	{ int setpriority(int which, int who, int prio); }
16711294Sswallace97	STD	BSD	{ int socket(int domain, int type, int protocol); }
16811294Sswallace98	STD	BSD	{ int connect(int s, caddr_t name, int namelen); }
16911330Sswallace99	CPT_NOA	BSD	{ int accept(int s, caddr_t name, int *anamelen); } \
17011294Sswallace			    accept accept_args int
17111294Sswallace100	STD	BSD	{ int getpriority(int which, int who); }
17211294Sswallace101	COMPAT	BSD	{ int send(int s, caddr_t buf, int len, int flags); }
17311294Sswallace102	COMPAT	BSD	{ int recv(int s, caddr_t buf, int len, int flags); }
17452149Smarcel103	COMPAT	BSD	{ int sigreturn(struct osigcontext *sigcntxp); }
17511294Sswallace104	STD	BSD	{ int bind(int s, caddr_t name, int namelen); }
17611294Sswallace105	STD	BSD	{ int setsockopt(int s, int level, int name, \
17711294Sswallace			    caddr_t val, int valsize); }
17811294Sswallace106	STD	BSD	{ int listen(int s, int backlog); }
17911294Sswallace107	OBSOL	NOHIDE	vtimes
18011294Sswallace108	COMPAT	BSD	{ int sigvec(int signum, struct sigvec *nsv, \
18111294Sswallace			    struct sigvec *osv); }
18211294Sswallace109	COMPAT	BSD	{ int sigblock(int mask); }
18311294Sswallace110	COMPAT	BSD	{ int sigsetmask(int mask); }
18452149Smarcel111	COMPAT	POSIX	{ int sigsuspend(osigset_t mask); }
18521776Sbde; XXX note nonstandard (bogus) calling convention - the libc stub passes
18621776Sbde; us the mask, not a pointer to it.
18711294Sswallace112	COMPAT	BSD	{ int sigstack(struct sigstack *nss, \
18811294Sswallace			    struct sigstack *oss); }
18911294Sswallace113	COMPAT	BSD	{ int recvmsg(int s, struct omsghdr *msg, int flags); }
19011294Sswallace114	COMPAT	BSD	{ int sendmsg(int s, caddr_t msg, int flags); }
19111294Sswallace115	OBSOL	NOHIDE	vtrace
19211294Sswallace116	STD	BSD	{ int gettimeofday(struct timeval *tp, \
19311294Sswallace			    struct timezone *tzp); }
19411294Sswallace117	STD	BSD	{ int getrusage(int who, struct rusage *rusage); }
19511294Sswallace118	STD	BSD	{ int getsockopt(int s, int level, int name, \
19611294Sswallace			    caddr_t val, int *avalsize); }
19714215Speter119	UNIMPL	NOHIDE	resuba (BSD/OS 2.x)
19811294Sswallace120	STD	BSD	{ int readv(int fd, struct iovec *iovp, u_int iovcnt); }
19911294Sswallace121	STD	BSD	{ int writev(int fd, struct iovec *iovp, \
20011294Sswallace			    u_int iovcnt); }
20111294Sswallace122	STD	BSD	{ int settimeofday(struct timeval *tv, \
20211294Sswallace			    struct timezone *tzp); }
20311294Sswallace123	STD	BSD	{ int fchown(int fd, int uid, int gid); }
20411294Sswallace124	STD	BSD	{ int fchmod(int fd, int mode); }
20511330Sswallace125	CPT_NOA	BSD	{ int recvfrom(int s, caddr_t buf, size_t len, \
20611294Sswallace			    int flags, caddr_t from, int *fromlenaddr); } \
20711294Sswallace			    recvfrom recvfrom_args int
20811294Sswallace126	STD	BSD	{ int setreuid(int ruid, int euid); }
20911294Sswallace127	STD	BSD	{ int setregid(int rgid, int egid); }
21011294Sswallace128	STD	POSIX	{ int rename(char *from, char *to); }
21111294Sswallace129	COMPAT	BSD	{ int truncate(char *path, long length); }
21211294Sswallace130	COMPAT	BSD	{ int ftruncate(int fd, long length); }
21311294Sswallace131	STD	BSD	{ int flock(int fd, int how); }
21411294Sswallace132	STD	POSIX	{ int mkfifo(char *path, int mode); }
21511294Sswallace133	STD	BSD	{ int sendto(int s, caddr_t buf, size_t len, \
21611294Sswallace			    int flags, caddr_t to, int tolen); }
21711294Sswallace134	STD	BSD	{ int shutdown(int s, int how); }
21811294Sswallace135	STD	BSD	{ int socketpair(int domain, int type, int protocol, \
21911294Sswallace			    int *rsv); }
22011294Sswallace136	STD	POSIX	{ int mkdir(char *path, int mode); }
22111294Sswallace137	STD	POSIX	{ int rmdir(char *path); }
22211294Sswallace138	STD	BSD	{ int utimes(char *path, struct timeval *tptr); }
22311294Sswallace139	OBSOL	NOHIDE	4.2 sigreturn
22411294Sswallace140	STD	BSD	{ int adjtime(struct timeval *delta, \
22511294Sswallace			    struct timeval *olddelta); }
22611294Sswallace141	COMPAT	BSD	{ int getpeername(int fdes, caddr_t asa, int *alen); }
22711294Sswallace142	COMPAT	BSD	{ long gethostid(void); }
22811294Sswallace143	COMPAT	BSD	{ int sethostid(long hostid); }
22965150Smarcel144	COMPAT	BSD	{ int getrlimit(u_int which, struct orlimit *rlp); }
23065150Smarcel145	COMPAT	BSD	{ int setrlimit(u_int which, struct orlimit *rlp); }
23111294Sswallace146	COMPAT	BSD	{ int killpg(int pgid, int signum); }
23211294Sswallace147	STD	POSIX	{ int setsid(void); }
23311294Sswallace148	STD	BSD	{ int quotactl(char *path, int cmd, int uid, \
23411294Sswallace			    caddr_t arg); }
23511294Sswallace149	COMPAT	BSD	{ int quota(void); }
23611330Sswallace150	CPT_NOA	BSD	{ int getsockname(int fdec, caddr_t asa, int *alen); }\
23711330Sswallace			    getsockname getsockname_args int
2381541Srgrimes
2391541Srgrimes; Syscalls 151-180 inclusive are reserved for vendor-specific
2401541Srgrimes; system calls.  (This includes various calls added for compatibity
2411541Srgrimes; with other Unix variants.)
2421541Srgrimes; Some of these calls are now supported by BSD...
24314215Speter151	UNIMPL	NOHIDE	sem_lock (BSD/OS 2.x)
24414215Speter152	UNIMPL	NOHIDE	sem_wakeup (BSD/OS 2.x)
24514215Speter153	UNIMPL	NOHIDE	asyncdaemon (BSD/OS 2.x)
24611294Sswallace154	UNIMPL	NOHIDE	nosys
24730740Sphk; 155 is initialized by the NFS code, if present.
24830740Sphk155	NOIMPL	BSD	{ int nfssvc(int flag, caddr_t argp); }
24911294Sswallace156	COMPAT	BSD	{ int getdirentries(int fd, char *buf, u_int count, \
25011294Sswallace			    long *basep); }
25111294Sswallace157	STD	BSD	{ int statfs(char *path, struct statfs *buf); }
25211294Sswallace158	STD	BSD	{ int fstatfs(int fd, struct statfs *buf); }
25311294Sswallace159	UNIMPL	NOHIDE	nosys
25411294Sswallace160	UNIMPL	NOHIDE	nosys
25554970Salfred161	STD	BSD	{ int getfh(char *fname, struct fhandle *fhp); }
25611294Sswallace162	STD	BSD	{ int getdomainname(char *domainname, int len); }
25711294Sswallace163	STD	BSD	{ int setdomainname(char *domainname, int len); }
25812216Sbde164	STD	BSD	{ int uname(struct utsname *name); }
25911294Sswallace165	STD	BSD	{ int sysarch(int op, char *parms); }
26011294Sswallace166	STD	BSD	{ int rtprio(int function, pid_t pid, \
26111294Sswallace			    struct rtprio *rtp); }
26211294Sswallace167	UNIMPL	NOHIDE	nosys
26311294Sswallace168	UNIMPL	NOHIDE	nosys
26469449Salfred; 169 is initialized by the SYSVSEM code if present or loaded
26569449Salfred169	NOSTD	BSD	{ int semsys(int which, int a2, int a3, int a4, \
26611294Sswallace			    int a5); }
26769449Salfred; 169 is initialized by the SYSVMSG code if present or loaded
26812216Sbde; XXX should be		{ int semsys(int which, ...); }
26969449Salfred170	NOSTD	BSD	{ int msgsys(int which, int a2, int a3, int a4, \
27011294Sswallace			    int a5, int a6); }
27169449Salfred; 169 is initialized by the SYSVSHM code if present or loaded
27212216Sbde; XXX should be		{ int msgsys(int which, ...); }
27369449Salfred171	NOSTD	BSD	{ int shmsys(int which, int a2, int a3, int a4); }
27412216Sbde; XXX should be		{ int shmsys(int which, ...); }
27511294Sswallace172	UNIMPL	NOHIDE	nosys
27645311Sdt173	STD	POSIX	{ ssize_t pread(int fd, void *buf, size_t nbyte, \
27745311Sdt			    int pad, off_t offset); }
27845311Sdt174	STD	POSIX	{ ssize_t pwrite(int fd, const void *buf, \
27945311Sdt			    size_t nbyte, int pad, off_t offset); }
28011294Sswallace175	UNIMPL	NOHIDE	nosys
28111294Sswallace176	STD	BSD	{ int ntp_adjtime(struct timex *tp); }
28214215Speter177	UNIMPL	NOHIDE	sfork (BSD/OS 2.x)
28314215Speter178	UNIMPL	NOHIDE	getdescriptor (BSD/OS 2.x)
28414215Speter179	UNIMPL	NOHIDE	setdescriptor (BSD/OS 2.x)
28549428Sjkh180	UNIMPL	NOHIDE	nosys
2861541Srgrimes
28749428Sjkh; Syscalls 181-199 are used by/reserved for BSD
28811294Sswallace181	STD	POSIX	{ int setgid(gid_t gid); }
28911294Sswallace182	STD	BSD	{ int setegid(gid_t egid); }
29011294Sswallace183	STD	BSD	{ int seteuid(uid_t euid); }
29132889Sphk184	UNIMPL	BSD	lfs_bmapv
29232889Sphk185	UNIMPL	BSD	lfs_markv
29332889Sphk186	UNIMPL	BSD	lfs_segclean
29432889Sphk187	UNIMPL	BSD	lfs_segwait
29511294Sswallace188	STD	POSIX	{ int stat(char *path, struct stat *ub); }
29611294Sswallace189	STD	POSIX	{ int fstat(int fd, struct stat *sb); }
29711294Sswallace190	STD	POSIX	{ int lstat(char *path, struct stat *ub); }
29811294Sswallace191	STD	POSIX	{ int pathconf(char *path, int name); }
29911294Sswallace192	STD	POSIX	{ int fpathconf(int fd, int name); }
30011294Sswallace193	UNIMPL	NOHIDE	nosys
30111294Sswallace194	STD	BSD	{ int getrlimit(u_int which, \
30265150Smarcel			    struct rlimit *rlp); } \
30311294Sswallace			    getrlimit __getrlimit_args int
30411294Sswallace195	STD	BSD	{ int setrlimit(u_int which, \
30565150Smarcel			    struct rlimit *rlp); } \
30611294Sswallace			    setrlimit __setrlimit_args int
30711294Sswallace196	STD	BSD	{ int getdirentries(int fd, char *buf, u_int count, \
30811294Sswallace			    long *basep); }
30911294Sswallace197	STD	BSD	{ caddr_t mmap(caddr_t addr, size_t len, int prot, \
31060247Sbde			    int flags, int fd, int pad, off_t pos); }
31111294Sswallace198	STD	NOHIDE	{ int nosys(void); } __syscall __syscall_args int
31211294Sswallace199	STD	POSIX	{ off_t lseek(int fd, int pad, off_t offset, \
31311294Sswallace			    int whence); }
31411294Sswallace200	STD	BSD	{ int truncate(char *path, int pad, off_t length); }
31511294Sswallace201	STD	BSD	{ int ftruncate(int fd, int pad, off_t length); }
31611294Sswallace202	STD	BSD	{ int __sysctl(int *name, u_int namelen, void *old, \
31711294Sswallace			    size_t *oldlenp, void *new, size_t newlen); } \
31811294Sswallace			    __sysctl sysctl_args int
3192696Swollman; properly, __sysctl should be a NOHIDE, but making an exception
3202696Swollman; here allows to avoid one in libc/sys/Makefile.inc.
32132166Salex203	STD	BSD	{ int mlock(const void *addr, size_t len); }
32232166Salex204	STD	BSD	{ int munlock(const void *addr, size_t len); }
32335938Sdyson205	STD	BSD	{ int undelete(char *path); }
32435938Sdyson206	STD	BSD	{ int futimes(int fd, struct timeval *tptr); }
32528399Speter207	STD	BSD	{ int getpgid(pid_t pid); }
32625581Speter208	UNIMPL	NOHIDE	newreboot (NetBSD)
32729348Speter209	STD	BSD	{ int poll(struct pollfd *fds, u_int nfds, \
32829348Speter			    int timeout); }
3292124Sdg
3302124Sdg;
3312124Sdg; The following are reserved for loadable syscalls
3322124Sdg;
33311294Sswallace210	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
33411294Sswallace211	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
33511294Sswallace212	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
33611294Sswallace213	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
33711294Sswallace214	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
33811294Sswallace215	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
33911294Sswallace216	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
34011294Sswallace217	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
34111294Sswallace218	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
34211294Sswallace219	NODEF	NOHIDE	lkmnosys lkmnosys nosys_args int
34312864Speter
34412864Speter;
34514215Speter; The following were introduced with NetBSD/4.4Lite-2
34669449Salfred; They are initialized by thier respective modules/sysinits
34769449Salfred220	NOSTD	BSD	{ int __semctl(int semid, int semnum, int cmd, \
34812864Speter			    union semun *arg); }
34969449Salfred221	NOSTD	BSD	{ int semget(key_t key, int nsems, int semflg); }
35069449Salfred222	NOSTD	BSD	{ int semop(int semid, struct sembuf *sops, \
35112864Speter			    u_int nsops); }
35259827Speter223	UNIMPL	NOHIDE	semconfig
35369449Salfred224	NOSTD	BSD	{ int msgctl(int msqid, int cmd, \
35412864Speter			    struct msqid_ds *buf); }
35569449Salfred225	NOSTD	BSD	{ int msgget(key_t key, int msgflg); }
35669449Salfred226	NOSTD	BSD	{ int msgsnd(int msqid, void *msgp, size_t msgsz, \
35712864Speter			    int msgflg); }
35869449Salfred227	NOSTD	BSD	{ int msgrcv(int msqid, void *msgp, size_t msgsz, \
35912864Speter			    long msgtyp, int msgflg); }
36069449Salfred228	NOSTD	BSD	{ int shmat(int shmid, void *shmaddr, int shmflg); }
36169449Salfred229	NOSTD	BSD	{ int shmctl(int shmid, int cmd, \
36212864Speter			    struct shmid_ds *buf); }
36369449Salfred230	NOSTD	BSD	{ int shmdt(void *shmaddr); }
36469449Salfred231	NOSTD	BSD	{ int shmget(key_t key, int size, int shmflg); }
36514219Speter;
36625580Speter232	STD	POSIX	{ int clock_gettime(clockid_t clock_id, \
36725580Speter			    struct timespec *tp); }
36825580Speter233	STD	POSIX	{ int clock_settime(clockid_t clock_id, \
36925580Speter			    const struct timespec *tp); }
37025580Speter234	STD	POSIX	{ int clock_getres(clockid_t clock_id, \
37125580Speter			    struct timespec *tp); }
37225580Speter235	UNIMPL	NOHIDE	timer_create
37325580Speter236	UNIMPL	NOHIDE	timer_delete
37425580Speter237	UNIMPL	NOHIDE	timer_settime
37525580Speter238	UNIMPL	NOHIDE	timer_gettime
37625580Speter239	UNIMPL	NOHIDE	timer_getoverrun
37725580Speter240	STD	POSIX	{ int nanosleep(const struct timespec *rqtp, \
37825580Speter			    struct timespec *rmtp); }
37914219Speter241	UNIMPL	NOHIDE	nosys
38014219Speter242	UNIMPL	NOHIDE	nosys
38114219Speter243	UNIMPL	NOHIDE	nosys
38214219Speter244	UNIMPL	NOHIDE	nosys
38314219Speter245	UNIMPL	NOHIDE	nosys
38414219Speter246	UNIMPL	NOHIDE	nosys
38514219Speter247	UNIMPL	NOHIDE	nosys
38614219Speter248	UNIMPL	NOHIDE	nosys
38714219Speter249	UNIMPL	NOHIDE	nosys
38814219Speter; syscall numbers initially used in OpenBSD
38932166Salex250	STD	BSD	{ int minherit(void *addr, size_t len, int inherit); }
39014219Speter251	STD	BSD	{ int rfork(int flags); }
39129348Speter252	STD	BSD	{ int openbsd_poll(struct pollfd *fds, u_int nfds, \
39229348Speter			    int timeout); }
39324451Speter253	STD	BSD	{ int issetugid(void); }
39424439Speter254	STD	BSD	{ int lchown(char *path, int uid, int gid); }
39525537Sdfr255	UNIMPL	NOHIDE	nosys
39625537Sdfr256	UNIMPL	NOHIDE	nosys
39725537Sdfr257	UNIMPL	NOHIDE	nosys
39825537Sdfr258	UNIMPL	NOHIDE	nosys
39925537Sdfr259	UNIMPL	NOHIDE	nosys
40025537Sdfr260	UNIMPL	NOHIDE	nosys
40125537Sdfr261	UNIMPL	NOHIDE	nosys
40225537Sdfr262	UNIMPL	NOHIDE	nosys
40325537Sdfr263	UNIMPL	NOHIDE	nosys
40425537Sdfr264	UNIMPL	NOHIDE	nosys
40525537Sdfr265	UNIMPL	NOHIDE	nosys
40625537Sdfr266	UNIMPL	NOHIDE	nosys
40725537Sdfr267	UNIMPL	NOHIDE	nosys
40825537Sdfr268	UNIMPL	NOHIDE	nosys
40925537Sdfr269	UNIMPL	NOHIDE	nosys
41025537Sdfr270	UNIMPL	NOHIDE	nosys
41125537Sdfr271	UNIMPL	NOHIDE	nosys
41235938Sdyson272	STD	BSD	{ int getdents(int fd, char *buf, size_t count); }
41325537Sdfr273	UNIMPL	NOHIDE	nosys
41435938Sdyson274	STD	BSD	{ int lchmod(char *path, mode_t mode); }
41560247Sbde275	NOPROTO BSD	{ int lchown(char *path, uid_t uid, gid_t gid); } netbsd_lchown lchown_args int
41635938Sdyson276	STD	BSD	{ int lutimes(char *path, struct timeval *tptr); }
41760247Sbde277	NOPROTO	BSD	{ int msync(void *addr, size_t len, int flags); } netbsd_msync msync_args int
41835938Sdyson278	STD	BSD	{ int nstat(char *path, struct nstat *ub); }
41935938Sdyson279	STD	BSD	{ int nfstat(int fd, struct nstat *sb); }
42035938Sdyson280	STD	BSD	{ int nlstat(char *path, struct nstat *ub); }
42125537Sdfr281	UNIMPL	NOHIDE	nosys
42225537Sdfr282	UNIMPL	NOHIDE	nosys
42325537Sdfr283	UNIMPL	NOHIDE	nosys
42425537Sdfr284	UNIMPL	NOHIDE	nosys
42525537Sdfr285	UNIMPL	NOHIDE	nosys
42625537Sdfr286	UNIMPL	NOHIDE	nosys
42725537Sdfr287	UNIMPL	NOHIDE	nosys
42825537Sdfr288	UNIMPL	NOHIDE	nosys
42925537Sdfr289	UNIMPL	NOHIDE	nosys
43025537Sdfr290	UNIMPL	NOHIDE	nosys
43125537Sdfr291	UNIMPL	NOHIDE	nosys
43225537Sdfr292	UNIMPL	NOHIDE	nosys
43325537Sdfr293	UNIMPL	NOHIDE	nosys
43425537Sdfr294	UNIMPL	NOHIDE	nosys
43525537Sdfr295	UNIMPL	NOHIDE	nosys
43625537Sdfr296	UNIMPL	NOHIDE	nosys
43751138Salfred; XXX 297 is 300 in NetBSD 
43851138Salfred297	STD	BSD	{ int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
43951138Salfred298	STD	BSD	{ int fhopen(const struct fhandle *u_fhp, int flags); }
44051138Salfred299	STD	BSD 	{ int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
44125537Sdfr; syscall numbers for FreeBSD
44225537Sdfr300	STD	BSD	{ int modnext(int modid); }
44325537Sdfr301	STD	BSD	{ int modstat(int modid, struct module_stat* stat); }
44425537Sdfr302	STD	BSD	{ int modfnext(int modid); }
44553299Sbrian303	STD	BSD	{ int modfind(const char *name); }
44625537Sdfr304	STD	BSD	{ int kldload(const char *file); }
44725537Sdfr305	STD	BSD	{ int kldunload(int fileid); }
44825537Sdfr306	STD	BSD	{ int kldfind(const char *file); }
44925537Sdfr307	STD	BSD	{ int kldnext(int fileid); }
45025537Sdfr308	STD	BSD	{ int kldstat(int fileid, struct kld_file_stat* stat); }
45125537Sdfr309	STD	BSD	{ int kldfirstmod(int fileid); }
45228399Speter310	STD	BSD	{ int getsid(pid_t pid); }
45356115Speter311	STD	BSD	{ int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
45456115Speter312	STD	BSD	{ int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
45536033Speter313	OBSOL	NOHIDE	signanosleep
45626671Sdyson314     STD     BSD     { int aio_return(struct aiocb *aiocbp); }
45726671Sdyson315     STD     BSD     { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
45826671Sdyson316     STD     BSD     { int aio_cancel(int fd, struct aiocb *aiocbp); }
45926671Sdyson317     STD     BSD     { int aio_error(struct aiocb *aiocbp); }
46026671Sdyson318     STD     BSD     { int aio_read(struct aiocb *aiocbp); }
46126671Sdyson319     STD     BSD     { int aio_write(struct aiocb *aiocbp); }
46226671Sdyson320     STD     BSD     { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
46326671Sdyson321     STD     BSD     { int yield(void); }
46426671Sdyson322     STD     BSD     { int thr_sleep(const struct timespec *timeout); }
46526671Sdyson323     STD     BSD     { int thr_wakeup(pid_t pid); }
46626671Sdyson324     STD     BSD     { int mlockall(int how); }
46726671Sdyson325     STD     BSD     { int munlockall(void); }
46829391Sphk326     STD     BSD     { int __getcwd(u_char *buf, u_int buflen); }
46934925Sdufault
47034925Sdufault327     STD     POSIX   { int sched_setparam (pid_t pid, const struct sched_param *param); }
47134925Sdufault328     STD     POSIX   { int sched_getparam (pid_t pid, struct sched_param *param); }
47234925Sdufault
47334925Sdufault329     STD     POSIX   { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
47434925Sdufault330     STD     POSIX   { int sched_getscheduler (pid_t pid); }
47534925Sdufault
47634925Sdufault331     STD     POSIX   { int sched_yield (void); }
47734925Sdufault332     STD     POSIX   { int sched_get_priority_max (int policy); }
47834925Sdufault333     STD     POSIX   { int sched_get_priority_min (int policy); }
47934925Sdufault334     STD     POSIX   { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
48047103Sbde335	STD	BSD	{ int utrace(const void *addr, size_t len); }
48140931Sdg336	STD	BSD	{ int sendfile(int fd, int s, off_t offset, size_t nbytes, \
48240931Sdg				struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
48341088Speter337	STD	BSD	{ int kldsym(int fileid, int cmd, void *data); }
48446154Sphk338	STD	BSD	{ int jail(struct jail *jail); }
48549420Sjkh339	UNIMPL	BSD	pioctl
48658963Salfred340	MPSAFE	STD	POSIX	{ int sigprocmask(int how, const sigset_t *set, \
48751790Smarcel			    sigset_t *oset); }
48851790Smarcel341	STD	POSIX	{ int sigsuspend(const sigset_t *sigmask); }
48951790Smarcel342	STD	POSIX	{ int sigaction(int sig, const struct sigaction *act, \
49051790Smarcel			    struct sigaction *oact); }
49151790Smarcel343	STD	POSIX	{ int sigpending(sigset_t *set); }
49251790Smarcel344	STD	BSD	{ int sigreturn(ucontext_t *sigcntxp); }
49351790Smarcel345	UNIMPL	NOHIDE	sigtimedwait
49451790Smarcel346	UNIMPL	NOHIDE	sigwaitinfo
49556270Srwatson347	STD	BSD	{ int __acl_get_file(const char *path, \
49656270Srwatson			    acl_type_t type, struct acl *aclp); }
49756270Srwatson348	STD	BSD	{ int __acl_set_file(const char *path, \
49856270Srwatson			    acl_type_t type, struct acl *aclp); }
49956270Srwatson349	STD	BSD	{ int __acl_get_fd(int filedes, acl_type_t type, \
50056270Srwatson			    struct acl *aclp); }
50156270Srwatson350	STD	BSD	{ int __acl_set_fd(int filedes, acl_type_t type, \
50256270Srwatson			    struct acl *aclp); }
50356270Srwatson351	STD	BSD	{ int __acl_delete_file(const char *path, \
50456270Srwatson			    acl_type_t type); }
50556270Srwatson352	STD	BSD	{ int __acl_delete_fd(int filedes, acl_type_t type); }
50656270Srwatson353	STD	BSD	{ int __acl_aclcheck_file(const char *path, \
50756270Srwatson			    acl_type_t type, struct acl *aclp); }
50856270Srwatson354	STD	BSD	{ int __acl_aclcheck_fd(int filedes, acl_type_t type, \
50956270Srwatson			    struct acl *aclp); }
51056270Srwatson355	STD	BSD	{ int extattrctl(const char *path, int cmd, \
51156270Srwatson			    const char *attrname, char *arg); }
51256270Srwatson356	STD	BSD	{ int extattr_set_file(const char *path, \
51356270Srwatson			    const char *attrname, struct iovec *iovp, \
51456270Srwatson			    unsigned iovcnt); }
51556270Srwatson357	STD	BSD	{ int extattr_get_file(const char *path, \
51656270Srwatson			    const char *attrname, struct iovec *iovp, \
51756270Srwatson			    unsigned iovcnt); }
51856270Srwatson358	STD	BSD	{ int extattr_delete_file(const char *path, \
51956270Srwatson			    const char *attrname); }
52055943Sjasone359	STD	BSD	{ int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
52156115Speter360	STD	BSD	{ int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
52256115Speter361	STD	BSD	{ int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
52359288Sjlemon362	STD	BSD	{ int kqueue(void); }
52459288Sjlemon363	STD	BSD	{ int kevent(int fd, \
52563452Sjlemon			    const struct kevent *changelist, int nchanges, \
52663452Sjlemon			    struct kevent *eventlist, int nevents, \
52763452Sjlemon			    const struct timespec *timeout); }
52861718Srwatson364	STD	BSD	{ int __cap_get_proc(struct cap *cap_p); }
52961718Srwatson365	STD	BSD	{ int __cap_set_proc(struct cap *cap_p); }
53063082Srwatson366	STD	BSD	{ int __cap_get_fd(int fd, struct cap *cap_p); }
53163082Srwatson367	STD	BSD	{ int __cap_get_file(const char *path_p, struct cap *cap_p); }
53263082Srwatson368	STD	BSD	{ int __cap_set_fd(int fd, struct cap *cap_p); }
53363082Srwatson369	STD	BSD	{ int __cap_set_file(const char *path_p, struct cap *cap_p); }
53469449Salfred370	NODEF	NOHIDE	lkmressys lkmressys nosys_args int
535