xref: /csrg-svn/sys/kern/syscalls.master (revision 68300)
1*68300Scgd	@(#)syscalls.master	8.5 (Berkeley) 02/14/95
2*68300Scgd; System call name/number "master" file.
3*68300Scgd; (See syscalls.conf to see what it is processed into.)
4*68300Scgd;
5*68300Scgd; Fields: number type [type-dependent ...]
637325Skarels;	number	system call number, must be in order
7*68300Scgd;	type	one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
8*68300Scgd;		the compatibility options defined in syscalls.conf.
9*68300Scgd;
1037325Skarels; types:
1137325Skarels;	STD	always included
12*68300Scgd;	OBSOL	obsolete, not included in system
13*68300Scgd;	UNIMPL	unimplemented, not included in system
14*68300Scgd;	NODEF	included, but don't define the syscall number
15*68300Scgd;	NOARGS	included, but don't define the syscall args structure
16*68300Scgd;
17*68300Scgd; The compat options are defined in the syscalls.conf file, and the
18*68300Scgd; compat option name is prefixed to the syscall name.  Other than
19*68300Scgd; that, they're like NODEF (for 'compat' options), or STD (for
20*68300Scgd; 'libcompat' options).
21*68300Scgd;
22*68300Scgd; The type-dependent arguments are as follows:
23*68300Scgd; For STD, NODEF, NOARGS, and compat syscalls:
24*68300Scgd;	{ pseudo-proto } [alias]
25*68300Scgd; For other syscalls:
26*68300Scgd;	[comment]
27*68300Scgd;
2837325Skarels; #ifdef's, etc. may be included, and are copied to the output files.
29*68300Scgd; #include's are copied to the syscall switch definition file only.
3037325Skarels
31*68300Scgd#include <sys/param.h>
32*68300Scgd#include <sys/systm.h>
33*68300Scgd#include <sys/signal.h>
34*68300Scgd#include <sys/mount.h>
35*68300Scgd#include <sys/syscallargs.h>
36*68300Scgd
3737325Skarels; Reserved/unimplemented system calls in the range 0-150 inclusive
3837325Skarels; are reserved for use in future Berkeley releases.
3937325Skarels; Additional system calls implemented in vendor and other
4037325Skarels; redistributions should be placed in the reserved range at the end
4137325Skarels; of the current calls.
4237325Skarels
43*68300Scgd0	STD		{ int nosys(void); } syscall
44*68300Scgd1	STD		{ int exit(int rval); }
45*68300Scgd2	STD		{ int fork(void); }
46*68300Scgd3	STD		{ int read(int fd, char *buf, u_int nbyte); }
47*68300Scgd4	STD		{ int write(int fd, char *buf, u_int nbyte); }
48*68300Scgd5	STD		{ int open(char *path, int flags, int mode); }
49*68300Scgd6	STD		{ int close(int fd); }
50*68300Scgd7	STD		{ int wait4(int pid, int *status, int options, \
51*68300Scgd			    struct rusage *rusage); }
52*68300Scgd8	COMPAT_43	{ int creat(char *path, int mode); }
53*68300Scgd9	STD		{ int link(char *path, char *link); }
54*68300Scgd10	STD		{ int unlink(char *path); }
55*68300Scgd11	OBSOL		execv
56*68300Scgd12	STD		{ int chdir(char *path); }
57*68300Scgd13	STD		{ int fchdir(int fd); }
58*68300Scgd14	STD		{ int mknod(char *path, int mode, int dev); }
59*68300Scgd15	STD		{ int chmod(char *path, int mode); }
60*68300Scgd16	STD		{ int chown(char *path, int uid, int gid); }
61*68300Scgd17	STD		{ int obreak(char *nsize); } break
62*68300Scgd18	STD		{ int getfsstat(struct statfs *buf, long bufsize, \
63*68300Scgd			    int flags); }
64*68300Scgd19	COMPAT_43	{ long lseek(int fd, long offset, int whence); }
65*68300Scgd20	STD		{ pid_t getpid(void); }
66*68300Scgd21	STD		{ int mount(int type, char *path, int flags, \
67*68300Scgd			    caddr_t data); }
68*68300Scgd22	STD		{ int unmount(char *path, int flags); }
69*68300Scgd23	STD		{ int setuid(uid_t uid); }
70*68300Scgd24	STD		{ uid_t getuid(void); }
71*68300Scgd25	STD		{ uid_t geteuid(void); }
72*68300Scgd26	STD		{ int ptrace(int req, pid_t pid, caddr_t addr, \
73*68300Scgd			    int data); }
74*68300Scgd27	STD		{ int recvmsg(int s, struct msghdr *msg, int flags); }
75*68300Scgd28	STD		{ int sendmsg(int s, caddr_t msg, int flags); }
76*68300Scgd29	STD		{ int recvfrom(int s, caddr_t buf, size_t len, \
77*68300Scgd			    int flags, caddr_t from, int *fromlenaddr); }
78*68300Scgd30	STD		{ int accept(int s, caddr_t name, int *anamelen); }
79*68300Scgd31	STD		{ int getpeername(int fdes, caddr_t asa, int *alen); }
80*68300Scgd32	STD		{ int getsockname(int fdes, caddr_t asa, int *alen); }
81*68300Scgd33	STD		{ int access(char *path, int flags); }
82*68300Scgd34	STD		{ int chflags(char *path, int flags); }
83*68300Scgd35	STD		{ int fchflags(int fd, int flags); }
84*68300Scgd36	STD		{ int sync(void); }
85*68300Scgd37	STD		{ int kill(int pid, int signum); }
86*68300Scgd38	COMPAT_43	{ int stat(char *path, struct ostat *ub); }
87*68300Scgd39	STD		{ pid_t getppid(void); }
88*68300Scgd40	COMPAT_43	{ int lstat(char *path, struct ostat *ub); }
89*68300Scgd41	STD		{ int dup(u_int fd); }
90*68300Scgd42	STD		{ int pipe(void); }
91*68300Scgd43	STD		{ gid_t getegid(void); }
92*68300Scgd44	STD		{ int profil(caddr_t samples, u_int size, \
93*68300Scgd			    u_int offset, u_int scale); }
9437325Skarels#ifdef KTRACE
95*68300Scgd45	STD		{ int ktrace(char *fname, int ops, int facs, \
96*68300Scgd			    int pid); }
9737325Skarels#else
98*68300Scgd45	UNIMPL		ktrace
9937325Skarels#endif
100*68300Scgd46	STD		{ int sigaction(int signum, struct sigaction *nsa, \
101*68300Scgd			    struct sigaction *osa); }
102*68300Scgd47	STD		{ gid_t getgid(void); }
103*68300Scgd48	STD		{ int sigprocmask(int how, sigset_t mask); }
104*68300Scgd49	STD		{ int getlogin(char *namebuf, u_int namelen); }
105*68300Scgd50	STD		{ int setlogin(char *namebuf); }
106*68300Scgd51	STD		{ int acct(char *path); }
107*68300Scgd52	STD		{ int sigpending(void); }
108*68300Scgd53	STD		{ int sigaltstack(struct sigaltstack *nss, \
109*68300Scgd			    struct sigaltstack *oss); }
110*68300Scgd54	STD		{ int ioctl(int fd, u_long com, caddr_t data); }
111*68300Scgd55	STD		{ int reboot(int opt); }
112*68300Scgd56	STD		{ int revoke(char *path); }
113*68300Scgd57	STD		{ int symlink(char *path, char *link); }
114*68300Scgd58	STD		{ int readlink(char *path, char *buf, int count); }
115*68300Scgd59	STD		{ int execve(char *path, char **argp, char **envp); }
116*68300Scgd60	STD		{ int umask(int newmask); }
117*68300Scgd61	STD		{ int chroot(char *path); }
118*68300Scgd62	COMPAT_43	{ int fstat(int fd, struct ostat *sb); }
119*68300Scgd63	COMPAT_43	{ int getkerninfo(int op, char *where, int *size, \
120*68300Scgd			    int arg); }
121*68300Scgd64	COMPAT_43	{ int getpagesize(void); }
122*68300Scgd65	STD		{ int msync(caddr_t addr, int len); }
123*68300Scgd66	STD		{ int vfork(void); }
124*68300Scgd67	OBSOL		vread
125*68300Scgd68	OBSOL		vwrite
126*68300Scgd69	STD		{ int sbrk(int incr); }
127*68300Scgd70	STD		{ int sstk(int incr); }
128*68300Scgd71	COMPAT_43	{ int mmap(caddr_t addr, int len, int prot, \
129*68300Scgd			    int flags, int fd, long pos); }
130*68300Scgd72	STD		{ int ovadvise(int anom); } vadvise
131*68300Scgd73	STD		{ int munmap(caddr_t addr, int len); }
132*68300Scgd74	STD		{ int mprotect(caddr_t addr, int len, int prot); }
133*68300Scgd75	STD		{ int madvise(caddr_t addr, int len, int behav); }
134*68300Scgd76	OBSOL		vhangup
135*68300Scgd77	OBSOL		vlimit
136*68300Scgd78	STD		{ int mincore(caddr_t addr, int len, char *vec); }
137*68300Scgd79	STD		{ int getgroups(u_int gidsetsize, gid_t *gidset); }
138*68300Scgd80	STD		{ int setgroups(u_int gidsetsize, gid_t *gidset); }
139*68300Scgd81	STD		{ int getpgrp(void); }
140*68300Scgd82	STD		{ int setpgid(int pid, int pgid); }
141*68300Scgd83	STD		{ int setitimer(u_int which, struct itimerval *itv, \
142*68300Scgd			    struct itimerval *oitv); }
143*68300Scgd84	COMPAT_43	{ int wait(void); }
144*68300Scgd85	STD		{ int swapon(char *name); }
145*68300Scgd86	STD		{ int getitimer(u_int which, struct itimerval *itv); }
146*68300Scgd87	COMPAT_43	{ int gethostname(char *hostname, u_int len); }
147*68300Scgd88	COMPAT_43	{ int sethostname(char *hostname, u_int len); }
148*68300Scgd89	STD		{ int getdtablesize(void); }
149*68300Scgd90	STD		{ int dup2(u_int from, u_int to); }
150*68300Scgd91	UNIMPL		getdopt
151*68300Scgd92	STD		{ int fcntl(int fd, int cmd, void *arg); }
152*68300Scgd93	STD		{ int select(u_int nd, fd_set *in, fd_set *ou, \
153*68300Scgd			    fd_set *ex, struct timeval *tv); }
154*68300Scgd94	UNIMPL		setdopt
155*68300Scgd95	STD		{ int fsync(int fd); }
156*68300Scgd96	STD		{ int setpriority(int which, int who, int prio); }
157*68300Scgd97	STD		{ int socket(int domain, int type, int protocol); }
158*68300Scgd98	STD		{ int connect(int s, caddr_t name, int namelen); }
159*68300Scgd99	COMPAT_43	{ int accept(int s, caddr_t name, int *anamelen); }
160*68300Scgd100	STD		{ int getpriority(int which, int who); }
161*68300Scgd101	COMPAT_43	{ int send(int s, caddr_t buf, int len, int flags); }
162*68300Scgd102	COMPAT_43	{ int recv(int s, caddr_t buf, int len, int flags); }
163*68300Scgd103	STD		{ int sigreturn(struct sigcontext *sigcntxp); }
164*68300Scgd104	STD		{ int bind(int s, caddr_t name, int namelen); }
165*68300Scgd105	STD		{ int setsockopt(int s, int level, int name, \
166*68300Scgd			    caddr_t val, int valsize); }
167*68300Scgd106	STD		{ int listen(int s, int backlog); }
168*68300Scgd107	OBSOL		vtimes
169*68300Scgd108	COMPAT_43	{ int sigvec(int signum, struct sigvec *nsv, \
170*68300Scgd			    struct sigvec *osv); }
171*68300Scgd109	COMPAT_43	{ int sigblock(int mask); }
172*68300Scgd110	COMPAT_43	{ int sigsetmask(int mask); }
173*68300Scgd111	STD		{ int sigsuspend(int mask); }
174*68300Scgd112	COMPAT_43	{ int sigstack(struct sigstack *nss, \
175*68300Scgd			    struct sigstack *oss); }
176*68300Scgd113	COMPAT_43	{ int recvmsg(int s, struct omsghdr *msg, int flags); }
177*68300Scgd114	COMPAT_43	{ int sendmsg(int s, caddr_t msg, int flags); }
17837325Skarels#ifdef TRACE
179*68300Scgd115	STD		{ int vtrace(int request, int value); }
18037325Skarels#else
181*68300Scgd115	OBSOL		vtrace
18237325Skarels#endif
183*68300Scgd116	STD		{ int gettimeofday(struct timeval *tp, \
184*68300Scgd			    struct timezone *tzp); }
185*68300Scgd117	STD		{ int getrusage(int who, struct rusage *rusage); }
186*68300Scgd118	STD		{ int getsockopt(int s, int level, int name, \
187*68300Scgd			    caddr_t val, int *avalsize); }
18837325Skarels#ifdef vax
189*68300Scgd119	STD		{ int resuba(int value); }
19037325Skarels#else
191*68300Scgd119	UNIMPL		resuba
19237325Skarels#endif
193*68300Scgd120	STD		{ int readv(int fd, struct iovec *iovp, u_int iovcnt); }
194*68300Scgd121	STD		{ int writev(int fd, struct iovec *iovp, \
195*68300Scgd			    u_int iovcnt); }
196*68300Scgd122	STD		{ int settimeofday(struct timeval *tv, \
197*68300Scgd			    struct timezone *tzp); }
198*68300Scgd123	STD		{ int fchown(int fd, int uid, int gid); }
199*68300Scgd124	STD		{ int fchmod(int fd, int mode); }
200*68300Scgd125	COMPAT_43	{ int recvfrom(int s, caddr_t buf, size_t len, \
201*68300Scgd			    int flags, caddr_t from, int *fromlenaddr); }
202*68300Scgd126	COMPAT_43	{ int setreuid(int ruid, int euid); }
203*68300Scgd127	COMPAT_43	{ int setregid(int rgid, int egid); }
204*68300Scgd128	STD		{ int rename(char *from, char *to); }
205*68300Scgd129	COMPAT_43	{ int truncate(char *path, long length); }
206*68300Scgd130	COMPAT_43	{ int ftruncate(int fd, long length); }
207*68300Scgd131	STD		{ int flock(int fd, int how); }
208*68300Scgd132	STD		{ int mkfifo(char *path, int mode); }
209*68300Scgd133	STD		{ int sendto(int s, caddr_t buf, size_t len, \
210*68300Scgd			    int flags, caddr_t to, int tolen); }
211*68300Scgd134	STD		{ int shutdown(int s, int how); }
212*68300Scgd135	STD		{ int socketpair(int domain, int type, int protocol, \
213*68300Scgd			    int *rsv); }
214*68300Scgd136	STD		{ int mkdir(char *path, int mode); }
215*68300Scgd137	STD		{ int rmdir(char *path); }
216*68300Scgd138	STD		{ int utimes(char *path, struct timeval *tptr); }
217*68300Scgd139	OBSOL		4.2 sigreturn
218*68300Scgd140	STD		{ int adjtime(struct timeval *delta, \
219*68300Scgd			    struct timeval *olddelta); }
220*68300Scgd141	COMPAT_43	{ int getpeername(int fdes, caddr_t asa, int *alen); }
221*68300Scgd142	COMPAT_43	{ int32_t gethostid(void); }
222*68300Scgd143	COMPAT_43	{ int sethostid(int32_t hostid); }
223*68300Scgd144	COMPAT_43	{ int getrlimit(u_int which, struct ogetrlimit *rlp); }
224*68300Scgd145	COMPAT_43	{ int setrlimit(u_int which, struct ogetrlimit *rlp); }
225*68300Scgd146	COMPAT_43	{ int killpg(int pgid, int signum); }
226*68300Scgd147	STD		{ int setsid(void); }
227*68300Scgd148	STD		{ int quotactl(char *path, int cmd, int uid, \
228*68300Scgd			    caddr_t arg); }
229*68300Scgd149	COMPAT_43	{ int quota(void); }
230*68300Scgd150	COMPAT_43	{ int getsockname(int fdec, caddr_t asa, int *alen); }
23138353Smckusick
23238353Smckusick; Syscalls 151-180 inclusive are reserved for vendor-specific
23338353Smckusick; system calls.  (This includes various calls added for compatibity
23438353Smckusick; with other Unix variants.)
23543401Skarels; Some of these calls are now supported by BSD...
236*68300Scgd151	UNIMPL
237*68300Scgd152	UNIMPL
238*68300Scgd153	UNIMPL
239*68300Scgd154	UNIMPL
24038353Smckusick#ifdef NFS
241*68300Scgd155	STD		{ int nfssvc(int flag, caddr_t argp); }
24238353Smckusick#else
243*68300Scgd155	UNIMPL		nfssvc
24438353Smckusick#endif
245*68300Scgd156	COMPAT_43	{ int getdirentries(int fd, char *buf, u_int count, \
246*68300Scgd			    long *basep); }
247*68300Scgd157	STD		{ int statfs(char *path, struct statfs *buf); }
248*68300Scgd158	STD		{ int fstatfs(int fd, struct statfs *buf); }
249*68300Scgd159	UNIMPL
250*68300Scgd160	UNIMPL
25138353Smckusick#ifdef NFS
252*68300Scgd161	STD		{ int getfh(char *fname, fhandle_t *fhp); }
25338353Smckusick#else
254*68300Scgd161	UNIMPL		getfh
25538353Smckusick#endif
256*68300Scgd162	UNIMPL		getdomainname
257*68300Scgd163	UNIMPL		setdomainname
258*68300Scgd164	UNIMPL
259*68300Scgd165	UNIMPL
260*68300Scgd166	UNIMPL
261*68300Scgd167	UNIMPL
262*68300Scgd168	UNIMPL
263*68300Scgd169	UNIMPL		semsys
264*68300Scgd170	UNIMPL		msgsys
265*68300Scgd; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
266*68300Scgd#if defined(SYSVSHM) && !defined(alpha)
267*68300Scgd171	COMPAT_43	{ int shmsys(int which, int a2, int a3, int a4); }
26841992Smckusick#else
269*68300Scgd171	UNIMPL		shmsys
27041992Smckusick#endif
271*68300Scgd172	UNIMPL
272*68300Scgd173	UNIMPL
273*68300Scgd174	UNIMPL
274*68300Scgd175	UNIMPL
275*68300Scgd176	UNIMPL
276*68300Scgd177	UNIMPL
277*68300Scgd178	UNIMPL
278*68300Scgd179	UNIMPL
279*68300Scgd180	UNIMPL
28040373Smckusick
281*68300Scgd; Syscalls 180-209 are used by/reserved for BSD
282*68300Scgd181	STD		{ int setgid(gid_t gid); }
283*68300Scgd182	STD		{ int setegid(gid_t egid); }
284*68300Scgd183	STD		{ int seteuid(uid_t euid); }
28551874Smckusick#ifdef LFS
286*68300Scgd184	STD		{ int lfs_bmapv(fsid_t *fsidp, \
287*68300Scgd			    struct block_info *blkiov, int blkcnt); }
288*68300Scgd185	STD		{ int lfs_markv(fsid_t *fsidp, \
289*68300Scgd			    struct block_info *blkiov, int blkcnt); }
290*68300Scgd186	STD		{ int lfs_segclean(fsid_t *fsidp, u_long segment); }
291*68300Scgd187	STD		{ int lfs_segwait(fsid_t *fsidp, struct timeval *tv); }
29251874Smckusick#else
293*68300Scgd184	UNIMPL		lfs_bmapv
294*68300Scgd185	UNIMPL		lfs_markv
295*68300Scgd186	UNIMPL		lfs_segclean
296*68300Scgd187	UNIMPL		lfs_segwait
29751874Smckusick#endif
298*68300Scgd188	STD		{ int stat(char *path, struct stat *ub); }
299*68300Scgd189	STD		{ int fstat(int fd, struct stat *sb); }
300*68300Scgd190	STD		{ int lstat(char *path, struct stat *ub); }
301*68300Scgd191	STD		{ int pathconf(char *path, int name); }
302*68300Scgd192	STD		{ int fpathconf(int fd, int name); }
303*68300Scgd193	UNIMPL
304*68300Scgd194	STD		{ int getrlimit(u_int which, struct rlimit *rlp); }
305*68300Scgd195	STD		{ int setrlimit(u_int which, struct rlimit *rlp); }
306*68300Scgd196	STD		{ int getdirentries(int fd, char *buf, u_int count, \
307*68300Scgd			    long *basep); }
308*68300Scgd197	STD		{ caddr_t mmap(caddr_t addr, size_t len, int prot, \
309*68300Scgd			    int flags, int fd, long pad, off_t pos); }
310*68300Scgd198	STD		{ int nosys(void); } __syscall
311*68300Scgd199	STD		{ off_t lseek(int fd, int pad, off_t offset, \
312*68300Scgd			    int whence); }
313*68300Scgd200	STD		{ int truncate(char *path, int pad, off_t length); }
314*68300Scgd201	STD		{ int ftruncate(int fd, int pad, off_t length); }
315*68300Scgd202	STD		{ int __sysctl(int *name, u_int namelen, void *old, \
316*68300Scgd			    size_t *oldlenp, void *new, size_t newlen); }
317*68300Scgd203	STD		{ int mlock(caddr_t addr, size_t len); }
318*68300Scgd204	STD		{ int munlock(caddr_t addr, size_t len); }
319*68300Scgd205	STD		{ int undelete(char *path); }
320*68300Scgd206	UNIMPL
321*68300Scgd207	UNIMPL
322*68300Scgd208	UNIMPL
323*68300Scgd209	UNIMPL
324*68300Scgd; Syscalls 210-219 are used by/reserved for vendor-specific system calls
325*68300Scgd210	UNIMPL
326*68300Scgd211	UNIMPL
327*68300Scgd212	UNIMPL
328*68300Scgd213	UNIMPL
329*68300Scgd214	UNIMPL
330*68300Scgd215	UNIMPL
331*68300Scgd216	UNIMPL
332*68300Scgd217	UNIMPL
333*68300Scgd218	UNIMPL
334*68300Scgd219	UNIMPL
335*68300Scgd; System calls 220-240 are reserved for use by BSD
336*68300Scgd220	UNIMPL		semctl
337*68300Scgd221	UNIMPL		semget
338*68300Scgd222	UNIMPL		semop
339*68300Scgd223	UNIMPL		semconfig
340*68300Scgd224	UNIMPL		msgctl
341*68300Scgd225	UNIMPL		msgget
342*68300Scgd226	UNIMPL		msgsnd
343*68300Scgd227	UNIMPL		msgrcv
344*68300Scgd#if defined(SYSVSHM) && 0
345*68300Scgd228	STD		{ int shmat(int shmid, void *shmaddr, int shmflg); }
346*68300Scgd229	STD		{ int shmctl(int shmid, int cmd, \
347*68300Scgd			    struct shmid_ds *buf); }
348*68300Scgd230	STD		{ int shmdt(void *shmaddr); }
349*68300Scgd231	STD		{ int shmget(key_t key, int size, int shmflg); }
350*68300Scgd#else
351*68300Scgd228	UNIMPL		shmat
352*68300Scgd229	UNIMPL		shmctl
353*68300Scgd230	UNIMPL		shmdt
354*68300Scgd231	UNIMPL		shmget
355*68300Scgd#endif
356