Commit | Line | Data |
---|---|---|
42f98b43 | 1 | @(#)syscalls.master 8.6 (Berkeley) %G% |
66109e76 CD |
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 ...] | |
1c7df810 | 6 | ; number system call number, must be in order |
66109e76 CD |
7 | ; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of |
8 | ; the compatibility options defined in syscalls.conf. | |
9 | ; | |
1c7df810 MK |
10 | ; types: |
11 | ; STD always included | |
66109e76 CD |
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 | ; | |
1c7df810 | 28 | ; #ifdef's, etc. may be included, and are copied to the output files. |
66109e76 CD |
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> | |
1c7df810 MK |
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 | ||
66109e76 CD |
43 | 0 STD { int nosys(void); } syscall |
44 | 1 STD { int exit(int rval); } | |
45 | 2 STD { int fork(void); } | |
46 | 3 STD { int read(int fd, char *buf, u_int nbyte); } | |
47 | 4 STD { int write(int fd, char *buf, u_int nbyte); } | |
48 | 5 STD { int open(char *path, int flags, int mode); } | |
49 | 6 STD { int close(int fd); } | |
50 | 7 STD { int wait4(int pid, int *status, int options, \ | |
51 | struct rusage *rusage); } | |
52 | 8 COMPAT_43 { int creat(char *path, int mode); } | |
53 | 9 STD { int link(char *path, char *link); } | |
54 | 10 STD { int unlink(char *path); } | |
55 | 11 OBSOL execv | |
56 | 12 STD { int chdir(char *path); } | |
57 | 13 STD { int fchdir(int fd); } | |
58 | 14 STD { int mknod(char *path, int mode, int dev); } | |
59 | 15 STD { int chmod(char *path, int mode); } | |
60 | 16 STD { int chown(char *path, int uid, int gid); } | |
61 | 17 STD { int obreak(char *nsize); } break | |
62 | 18 STD { int getfsstat(struct statfs *buf, long bufsize, \ | |
63 | int flags); } | |
64 | 19 COMPAT_43 { long lseek(int fd, long offset, int whence); } | |
65 | 20 STD { pid_t getpid(void); } | |
42f98b43 | 66 | 21 STD { int mount(char *type, char *path, int flags, \ |
66109e76 CD |
67 | caddr_t data); } |
68 | 22 STD { int unmount(char *path, int flags); } | |
69 | 23 STD { int setuid(uid_t uid); } | |
70 | 24 STD { uid_t getuid(void); } | |
71 | 25 STD { uid_t geteuid(void); } | |
72 | 26 STD { int ptrace(int req, pid_t pid, caddr_t addr, \ | |
73 | int data); } | |
74 | 27 STD { int recvmsg(int s, struct msghdr *msg, int flags); } | |
75 | 28 STD { int sendmsg(int s, caddr_t msg, int flags); } | |
76 | 29 STD { int recvfrom(int s, caddr_t buf, size_t len, \ | |
77 | int flags, caddr_t from, int *fromlenaddr); } | |
78 | 30 STD { int accept(int s, caddr_t name, int *anamelen); } | |
79 | 31 STD { int getpeername(int fdes, caddr_t asa, int *alen); } | |
80 | 32 STD { int getsockname(int fdes, caddr_t asa, int *alen); } | |
81 | 33 STD { int access(char *path, int flags); } | |
82 | 34 STD { int chflags(char *path, int flags); } | |
83 | 35 STD { int fchflags(int fd, int flags); } | |
84 | 36 STD { int sync(void); } | |
85 | 37 STD { int kill(int pid, int signum); } | |
86 | 38 COMPAT_43 { int stat(char *path, struct ostat *ub); } | |
87 | 39 STD { pid_t getppid(void); } | |
88 | 40 COMPAT_43 { int lstat(char *path, struct ostat *ub); } | |
89 | 41 STD { int dup(u_int fd); } | |
90 | 42 STD { int pipe(void); } | |
91 | 43 STD { gid_t getegid(void); } | |
92 | 44 STD { int profil(caddr_t samples, u_int size, \ | |
93 | u_int offset, u_int scale); } | |
1c7df810 | 94 | #ifdef KTRACE |
66109e76 CD |
95 | 45 STD { int ktrace(char *fname, int ops, int facs, \ |
96 | int pid); } | |
1c7df810 | 97 | #else |
66109e76 | 98 | 45 UNIMPL ktrace |
1c7df810 | 99 | #endif |
66109e76 CD |
100 | 46 STD { int sigaction(int signum, struct sigaction *nsa, \ |
101 | struct sigaction *osa); } | |
102 | 47 STD { gid_t getgid(void); } | |
103 | 48 STD { int sigprocmask(int how, sigset_t mask); } | |
104 | 49 STD { int getlogin(char *namebuf, u_int namelen); } | |
105 | 50 STD { int setlogin(char *namebuf); } | |
106 | 51 STD { int acct(char *path); } | |
107 | 52 STD { int sigpending(void); } | |
108 | 53 STD { int sigaltstack(struct sigaltstack *nss, \ | |
109 | struct sigaltstack *oss); } | |
110 | 54 STD { int ioctl(int fd, u_long com, caddr_t data); } | |
111 | 55 STD { int reboot(int opt); } | |
112 | 56 STD { int revoke(char *path); } | |
113 | 57 STD { int symlink(char *path, char *link); } | |
114 | 58 STD { int readlink(char *path, char *buf, int count); } | |
115 | 59 STD { int execve(char *path, char **argp, char **envp); } | |
116 | 60 STD { int umask(int newmask); } | |
117 | 61 STD { int chroot(char *path); } | |
118 | 62 COMPAT_43 { int fstat(int fd, struct ostat *sb); } | |
119 | 63 COMPAT_43 { int getkerninfo(int op, char *where, int *size, \ | |
120 | int arg); } | |
121 | 64 COMPAT_43 { int getpagesize(void); } | |
122 | 65 STD { int msync(caddr_t addr, int len); } | |
123 | 66 STD { int vfork(void); } | |
124 | 67 OBSOL vread | |
125 | 68 OBSOL vwrite | |
126 | 69 STD { int sbrk(int incr); } | |
127 | 70 STD { int sstk(int incr); } | |
128 | 71 COMPAT_43 { int mmap(caddr_t addr, int len, int prot, \ | |
129 | int flags, int fd, long pos); } | |
130 | 72 STD { int ovadvise(int anom); } vadvise | |
131 | 73 STD { int munmap(caddr_t addr, int len); } | |
132 | 74 STD { int mprotect(caddr_t addr, int len, int prot); } | |
133 | 75 STD { int madvise(caddr_t addr, int len, int behav); } | |
134 | 76 OBSOL vhangup | |
135 | 77 OBSOL vlimit | |
136 | 78 STD { int mincore(caddr_t addr, int len, char *vec); } | |
137 | 79 STD { int getgroups(u_int gidsetsize, gid_t *gidset); } | |
138 | 80 STD { int setgroups(u_int gidsetsize, gid_t *gidset); } | |
139 | 81 STD { int getpgrp(void); } | |
140 | 82 STD { int setpgid(int pid, int pgid); } | |
141 | 83 STD { int setitimer(u_int which, struct itimerval *itv, \ | |
142 | struct itimerval *oitv); } | |
143 | 84 COMPAT_43 { int wait(void); } | |
144 | 85 STD { int swapon(char *name); } | |
145 | 86 STD { int getitimer(u_int which, struct itimerval *itv); } | |
146 | 87 COMPAT_43 { int gethostname(char *hostname, u_int len); } | |
147 | 88 COMPAT_43 { int sethostname(char *hostname, u_int len); } | |
148 | 89 STD { int getdtablesize(void); } | |
149 | 90 STD { int dup2(u_int from, u_int to); } | |
150 | 91 UNIMPL getdopt | |
151 | 92 STD { int fcntl(int fd, int cmd, void *arg); } | |
152 | 93 STD { int select(u_int nd, fd_set *in, fd_set *ou, \ | |
153 | fd_set *ex, struct timeval *tv); } | |
154 | 94 UNIMPL setdopt | |
155 | 95 STD { int fsync(int fd); } | |
156 | 96 STD { int setpriority(int which, int who, int prio); } | |
157 | 97 STD { int socket(int domain, int type, int protocol); } | |
158 | 98 STD { int connect(int s, caddr_t name, int namelen); } | |
159 | 99 COMPAT_43 { int accept(int s, caddr_t name, int *anamelen); } | |
160 | 100 STD { int getpriority(int which, int who); } | |
161 | 101 COMPAT_43 { int send(int s, caddr_t buf, int len, int flags); } | |
162 | 102 COMPAT_43 { int recv(int s, caddr_t buf, int len, int flags); } | |
163 | 103 STD { int sigreturn(struct sigcontext *sigcntxp); } | |
164 | 104 STD { int bind(int s, caddr_t name, int namelen); } | |
165 | 105 STD { int setsockopt(int s, int level, int name, \ | |
166 | caddr_t val, int valsize); } | |
167 | 106 STD { int listen(int s, int backlog); } | |
168 | 107 OBSOL vtimes | |
169 | 108 COMPAT_43 { int sigvec(int signum, struct sigvec *nsv, \ | |
170 | struct sigvec *osv); } | |
171 | 109 COMPAT_43 { int sigblock(int mask); } | |
172 | 110 COMPAT_43 { int sigsetmask(int mask); } | |
173 | 111 STD { int sigsuspend(int mask); } | |
174 | 112 COMPAT_43 { int sigstack(struct sigstack *nss, \ | |
175 | struct sigstack *oss); } | |
176 | 113 COMPAT_43 { int recvmsg(int s, struct omsghdr *msg, int flags); } | |
177 | 114 COMPAT_43 { int sendmsg(int s, caddr_t msg, int flags); } | |
1c7df810 | 178 | #ifdef TRACE |
66109e76 | 179 | 115 STD { int vtrace(int request, int value); } |
1c7df810 | 180 | #else |
66109e76 | 181 | 115 OBSOL vtrace |
1c7df810 | 182 | #endif |
66109e76 CD |
183 | 116 STD { int gettimeofday(struct timeval *tp, \ |
184 | struct timezone *tzp); } | |
185 | 117 STD { int getrusage(int who, struct rusage *rusage); } | |
186 | 118 STD { int getsockopt(int s, int level, int name, \ | |
187 | caddr_t val, int *avalsize); } | |
1c7df810 | 188 | #ifdef vax |
66109e76 | 189 | 119 STD { int resuba(int value); } |
1c7df810 | 190 | #else |
66109e76 | 191 | 119 UNIMPL resuba |
1c7df810 | 192 | #endif |
66109e76 CD |
193 | 120 STD { int readv(int fd, struct iovec *iovp, u_int iovcnt); } |
194 | 121 STD { int writev(int fd, struct iovec *iovp, \ | |
195 | u_int iovcnt); } | |
196 | 122 STD { int settimeofday(struct timeval *tv, \ | |
197 | struct timezone *tzp); } | |
198 | 123 STD { int fchown(int fd, int uid, int gid); } | |
199 | 124 STD { int fchmod(int fd, int mode); } | |
200 | 125 COMPAT_43 { int recvfrom(int s, caddr_t buf, size_t len, \ | |
201 | int flags, caddr_t from, int *fromlenaddr); } | |
202 | 126 COMPAT_43 { int setreuid(int ruid, int euid); } | |
203 | 127 COMPAT_43 { int setregid(int rgid, int egid); } | |
204 | 128 STD { int rename(char *from, char *to); } | |
205 | 129 COMPAT_43 { int truncate(char *path, long length); } | |
206 | 130 COMPAT_43 { int ftruncate(int fd, long length); } | |
207 | 131 STD { int flock(int fd, int how); } | |
208 | 132 STD { int mkfifo(char *path, int mode); } | |
209 | 133 STD { int sendto(int s, caddr_t buf, size_t len, \ | |
210 | int flags, caddr_t to, int tolen); } | |
211 | 134 STD { int shutdown(int s, int how); } | |
212 | 135 STD { int socketpair(int domain, int type, int protocol, \ | |
213 | int *rsv); } | |
214 | 136 STD { int mkdir(char *path, int mode); } | |
215 | 137 STD { int rmdir(char *path); } | |
216 | 138 STD { int utimes(char *path, struct timeval *tptr); } | |
217 | 139 OBSOL 4.2 sigreturn | |
218 | 140 STD { int adjtime(struct timeval *delta, \ | |
219 | struct timeval *olddelta); } | |
220 | 141 COMPAT_43 { int getpeername(int fdes, caddr_t asa, int *alen); } | |
221 | 142 COMPAT_43 { int32_t gethostid(void); } | |
222 | 143 COMPAT_43 { int sethostid(int32_t hostid); } | |
223 | 144 COMPAT_43 { int getrlimit(u_int which, struct ogetrlimit *rlp); } | |
224 | 145 COMPAT_43 { int setrlimit(u_int which, struct ogetrlimit *rlp); } | |
225 | 146 COMPAT_43 { int killpg(int pgid, int signum); } | |
226 | 147 STD { int setsid(void); } | |
227 | 148 STD { int quotactl(char *path, int cmd, int uid, \ | |
228 | caddr_t arg); } | |
229 | 149 COMPAT_43 { int quota(void); } | |
230 | 150 COMPAT_43 { int getsockname(int fdec, caddr_t asa, int *alen); } | |
cc7d9ee1 KM |
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.) | |
b241e504 | 235 | ; Some of these calls are now supported by BSD... |
66109e76 CD |
236 | 151 UNIMPL |
237 | 152 UNIMPL | |
238 | 153 UNIMPL | |
239 | 154 UNIMPL | |
cc7d9ee1 | 240 | #ifdef NFS |
66109e76 | 241 | 155 STD { int nfssvc(int flag, caddr_t argp); } |
cc7d9ee1 | 242 | #else |
66109e76 | 243 | 155 UNIMPL nfssvc |
cc7d9ee1 | 244 | #endif |
66109e76 CD |
245 | 156 COMPAT_43 { int getdirentries(int fd, char *buf, u_int count, \ |
246 | long *basep); } | |
247 | 157 STD { int statfs(char *path, struct statfs *buf); } | |
248 | 158 STD { int fstatfs(int fd, struct statfs *buf); } | |
249 | 159 UNIMPL | |
250 | 160 UNIMPL | |
cc7d9ee1 | 251 | #ifdef NFS |
66109e76 | 252 | 161 STD { int getfh(char *fname, fhandle_t *fhp); } |
cc7d9ee1 | 253 | #else |
66109e76 | 254 | 161 UNIMPL getfh |
cc7d9ee1 | 255 | #endif |
66109e76 CD |
256 | 162 UNIMPL getdomainname |
257 | 163 UNIMPL setdomainname | |
258 | 164 UNIMPL | |
259 | 165 UNIMPL | |
260 | 166 UNIMPL | |
261 | 167 UNIMPL | |
262 | 168 UNIMPL | |
263 | 169 UNIMPL semsys | |
264 | 170 UNIMPL msgsys | |
265 | ; XXX more generally, never on machines where sizeof(void *) != sizeof(int) | |
266 | #if defined(SYSVSHM) && !defined(alpha) | |
267 | 171 COMPAT_43 { int shmsys(int which, int a2, int a3, int a4); } | |
47b2b388 | 268 | #else |
66109e76 | 269 | 171 UNIMPL shmsys |
47b2b388 | 270 | #endif |
66109e76 CD |
271 | 172 UNIMPL |
272 | 173 UNIMPL | |
273 | 174 UNIMPL | |
274 | 175 UNIMPL | |
275 | 176 UNIMPL | |
276 | 177 UNIMPL | |
277 | 178 UNIMPL | |
278 | 179 UNIMPL | |
279 | 180 UNIMPL | |
910ebf3e | 280 | |
66109e76 CD |
281 | ; Syscalls 180-209 are used by/reserved for BSD |
282 | 181 STD { int setgid(gid_t gid); } | |
283 | 182 STD { int setegid(gid_t egid); } | |
284 | 183 STD { int seteuid(uid_t euid); } | |
5306a47c | 285 | #ifdef LFS |
66109e76 CD |
286 | 184 STD { int lfs_bmapv(fsid_t *fsidp, \ |
287 | struct block_info *blkiov, int blkcnt); } | |
288 | 185 STD { int lfs_markv(fsid_t *fsidp, \ | |
289 | struct block_info *blkiov, int blkcnt); } | |
290 | 186 STD { int lfs_segclean(fsid_t *fsidp, u_long segment); } | |
291 | 187 STD { int lfs_segwait(fsid_t *fsidp, struct timeval *tv); } | |
292 | #else | |
293 | 184 UNIMPL lfs_bmapv | |
294 | 185 UNIMPL lfs_markv | |
295 | 186 UNIMPL lfs_segclean | |
296 | 187 UNIMPL lfs_segwait | |
297 | #endif | |
298 | 188 STD { int stat(char *path, struct stat *ub); } | |
299 | 189 STD { int fstat(int fd, struct stat *sb); } | |
300 | 190 STD { int lstat(char *path, struct stat *ub); } | |
301 | 191 STD { int pathconf(char *path, int name); } | |
302 | 192 STD { int fpathconf(int fd, int name); } | |
303 | 193 UNIMPL | |
304 | 194 STD { int getrlimit(u_int which, struct rlimit *rlp); } | |
305 | 195 STD { int setrlimit(u_int which, struct rlimit *rlp); } | |
306 | 196 STD { int getdirentries(int fd, char *buf, u_int count, \ | |
307 | long *basep); } | |
308 | 197 STD { caddr_t mmap(caddr_t addr, size_t len, int prot, \ | |
309 | int flags, int fd, long pad, off_t pos); } | |
310 | 198 STD { int nosys(void); } __syscall | |
311 | 199 STD { off_t lseek(int fd, int pad, off_t offset, \ | |
312 | int whence); } | |
313 | 200 STD { int truncate(char *path, int pad, off_t length); } | |
314 | 201 STD { int ftruncate(int fd, int pad, off_t length); } | |
315 | 202 STD { int __sysctl(int *name, u_int namelen, void *old, \ | |
316 | size_t *oldlenp, void *new, size_t newlen); } | |
317 | 203 STD { int mlock(caddr_t addr, size_t len); } | |
318 | 204 STD { int munlock(caddr_t addr, size_t len); } | |
319 | 205 STD { int undelete(char *path); } | |
320 | 206 UNIMPL | |
321 | 207 UNIMPL | |
322 | 208 UNIMPL | |
323 | 209 UNIMPL | |
324 | ; Syscalls 210-219 are used by/reserved for vendor-specific system calls | |
325 | 210 UNIMPL | |
326 | 211 UNIMPL | |
327 | 212 UNIMPL | |
328 | 213 UNIMPL | |
329 | 214 UNIMPL | |
330 | 215 UNIMPL | |
331 | 216 UNIMPL | |
332 | 217 UNIMPL | |
333 | 218 UNIMPL | |
334 | 219 UNIMPL | |
335 | ; System calls 220-240 are reserved for use by BSD | |
336 | 220 UNIMPL semctl | |
337 | 221 UNIMPL semget | |
338 | 222 UNIMPL semop | |
339 | 223 UNIMPL semconfig | |
340 | 224 UNIMPL msgctl | |
341 | 225 UNIMPL msgget | |
342 | 226 UNIMPL msgsnd | |
343 | 227 UNIMPL msgrcv | |
344 | #if defined(SYSVSHM) && 0 | |
345 | 228 STD { int shmat(int shmid, void *shmaddr, int shmflg); } | |
346 | 229 STD { int shmctl(int shmid, int cmd, \ | |
347 | struct shmid_ds *buf); } | |
348 | 230 STD { int shmdt(void *shmaddr); } | |
349 | 231 STD { int shmget(key_t key, int size, int shmflg); } | |
5306a47c | 350 | #else |
66109e76 CD |
351 | 228 UNIMPL shmat |
352 | 229 UNIMPL shmctl | |
353 | 230 UNIMPL shmdt | |
354 | 231 UNIMPL shmget | |
5306a47c | 355 | #endif |