Annotation of sys/compat/bsdos/syscalls.master, Revision 1.1.1.1
1.1 nbrk 1: $OpenBSD: syscalls.master,v 1.17 2006/09/22 15:29:57 pedro Exp $
2:
3: ; OpenBSD COMPAT_BSDOS system call name/number "master" file.
4: ; (See syscalls.conf to see what it is processed into.)
5: ;
6: ; Fields: number type [type-dependent ...]
7: ; number system call number, must be in order
8: ; type one of NOARGS, OBSOL, UNIMPL, NODEF, NOARGS, or one of
9: ; the compatibility options defined in syscalls.conf.
10: ;
11: ; types:
12: ; NOARGS always included
13: ; OBSOL obsolete, not included in system
14: ; UNIMPL unimplemented, not included in system
15: ; NODEF included, but don't define the syscall number
16: ; NOARGS included, but don't define the syscall args structure
17: ;
18: ; The compat options are defined in the syscalls.conf file, and the
19: ; compat option name is prefixed to the syscall name. Other than
20: ; that, they're like NODEF (for 'compat' options), or NOARGS (for
21: ; 'libcompat' options).
22: ;
23: ; The type-dependent arguments are as follows:
24: ; For NOARGS, NODEF, NOARGS, and compat syscalls:
25: ; { pseudo-proto } [alias]
26: ; For other syscalls:
27: ; [comment]
28: ;
29: ; #ifdef's, etc. may be included, and are copied to the output files.
30: ; #include's are copied to the syscall switch definition file only.
31:
32: #include <sys/param.h>
33: #include <sys/systm.h>
34: #include <sys/signal.h>
35: #include <sys/mount.h>
36: #include <sys/syscallargs.h>
37:
38: #include <compat/bsdos/bsdos_syscallargs.h>
39:
40: ; Reserved/unimplemented system calls in the range 0-150 inclusive
41: ; are reserved for use in future Berkeley releases.
42: ; Additional system calls implemented in vendor and other
43: ; redistributions should be placed in the reserved range at the end
44: ; of the current calls.
45:
46: 0 NOARGS { int sys_nosys(void); } syscall
47: 1 NOARGS { int sys_exit(int rval); }
48: 2 NOARGS { int sys_fork(void); }
49: 3 NOARGS { int sys_read(int fd, char *buf, u_int nbyte); }
50: 4 NOARGS { int sys_write(int fd, char *buf, u_int nbyte); }
51: 5 NOARGS { int sys_open(char *path, int flags, int mode); }
52: 6 NOARGS { int sys_close(int fd); }
53: 7 NOARGS { int sys_wait4(int pid, int *status, int options, \
54: struct rusage *rusage); }
55: 8 NOARGS { int compat_43_sys_creat(char *path, \
56: int mode); } ocreat
57: 9 NOARGS { int sys_link(char *path, char *link); }
58: 10 NOARGS { int sys_unlink(char *path); }
59: 11 OBSOL execv
60: 12 NOARGS { int sys_chdir(char *path); }
61: 13 NOARGS { int sys_fchdir(int fd); }
62: 14 NOARGS { int sys_mknod(char *path, int mode, int dev); }
63: 15 NOARGS { int sys_chmod(char *path, int mode); }
64: 16 NOARGS { int sys_chown(char *path, int uid, int gid); }
65: 17 NOARGS { int sys_obreak(char *nsize); } break
66: 18 NOARGS { int compat_25_sys_getfsstat(struct ostatfs *buf, \
67: long bufsize, int flags); }
68: 19 NOARGS { long compat_43_sys_lseek(int fd, long offset, \
69: int whence); } olseek
70: 20 NOARGS { pid_t sys_getpid(void); }
71: 21 NOARGS { int sys_mount(int type, char *path, \
72: int flags, caddr_t data); }
73: 22 NOARGS { int sys_unmount(char *path, int flags); }
74: 23 NOARGS { int sys_setuid(uid_t uid); }
75: 24 NOARGS { uid_t sys_getuid(void); }
76: 25 NOARGS { uid_t sys_geteuid(void); }
77: #ifdef PTRACE
78: 26 NOARGS { int sys_ptrace(int req, pid_t pid, \
79: caddr_t addr, int data); }
80: #else
81: 26 UNIMPL ptrace
82: #endif
83: 27 NOARGS { int sys_recvmsg(int s, struct msghdr *msg, \
84: int flags); }
85: 28 NOARGS { int sys_sendmsg(int s, caddr_t msg, int flags); }
86: 29 NOARGS { int sys_recvfrom(int s, caddr_t buf, size_t len, \
87: int flags, caddr_t from, int *fromlenaddr); }
88: 30 NOARGS { int sys_accept(int s, caddr_t name, int *anamelen); }
89: 31 NOARGS { int sys_getpeername(int fdes, caddr_t asa, \
90: int *alen); }
91: 32 NOARGS { int sys_getsockname(int fdes, caddr_t asa, \
92: int *alen); }
93: 33 NOARGS { int sys_access(char *path, int flags); }
94: 34 NOARGS { int sys_chflags(char *path, int flags); }
95: 35 NOARGS { int sys_fchflags(int fd, int flags); }
96: 36 NOARGS { int sys_sync(void); }
97: 37 NOARGS { int sys_kill(int pid, int signum); }
98: 38 NOARGS { int compat_43_sys_stat(char *path, \
99: struct stat43 *ub); } stat43
100: 39 NOARGS { pid_t sys_getppid(void); }
101: 40 NOARGS { int compat_43_sys_lstat(char *path, \
102: struct stat43 *ub); } lstat43
103: 41 NOARGS { int sys_dup(u_int fd); }
104: 42 NOARGS { int sys_opipe(void); }
105: 43 NOARGS { gid_t sys_getegid(void); }
106: 44 NOARGS { int sys_profil(caddr_t samples, u_int size, \
107: u_int offset, u_int scale); }
108: #ifdef KTRACE
109: 45 NOARGS { int sys_ktrace(char *fname, int ops, int facs, \
110: int pid); }
111: #else
112: 45 UNIMPL ktrace
113: #endif
114: 46 NOARGS { int sys_sigaction(int signum, struct sigaction *nsa, \
115: struct sigaction *osa); }
116: 47 NOARGS { gid_t sys_getgid(void); }
117: 48 NOARGS { int sys_sigprocmask(int how, sigset_t mask); }
118: 49 NOARGS { int sys_getlogin(char *namebuf, u_int namelen); }
119: 50 NOARGS { int sys_setlogin(char *namebuf); }
120: #ifdef ACCOUNTING
121: 51 NOARGS { int sys_acct(char *path); }
122: #else
123: 51 UNIMPL acct
124: #endif
125: 52 NOARGS { int sys_sigpending(void); }
126: 53 NOARGS { int sys_osigaltstack(struct osigaltstack *nss, \
127: struct osigaltstack *oss); }
128: 54 STD { int bsdos_sys_ioctl(int fd, u_long com, \
129: caddr_t data); }
130: 55 NOARGS { int sys_reboot(int opt); }
131: 56 NOARGS { int sys_revoke(char *path); }
132: 57 NOARGS { int sys_symlink(char *path, char *link); }
133: 58 NOARGS { int sys_readlink(char *path, char *buf, int count); }
134: 59 NOARGS { int sys_execve(char *path, char **argp, \
135: char **envp); }
136: 60 NOARGS { int sys_umask(int newmask); }
137: 61 NOARGS { int sys_chroot(char *path); }
138: 62 NOARGS { int compat_43_sys_fstat(int fd, struct stat43 *sb); } \
139: fstat43
140: 63 NOARGS { int compat_43_sys_getkerninfo(int op, char *where, \
141: int *size, int arg); } ogetkerninfo
142: 64 NOARGS { int compat_43_sys_getpagesize(void); } ogetpagesize
143: 65 NOARGS { int sys_msync(void *addr, size_t len, int flags); }
144: 66 NOARGS { int sys_vfork(void); }
145: 67 OBSOL vread
146: 68 OBSOL vwrite
147: 69 NOARGS { int sys_sbrk(int incr); }
148: 70 NOARGS { int sys_sstk(int incr); }
149: 71 NOARGS { int compat_43_sys_mmap(caddr_t addr, size_t len, \
150: int prot, int flags, int fd, long pos); } ommap
151: 72 NOARGS { int sys_ovadvise(int anom); } vadvise
152: 73 NOARGS { int sys_munmap(caddr_t addr, size_t len); }
153: 74 NOARGS { int sys_mprotect(caddr_t addr, size_t len, \
154: int prot); }
155: 75 NOARGS { int sys_madvise(caddr_t addr, size_t len, \
156: int behav); }
157: 76 OBSOL vhangup
158: 77 OBSOL vlimit
159: 78 NOARGS { int sys_mincore(caddr_t addr, size_t len, char *vec); }
160: 79 NOARGS { int sys_getgroups(u_int gidsetsize, gid_t *gidset); }
161: 80 NOARGS { int sys_setgroups(u_int gidsetsize, gid_t *gidset); }
162: 81 NOARGS { int sys_getpgrp(void); }
163: 82 NOARGS { int sys_setpgid(int pid, int pgid); }
164: 83 NOARGS { int sys_setitimer(u_int which, \
165: struct itimerval *itv, struct itimerval *oitv); }
166: 84 NOARGS { int compat_43_sys_wait(void); } owait
167: 85 NOARGS { int compat_25_sys_swapon(char *name); }
168: 86 NOARGS { int sys_getitimer(u_int which, \
169: struct itimerval *itv); }
170: 87 NOARGS { int compat_43_sys_gethostname(char *hostname, \
171: u_int len); } ogethostname
172: 88 NOARGS { int compat_43_sys_sethostname(char *hostname, \
173: u_int len); } osethostname
174: 89 NOARGS { int compat_43_sys_getdtablesize(void); } \
175: ogetdtablesize
176: 90 NOARGS { int sys_dup2(u_int from, u_int to); }
177: 91 UNIMPL getdopt
178: 92 NOARGS { int sys_fcntl(int fd, int cmd, void *arg); }
179: 93 NOARGS { int sys_select(u_int nd, fd_set *in, fd_set *ou, \
180: fd_set *ex, struct timeval *tv); }
181: 94 UNIMPL setdopt
182: 95 NOARGS { int sys_fsync(int fd); }
183: 96 NOARGS { int sys_setpriority(int which, int who, int prio); }
184: 97 NOARGS { int sys_socket(int domain, int type, int protocol); }
185: 98 NOARGS { int sys_connect(int s, caddr_t name, int namelen); }
186: 99 NOARGS { int compat_43_sys_accept(int s, caddr_t name, \
187: int *anamelen); } oaccept
188: 100 NOARGS { int sys_getpriority(int which, int who); }
189: 101 NOARGS { int compat_43_sys_send(int s, caddr_t buf, int len, \
190: int flags); } osend
191: 102 NOARGS { int compat_43_sys_recv(int s, caddr_t buf, int len, \
192: int flags); } orecv
193: 103 NOARGS { int sys_sigreturn( struct sigcontext *scp); }
194: 104 NOARGS { int sys_bind(int s, caddr_t name, int namelen); }
195: 105 NOARGS { int sys_setsockopt(int s, int level, int name, \
196: caddr_t val, int valsize); }
197: 106 NOARGS { int sys_listen(int s, int backlog); }
198: 107 OBSOL vtimes
199: 108 NOARGS { int compat_43_sys_sigvec(int signum, \
200: struct sigvec *nsv, struct sigvec *osv); } osigvec
201: 109 NOARGS { int compat_43_sys_sigblock(int mask); } osigblock
202: 110 NOARGS { int compat_43_sys_sigsetmask(int mask); } osigsetmask
203: 111 NOARGS { int sys_sigsuspend(int mask); }
204: 112 NOARGS { int compat_43_sys_sigstack(struct sigstack *nss, \
205: struct sigstack *oss); } osigstack
206: 113 NOARGS { int compat_43_sys_recvmsg(int s, \
207: struct omsghdr *msg, int flags); } orecvmsg
208: 114 NOARGS { int compat_43_sys_sendmsg(int s, caddr_t msg, \
209: int flags); } osendmsg
210: #ifdef TRACE
211: 115 NOARGS { int sys_vtrace(int request, int value); }
212: #else
213: 115 OBSOL vtrace
214: #endif
215: 116 NOARGS { int sys_gettimeofday(struct timeval *tp, \
216: struct timezone *tzp); }
217: 117 NOARGS { int sys_getrusage(int who, struct rusage *rusage); }
218: 118 NOARGS { int sys_getsockopt(int s, int level, int name, \
219: caddr_t val, int *avalsize); }
220: 119 OBSOL resuba
221: 120 NOARGS { int sys_readv(int fd, struct iovec *iovp, \
222: u_int iovcnt); }
223: 121 NOARGS { int sys_writev(int fd, struct iovec *iovp, \
224: u_int iovcnt); }
225: 122 NOARGS { int sys_settimeofday(struct timeval *tv, \
226: struct timezone *tzp); }
227: 123 NOARGS { int sys_fchown(int fd, int uid, int gid); }
228: 124 NOARGS { int sys_fchmod(int fd, int mode); }
229: 125 NOARGS { int compat_43_sys_recvfrom(int s, caddr_t buf, \
230: size_t len, int flags, caddr_t from, \
231: int *fromlenaddr); } orecvfrom
232: 126 NOARGS { int sys_setreuid(uid_t ruid, uid_t euid); }
233: 127 NOARGS { int sys_setregid(gid_t rgid, gid_t egid); }
234: 128 NOARGS { int sys_rename(char *from, char *to); }
235: 129 NOARGS { int compat_43_sys_truncate(char *path, \
236: long length); } otruncate
237: 130 NOARGS { int compat_43_sys_ftruncate(int fd, long length); } \
238: oftruncate
239: 131 NOARGS { int sys_flock(int fd, int how); }
240: 132 NOARGS { int sys_mkfifo(char *path, int mode); }
241: 133 NOARGS { int sys_sendto(int s, caddr_t buf, size_t len, \
242: int flags, caddr_t to, int tolen); }
243: 134 NOARGS { int sys_shutdown(int s, int how); }
244: 135 NOARGS { int sys_socketpair(int domain, int type, \
245: int protocol, int *rsv); }
246: 136 NOARGS { int sys_mkdir(char *path, int mode); }
247: 137 NOARGS { int sys_rmdir(char *path); }
248: 138 NOARGS { int sys_utimes(char *path, struct timeval *tptr); }
249: 139 OBSOL 4.2 sigreturn
250: 140 NOARGS { int sys_adjtime(struct timeval *delta, \
251: struct timeval *olddelta); }
252: 141 NOARGS { int compat_43_sys_getpeername(int fdes, caddr_t asa, \
253: int *alen); } ogetpeername
254: 142 NOARGS { int32_t compat_43_sys_gethostid(void); } ogethostid
255: 143 NOARGS { int compat_43_sys_sethostid(int32_t hostid); } \
256: osethostid
257: 144 NOARGS { int compat_43_sys_getrlimit(u_int which, \
258: struct ogetrlimit *rlp); } ogetrlimit
259: 145 NOARGS { int compat_43_sys_setrlimit(u_int which, \
260: struct ogetrlimit *rlp); } osetrlimit
261: 146 NOARGS { int compat_43_sys_killpg(int pgid, int signum); } \
262: okillpg
263: 147 NOARGS { int sys_setsid(void); }
264: 148 NOARGS { int sys_quotactl(char *path, int cmd, int uid, \
265: caddr_t arg); }
266: 149 NOARGS { int compat_43_sys_quota(void); } oquota
267: 150 NOARGS { int compat_43_sys_getsockname(int fdec, caddr_t asa, \
268: int *alen); } ogetsockname
269:
270: ; Syscalls 151-180 inclusive are reserved for vendor-specific
271: ; system calls. (This includes various calls added for compatibity
272: ; with other Unix variants.)
273: ; Some of these calls are now supported by BSD...
274: ;
275: 151 UNIMPL sem_lock
276: 152 UNIMPL sem_wakeup
277: 153 UNIMPL asyncdaemon
278: 154 UNIMPL
279: #if defined(NFSCLIENT) || defined(NFSSERVER)
280: 155 NOARGS { int sys_nfssvc(int flag, caddr_t argp); }
281: #else
282: 155 UNIMPL
283: #endif
284: 156 NOARGS { int compat_43_sys_getdirentries(int fd, char *buf, \
285: u_int count, long *basep); } ogetdirentries
286: 157 NOARGS { int compat_25_sys_statfs(char *path, \
287: struct ostatfs *buf); }
288: 158 NOARGS { int compat_25_sys_fstatfs(int fd, \
289: struct ostatfs *buf); }
290: 159 UNIMPL
291: 160 UNIMPL
292: #ifdef NFSCLIENT
293: 161 NOARGS { int sys_getfh(char *fname, fhandle_t *fhp); }
294: #else
295: 161 UNIMPL getfh
296: #endif
297: 162 UNIMPL
298: 163 UNIMPL
299: 164 UNIMPL
300: 165 UNIMPL
301: 166 UNIMPL
302: 167 UNIMPL
303: 168 UNIMPL
304: 169 UNIMPL
305: 170 UNIMPL
306: ; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
307: #if defined(SYSVSHM) && !defined(alpha)
308: 171 NOARGS { int compat_10_sys_shmsys(int which, int a2, int a3, \
309: int a4); }
310: #else
311: 171 UNIMPL shmsys
312: #endif
313: 172 UNIMPL
314: 173 UNIMPL
315: 174 UNIMPL
316: 175 UNIMPL
317: 176 UNIMPL
318: 177 UNIMPL sfork
319: 178 UNIMPL
320: 179 UNIMPL getdescriptor
321: 180 UNIMPL setdescriptor
322:
323: ; Syscalls 180-199 are used by/reserved for BSD
324: 181 NOARGS { int sys_setgid(gid_t gid); }
325: 182 NOARGS { int sys_setegid(gid_t egid); }
326: 183 NOARGS { int sys_seteuid(uid_t euid); }
327: 184 UNIMPL
328: 185 UNIMPL
329: 186 UNIMPL
330: 187 UNIMPL
331: 188 NOARGS { int compat_35_sys_stat(char *path, \
332: struct stat35 *ub); } stat35
333: 189 NOARGS { int compat_35_sys_fstat(int fd, \
334: struct stat35 *sb); } fstat35
335: 190 NOARGS { int compat_35_sys_lstat(char *path, \
336: struct stat35 *ub); } lstat35
337: 191 NOARGS { int sys_pathconf(char *path, int name); }
338: 192 NOARGS { int sys_fpathconf(int fd, int name); }
339: 193 UNIMPL
340: 194 NOARGS { int sys_getrlimit(u_int which, struct rlimit *rlp); }
341: 195 NOARGS { int sys_setrlimit(u_int which, struct rlimit *rlp); }
342: 196 NOARGS { int sys_getdirentries(int fd, char *buf, \
343: u_int count, long *basep); }
344: 197 NOARGS { caddr_t sys_mmap(caddr_t addr, size_t len, int prot, \
345: int flags, int fd, long pad, off_t pos); }
346: 198 NOARGS { int sys_nosys(void); } __syscall
347: 199 NOARGS { off_t sys_lseek(int fd, int pad, off_t offset, \
348: int whence); }
349: 200 NOARGS { int sys_truncate(char *path, int pad, off_t length); }
350: 201 NOARGS { int sys_ftruncate(int fd, int pad, off_t length); }
351: 202 NOARGS { int sys___sysctl(int *name, u_int namelen, \
352: void *old, size_t *oldlenp, void *new, \
353: size_t newlen); }
354: 203 NOARGS { int sys_mlock(caddr_t addr, size_t len); }
355: 204 NOARGS { int sys_munlock(caddr_t addr, size_t len); }
356: 205 UNIMPL sys_undelete
357: 206 UNIMPL
358: 207 UNIMPL
359: 208 UNIMPL
360: 209 UNIMPL
361: 210 UNIMPL
362: 211 UNIMPL
363: 212 UNIMPL
364: 213 UNIMPL
365: 214 UNIMPL
366: 215 UNIMPL
367: 216 UNIMPL
368: 217 UNIMPL
369: 218 UNIMPL
370: 219 UNIMPL
371: ; BSD/OS 3.0 starts here with the Net/OpenBSD SYSV* syscalls. This needs
372: ; checking against manpages to see how/if these differ. (Probably not at all.)
373: #ifdef SYSVSEM
374: 220 NOARGS { int sys___semctl(int semid, int semnum, int cmd, \
375: union semun *arg); }
376: 221 NOARGS { int sys_semget(key_t key, int nsems, int semflg); }
377: 222 NOARGS { int sys_semop(int semid, struct sembuf *sops, \
378: u_int nsops); }
379: ; 223 is UNIMPL in BSD/OS
380: 223 OBSOL sys_semconfig
381: #else
382: 220 UNIMPL semctl
383: 221 UNIMPL semget
384: 222 UNIMPL semop
385: 223 UNIMPL semconfig
386: #endif
387: #ifdef SYSVMSG
388: 224 NOARGS { int sys_msgctl(int msqid, int cmd, \
389: struct msqid_ds *buf); }
390: 225 NOARGS { int sys_msgget(key_t key, int msgflg); }
391: 226 NOARGS { int sys_msgsnd(int msqid, void *msgp, size_t msgsz, \
392: int msgflg); }
393: 227 NOARGS { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \
394: long msgtyp, int msgflg); }
395: #else
396: 224 UNIMPL msgctl
397: 225 UNIMPL msgget
398: 226 UNIMPL msgsnd
399: 227 UNIMPL msgrcv
400: #endif
401: #ifdef SYSVSHM
402: 228 NOARGS { int sys_shmat(int shmid, void *shmaddr, int shmflg); }
403: 229 NOARGS { int sys_shmctl(int shmid, int cmd, \
404: struct shmid_ds *buf); }
405: 230 NOARGS { int sys_shmdt(void *shmaddr); }
406: 231 NOARGS { int sys_shmget(key_t key, int size, int shmflg); }
407: #else
408: 228 UNIMPL shmat
409: 229 UNIMPL shmctl
410: 230 UNIMPL shmdt
411: 231 UNIMPL shmget
412: #endif
CVSweb