xref: /csrg-svn/sys/kern/syscalls.master (revision 68658)
1*68658Smckusick	@(#)syscalls.master	8.6 (Berkeley) 03/30/95
268300Scgd; System call name/number "master" file.
368300Scgd; (See syscalls.conf to see what it is processed into.)
468300Scgd;
568300Scgd; Fields: number type [type-dependent ...]
637325Skarels;	number	system call number, must be in order
768300Scgd;	type	one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
868300Scgd;		the compatibility options defined in syscalls.conf.
968300Scgd;
1037325Skarels; types:
1137325Skarels;	STD	always included
1268300Scgd;	OBSOL	obsolete, not included in system
1368300Scgd;	UNIMPL	unimplemented, not included in system
1468300Scgd;	NODEF	included, but don't define the syscall number
1568300Scgd;	NOARGS	included, but don't define the syscall args structure
1668300Scgd;
1768300Scgd; The compat options are defined in the syscalls.conf file, and the
1868300Scgd; compat option name is prefixed to the syscall name.  Other than
1968300Scgd; that, they're like NODEF (for 'compat' options), or STD (for
2068300Scgd; 'libcompat' options).
2168300Scgd;
2268300Scgd; The type-dependent arguments are as follows:
2368300Scgd; For STD, NODEF, NOARGS, and compat syscalls:
2468300Scgd;	{ pseudo-proto } [alias]
2568300Scgd; For other syscalls:
2668300Scgd;	[comment]
2768300Scgd;
2837325Skarels; #ifdef's, etc. may be included, and are copied to the output files.
2968300Scgd; #include's are copied to the syscall switch definition file only.
3037325Skarels
3168300Scgd#include <sys/param.h>
3268300Scgd#include <sys/systm.h>
3368300Scgd#include <sys/signal.h>
3468300Scgd#include <sys/mount.h>
3568300Scgd#include <sys/syscallargs.h>
3668300Scgd
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
4368300Scgd0	STD		{ int nosys(void); } syscall
4468300Scgd1	STD		{ int exit(int rval); }
4568300Scgd2	STD		{ int fork(void); }
4668300Scgd3	STD		{ int read(int fd, char *buf, u_int nbyte); }
4768300Scgd4	STD		{ int write(int fd, char *buf, u_int nbyte); }
4868300Scgd5	STD		{ int open(char *path, int flags, int mode); }
4968300Scgd6	STD		{ int close(int fd); }
5068300Scgd7	STD		{ int wait4(int pid, int *status, int options, \
5168300Scgd			    struct rusage *rusage); }
5268300Scgd8	COMPAT_43	{ int creat(char *path, int mode); }
5368300Scgd9	STD		{ int link(char *path, char *link); }
5468300Scgd10	STD		{ int unlink(char *path); }
5568300Scgd11	OBSOL		execv
5668300Scgd12	STD		{ int chdir(char *path); }
5768300Scgd13	STD		{ int fchdir(int fd); }
5868300Scgd14	STD		{ int mknod(char *path, int mode, int dev); }
5968300Scgd15	STD		{ int chmod(char *path, int mode); }
6068300Scgd16	STD		{ int chown(char *path, int uid, int gid); }
6168300Scgd17	STD		{ int obreak(char *nsize); } break
6268300Scgd18	STD		{ int getfsstat(struct statfs *buf, long bufsize, \
6368300Scgd			    int flags); }
6468300Scgd19	COMPAT_43	{ long lseek(int fd, long offset, int whence); }
6568300Scgd20	STD		{ pid_t getpid(void); }
66*68658Smckusick21	STD		{ int mount(char *type, char *path, int flags, \
6768300Scgd			    caddr_t data); }
6868300Scgd22	STD		{ int unmount(char *path, int flags); }
6968300Scgd23	STD		{ int setuid(uid_t uid); }
7068300Scgd24	STD		{ uid_t getuid(void); }
7168300Scgd25	STD		{ uid_t geteuid(void); }
7268300Scgd26	STD		{ int ptrace(int req, pid_t pid, caddr_t addr, \
7368300Scgd			    int data); }
7468300Scgd27	STD		{ int recvmsg(int s, struct msghdr *msg, int flags); }
7568300Scgd28	STD		{ int sendmsg(int s, caddr_t msg, int flags); }
7668300Scgd29	STD		{ int recvfrom(int s, caddr_t buf, size_t len, \
7768300Scgd			    int flags, caddr_t from, int *fromlenaddr); }
7868300Scgd30	STD		{ int accept(int s, caddr_t name, int *anamelen); }
7968300Scgd31	STD		{ int getpeername(int fdes, caddr_t asa, int *alen); }
8068300Scgd32	STD		{ int getsockname(int fdes, caddr_t asa, int *alen); }
8168300Scgd33	STD		{ int access(char *path, int flags); }
8268300Scgd34	STD		{ int chflags(char *path, int flags); }
8368300Scgd35	STD		{ int fchflags(int fd, int flags); }
8468300Scgd36	STD		{ int sync(void); }
8568300Scgd37	STD		{ int kill(int pid, int signum); }
8668300Scgd38	COMPAT_43	{ int stat(char *path, struct ostat *ub); }
8768300Scgd39	STD		{ pid_t getppid(void); }
8868300Scgd40	COMPAT_43	{ int lstat(char *path, struct ostat *ub); }
8968300Scgd41	STD		{ int dup(u_int fd); }
9068300Scgd42	STD		{ int pipe(void); }
9168300Scgd43	STD		{ gid_t getegid(void); }
9268300Scgd44	STD		{ int profil(caddr_t samples, u_int size, \
9368300Scgd			    u_int offset, u_int scale); }
9437325Skarels#ifdef KTRACE
9568300Scgd45	STD		{ int ktrace(char *fname, int ops, int facs, \
9668300Scgd			    int pid); }
9737325Skarels#else
9868300Scgd45	UNIMPL		ktrace
9937325Skarels#endif
10068300Scgd46	STD		{ int sigaction(int signum, struct sigaction *nsa, \
10168300Scgd			    struct sigaction *osa); }
10268300Scgd47	STD		{ gid_t getgid(void); }
10368300Scgd48	STD		{ int sigprocmask(int how, sigset_t mask); }
10468300Scgd49	STD		{ int getlogin(char *namebuf, u_int namelen); }
10568300Scgd50	STD		{ int setlogin(char *namebuf); }
10668300Scgd51	STD		{ int acct(char *path); }
10768300Scgd52	STD		{ int sigpending(void); }
10868300Scgd53	STD		{ int sigaltstack(struct sigaltstack *nss, \
10968300Scgd			    struct sigaltstack *oss); }
11068300Scgd54	STD		{ int ioctl(int fd, u_long com, caddr_t data); }
11168300Scgd55	STD		{ int reboot(int opt); }
11268300Scgd56	STD		{ int revoke(char *path); }
11368300Scgd57	STD		{ int symlink(char *path, char *link); }
11468300Scgd58	STD		{ int readlink(char *path, char *buf, int count); }
11568300Scgd59	STD		{ int execve(char *path, char **argp, char **envp); }
11668300Scgd60	STD		{ int umask(int newmask); }
11768300Scgd61	STD		{ int chroot(char *path); }
11868300Scgd62	COMPAT_43	{ int fstat(int fd, struct ostat *sb); }
11968300Scgd63	COMPAT_43	{ int getkerninfo(int op, char *where, int *size, \
12068300Scgd			    int arg); }
12168300Scgd64	COMPAT_43	{ int getpagesize(void); }
12268300Scgd65	STD		{ int msync(caddr_t addr, int len); }
12368300Scgd66	STD		{ int vfork(void); }
12468300Scgd67	OBSOL		vread
12568300Scgd68	OBSOL		vwrite
12668300Scgd69	STD		{ int sbrk(int incr); }
12768300Scgd70	STD		{ int sstk(int incr); }
12868300Scgd71	COMPAT_43	{ int mmap(caddr_t addr, int len, int prot, \
12968300Scgd			    int flags, int fd, long pos); }
13068300Scgd72	STD		{ int ovadvise(int anom); } vadvise
13168300Scgd73	STD		{ int munmap(caddr_t addr, int len); }
13268300Scgd74	STD		{ int mprotect(caddr_t addr, int len, int prot); }
13368300Scgd75	STD		{ int madvise(caddr_t addr, int len, int behav); }
13468300Scgd76	OBSOL		vhangup
13568300Scgd77	OBSOL		vlimit
13668300Scgd78	STD		{ int mincore(caddr_t addr, int len, char *vec); }
13768300Scgd79	STD		{ int getgroups(u_int gidsetsize, gid_t *gidset); }
13868300Scgd80	STD		{ int setgroups(u_int gidsetsize, gid_t *gidset); }
13968300Scgd81	STD		{ int getpgrp(void); }
14068300Scgd82	STD		{ int setpgid(int pid, int pgid); }
14168300Scgd83	STD		{ int setitimer(u_int which, struct itimerval *itv, \
14268300Scgd			    struct itimerval *oitv); }
14368300Scgd84	COMPAT_43	{ int wait(void); }
14468300Scgd85	STD		{ int swapon(char *name); }
14568300Scgd86	STD		{ int getitimer(u_int which, struct itimerval *itv); }
14668300Scgd87	COMPAT_43	{ int gethostname(char *hostname, u_int len); }
14768300Scgd88	COMPAT_43	{ int sethostname(char *hostname, u_int len); }
14868300Scgd89	STD		{ int getdtablesize(void); }
14968300Scgd90	STD		{ int dup2(u_int from, u_int to); }
15068300Scgd91	UNIMPL		getdopt
15168300Scgd92	STD		{ int fcntl(int fd, int cmd, void *arg); }
15268300Scgd93	STD		{ int select(u_int nd, fd_set *in, fd_set *ou, \
15368300Scgd			    fd_set *ex, struct timeval *tv); }
15468300Scgd94	UNIMPL		setdopt
15568300Scgd95	STD		{ int fsync(int fd); }
15668300Scgd96	STD		{ int setpriority(int which, int who, int prio); }
15768300Scgd97	STD		{ int socket(int domain, int type, int protocol); }
15868300Scgd98	STD		{ int connect(int s, caddr_t name, int namelen); }
15968300Scgd99	COMPAT_43	{ int accept(int s, caddr_t name, int *anamelen); }
16068300Scgd100	STD		{ int getpriority(int which, int who); }
16168300Scgd101	COMPAT_43	{ int send(int s, caddr_t buf, int len, int flags); }
16268300Scgd102	COMPAT_43	{ int recv(int s, caddr_t buf, int len, int flags); }
16368300Scgd103	STD		{ int sigreturn(struct sigcontext *sigcntxp); }
16468300Scgd104	STD		{ int bind(int s, caddr_t name, int namelen); }
16568300Scgd105	STD		{ int setsockopt(int s, int level, int name, \
16668300Scgd			    caddr_t val, int valsize); }
16768300Scgd106	STD		{ int listen(int s, int backlog); }
16868300Scgd107	OBSOL		vtimes
16968300Scgd108	COMPAT_43	{ int sigvec(int signum, struct sigvec *nsv, \
17068300Scgd			    struct sigvec *osv); }
17168300Scgd109	COMPAT_43	{ int sigblock(int mask); }
17268300Scgd110	COMPAT_43	{ int sigsetmask(int mask); }
17368300Scgd111	STD		{ int sigsuspend(int mask); }
17468300Scgd112	COMPAT_43	{ int sigstack(struct sigstack *nss, \
17568300Scgd			    struct sigstack *oss); }
17668300Scgd113	COMPAT_43	{ int recvmsg(int s, struct omsghdr *msg, int flags); }
17768300Scgd114	COMPAT_43	{ int sendmsg(int s, caddr_t msg, int flags); }
17837325Skarels#ifdef TRACE
17968300Scgd115	STD		{ int vtrace(int request, int value); }
18037325Skarels#else
18168300Scgd115	OBSOL		vtrace
18237325Skarels#endif
18368300Scgd116	STD		{ int gettimeofday(struct timeval *tp, \
18468300Scgd			    struct timezone *tzp); }
18568300Scgd117	STD		{ int getrusage(int who, struct rusage *rusage); }
18668300Scgd118	STD		{ int getsockopt(int s, int level, int name, \
18768300Scgd			    caddr_t val, int *avalsize); }
18837325Skarels#ifdef vax
18968300Scgd119	STD		{ int resuba(int value); }
19037325Skarels#else
19168300Scgd119	UNIMPL		resuba
19237325Skarels#endif
19368300Scgd120	STD		{ int readv(int fd, struct iovec *iovp, u_int iovcnt); }
19468300Scgd121	STD		{ int writev(int fd, struct iovec *iovp, \
19568300Scgd			    u_int iovcnt); }
19668300Scgd122	STD		{ int settimeofday(struct timeval *tv, \
19768300Scgd			    struct timezone *tzp); }
19868300Scgd123	STD		{ int fchown(int fd, int uid, int gid); }
19968300Scgd124	STD		{ int fchmod(int fd, int mode); }
20068300Scgd125	COMPAT_43	{ int recvfrom(int s, caddr_t buf, size_t len, \
20168300Scgd			    int flags, caddr_t from, int *fromlenaddr); }
20268300Scgd126	COMPAT_43	{ int setreuid(int ruid, int euid); }
20368300Scgd127	COMPAT_43	{ int setregid(int rgid, int egid); }
20468300Scgd128	STD		{ int rename(char *from, char *to); }
20568300Scgd129	COMPAT_43	{ int truncate(char *path, long length); }
20668300Scgd130	COMPAT_43	{ int ftruncate(int fd, long length); }
20768300Scgd131	STD		{ int flock(int fd, int how); }
20868300Scgd132	STD		{ int mkfifo(char *path, int mode); }
20968300Scgd133	STD		{ int sendto(int s, caddr_t buf, size_t len, \
21068300Scgd			    int flags, caddr_t to, int tolen); }
21168300Scgd134	STD		{ int shutdown(int s, int how); }
21268300Scgd135	STD		{ int socketpair(int domain, int type, int protocol, \
21368300Scgd			    int *rsv); }
21468300Scgd136	STD		{ int mkdir(char *path, int mode); }
21568300Scgd137	STD		{ int rmdir(char *path); }
21668300Scgd138	STD		{ int utimes(char *path, struct timeval *tptr); }
21768300Scgd139	OBSOL		4.2 sigreturn
21868300Scgd140	STD		{ int adjtime(struct timeval *delta, \
21968300Scgd			    struct timeval *olddelta); }
22068300Scgd141	COMPAT_43	{ int getpeername(int fdes, caddr_t asa, int *alen); }
22168300Scgd142	COMPAT_43	{ int32_t gethostid(void); }
22268300Scgd143	COMPAT_43	{ int sethostid(int32_t hostid); }
22368300Scgd144	COMPAT_43	{ int getrlimit(u_int which, struct ogetrlimit *rlp); }
22468300Scgd145	COMPAT_43	{ int setrlimit(u_int which, struct ogetrlimit *rlp); }
22568300Scgd146	COMPAT_43	{ int killpg(int pgid, int signum); }
22668300Scgd147	STD		{ int setsid(void); }
22768300Scgd148	STD		{ int quotactl(char *path, int cmd, int uid, \
22868300Scgd			    caddr_t arg); }
22968300Scgd149	COMPAT_43	{ int quota(void); }
23068300Scgd150	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...
23668300Scgd151	UNIMPL
23768300Scgd152	UNIMPL
23868300Scgd153	UNIMPL
23968300Scgd154	UNIMPL
24038353Smckusick#ifdef NFS
24168300Scgd155	STD		{ int nfssvc(int flag, caddr_t argp); }
24238353Smckusick#else
24368300Scgd155	UNIMPL		nfssvc
24438353Smckusick#endif
24568300Scgd156	COMPAT_43	{ int getdirentries(int fd, char *buf, u_int count, \
24668300Scgd			    long *basep); }
24768300Scgd157	STD		{ int statfs(char *path, struct statfs *buf); }
24868300Scgd158	STD		{ int fstatfs(int fd, struct statfs *buf); }
24968300Scgd159	UNIMPL
25068300Scgd160	UNIMPL
25138353Smckusick#ifdef NFS
25268300Scgd161	STD		{ int getfh(char *fname, fhandle_t *fhp); }
25338353Smckusick#else
25468300Scgd161	UNIMPL		getfh
25538353Smckusick#endif
25668300Scgd162	UNIMPL		getdomainname
25768300Scgd163	UNIMPL		setdomainname
25868300Scgd164	UNIMPL
25968300Scgd165	UNIMPL
26068300Scgd166	UNIMPL
26168300Scgd167	UNIMPL
26268300Scgd168	UNIMPL
26368300Scgd169	UNIMPL		semsys
26468300Scgd170	UNIMPL		msgsys
26568300Scgd; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
26668300Scgd#if defined(SYSVSHM) && !defined(alpha)
26768300Scgd171	COMPAT_43	{ int shmsys(int which, int a2, int a3, int a4); }
26841992Smckusick#else
26968300Scgd171	UNIMPL		shmsys
27041992Smckusick#endif
27168300Scgd172	UNIMPL
27268300Scgd173	UNIMPL
27368300Scgd174	UNIMPL
27468300Scgd175	UNIMPL
27568300Scgd176	UNIMPL
27668300Scgd177	UNIMPL
27768300Scgd178	UNIMPL
27868300Scgd179	UNIMPL
27968300Scgd180	UNIMPL
28040373Smckusick
28168300Scgd; Syscalls 180-209 are used by/reserved for BSD
28268300Scgd181	STD		{ int setgid(gid_t gid); }
28368300Scgd182	STD		{ int setegid(gid_t egid); }
28468300Scgd183	STD		{ int seteuid(uid_t euid); }
28551874Smckusick#ifdef LFS
28668300Scgd184	STD		{ int lfs_bmapv(fsid_t *fsidp, \
28768300Scgd			    struct block_info *blkiov, int blkcnt); }
28868300Scgd185	STD		{ int lfs_markv(fsid_t *fsidp, \
28968300Scgd			    struct block_info *blkiov, int blkcnt); }
29068300Scgd186	STD		{ int lfs_segclean(fsid_t *fsidp, u_long segment); }
29168300Scgd187	STD		{ int lfs_segwait(fsid_t *fsidp, struct timeval *tv); }
29251874Smckusick#else
29368300Scgd184	UNIMPL		lfs_bmapv
29468300Scgd185	UNIMPL		lfs_markv
29568300Scgd186	UNIMPL		lfs_segclean
29668300Scgd187	UNIMPL		lfs_segwait
29751874Smckusick#endif
29868300Scgd188	STD		{ int stat(char *path, struct stat *ub); }
29968300Scgd189	STD		{ int fstat(int fd, struct stat *sb); }
30068300Scgd190	STD		{ int lstat(char *path, struct stat *ub); }
30168300Scgd191	STD		{ int pathconf(char *path, int name); }
30268300Scgd192	STD		{ int fpathconf(int fd, int name); }
30368300Scgd193	UNIMPL
30468300Scgd194	STD		{ int getrlimit(u_int which, struct rlimit *rlp); }
30568300Scgd195	STD		{ int setrlimit(u_int which, struct rlimit *rlp); }
30668300Scgd196	STD		{ int getdirentries(int fd, char *buf, u_int count, \
30768300Scgd			    long *basep); }
30868300Scgd197	STD		{ caddr_t mmap(caddr_t addr, size_t len, int prot, \
30968300Scgd			    int flags, int fd, long pad, off_t pos); }
31068300Scgd198	STD		{ int nosys(void); } __syscall
31168300Scgd199	STD		{ off_t lseek(int fd, int pad, off_t offset, \
31268300Scgd			    int whence); }
31368300Scgd200	STD		{ int truncate(char *path, int pad, off_t length); }
31468300Scgd201	STD		{ int ftruncate(int fd, int pad, off_t length); }
31568300Scgd202	STD		{ int __sysctl(int *name, u_int namelen, void *old, \
31668300Scgd			    size_t *oldlenp, void *new, size_t newlen); }
31768300Scgd203	STD		{ int mlock(caddr_t addr, size_t len); }
31868300Scgd204	STD		{ int munlock(caddr_t addr, size_t len); }
31968300Scgd205	STD		{ int undelete(char *path); }
32068300Scgd206	UNIMPL
32168300Scgd207	UNIMPL
32268300Scgd208	UNIMPL
32368300Scgd209	UNIMPL
32468300Scgd; Syscalls 210-219 are used by/reserved for vendor-specific system calls
32568300Scgd210	UNIMPL
32668300Scgd211	UNIMPL
32768300Scgd212	UNIMPL
32868300Scgd213	UNIMPL
32968300Scgd214	UNIMPL
33068300Scgd215	UNIMPL
33168300Scgd216	UNIMPL
33268300Scgd217	UNIMPL
33368300Scgd218	UNIMPL
33468300Scgd219	UNIMPL
33568300Scgd; System calls 220-240 are reserved for use by BSD
33668300Scgd220	UNIMPL		semctl
33768300Scgd221	UNIMPL		semget
33868300Scgd222	UNIMPL		semop
33968300Scgd223	UNIMPL		semconfig
34068300Scgd224	UNIMPL		msgctl
34168300Scgd225	UNIMPL		msgget
34268300Scgd226	UNIMPL		msgsnd
34368300Scgd227	UNIMPL		msgrcv
34468300Scgd#if defined(SYSVSHM) && 0
34568300Scgd228	STD		{ int shmat(int shmid, void *shmaddr, int shmflg); }
34668300Scgd229	STD		{ int shmctl(int shmid, int cmd, \
34768300Scgd			    struct shmid_ds *buf); }
34868300Scgd230	STD		{ int shmdt(void *shmaddr); }
34968300Scgd231	STD		{ int shmget(key_t key, int size, int shmflg); }
35068300Scgd#else
35168300Scgd228	UNIMPL		shmat
35268300Scgd229	UNIMPL		shmctl
35368300Scgd230	UNIMPL		shmdt
35468300Scgd231	UNIMPL		shmget
35568300Scgd#endif
356