xref: /original-bsd/sys/kern/syscalls.master (revision 0842ddeb)
1	@(#)syscalls.master	8.6 (Berkeley) 03/30/95
2; System call name/number "master" file.
3; (See syscalls.conf to see what it is processed into.)
4;
5; Fields: number type [type-dependent ...]
6;	number	system call number, must be in order
7;	type	one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
8;		the compatibility options defined in syscalls.conf.
9;
10; types:
11;	STD	always included
12;	OBSOL	obsolete, not included in system
13;	UNIMPL	unimplemented, not included in system
14;	NODEF	included, but don't define the syscall number
15;	NOARGS	included, but don't define the syscall args structure
16;
17; The compat options are defined in the syscalls.conf file, and the
18; compat option name is prefixed to the syscall name.  Other than
19; that, they're like NODEF (for 'compat' options), or STD (for
20; 'libcompat' options).
21;
22; The type-dependent arguments are as follows:
23; For STD, NODEF, NOARGS, and compat syscalls:
24;	{ pseudo-proto } [alias]
25; For other syscalls:
26;	[comment]
27;
28; #ifdef's, etc. may be included, and are copied to the output files.
29; #include's are copied to the syscall switch definition file only.
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/signal.h>
34#include <sys/mount.h>
35#include <sys/syscallargs.h>
36
37; Reserved/unimplemented system calls in the range 0-150 inclusive
38; are reserved for use in future Berkeley releases.
39; Additional system calls implemented in vendor and other
40; redistributions should be placed in the reserved range at the end
41; of the current calls.
42
430	STD		{ int nosys(void); } syscall
441	STD		{ int exit(int rval); }
452	STD		{ int fork(void); }
463	STD		{ int read(int fd, char *buf, u_int nbyte); }
474	STD		{ int write(int fd, char *buf, u_int nbyte); }
485	STD		{ int open(char *path, int flags, int mode); }
496	STD		{ int close(int fd); }
507	STD		{ int wait4(int pid, int *status, int options, \
51			    struct rusage *rusage); }
528	COMPAT_43	{ int creat(char *path, int mode); }
539	STD		{ int link(char *path, char *link); }
5410	STD		{ int unlink(char *path); }
5511	OBSOL		execv
5612	STD		{ int chdir(char *path); }
5713	STD		{ int fchdir(int fd); }
5814	STD		{ int mknod(char *path, int mode, int dev); }
5915	STD		{ int chmod(char *path, int mode); }
6016	STD		{ int chown(char *path, int uid, int gid); }
6117	STD		{ int obreak(char *nsize); } break
6218	STD		{ int getfsstat(struct statfs *buf, long bufsize, \
63			    int flags); }
6419	COMPAT_43	{ long lseek(int fd, long offset, int whence); }
6520	STD		{ pid_t getpid(void); }
6621	STD		{ int mount(char *type, char *path, int flags, \
67			    caddr_t data); }
6822	STD		{ int unmount(char *path, int flags); }
6923	STD		{ int setuid(uid_t uid); }
7024	STD		{ uid_t getuid(void); }
7125	STD		{ uid_t geteuid(void); }
7226	STD		{ int ptrace(int req, pid_t pid, caddr_t addr, \
73			    int data); }
7427	STD		{ int recvmsg(int s, struct msghdr *msg, int flags); }
7528	STD		{ int sendmsg(int s, caddr_t msg, int flags); }
7629	STD		{ int recvfrom(int s, caddr_t buf, size_t len, \
77			    int flags, caddr_t from, int *fromlenaddr); }
7830	STD		{ int accept(int s, caddr_t name, int *anamelen); }
7931	STD		{ int getpeername(int fdes, caddr_t asa, int *alen); }
8032	STD		{ int getsockname(int fdes, caddr_t asa, int *alen); }
8133	STD		{ int access(char *path, int flags); }
8234	STD		{ int chflags(char *path, int flags); }
8335	STD		{ int fchflags(int fd, int flags); }
8436	STD		{ int sync(void); }
8537	STD		{ int kill(int pid, int signum); }
8638	COMPAT_43	{ int stat(char *path, struct ostat *ub); }
8739	STD		{ pid_t getppid(void); }
8840	COMPAT_43	{ int lstat(char *path, struct ostat *ub); }
8941	STD		{ int dup(u_int fd); }
9042	STD		{ int pipe(void); }
9143	STD		{ gid_t getegid(void); }
9244	STD		{ int profil(caddr_t samples, u_int size, \
93			    u_int offset, u_int scale); }
94#ifdef KTRACE
9545	STD		{ int ktrace(char *fname, int ops, int facs, \
96			    int pid); }
97#else
9845	UNIMPL		ktrace
99#endif
10046	STD		{ int sigaction(int signum, struct sigaction *nsa, \
101			    struct sigaction *osa); }
10247	STD		{ gid_t getgid(void); }
10348	STD		{ int sigprocmask(int how, sigset_t mask); }
10449	STD		{ int getlogin(char *namebuf, u_int namelen); }
10550	STD		{ int setlogin(char *namebuf); }
10651	STD		{ int acct(char *path); }
10752	STD		{ int sigpending(void); }
10853	STD		{ int sigaltstack(struct sigaltstack *nss, \
109			    struct sigaltstack *oss); }
11054	STD		{ int ioctl(int fd, u_long com, caddr_t data); }
11155	STD		{ int reboot(int opt); }
11256	STD		{ int revoke(char *path); }
11357	STD		{ int symlink(char *path, char *link); }
11458	STD		{ int readlink(char *path, char *buf, int count); }
11559	STD		{ int execve(char *path, char **argp, char **envp); }
11660	STD		{ int umask(int newmask); }
11761	STD		{ int chroot(char *path); }
11862	COMPAT_43	{ int fstat(int fd, struct ostat *sb); }
11963	COMPAT_43	{ int getkerninfo(int op, char *where, int *size, \
120			    int arg); }
12164	COMPAT_43	{ int getpagesize(void); }
12265	STD		{ int msync(caddr_t addr, int len); }
12366	STD		{ int vfork(void); }
12467	OBSOL		vread
12568	OBSOL		vwrite
12669	STD		{ int sbrk(int incr); }
12770	STD		{ int sstk(int incr); }
12871	COMPAT_43	{ int mmap(caddr_t addr, int len, int prot, \
129			    int flags, int fd, long pos); }
13072	STD		{ int ovadvise(int anom); } vadvise
13173	STD		{ int munmap(caddr_t addr, int len); }
13274	STD		{ int mprotect(caddr_t addr, int len, int prot); }
13375	STD		{ int madvise(caddr_t addr, int len, int behav); }
13476	OBSOL		vhangup
13577	OBSOL		vlimit
13678	STD		{ int mincore(caddr_t addr, int len, char *vec); }
13779	STD		{ int getgroups(u_int gidsetsize, gid_t *gidset); }
13880	STD		{ int setgroups(u_int gidsetsize, gid_t *gidset); }
13981	STD		{ int getpgrp(void); }
14082	STD		{ int setpgid(int pid, int pgid); }
14183	STD		{ int setitimer(u_int which, struct itimerval *itv, \
142			    struct itimerval *oitv); }
14384	COMPAT_43	{ int wait(void); }
14485	STD		{ int swapon(char *name); }
14586	STD		{ int getitimer(u_int which, struct itimerval *itv); }
14687	COMPAT_43	{ int gethostname(char *hostname, u_int len); }
14788	COMPAT_43	{ int sethostname(char *hostname, u_int len); }
14889	STD		{ int getdtablesize(void); }
14990	STD		{ int dup2(u_int from, u_int to); }
15091	UNIMPL		getdopt
15192	STD		{ int fcntl(int fd, int cmd, void *arg); }
15293	STD		{ int select(u_int nd, fd_set *in, fd_set *ou, \
153			    fd_set *ex, struct timeval *tv); }
15494	UNIMPL		setdopt
15595	STD		{ int fsync(int fd); }
15696	STD		{ int setpriority(int which, int who, int prio); }
15797	STD		{ int socket(int domain, int type, int protocol); }
15898	STD		{ int connect(int s, caddr_t name, int namelen); }
15999	COMPAT_43	{ int accept(int s, caddr_t name, int *anamelen); }
160100	STD		{ int getpriority(int which, int who); }
161101	COMPAT_43	{ int send(int s, caddr_t buf, int len, int flags); }
162102	COMPAT_43	{ int recv(int s, caddr_t buf, int len, int flags); }
163103	STD		{ int sigreturn(struct sigcontext *sigcntxp); }
164104	STD		{ int bind(int s, caddr_t name, int namelen); }
165105	STD		{ int setsockopt(int s, int level, int name, \
166			    caddr_t val, int valsize); }
167106	STD		{ int listen(int s, int backlog); }
168107	OBSOL		vtimes
169108	COMPAT_43	{ int sigvec(int signum, struct sigvec *nsv, \
170			    struct sigvec *osv); }
171109	COMPAT_43	{ int sigblock(int mask); }
172110	COMPAT_43	{ int sigsetmask(int mask); }
173111	STD		{ int sigsuspend(int mask); }
174112	COMPAT_43	{ int sigstack(struct sigstack *nss, \
175			    struct sigstack *oss); }
176113	COMPAT_43	{ int recvmsg(int s, struct omsghdr *msg, int flags); }
177114	COMPAT_43	{ int sendmsg(int s, caddr_t msg, int flags); }
178#ifdef TRACE
179115	STD		{ int vtrace(int request, int value); }
180#else
181115	OBSOL		vtrace
182#endif
183116	STD		{ int gettimeofday(struct timeval *tp, \
184			    struct timezone *tzp); }
185117	STD		{ int getrusage(int who, struct rusage *rusage); }
186118	STD		{ int getsockopt(int s, int level, int name, \
187			    caddr_t val, int *avalsize); }
188#ifdef vax
189119	STD		{ int resuba(int value); }
190#else
191119	UNIMPL		resuba
192#endif
193120	STD		{ int readv(int fd, struct iovec *iovp, u_int iovcnt); }
194121	STD		{ int writev(int fd, struct iovec *iovp, \
195			    u_int iovcnt); }
196122	STD		{ int settimeofday(struct timeval *tv, \
197			    struct timezone *tzp); }
198123	STD		{ int fchown(int fd, int uid, int gid); }
199124	STD		{ int fchmod(int fd, int mode); }
200125	COMPAT_43	{ int recvfrom(int s, caddr_t buf, size_t len, \
201			    int flags, caddr_t from, int *fromlenaddr); }
202126	COMPAT_43	{ int setreuid(int ruid, int euid); }
203127	COMPAT_43	{ int setregid(int rgid, int egid); }
204128	STD		{ int rename(char *from, char *to); }
205129	COMPAT_43	{ int truncate(char *path, long length); }
206130	COMPAT_43	{ int ftruncate(int fd, long length); }
207131	STD		{ int flock(int fd, int how); }
208132	STD		{ int mkfifo(char *path, int mode); }
209133	STD		{ int sendto(int s, caddr_t buf, size_t len, \
210			    int flags, caddr_t to, int tolen); }
211134	STD		{ int shutdown(int s, int how); }
212135	STD		{ int socketpair(int domain, int type, int protocol, \
213			    int *rsv); }
214136	STD		{ int mkdir(char *path, int mode); }
215137	STD		{ int rmdir(char *path); }
216138	STD		{ int utimes(char *path, struct timeval *tptr); }
217139	OBSOL		4.2 sigreturn
218140	STD		{ int adjtime(struct timeval *delta, \
219			    struct timeval *olddelta); }
220141	COMPAT_43	{ int getpeername(int fdes, caddr_t asa, int *alen); }
221142	COMPAT_43	{ int32_t gethostid(void); }
222143	COMPAT_43	{ int sethostid(int32_t hostid); }
223144	COMPAT_43	{ int getrlimit(u_int which, struct ogetrlimit *rlp); }
224145	COMPAT_43	{ int setrlimit(u_int which, struct ogetrlimit *rlp); }
225146	COMPAT_43	{ int killpg(int pgid, int signum); }
226147	STD		{ int setsid(void); }
227148	STD		{ int quotactl(char *path, int cmd, int uid, \
228			    caddr_t arg); }
229149	COMPAT_43	{ int quota(void); }
230150	COMPAT_43	{ int getsockname(int fdec, caddr_t asa, int *alen); }
231
232; Syscalls 151-180 inclusive are reserved for vendor-specific
233; system calls.  (This includes various calls added for compatibity
234; with other Unix variants.)
235; Some of these calls are now supported by BSD...
236151	UNIMPL
237152	UNIMPL
238153	UNIMPL
239154	UNIMPL
240#ifdef NFS
241155	STD		{ int nfssvc(int flag, caddr_t argp); }
242#else
243155	UNIMPL		nfssvc
244#endif
245156	COMPAT_43	{ int getdirentries(int fd, char *buf, u_int count, \
246			    long *basep); }
247157	STD		{ int statfs(char *path, struct statfs *buf); }
248158	STD		{ int fstatfs(int fd, struct statfs *buf); }
249159	UNIMPL
250160	UNIMPL
251#ifdef NFS
252161	STD		{ int getfh(char *fname, fhandle_t *fhp); }
253#else
254161	UNIMPL		getfh
255#endif
256162	UNIMPL		getdomainname
257163	UNIMPL		setdomainname
258164	UNIMPL
259165	UNIMPL
260166	UNIMPL
261167	UNIMPL
262168	UNIMPL
263169	UNIMPL		semsys
264170	UNIMPL		msgsys
265; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
266#if defined(SYSVSHM) && !defined(alpha)
267171	COMPAT_43	{ int shmsys(int which, int a2, int a3, int a4); }
268#else
269171	UNIMPL		shmsys
270#endif
271172	UNIMPL
272173	UNIMPL
273174	UNIMPL
274175	UNIMPL
275176	UNIMPL
276177	UNIMPL
277178	UNIMPL
278179	UNIMPL
279180	UNIMPL
280
281; Syscalls 180-209 are used by/reserved for BSD
282181	STD		{ int setgid(gid_t gid); }
283182	STD		{ int setegid(gid_t egid); }
284183	STD		{ int seteuid(uid_t euid); }
285#ifdef LFS
286184	STD		{ int lfs_bmapv(fsid_t *fsidp, \
287			    struct block_info *blkiov, int blkcnt); }
288185	STD		{ int lfs_markv(fsid_t *fsidp, \
289			    struct block_info *blkiov, int blkcnt); }
290186	STD		{ int lfs_segclean(fsid_t *fsidp, u_long segment); }
291187	STD		{ int lfs_segwait(fsid_t *fsidp, struct timeval *tv); }
292#else
293184	UNIMPL		lfs_bmapv
294185	UNIMPL		lfs_markv
295186	UNIMPL		lfs_segclean
296187	UNIMPL		lfs_segwait
297#endif
298188	STD		{ int stat(char *path, struct stat *ub); }
299189	STD		{ int fstat(int fd, struct stat *sb); }
300190	STD		{ int lstat(char *path, struct stat *ub); }
301191	STD		{ int pathconf(char *path, int name); }
302192	STD		{ int fpathconf(int fd, int name); }
303193	UNIMPL
304194	STD		{ int getrlimit(u_int which, struct rlimit *rlp); }
305195	STD		{ int setrlimit(u_int which, struct rlimit *rlp); }
306196	STD		{ int getdirentries(int fd, char *buf, u_int count, \
307			    long *basep); }
308197	STD		{ caddr_t mmap(caddr_t addr, size_t len, int prot, \
309			    int flags, int fd, long pad, off_t pos); }
310198	STD		{ int nosys(void); } __syscall
311199	STD		{ off_t lseek(int fd, int pad, off_t offset, \
312			    int whence); }
313200	STD		{ int truncate(char *path, int pad, off_t length); }
314201	STD		{ int ftruncate(int fd, int pad, off_t length); }
315202	STD		{ int __sysctl(int *name, u_int namelen, void *old, \
316			    size_t *oldlenp, void *new, size_t newlen); }
317203	STD		{ int mlock(caddr_t addr, size_t len); }
318204	STD		{ int munlock(caddr_t addr, size_t len); }
319205	STD		{ int undelete(char *path); }
320206	UNIMPL
321207	UNIMPL
322208	UNIMPL
323209	UNIMPL
324; Syscalls 210-219 are used by/reserved for vendor-specific system calls
325210	UNIMPL
326211	UNIMPL
327212	UNIMPL
328213	UNIMPL
329214	UNIMPL
330215	UNIMPL
331216	UNIMPL
332217	UNIMPL
333218	UNIMPL
334219	UNIMPL
335; System calls 220-240 are reserved for use by BSD
336220	UNIMPL		semctl
337221	UNIMPL		semget
338222	UNIMPL		semop
339223	UNIMPL		semconfig
340224	UNIMPL		msgctl
341225	UNIMPL		msgget
342226	UNIMPL		msgsnd
343227	UNIMPL		msgrcv
344#if defined(SYSVSHM) && 0
345228	STD		{ int shmat(int shmid, void *shmaddr, int shmflg); }
346229	STD		{ int shmctl(int shmid, int cmd, \
347			    struct shmid_ds *buf); }
348230	STD		{ int shmdt(void *shmaddr); }
349231	STD		{ int shmget(key_t key, int size, int shmflg); }
350#else
351228	UNIMPL		shmat
352229	UNIMPL		shmctl
353230	UNIMPL		shmdt
354231	UNIMPL		shmget
355#endif
356