NetBSD/sys/kern/syscalls.master

400 lines
14 KiB
Plaintext
Raw Normal View History

$NetBSD: syscalls.master,v 1.27 1995/03/09 17:28:28 mycroft Exp $
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
; NetBSD system call name/number "master" file.
; (See syscalls.conf to see what it is processed into.)
;
; Fields: number type [type-dependent ...]
; number system call number, must be in order
; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
1994-10-21 03:14:36 +03:00
; the compatibility options defined in syscalls.conf.
;
; types:
; STD always included
; OBSOL obsolete, not included in system
1994-10-21 03:14:36 +03:00
; UNIMPL unimplemented, not included in system
; NODEF included, but don't define the syscall number
; NOARGS included, but don't define the syscall args structure
;
; The compat options are defined in the syscalls.conf file, and the
; compat option name is prefixed to the syscall name. Other than
; that, they're like NODEF (for 'compat' options), or STD (for
; 'libcompat' options).
;
; The type-dependent arguments are as follows:
; For STD, NODEF, NOARGS, and compat syscalls:
; { pseudo-proto } [alias]
; For other syscalls:
; [comment]
;
; #ifdef's, etc. may be included, and are copied to the output files.
; #include's are copied to the syscall switch definition file only.
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/signal.h>
#include <sys/mount.h>
#include <sys/syscallargs.h>
; Reserved/unimplemented system calls in the range 0-150 inclusive
; are reserved for use in future Berkeley releases.
; Additional system calls implemented in vendor and other
; redistributions should be placed in the reserved range at the end
; of the current calls.
0 STD { int nosys(void); } syscall
1 STD { int exit(int rval); }
2 STD { int fork(void); }
3 STD { int read(int fd, char *buf, u_int nbyte); }
4 STD { int write(int fd, char *buf, u_int nbyte); }
5 STD { int open(char *path, int flags, int mode); }
6 STD { int close(int fd); }
7 STD { int wait4(int pid, int *status, int options, \
struct rusage *rusage); }
8 COMPAT_43 { int creat(char *path, int mode); }
9 STD { int link(char *path, char *link); }
10 STD { int unlink(char *path); }
11 OBSOL execv
12 STD { int chdir(char *path); }
13 STD { int fchdir(int fd); }
14 STD { int mknod(char *path, int mode, int dev); }
15 STD { int chmod(char *path, int mode); }
16 STD { int chown(char *path, int uid, int gid); }
17 STD { int obreak(char *nsize); } break
18 STD { int getfsstat(struct statfs *buf, long bufsize, \
int flags); }
19 COMPAT_43 { long lseek(int fd, long offset, int whence); }
20 STD { pid_t getpid(void); }
21 STD { int mount(char *type, char *path, int flags, \
caddr_t data); }
22 STD { int unmount(char *path, int flags); }
23 STD { int setuid(uid_t uid); }
24 STD { uid_t getuid(void); }
25 STD { uid_t geteuid(void); }
26 STD { int ptrace(int req, pid_t pid, caddr_t addr, \
int data); }
27 STD { int recvmsg(int s, struct msghdr *msg, int flags); }
28 STD { int sendmsg(int s, caddr_t msg, int flags); }
29 STD { int recvfrom(int s, caddr_t buf, size_t len, \
int flags, caddr_t from, int *fromlenaddr); }
30 STD { int accept(int s, caddr_t name, int *anamelen); }
31 STD { int getpeername(int fdes, caddr_t asa, int *alen); }
32 STD { int getsockname(int fdes, caddr_t asa, int *alen); }
33 STD { int access(char *path, int flags); }
34 STD { int chflags(char *path, int flags); }
35 STD { int fchflags(int fd, int flags); }
36 STD { int sync(void); }
37 STD { int kill(int pid, int signum); }
38 COMPAT_43 { int stat(char *path, struct ostat *ub); }
39 STD { pid_t getppid(void); }
40 COMPAT_43 { int lstat(char *path, struct ostat *ub); }
41 STD { int dup(u_int fd); }
42 STD { int pipe(void); }
43 STD { gid_t getegid(void); }
44 STD { int profil(caddr_t samples, u_int size, \
u_int offset, u_int scale); }
#ifdef KTRACE
45 STD { int ktrace(char *fname, int ops, int facs, \
int pid); }
#else
45 UNIMPL ktrace
#endif
46 STD { int sigaction(int signum, struct sigaction *nsa, \
struct sigaction *osa); }
47 STD { gid_t getgid(void); }
48 STD { int sigprocmask(int how, sigset_t mask); }
49 STD { int getlogin(char *namebuf, u_int namelen); }
50 STD { int setlogin(char *namebuf); }
51 STD { int acct(char *path); }
52 STD { int sigpending(void); }
53 STD { int sigaltstack(struct sigaltstack *nss, \
struct sigaltstack *oss); }
54 STD { int ioctl(int fd, u_long com, caddr_t data); }
55 STD { int reboot(int opt); }
56 STD { int revoke(char *path); }
57 STD { int symlink(char *path, char *link); }
58 STD { int readlink(char *path, char *buf, int count); }
59 STD { int execve(char *path, char **argp, char **envp); }
60 STD { int umask(int newmask); }
61 STD { int chroot(char *path); }
62 COMPAT_43 { int fstat(int fd, struct ostat *sb); }
63 COMPAT_43 { int getkerninfo(int op, char *where, int *size, \
int arg); }
64 COMPAT_43 { int getpagesize(void); }
65 STD { int msync(caddr_t addr, size_t len); }
66 STD { int vfork(void); }
67 OBSOL vread
68 OBSOL vwrite
69 STD { int sbrk(int incr); }
70 STD { int sstk(int incr); }
71 COMPAT_43 { int mmap(caddr_t addr, size_t len, int prot, \
int flags, int fd, long pos); }
72 STD { int ovadvise(int anom); } vadvise
73 STD { int munmap(caddr_t addr, size_t len); }
74 STD { int mprotect(caddr_t addr, size_t len, int prot); }
75 STD { int madvise(caddr_t addr, size_t len, int behav); }
76 OBSOL vhangup
77 OBSOL vlimit
78 STD { int mincore(caddr_t addr, size_t len, char *vec); }
79 STD { int getgroups(u_int gidsetsize, gid_t *gidset); }
80 STD { int setgroups(u_int gidsetsize, gid_t *gidset); }
81 STD { int getpgrp(void); }
82 STD { int setpgid(int pid, int pgid); }
83 STD { int setitimer(u_int which, struct itimerval *itv, \
struct itimerval *oitv); }
84 COMPAT_43 { int wait(void); }
85 STD { int swapon(char *name); }
86 STD { int getitimer(u_int which, struct itimerval *itv); }
87 COMPAT_43 { int gethostname(char *hostname, u_int len); }
88 COMPAT_43 { int sethostname(char *hostname, u_int len); }
89 COMPAT_43 { int getdtablesize(void); }
90 STD { int dup2(u_int from, u_int to); }
91 UNIMPL getdopt
92 STD { int fcntl(int fd, int cmd, void *arg); }
93 STD { int select(u_int nd, fd_set *in, fd_set *ou, \
fd_set *ex, struct timeval *tv); }
94 UNIMPL setdopt
95 STD { int fsync(int fd); }
96 STD { int setpriority(int which, int who, int prio); }
97 STD { int socket(int domain, int type, int protocol); }
98 STD { int connect(int s, caddr_t name, int namelen); }
99 COMPAT_43 { int accept(int s, caddr_t name, int *anamelen); }
100 STD { int getpriority(int which, int who); }
101 COMPAT_43 { int send(int s, caddr_t buf, int len, int flags); }
102 COMPAT_43 { int recv(int s, caddr_t buf, int len, int flags); }
103 STD { int sigreturn(struct sigcontext *sigcntxp); }
104 STD { int bind(int s, caddr_t name, int namelen); }
105 STD { int setsockopt(int s, int level, int name, \
caddr_t val, int valsize); }
106 STD { int listen(int s, int backlog); }
107 OBSOL vtimes
108 COMPAT_43 { int sigvec(int signum, struct sigvec *nsv, \
struct sigvec *osv); }
109 COMPAT_43 { int sigblock(int mask); }
110 COMPAT_43 { int sigsetmask(int mask); }
111 STD { int sigsuspend(int mask); }
112 COMPAT_43 { int sigstack(struct sigstack *nss, \
struct sigstack *oss); }
113 COMPAT_43 { int recvmsg(int s, struct omsghdr *msg, int flags); }
114 COMPAT_43 { int sendmsg(int s, caddr_t msg, int flags); }
#ifdef TRACE
115 STD { int vtrace(int request, int value); }
#else
115 OBSOL vtrace
#endif
116 STD { int gettimeofday(struct timeval *tp, \
struct timezone *tzp); }
117 STD { int getrusage(int who, struct rusage *rusage); }
118 STD { int getsockopt(int s, int level, int name, \
caddr_t val, int *avalsize); }
1995-01-06 03:08:17 +03:00
119 OBSOL resuba
120 STD { int readv(int fd, struct iovec *iovp, u_int iovcnt); }
121 STD { int writev(int fd, struct iovec *iovp, \
u_int iovcnt); }
122 STD { int settimeofday(struct timeval *tv, \
struct timezone *tzp); }
123 STD { int fchown(int fd, int uid, int gid); }
124 STD { int fchmod(int fd, int mode); }
125 COMPAT_43 { int recvfrom(int s, caddr_t buf, size_t len, \
int flags, caddr_t from, int *fromlenaddr); }
126 COMPAT_43 { int setreuid(int ruid, int euid); }
127 COMPAT_43 { int setregid(int rgid, int egid); }
128 STD { int rename(char *from, char *to); }
129 COMPAT_43 { int truncate(char *path, long length); }
130 COMPAT_43 { int ftruncate(int fd, long length); }
131 STD { int flock(int fd, int how); }
132 STD { int mkfifo(char *path, int mode); }
133 STD { int sendto(int s, caddr_t buf, size_t len, \
int flags, caddr_t to, int tolen); }
134 STD { int shutdown(int s, int how); }
135 STD { int socketpair(int domain, int type, int protocol, \
int *rsv); }
136 STD { int mkdir(char *path, int mode); }
137 STD { int rmdir(char *path); }
138 STD { int utimes(char *path, struct timeval *tptr); }
139 OBSOL 4.2 sigreturn
140 STD { int adjtime(struct timeval *delta, \
struct timeval *olddelta); }
141 COMPAT_43 { int getpeername(int fdes, caddr_t asa, int *alen); }
142 COMPAT_43 { int32_t gethostid(void); }
143 COMPAT_43 { int sethostid(int32_t hostid); }
144 COMPAT_43 { int getrlimit(u_int which, struct ogetrlimit *rlp); }
145 COMPAT_43 { int setrlimit(u_int which, struct ogetrlimit *rlp); }
146 COMPAT_43 { int killpg(int pgid, int signum); }
147 STD { int setsid(void); }
148 STD { int quotactl(char *path, int cmd, int uid, \
caddr_t arg); }
149 COMPAT_43 { int quota(void); }
150 COMPAT_43 { int getsockname(int fdec, caddr_t asa, int *alen); }
; Syscalls 151-180 inclusive are reserved for vendor-specific
; system calls. (This includes various calls added for compatibity
; with other Unix variants.)
; Some of these calls are now supported by BSD...
151 UNIMPL
152 UNIMPL
153 UNIMPL
154 UNIMPL
1994-06-08 15:28:29 +04:00
#if defined(NFSCLIENT) || defined(NFSSERVER)
155 STD { int nfssvc(int flag, caddr_t argp); }
#else
155 UNIMPL
#endif
156 COMPAT_43 { int getdirentries(int fd, char *buf, u_int count, \
long *basep); }
157 STD { int statfs(char *path, struct statfs *buf); }
158 STD { int fstatfs(int fd, struct statfs *buf); }
159 UNIMPL
160 UNIMPL
#ifdef NFSCLIENT
161 STD { int getfh(char *fname, fhandle_t *fhp); }
#else
161 UNIMPL getfh
#endif
162 COMPAT_09 { int getdomainname(char *domainname, int len); }
163 COMPAT_09 { int setdomainname(char *domainname, int len); }
164 COMPAT_09 { int uname(struct outsname *name); }
165 STD { int sysarch(int op, char *parms); }
166 UNIMPL
167 UNIMPL
168 UNIMPL
; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
#if defined(SYSVSEM) && !defined(alpha)
169 COMPAT_10 { int semsys(int which, int a2, int a3, int a4, \
int a5); }
#else
169 UNIMPL 1.0 semsys
#endif
; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
#if defined(SYSVMSG) && !defined(alpha)
170 COMPAT_10 { int msgsys(int which, int a2, int a3, int a4, \
int a5, int a6); }
#else
170 UNIMPL 1.0 msgsys
#endif
; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
#if defined(SYSVSHM) && !defined(alpha)
171 COMPAT_10 { int shmsys(int which, int a2, int a3, int a4); }
#else
171 UNIMPL 1.0 shmsys
#endif
172 UNIMPL
173 UNIMPL
174 UNIMPL
175 UNIMPL
176 UNIMPL
177 UNIMPL
178 UNIMPL
179 UNIMPL
180 UNIMPL
; Syscalls 180-199 are used by/reserved for BSD
181 STD { int setgid(gid_t gid); }
182 STD { int setegid(gid_t egid); }
183 STD { int seteuid(uid_t euid); }
#ifdef LFS
184 STD { int lfs_bmapv(fsid_t *fsidp, \
struct block_info *blkiov, int blkcnt); }
185 STD { int lfs_markv(fsid_t *fsidp, \
struct block_info *blkiov, int blkcnt); }
186 STD { int lfs_segclean(fsid_t *fsidp, u_long segment); }
187 STD { int lfs_segwait(fsid_t *fsidp, struct timeval *tv); }
#else
184 UNIMPL
185 UNIMPL
186 UNIMPL
187 UNIMPL
#endif
188 STD { int stat(char *path, struct stat *ub); }
189 STD { int fstat(int fd, struct stat *sb); }
190 STD { int lstat(char *path, struct stat *ub); }
191 STD { int pathconf(char *path, int name); }
192 STD { int fpathconf(int fd, int name); }
193 UNIMPL
194 STD { int getrlimit(u_int which, struct rlimit *rlp); }
195 STD { int setrlimit(u_int which, struct rlimit *rlp); }
196 STD { int getdirentries(int fd, char *buf, u_int count, \
long *basep); }
197 STD { caddr_t mmap(caddr_t addr, size_t len, int prot, \
int flags, int fd, long pad, off_t pos); }
198 STD { int nosys(void); } __syscall
199 STD { off_t lseek(int fd, int pad, off_t offset, \
int whence); }
200 STD { int truncate(char *path, int pad, off_t length); }
201 STD { int ftruncate(int fd, int pad, off_t length); }
202 STD { int __sysctl(int *name, u_int namelen, void *old, \
size_t *oldlenp, void *new, size_t newlen); }
203 STD { int mlock(caddr_t addr, size_t len); }
204 STD { int munlock(caddr_t addr, size_t len); }
1994-12-14 19:29:54 +03:00
205 STD { int undelete(char *path); }
206 UNIMPL
207 UNIMPL
208 UNIMPL
209 UNIMPL
;
; Syscalls 210-219 are reserved for dynamically loaded syscalls
;
#ifdef LKM
210 NODEF { int lkmnosys(void); }
211 NODEF { int lkmnosys(void); }
212 NODEF { int lkmnosys(void); }
213 NODEF { int lkmnosys(void); }
214 NODEF { int lkmnosys(void); }
215 NODEF { int lkmnosys(void); }
216 NODEF { int lkmnosys(void); }
217 NODEF { int lkmnosys(void); }
218 NODEF { int lkmnosys(void); }
219 NODEF { int lkmnosys(void); }
#else /* !LKM */
210 UNIMPL
211 UNIMPL
212 UNIMPL
213 UNIMPL
214 UNIMPL
215 UNIMPL
216 UNIMPL
217 UNIMPL
218 UNIMPL
219 UNIMPL
#endif /* !LKM */
; System calls 220-240 are reserved for use by NetBSD
#ifdef SYSVSEM
220 STD { int __semctl(int semid, int semnum, int cmd, \
union semun *arg); }
221 STD { int semget(key_t key, int nsems, int semflg); }
222 STD { int semop(int semid, struct sembuf *sops, \
u_int nsops); }
223 STD { int semconfig(int flag); }
#else
220 UNIMPL semctl
221 UNIMPL semget
222 UNIMPL semop
223 UNIMPL semconfig
#endif
#ifdef SYSVMSG
224 STD { int msgctl(int msqid, int cmd, \
struct msqid_ds *buf); }
225 STD { int msgget(key_t key, int msgflg); }
226 STD { int msgsnd(int msqid, void *msgp, size_t msgsz, \
int msgflg); }
227 STD { int msgrcv(int msqid, void *msgp, size_t msgsz, \
long msgtyp, int msgflg); }
#else
224 UNIMPL msgctl
225 UNIMPL msgget
226 UNIMPL msgsnd
227 UNIMPL msgrcv
#endif
#ifdef SYSVSHM
228 STD { int shmat(int shmid, void *shmaddr, int shmflg); }
229 STD { int shmctl(int shmid, int cmd, \
struct shmid_ds *buf); }
230 STD { int shmdt(void *shmaddr); }
231 STD { int shmget(key_t key, int size, int shmflg); }
#else
228 UNIMPL shmat
229 UNIMPL shmctl
230 UNIMPL shmdt
231 UNIMPL shmget
#endif