• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  * 3. The name of the author may not be used to endorse or promote products
14  *    derived from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 #define	SOLARIS_syscall	0
29 #define	SOLARIS_exit	1
30 #define	SOLARIS_fork	2
31 #define	SOLARIS_read	3
32 #define	SOLARIS_write	4
33 #define	SOLARIS_open	5
34 #define	SOLARIS_close	6
35 #define	SOLARIS_wait	7
36 #define	SOLARIS_creat	8
37 #define	SOLARIS_link	9
38 #define	SOLARIS_unlink	10
39 #define	SOLARIS_exec	11
40 #define	SOLARIS_chdir	12
41 #define	SOLARIS_time	13
42 #define	SOLARIS_mknod	14
43 #define	SOLARIS_chmod	15
44 #define	SOLARIS_chown	16
45 #define	SOLARIS_brk		17
46 #define	SOLARIS_stat	18
47 #define	SOLARIS_lseek	19
48 #define	SOLARIS_getpid	20
49 #define	SOLARIS_mount	21
50 #define	SOLARIS_umount	22
51 #define	SOLARIS_setuid	23
52 #define	SOLARIS_getuid	24
53 #define	SOLARIS_stime	25
54 #define	SOLARIS_ptrace	26
55 #define	SOLARIS_alarm	27
56 #define	SOLARIS_fstat	28
57 #define	SOLARIS_pause	29
58 #define	SOLARIS_utime	30
59 #define	SOLARIS_stty	31
60 #define	SOLARIS_gtty	32
61 #define	SOLARIS_access	33
62 #define	SOLARIS_nice	34
63 #define	SOLARIS_statfs	35
64 #define	SOLARIS_sync	36
65 #define	SOLARIS_kill	37
66 #define	SOLARIS_fstatfs	38
67 #define	SOLARIS_pgrpsys	39
68 #define	SOLARIS_xenix	40
69 #define	SOLARIS_dup		41
70 #define	SOLARIS_pipe	42
71 #define	SOLARIS_times	43
72 #define	SOLARIS_profil	44
73 #define	SOLARIS_plock	45
74 #define	SOLARIS_setgid	46
75 #define	SOLARIS_getgid	47
76 #define	SOLARIS_signal	48
77 #define	SOLARIS_msgsys	49
78 #define	SOLARIS_syssun	50
79 #define	SOLARIS_acct	51
80 #define	SOLARIS_shmsys	52
81 #define	SOLARIS_semsys	53
82 #define	SOLARIS_ioctl	54
83 #define	SOLARIS_uadmin	55
84 #define	SOLARIS_utssys	57
85 #define	SOLARIS_fdsync	58
86 #define	SOLARIS_execve	59
87 #define	SOLARIS_umask	60
88 #define	SOLARIS_chroot	61
89 #define	SOLARIS_fcntl	62
90 #define	SOLARIS_ulimit	63
91 #define	SOLARIS_rmdir	79
92 #define	SOLARIS_mkdir	80
93 #define	SOLARIS_getdents	81
94 #define	SOLARIS_sysfs	84
95 #define	SOLARIS_getmsg	85
96 #define	SOLARIS_putmsg	86
97 #define	SOLARIS_poll	87
98 #define	SOLARIS_lstat	88
99 #define	SOLARIS_symlink	89
100 #define	SOLARIS_readlink	90
101 #define	SOLARIS_setgroups	91
102 #define	SOLARIS_getgroups	92
103 #define	SOLARIS_fchmod	93
104 #define	SOLARIS_fchown	94
105 #define	SOLARIS_sigprocmask	95
106 #define	SOLARIS_sigsuspend	96
107 #define	SOLARIS_sigaltstack	97
108 #define	SOLARIS_sigaction	98
109 #define	SOLARIS_sigpending	99
110 #define	SOLARIS_context	100
111 #define	SOLARIS_evsys	101
112 #define	SOLARIS_evtrapret	102
113 #define	SOLARIS_statvfs	103
114 #define	SOLARIS_fstatvfs	104
115 #define	SOLARIS_nfssys	106
116 #define	SOLARIS_waitsys	107
117 #define	SOLARIS_sigsendsys	108
118 #define	SOLARIS_hrtsys	109
119 #define	SOLARIS_acancel	110
120 #define	SOLARIS_async	111
121 #define	SOLARIS_priocntlsys	112
122 #define	SOLARIS_pathconf	113
123 #define	SOLARIS_mincore	114
124 #define	SOLARIS_mmap	115
125 #define	SOLARIS_mprotect	116
126 #define	SOLARIS_munmap	117
127 #define	SOLARIS_fpathconf	118
128 #define	SOLARIS_vfork	119
129 #define	SOLARIS_fchdir	120
130 #define	SOLARIS_readv	121
131 #define	SOLARIS_writev	122
132 #define	SOLARIS_xstat	123
133 #define	SOLARIS_lxstat	124
134 #define	SOLARIS_fxstat	125
135 #define	SOLARIS_xmknod	126
136 #define	SOLARIS_clocal	127
137 #define	SOLARIS_setrlimit	128
138 #define	SOLARIS_getrlimit	129
139 #define	SOLARIS_lchown	130
140 #define	SOLARIS_memcntl	131
141 #define	SOLARIS_getpmsg	132
142 #define	SOLARIS_putpmsg	133
143 #define	SOLARIS_rename	134
144 #define	SOLARIS_uname	135
145 #define	SOLARIS_setegid	136
146 #define	SOLARIS_sysconfig	137
147 #define	SOLARIS_adjtime	138
148 #define	SOLARIS_systeminfo	139
149 #define	SOLARIS_seteuid	141
150 #define	SOLARIS_vtrace	142
151 #define	SOLARIS_fork1	143
152 #define	SOLARIS_sigtimedwait	144
153 #define	SOLARIS_lwp_info	145
154 #define	SOLARIS_yield	146
155 #define	SOLARIS_lwp_sema_wait	147
156 #define	SOLARIS_lwp_sema_post	148
157 #define	SOLARIS_modctl	152
158 #define	SOLARIS_fchroot	153
159 #define	SOLARIS_utimes	154
160 #define	SOLARIS_vhangup	155
161 #define	SOLARIS_gettimeofday	156
162 #define	SOLARIS_getitimer		157
163 #define	SOLARIS_setitimer		158
164 #define	SOLARIS_lwp_create		159
165 #define	SOLARIS_lwp_exit		160
166 #define	SOLARIS_lwp_suspend		161
167 #define	SOLARIS_lwp_continue	162
168 #define	SOLARIS_lwp_kill		163
169 #define	SOLARIS_lwp_self		164
170 #define	SOLARIS_lwp_setprivate	165
171 #define	SOLARIS_lwp_getprivate	166
172 #define	SOLARIS_lwp_wait		167
173 #define	SOLARIS_lwp_mutex_unlock	168
174 #define	SOLARIS_lwp_mutex_lock	169
175 #define	SOLARIS_lwp_cond_wait	170
176 #define	SOLARIS_lwp_cond_signal	171
177 #define	SOLARIS_lwp_cond_broadcast	172
178 #define	SOLARIS_pread		173
179 #define	SOLARIS_pwrite		174
180 #define	SOLARIS_llseek		175
181 #define	SOLARIS_inst_sync		176
182 #define	SOLARIS_kaio		178
183 #define	SOLARIS_tsolsys		184
184 #define	SOLARIS_acl			185
185 #define	SOLARIS_auditsys		186
186 #define	SOLARIS_processor_bind	187
187 #define	SOLARIS_processor_info	188
188 #define	SOLARIS_p_online		189
189 #define	SOLARIS_sigqueue		190
190 #define	SOLARIS_clock_gettime	191
191 #define	SOLARIS_clock_settime	192
192 #define	SOLARIS_clock_getres	193
193 #define	SOLARIS_timer_create	194
194 #define	SOLARIS_timer_delete	195
195 #define	SOLARIS_timer_settime	196
196 #define	SOLARIS_timer_gettime	197
197 #define	SOLARIS_timer_getoverrun	198
198 #define	SOLARIS_nanosleep		199
199 #define	SOLARIS_facl		200
200 #define	SOLARIS_door		201
201 #define	SOLARIS_setreuid		202
202 #define	SOLARIS_setregid		203
203 #define	SOLARIS_signotifywait	210
204 #define	SOLARIS_lwp_sigredirect	211
205 #define	SOLARIS_lwp_alarm		212
206 
207 #include "dummy2.h"
208 
209 extern int solaris_syscall();
210 extern int solaris_exit();
211 extern int solaris_fork();
212 extern int solaris_read();
213 extern int solaris_write();
214 extern int solaris_open();
215 extern int solaris_close();
216 extern int solaris_wait();
217 extern int solaris_creat();
218 extern int solaris_link();
219 extern int solaris_unlink();
220 extern int solaris_exec();
221 extern int solaris_chdir();
222 extern int solaris_time();
223 extern int solaris_mknod();
224 extern int solaris_chmod();
225 extern int solaris_chown();
226 extern int solaris_brk();
227 extern int solaris_stat();
228 extern int solaris_lseek();
229 extern int solaris_getpid();
230 extern int solaris_mount();
231 extern int solaris_umount();
232 extern int solaris_setuid();
233 extern int solaris_getuid();
234 extern int solaris_stime();
235 extern int solaris_ptrace();
236 extern int solaris_alarm();
237 extern int solaris_fstat();
238 extern int solaris_pause();
239 extern int solaris_utime();
240 extern int solaris_stty();
241 extern int solaris_gtty();
242 extern int solaris_access();
243 extern int solaris_nice();
244 extern int solaris_statfs();
245 extern int solaris_sync();
246 extern int solaris_kill();
247 extern int solaris_fstatfs();
248 extern int solaris_pgrpsys();
249 extern int solaris_setpgrp();
250 extern int solaris_xenix();
251 extern int solaris_syssgi();
252 extern int solaris_dup();
253 extern int solaris_pipe();
254 extern int solaris_times();
255 extern int solaris_profil();
256 extern int solaris_plock();
257 extern int solaris_setgid();
258 extern int solaris_getgid();
259 extern int solaris_sigcall();
260 extern int solaris_msgsys();
261 extern int solaris_syssun();
262 extern int solaris_sysi86();
263 extern int solaris_sysmips();
264 extern int solaris_sysmachine();
265 extern int solaris_acct();
266 extern int solaris_shmsys();
267 extern int solaris_semsys();
268 extern int solaris_ioctl();
269 extern int solaris_uadmin();
270 extern int solaris_utssys();
271 extern int solaris_fdsync();
272 extern int solaris_execve();
273 extern int solaris_umask();
274 extern int solaris_chroot();
275 extern int solaris_fcntl();
276 extern int solaris_ulimit();
277 extern int solaris_rmdir();
278 extern int solaris_mkdir();
279 extern int solaris_getdents();
280 extern int solaris_sysfs();
281 extern int solaris_getmsg();
282 extern int solaris_putmsg();
283 extern int solaris_poll();
284 extern int solaris_lstat();
285 extern int solaris_symlink();
286 extern int solaris_readlink();
287 extern int solaris_setgroups();
288 extern int solaris_getgroups();
289 extern int solaris_fchmod();
290 extern int solaris_fchown();
291 extern int solaris_sigprocmask();
292 extern int solaris_sigsuspend();
293 extern int solaris_sigaltstack();
294 extern int solaris_sigaction();
295 extern int solaris_spcall();
296 extern int solaris_context();
297 extern int solaris_evsys();
298 extern int solaris_evtrapret();
299 extern int solaris_statvfs();
300 extern int solaris_fstatvfs();
301 extern int solaris_nfssys();
302 extern int solaris_waitid();
303 extern int solaris_sigsendsys();
304 extern int solaris_hrtsys();
305 extern int solaris_acancel();
306 extern int solaris_async();
307 extern int solaris_priocntlsys();
308 extern int solaris_pathconf();
309 extern int solaris_mincore();
310 extern int solaris_mmap();
311 extern int solaris_mprotect();
312 extern int solaris_munmap();
313 extern int solaris_fpathconf();
314 extern int solaris_vfork();
315 extern int solaris_fchdir();
316 extern int solaris_readv();
317 extern int solaris_writev();
318 extern int solaris_xstat();
319 extern int solaris_lxstat();
320 extern int solaris_fxstat();
321 extern int solaris_xmknod();
322 extern int solaris_clocal();
323 extern int solaris_setrlimit();
324 extern int solaris_getrlimit();
325 extern int solaris_lchown();
326 extern int solaris_memcntl();
327 extern int solaris_getpmsg();
328 extern int solaris_putpmsg();
329 extern int solaris_rename();
330 extern int solaris_uname();
331 extern int solaris_setegid();
332 extern int solaris_sysconfig();
333 extern int solaris_adjtime();
334 extern int solaris_sysinfo();
335 extern int solaris_seteuid();
336 extern int solaris_vtrace();
337 extern int solaris_fork1();
338 extern int solaris_sigtimedwait();
339 extern int solaris_lwp_info();
340 extern int solaris_yield();
341 extern int solaris_lwp_sema_wait();
342 extern int solaris_lwp_sema_post();
343 extern int solaris_modctl();
344 extern int solaris_fchroot();
345 extern int solaris_utimes();
346 extern int solaris_vhangup();
347 extern int solaris_gettimeofday();
348 extern int solaris_getitimer();
349 extern int solaris_setitimer();
350 extern int solaris_lwp_create();
351 extern int solaris_lwp_exit();
352 extern int solaris_lwp_suspend();
353 extern int solaris_lwp_continue();
354 extern int solaris_lwp_kill();
355 extern int solaris_lwp_self();
356 extern int solaris_lwp_setprivate();
357 extern int solaris_lwp_getprivate();
358 extern int solaris_lwp_wait();
359 extern int solaris_lwp_mutex_unlock();
360 extern int solaris_lwp_mutex_lock();
361 extern int solaris_lwp_cond_wait();
362 extern int solaris_lwp_cond_signal();
363 extern int solaris_lwp_cond_broadcast();
364 extern int solaris_pread();
365 extern int solaris_pwrite();
366 extern int solaris_llseek();
367 extern int solaris_inst_sync();
368 extern int solaris_auditsys();
369 extern int solaris_processor_bind();
370 extern int solaris_processor_info();
371 extern int solaris_p_online();
372 extern int solaris_sigqueue();
373 extern int solaris_clock_gettime();
374 extern int solaris_clock_settime();
375 extern int solaris_clock_getres();
376 extern int solaris_timer_create();
377 extern int solaris_timer_delete();
378 extern int solaris_timer_settime();
379 extern int solaris_timer_gettime();
380 extern int solaris_timer_getoverrun();
381 extern int solaris_nanosleep();
382 
383 /* solaris_pgrpsys subcalls */
384 
385 extern int solaris_getpgrp(), solaris_setpgrp(), solaris_getsid();
386 extern int solaris_setsid(), solaris_getpgid(), solaris_setpgid();
387 
388 #define SOLARIS_pgrpsys_subcall	300
389 #define SOLARIS_getpgrp		(SOLARIS_pgrpsys_subcall + 0)
390 #define SOLARIS_setpgrp		(SOLARIS_pgrpsys_subcall + 1)
391 #define SOLARIS_getsid		(SOLARIS_pgrpsys_subcall + 2)
392 #define SOLARIS_setsid		(SOLARIS_pgrpsys_subcall + 3)
393 #define SOLARIS_getpgid		(SOLARIS_pgrpsys_subcall + 4)
394 #define SOLARIS_setpgid		(SOLARIS_pgrpsys_subcall + 5)
395 
396 #define SOLARIS_pgrpsys_nsubcalls	6
397 
398 /* solaris_sigcall subcalls */
399 
400 #undef SOLARIS_signal
401 #define SOLARIS_sigcall		48
402 
403 extern int solaris_signal(), solaris_sigset(), solaris_sighold();
404 extern int solaris_sigrelse(), solaris_sigignore(), solaris_sigpause();
405 
406 #define SOLARIS_sigcall_subcall	310
407 #define SOLARIS_signal		(SOLARIS_sigcall_subcall + 0)
408 #define SOLARIS_sigset		(SOLARIS_sigcall_subcall + 1)
409 #define SOLARIS_sighold		(SOLARIS_sigcall_subcall + 2)
410 #define SOLARIS_sigrelse		(SOLARIS_sigcall_subcall + 3)
411 #define SOLARIS_sigignore		(SOLARIS_sigcall_subcall + 4)
412 #define SOLARIS_sigpause		(SOLARIS_sigcall_subcall + 5)
413 
414 #define SOLARIS_sigcall_nsubcalls	6
415 
416 /* msgsys subcalls */
417 
418 extern int solaris_msgget(), solaris_msgctl(), solaris_msgrcv(), solaris_msgsnd();
419 
420 #define SOLARIS_msgsys_subcall	320
421 #define SOLARIS_msgget		(SOLARIS_msgsys_subcall + 0)
422 #define SOLARIS_msgctl		(SOLARIS_msgsys_subcall + 1)
423 #define SOLARIS_msgrcv		(SOLARIS_msgsys_subcall + 2)
424 #define SOLARIS_msgsnd		(SOLARIS_msgsys_subcall + 3)
425 
426 #define SOLARIS_msgsys_nsubcalls	4
427 
428 /* shmsys subcalls */
429 
430 extern int solaris_shmat(), solaris_shmctl(), solaris_shmdt(), solaris_shmget();
431 
432 #define SOLARIS_shmsys_subcall	330
433 #define SOLARIS_shmat		(SOLARIS_shmsys_subcall + 0)
434 #define SOLARIS_shmctl		(SOLARIS_shmsys_subcall + 1)
435 #define SOLARIS_shmdt		(SOLARIS_shmsys_subcall + 2)
436 #define SOLARIS_shmget		(SOLARIS_shmsys_subcall + 3)
437 
438 #define SOLARIS_shmsys_nsubcalls	4
439 
440 /* semsys subcalls */
441 
442 extern int solaris_semctl(), solaris_semget(), solaris_semop();
443 
444 #define SOLARIS_semsys_subcall	340
445 #define SOLARIS_semctl		(SOLARIS_semsys_subcall + 0)
446 #define SOLARIS_semget		(SOLARIS_semsys_subcall + 1)
447 #define SOLARIS_semop		(SOLARIS_semsys_subcall + 2)
448 
449 #define SOLARIS_semsys_nsubcalls	3
450 
451 /* utssys subcalls */
452 
453 extern int solaris_olduname(), solaris_ustat(), solaris_fusers();
454 
455 #define SOLARIS_utssys_subcall	350
456 
457 #define SOLARIS_olduname		(SOLARIS_utssys_subcall + 0)
458 				/* 1 is unused */
459 #define SOLARIS_ustat		(SOLARIS_utssys_subcall + 2)
460 #define SOLARIS_fusers		(SOLARIS_utssys_subcall + 3)
461 
462 #define SOLARIS_utssys_nsubcalls	4
463 
464 /* sysfs subcalls */
465 
466 extern int solaris_sysfs1(), solaris_sysfs2(), solaris_sysfs3();
467 
468 #define SOLARIS_sysfs_subcall	360
469 				/* 0 is unused */
470 #define SOLARIS_sysfs1		(SOLARIS_sysfs_subcall + 1)
471 #define SOLARIS_sysfs2		(SOLARIS_sysfs_subcall + 2)
472 #define SOLARIS_sysfs3		(SOLARIS_sysfs_subcall + 3)
473 
474 #define SOLARIS_sysfs_nsubcalls	4
475 
476 /* solaris_spcall subcalls */
477 
478 #undef SOLARIS_sigpending
479 #define SOLARIS_spcall		99
480 
481 extern int solaris_sigpending(), solaris_sigfillset();
482 
483 #define SOLARIS_spcall_subcall	370
484 				/* 0 is unused */
485 #define SOLARIS_sigpending		(SOLARIS_spcall_subcall + 1)
486 #define SOLARIS_sigfillset		(SOLARIS_spcall_subcall + 2)
487 
488 #define SOLARIS_spcall_nsubcalls	3
489 
490 /* solaris_context subcalls */
491 
492 extern int solaris_getcontext(), solaris_setcontext();
493 
494 #define SOLARIS_context_subcall	380
495 #define SOLARIS_getcontext		(SOLARIS_context_subcall + 0)
496 #define SOLARIS_setcontext		(SOLARIS_context_subcall + 1)
497 
498 #define SOLARIS_context_nsubcalls	2
499