Pristine Ack-5.5
[Ack-5.5.git] / mach / sun3 / libsys / libmon_s.a
1 eÿaccept.s\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
2 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
3 .define _accept
4 _accept: SYSTEM(SYS_accept)
5 \0access.s\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
6 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
7 .define _access
8 _access: SYSTEM(SYS_access)
9 \0acct.s\0s\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0y\0#include "syscall.h"
10 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
11 .define _acct
12 _acct: SYSTEM(SYS_acct)
13 cadjtime.s\0\0\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\82\0#include "syscall.h"
14 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
15 .define _adjtime
16 _adjtime: SYSTEM(SYS_adjtime)
17 alarm.c\0s\0\0\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0Æ\0unsigned
18 alarm(n)
19         unsigned n;
20 {
21         struct { long l1,l2,l3,l4; } t1,t2;
22         t1.l1 = 0;
23         t1.l2 = 0;
24         t1.l4 = 0;
25         t1.l3 = n;
26         if (setitimer(0,&t1,&t2) < 0) return -1;
27         if (t2.l4) t2.l3++;
28         return t2.l3;
29 }
30 _alarm.c\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0È\0unsigned
31 _alarm(n)
32         unsigned n;
33 {
34         struct { long l1,l2,l3,l4; } t1,t2;
35         t1.l1 = 0;
36         t1.l2 = 0;
37         t1.l4 = 0;
38         t1.l3 = n;
39         if (_setitimer(0,&t1,&t2) < 0) return -1;
40         if (t2.l4) t2.l3++;
41         return t2.l3;
42 }
43 async_dem.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\91\0#include "syscall.h"
44 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
45 .define _async_daemon
46 _async_daemon: SYSTEM(SYS_async_daemon)
47  bind.s\0em.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0y\0#include "syscall.h"
48 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
49 .define _bind
50 _bind: SYSTEM(SYS_bind)
51 Ycerror.s\0.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0¡\0.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
52 .define cerror,_errno
53 cerror:
54         move.l  d0,(_errno)
55         move.l  #-1,d0
56         rts
57
58 .sect .bss
59 _errno: .space 4
60
61 chdir.s\0\0.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0|\0#include "syscall.h"
62 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
63 .define _chdir
64 _chdir: SYSTEM(SYS_chdir)
65 chmod.s\0\0.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0|\0#include "syscall.h"
66 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
67 .define _chmod
68 _chmod: SYSTEM(SYS_chmod)
69 chown.s\0\0.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0|\0#include "syscall.h"
70 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
71 .define _chown
72 _chown: SYSTEM(SYS_chown)
73 chroot.s\0.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
74 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
75 .define _chroot
76 _chroot: SYSTEM(SYS_chroot)
77         cleanup.c\0s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\ f\0_cleanup() { }
78 lclose.s\0c\0s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0|\0#include "syscall.h"
79 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
80 .define _close
81 _close: SYSTEM(SYS_close)
82 _close.s\0\0s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0~\0#include "syscall.h"
83 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
84 .define __close
85 __close: SYSTEM(SYS_close)
86 connect.s\0s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\82\0#include "syscall.h"
87 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
88 .define _connect
89 _connect: SYSTEM(SYS_connect)
90 creat.s\0s\0s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0|\0#include "syscall.h"
91 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
92 .define _creat
93 _creat: SYSTEM(SYS_creat)
94 _creat.s\0\0s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0~\0#include "syscall.h"
95 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
96 .define __creat
97 __creat: SYSTEM(SYS_creat)
98 dup.s\0.s\0\0s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0v\0#include "syscall.h"
99 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
100 .define _dup
101 _dup: SYSTEM(SYS_dup)
102 _dup.s\0s\0\0s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0x\0#include "syscall.h"
103 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
104 .define __dup
105 __dup: SYSTEM(SYS_dup)
106 dup2.s\0s\0\0s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0y\0#include "syscall.h"
107 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
108 .define _dup2
109 _dup2: SYSTEM(SYS_dup2)
110 e_dup2.s\0\0\0s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0{\0#include "syscall.h"
111 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
112 .define __dup2
113 __dup2: SYSTEM(SYS_dup2)
114 texecl.c\0\0\0s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0c\0execl(name,args)
115         char *name;
116         int args;
117 {
118         extern char **environ;
119
120         execve(name,&args,environ);
121 }
122 __execl.c\0\0s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0e\0_execl(name,args)
123         char *name;
124         int args;
125 {
126         extern char **environ;
127
128         _execve(name,&args,environ);
129 }
130 uexecle.c\0\0s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0l\0execle(name,args)
131         char *name;
132         char *args;
133 {
134         char **p = &args;
135         while (*p++) ;
136
137         execve(name,&args,*p);
138 }
139 execv.c\0\0\0s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0d\0execv(name,args)
140         char *name;
141         char **args;
142 {
143         extern char **environ;
144         execve(name,args,environ);
145 }
146 execve.s\0\0s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
147 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
148 .define _execve
149 _execve: SYSTEM(SYS_execve)
150 t_execve.s\0s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\81\0#include "syscall.h"
151 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
152 .define __execve
153 __execve: SYSTEM(SYS_execve)
154
155 exit.c\0.s\0s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0$\0exit(n)
156 {
157         _cleanup();
158         _exit(n);
159 }
160 exportfs.s\0\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\85\0#include "syscall.h"
161 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
162 .define _exportfs
163 _exportfs: SYSTEM(SYS_exportfs)
164 .fchmod.s\0s\0\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
165 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
166 .define _fchmod
167 _fchmod: SYSTEM(SYS_fchmod)
168 rfchown.s\0s\0\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
169 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
170 .define _fchown
171 _fchown: SYSTEM(SYS_fchown)
172 rfcntl.s\0\0s\0\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0|\0#include "syscall.h"
173 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
174 .define _fcntl
175 _fcntl: SYSTEM(SYS_fcntl)
176 flock.s\0\0s\0\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0|\0#include "syscall.h"
177 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
178 .define _flock
179 _flock: SYSTEM(SYS_flock)
180 fork.s\0\0\0s\0\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0¾\0#include "syscall.h"
181 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
182 .define _fork
183 _fork:
184         pea     (SYS_fork)
185         trap    #0
186         bcs     1f
187         tst.l   d1
188         beq     2f
189         clr.l   d0
190 2:
191         rts
192 1:
193         jmp     (cerror)
194 _fork.s\0\0s\0\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0À\0#include "syscall.h"
195 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
196 .define __fork
197 __fork:
198         pea     (SYS_fork)
199         trap    #0
200         bcs     1f
201         tst.l   d1
202         beq     2f
203         clr.l   d0
204 2:
205         rts
206 1:
207         jmp     (cerror)
208 fstat.s\0\0s\0\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0x\0#include "syscall.h"
209 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
210 .define _fstat
211 _fstat: jmp (__fstat)
212 _fstat.s\0s\0\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0Ã\0#include "syscall.h"
213 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
214 .define __fstat
215 __fstat: pea (SYS_fstat); trap #0; bcc 1f; jmp (cerror)
216 1:
217         move.l  (sp)+,(sp)
218         jmp     (___statcvt)
219 3fstatfs.s\0\0\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\82\0#include "syscall.h"
220 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
221 .define _fstatfs
222 _fstatfs: SYSTEM(SYS_fstatfs)
223 fsync.s\0s\0\0\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0|\0#include "syscall.h"
224 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
225 .define _fsync
226 _fsync: SYSTEM(SYS_fsync)
227 ftime.c\0s\0\0\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0)\ 1#include <sys/types.h>
228
229 ftime(p)
230         struct { time_t time; unsigned short millitm;
231                  short timezone; short dstflag; } *p;
232 {
233         struct { long l1,l2; } t1,t2;
234
235         if (gettimeofday(&t1,&t2) < 0) return -1;
236         p->time = t1.l1;
237         p->millitm = t1.l2/1000;
238         p->dstflag = t2.l2;
239         p->timezone = t2.l1;
240         return 0;
241 }
242 \0_ftime.c\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0+\ 1#include <sys/types.h>
243
244 _ftime(p)
245         struct { time_t time; unsigned short millitm;
246                  short timezone; short dstflag; } *p;
247 {
248         struct { long l1,l2; } t1,t2;
249
250         if (_gettimeofday(&t1,&t2) < 0) return -1;
251         p->time = t1.l1;
252         p->millitm = t1.l2/1000;
253         p->dstflag = t2.l2;
254         p->timezone = t2.l1;
255         return 0;
256 }
257 \0ftruncate.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\88\0#include "syscall.h"
258 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
259 .define _ftruncate
260 _ftruncate: SYSTEM(SYS_ftruncate)
261 getdirent.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\94\0#include "syscall.h"
262 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
263 .define _getdirentries
264 _getdirentries: SYSTEM(SYS_getdirentries)
265 getdomnam.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\94\0#include "syscall.h"
266 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
267 .define _getdomainname
268 _getdomainname: SYSTEM(SYS_getdomainname)
269 getdopt.s\0s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\82\0#include "syscall.h"
270 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
271 .define _getdopt
272 _getdopt: SYSTEM(SYS_getdopt)
273 getdtabsz.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\94\0#include "syscall.h"
274 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
275 .define _getdtablesize
276 _getdtablesize: SYSTEM(SYS_getdtablesize)
277 getfh.s\0z.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0|\0#include "syscall.h"
278 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
279 .define _getfh
280 _getfh: SYSTEM(SYS_getfh)
281 getgid.s\0.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
282 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
283 .define _getgid
284 _getgid: SYSTEM(SYS_getgid)
285 Mgetgroups.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\88\0#include "syscall.h"
286 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
287 .define _getgroups
288 _getgroups: SYSTEM(SYS_getgroups)
289 gethostid.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\88\0#include "syscall.h"
290 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
291 .define _gethostid
292 _gethostid: SYSTEM(SYS_gethostid)
293 gethostnam.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\8e\0#include "syscall.h"
294 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
295 .define _gethostname
296 _gethostname: SYSTEM(SYS_gethostname)
297 getitimer.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\88\0#include "syscall.h"
298 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
299 .define _getitimer
300 _getitimer: SYSTEM(SYS_getitimer)
301 getpagesiz.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\8e\0#include "syscall.h"
302 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
303 .define _getpagesize
304 _getpagesize: SYSTEM(SYS_getpagesize)
305 getpeernam.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\8e\0#include "syscall.h"
306 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
307 .define _getpeername
308 _getpeername: SYSTEM(SYS_getpeername)
309 getpgrp.s\0.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\82\0#include "syscall.h"
310 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
311 .define _getpgrp
312 _getpgrp: SYSTEM(SYS_getpgrp)
313 getpid.s\0\0.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
314 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
315 .define _getpid
316 _getpid: SYSTEM(SYS_getpid)
317 p_getpid.s\0.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\81\0#include "syscall.h"
318 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
319 .define __getpid
320 __getpid: SYSTEM(SYS_getpid)
321
322 getprio.s\0.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\8e\0#include "syscall.h"
323 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
324 .define _getpriority
325 _getpriority: SYSTEM(SYS_getpriority)
326 getrlimit.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\88\0#include "syscall.h"
327 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
328 .define _getrlimit
329 _getrlimit: SYSTEM(SYS_getrlimit)
330 getrusage.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\88\0#include "syscall.h"
331 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
332 .define _getrusage
333 _getrusage: SYSTEM(SYS_getrusage)
334 _getrusage.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\8a\0#include "syscall.h"
335 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
336 .define __getrusage
337 __getrusage: SYSTEM(SYS_getrusage)
338 getsocknam.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\8e\0#include "syscall.h"
339 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
340 .define _getsockname
341 _getsockname: SYSTEM(SYS_getsockname)
342 getsockopt.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\8b\0#include "syscall.h"
343 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
344 .define _getsockopt
345 _getsockopt: SYSTEM(SYS_getsockopt)
346 egettimday.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\91\0#include "syscall.h"
347 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
348 .define _gettimeofday
349 _gettimeofday: SYSTEM(SYS_gettimeofday)
350 e_gettimday.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\93\0#include "syscall.h"
351 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
352 .define __gettimeofday
353 __gettimeofday: SYSTEM(SYS_gettimeofday)
354
355 getuid.s\0y.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
356 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
357 .define _getuid
358 _getuid: SYSTEM(SYS_getuid)
359 Mioctl.s\0\0y.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0|\0#include "syscall.h"
360 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
361 .define _ioctl
362 _ioctl: SYSTEM(SYS_ioctl)
363 _ioctl.s\0y.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0~\0#include "syscall.h"
364 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
365 .define __ioctl
366 __ioctl: SYSTEM(SYS_ioctl)
367 kill.s\0s\0y.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0y\0#include "syscall.h"
368 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
369 .define _kill
370 _kill: SYSTEM(SYS_kill)
371 c_kill.s\0\0y.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0{\0#include "syscall.h"
372 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
373 .define __kill
374 __kill: SYSTEM(SYS_kill)
375 lkillpg.s\0y.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
376 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
377 .define _killpg
378 _killpg: SYSTEM(SYS_killpg)
379 Mlink.s\0s\0y.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0y\0#include "syscall.h"
380 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
381 .define _link
382 _link: SYSTEM(SYS_link)
383 l_link.s\0\0y.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0{\0#include "syscall.h"
384 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
385 .define __link
386 __link: SYSTEM(SYS_link)
387 plisten.s\0y.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
388 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
389 .define _listen
390 _listen: SYSTEM(SYS_listen)
391 Mlseek.s\0\0y.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0|\0#include "syscall.h"
392 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
393 .define _lseek
394 _lseek: SYSTEM(SYS_lseek)
395 _lseek.s\0y.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0~\0#include "syscall.h"
396 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
397 .define __lseek
398 __lseek: SYSTEM(SYS_lseek)
399 lstat.s\0\0y.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0Á\0#include "syscall.h"
400 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
401 .define _lstat
402 _lstat: pea (SYS_lstat); trap #0; bcc 1f; jmp (cerror)
403 1:
404         move.l  (sp)+,(sp)
405         jmp     (___statcvt)
406 nmadvise.s\0.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\82\0#include "syscall.h"
407 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
408 .define _madvise
409 _madvise: SYSTEM(SYS_madvise)
410 mincore.s\0.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\82\0#include "syscall.h"
411 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
412 .define _mincore
413 _mincore: SYSTEM(SYS_mincore)
414 mkdir.s\0s\0.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0|\0#include "syscall.h"
415 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
416 .define _mkdir
417 _mkdir: SYSTEM(SYS_mkdir)
418 mknod.s\0s\0.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0|\0#include "syscall.h"
419 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
420 .define _mknod
421 _mknod: SYSTEM(SYS_mknod)
422 mmap.s\0\0s\0.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0y\0#include "syscall.h"
423 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
424 .define _mmap
425 _mmap: SYSTEM(SYS_mmap)
426 dmount.s\0s\0.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0|\0#include "syscall.h"
427 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
428 .define _mount
429 _mount: SYSTEM(SYS_mount)
430 mprotect.s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\85\0#include "syscall.h"
431 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
432 .define _mprotect
433 _mprotect: SYSTEM(SYS_mprotect)
434 cmremap.s\0s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
435 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
436 .define _mremap
437 _mremap: SYSTEM(SYS_mremap)
438 tmsgsys.s\0s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
439 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
440 .define _msgsys
441 _msgsys: SYSTEM(SYS_msgsys)
442 tmunmap.s\0s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
443 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
444 .define _munmap
445 _munmap: SYSTEM(SYS_munmap)
446 tnfssvc.s\0s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
447 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
448 .define _nfssvc
449 _nfssvc: SYSTEM(SYS_nfssvc)
450 tnice.c\0s\0s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0Ô\0nice(incr)
451 {
452         extern int errno;
453         int sav = errno;
454         int prio;
455
456         errno = 0;
457         prio = getpriority(0,0);
458         if (prio == -1 && errno) return -1;
459         if (setpriority(0,0,prio+incr) < 0) return -1;
460         errno = sav;
461         return 0;
462 }
463 open.s\0s\0s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0y\0#include "syscall.h"
464 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
465 .define _open
466 _open: SYSTEM(SYS_open)
467 r_open.s\0\0s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0{\0#include "syscall.h"
468 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
469 .define __open
470 __open: SYSTEM(SYS_open)
471 opause.c\0\0s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0#\0pause() {
472         sigpause(sigblock());
473 }
474 s_pause.c\0s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0&\0_pause() {
475         _sigpause(_sigblock());
476 }
477 pipe.s\0c\0s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0Ü\0#include "syscall.h"
478 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
479 .define _pipe
480 _pipe:
481         pea     (SYS_pipe)
482         trap    #0
483         bcs     1f
484         move.l  (4,sp),a0
485         move.l  d0,(a0)+
486         move.l  d1,(a0)
487         clr.l   d0
488         rts
489 1:
490         jmp     (cerror)
491 _pipe.s\0\0s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0Þ\0#include "syscall.h"
492 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
493 .define __pipe
494 __pipe:
495         pea     (SYS_pipe)
496         trap    #0
497         bcs     1f
498         move.l  (4,sp),a0
499         move.l  d0,(a0)+
500         move.l  d1,(a0)
501         clr.l   d0
502         rts
503 1:
504         jmp     (cerror)
505 profil.s\0s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
506 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
507 .define _profil
508 _profil: SYSTEM(SYS_profil)
509         ptrace.s\0s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\9f\0#include "syscall.h"
510 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
511 .define _ptrace
512 .extern _errno
513 _ptrace:
514         clr.l   (_errno)
515         SYSTEM(SYS_ptrace)
516 oquotactl.s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\85\0#include "syscall.h"
517 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
518 .define _quotactl
519 _quotactl: SYSTEM(SYS_quotactl)
520 rread.s\0l.s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0y\0#include "syscall.h"
521 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
522 .define _read
523 _read: SYSTEM(SYS_read)
524 S_read.s\0.s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0{\0#include "syscall.h"
525 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
526 .define __read
527 __read: SYSTEM(SYS_read)
528 qreadlink.s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\85\0#include "syscall.h"
529 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
530 .define _readlink
531 _readlink: SYSTEM(SYS_readlink)
532 rreadv.s\0.s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0|\0#include "syscall.h"
533 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
534 .define _readv
535 _readv: SYSTEM(SYS_readv)
536 reboot.s\0s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0©\0#include "syscall.h"
537 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
538 .define _reboot
539 _reboot:
540         pea     (SYS_reboot)
541         trap    #0
542         bcs     1f
543         stop    #0
544 1:
545         jmp     (cerror)
546 arecv.s\0s\0s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0y\0#include "syscall.h"
547 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
548 .define _recv
549 _recv: SYSTEM(SYS_recv)
550 orecvfrom.s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\85\0#include "syscall.h"
551 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
552 .define _recvfrom
553 _recvfrom: SYSTEM(SYS_recvfrom)
554 0recvmsg.s\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\82\0#include "syscall.h"
555 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
556 .define _recvmsg
557 _recvmsg: SYSTEM(SYS_recvmsg)
558 rename.s\0\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
559 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
560 .define _rename
561 _rename: SYSTEM(SYS_rename)
562 grmdir.s\0\0\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0|\0#include "syscall.h"
563 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
564 .define _rmdir
565 _rmdir: SYSTEM(SYS_rmdir)
566 sbrk.s\0\0\0\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0*\ 2#include "syscall.h"
567 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
568 .define _sbrk,_brk
569 _sbrk:
570         move.l  (4,sp),d0
571         add.l   #3,d0
572         move.l  #~3,d1
573         and.l   d1,d0
574         move.l  d0,a0
575         move.l  (.limhp),d0
576         add.l   #3,d0
577         and.l   d1,d0
578         move.l  d0,(.limhp)
579         add.l   d0,a0
580         move.l  a0,(4,sp)
581         pea     (17)    ! not SYS_sbrk
582         trap    #0
583         bcs     1f
584         move.l  (.limhp),d0
585         move.l  (4,sp),(.limhp)
586         rts
587 1:
588         jmp     (cerror)
589
590 _brk:
591         move.l  (4,sp),d0
592         add.l   #3,d0
593         move.l  #~3,d1
594         and.l   d1,d0
595         move.l  d0,(4,sp)
596         pea     (17)
597         trap    #0
598         bcs     1f
599         move.l  (4,sp),(.limhp)
600         clr.l   d0
601         rts
602 1:
603         jmp     (cerror)
604 _sbrk.s\0\0\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0.\ 2#include "syscall.h"
605 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
606 .define __sbrk,__brk
607 __sbrk:
608         move.l  (4,sp),d0
609         add.l   #3,d0
610         move.l  #~3,d1
611         and.l   d1,d0
612         move.l  d0,a0
613         move.l  (.limhp),d0
614         add.l   #3,d0
615         and.l   d1,d0
616         move.l  d0,(.limhp)
617         add.l   d0,a0
618         move.l  a0,(4,sp)
619         pea     (17)    ! not SYS_sbrk
620         trap    #0
621         bcs     1f
622         move.l  (.limhp),d0
623         move.l  (4,sp),(.limhp)
624         rts
625 1:
626         jmp     (cerror)
627
628 __brk:
629         move.l  (4,sp),d0
630         add.l   #3,d0
631         move.l  #~3,d1
632         and.l   d1,d0
633         move.l  d0,(4,sp)
634         pea     (17)
635         trap    #0
636         bcs     1f
637         move.l  (4,sp),(.limhp)
638         clr.l   d0
639         rts
640 1:
641         jmp     (cerror)
642 select.s\0\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
643 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
644 .define _select
645 _select: SYSTEM(SYS_select)
646 dsemsys.s\0\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
647 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
648 .define _semsys
649 _semsys: SYSTEM(SYS_semsys)
650 dsend.s\0s\0\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0y\0#include "syscall.h"
651 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
652 .define _send
653 _send: SYSTEM(SYS_send)
654 msendmsg.s\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\82\0#include "syscall.h"
655 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
656 .define _sendmsg
657 _sendmsg: SYSTEM(SYS_sendmsg)
658 sendto.s\0\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
659 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
660 .define _sendto
661 _sendto: SYSTEM(SYS_sendto)
662 gsetdomnam.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\94\0#include "syscall.h"
663 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
664 .define _setdomainname
665 _setdomainname: SYSTEM(SYS_setdomainname)
666 setdopt.s\0s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\82\0#include "syscall.h"
667 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
668 .define _setdopt
669 _setdopt: SYSTEM(SYS_setdopt)
670 setgroups.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\88\0#include "syscall.h"
671 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
672 .define _setgroups
673 _setgroups: SYSTEM(SYS_setgroups)
674 sethostnam.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\8e\0#include "syscall.h"
675 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
676 .define _sethostname
677 _sethostname: SYSTEM(SYS_sethostname)
678 setitimer.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\88\0#include "syscall.h"
679 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
680 .define _setitimer
681 _setitimer: SYSTEM(SYS_setitimer)
682 _setitimer.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\8a\0#include "syscall.h"
683 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
684 .define __setitimer
685 __setitimer: SYSTEM(SYS_setitimer)
686 setpgrp.s\0.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\82\0#include "syscall.h"
687 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
688 .define _setpgrp
689 _setpgrp: SYSTEM(SYS_setpgrp)
690 setprio.s\0.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\8e\0#include "syscall.h"
691 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
692 .define _setpriority
693 _setpriority: SYSTEM(SYS_setpriority)
694 setregid.s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\85\0#include "syscall.h"
695 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
696 .define _setregid
697 _setregid: SYSTEM(SYS_setregid)
698 rsetreuid.s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\85\0#include "syscall.h"
699 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
700 .define _setreuid
701 _setreuid: SYSTEM(SYS_setreuid)
702 rsetrlimit.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\88\0#include "syscall.h"
703 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
704 .define _setrlimit
705 _setrlimit: SYSTEM(SYS_setrlimit)
706 setsockopt.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\8b\0#include "syscall.h"
707 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
708 .define _setsockopt
709 _setsockopt: SYSTEM(SYS_setsockopt)
710 ysettimday.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\91\0#include "syscall.h"
711 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
712 .define _settimeofday
713 _settimeofday: SYSTEM(SYS_settimeofday)
714 eshmsys.s\0.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
715 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
716 .define _shmsys
717 _shmsys: SYSTEM(SYS_shmsys)
718 Sshutdown.s\0\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\85\0#include "syscall.h"
719 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
720 .define _shutdown
721 _shutdown: SYSTEM(SYS_shutdown)
722 tsigblock.s\0\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\85\0#include "syscall.h"
723 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
724 .define _sigblock
725 _sigblock: SYSTEM(SYS_sigblock)
726 t_sigblock.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\87\0#include "syscall.h"
727 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
728 .define __sigblock
729 __sigblock: SYSTEM(SYS_sigblock)
730 isignal.c\0.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\08\ 2static long masks[32];
731 static long flags[32];
732 void (*
733 signal(sig,handler))()
734         void (*handler)();
735 {
736         struct {
737                 void (*sv_handler)();
738                 long    sv_mask;
739                 long    sv_flags;
740         } v, ov;
741
742         v.sv_handler = handler;
743         v.sv_mask = masks[sig];
744         v.sv_flags = flags[sig];
745         if (_sigvec(sig,&v, &ov) < 0) return (void (*)()) -1;
746         if (v.sv_mask != ov.sv_mask || v.sv_flags != ov.sv_flags) {
747                 v.sv_mask = ov.sv_mask;
748                 masks[sig] = ov.sv_mask;
749                 v.sv_flags = ov.sv_flags;
750                 flags[sig] = ov.sv_flags;
751                 if (_sigvec(sig,&v,(char *) 0) < 0) return (void (*)()) -1;
752         }
753         return ov.sv_handler;
754 }
755 sigpause.s\0\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\85\0#include "syscall.h"
756 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
757 .define _sigpause
758 _sigpause: SYSTEM(SYS_sigpause)
759         _sigpause.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\87\0#include "syscall.h"
760 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
761 .define __sigpause
762 __sigpause: SYSTEM(SYS_sigpause)
763 lsigsetmask.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\8b\0#include "syscall.h"
764 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
765 .define _sigsetmask
766 _sigsetmask: SYSTEM(SYS_sigsetmask)
767         _sigsetmask.s\0\0\0\0\0\ 2\ 2¤\ 1\0\0\8d\0#include "syscall.h"
768 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
769 .define __sigsetmask
770 __sigsetmask: SYSTEM(SYS_sigsetmask)
771 vsigstack.s\0.s\0\0\0\0\0\ 2\ 2¤\ 1\0\0\85\0#include "syscall.h"
772 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
773 .define _sigstack
774 _sigstack: SYSTEM(SYS_sigstack)
775 esigtramp.s\0.s\0\0\0\0\0\ 2\ 2¤\ 1\0\0.\ 1.sect .text
776 .define __sigtramp
777 __sigtramp:
778         movem.l d0/d1/a0/a1,-(sp)
779         move.l  #__sigfunc,a0
780         move.l  (0x10,sp),d0
781         lsl.l   #2,d0
782         move.l  (a0,d0),a0
783         move.l  (0x18,sp),-(sp)
784         move.l  (0x18,sp),-(sp)
785         move.l  (0x18,sp),-(sp)
786         jsr     (a0)
787         add.l   #12,sp
788         movem.l (sp)+,d0/d1/a0/a1
789         add.l   #8,sp
790         pea     (0x8b)
791         trap    #0
792 sigvec.c\0s\0.s\0\0\0\0\0\ 2\ 2¤\ 1\0\0¯\ 2#include "syscall.h"
793 #include <errno.h>
794 struct sigvec { int (*handler)(); int mask,flags; };
795 int (*(_sigfunc[32]))();
796 extern int _sigtramp();
797 extern int errno;
798
799 sigvec(sig,vec,ovec)
800         register struct sigvec *vec;
801         struct sigvec *ovec;
802 {
803         struct sigvec tmp;
804         int (*old)();
805
806         if ((unsigned) sig >= 32) {
807                 errno = EINVAL;
808                 return -1;
809         }
810         old = _sigfunc[sig];
811         if (vec) {
812                 tmp = *vec;
813                 vec = &tmp;
814                 if (vec->handler && vec->handler != (int (*)()) 1) {
815                         _sigfunc[sig] = vec->handler;
816                         vec->handler = _sigtramp;
817                 }
818         }
819         if (syscall(SYS_sigvec,sig,vec,ovec) < 0) {
820                 _sigfunc[sig] = old;
821                 return -1;
822         }
823         if (ovec && ovec->handler == _sigtramp) {
824                 ovec->handler = old;
825         }
826         return 0;
827 }
828 \0_sigvec.c\0\0.s\0\0\0\0\0\ 2\ 2¤\ 1\0\0±\ 2#include "syscall.h"
829 #include <errno.h>
830 struct sigvec { int (*handler)(); int mask,flags; };
831 int (*(_sigfunc[32]))();
832 extern int _sigtramp();
833 extern int errno;
834
835 _sigvec(sig,vec,ovec)
836         register struct sigvec *vec;
837         struct sigvec *ovec;
838 {
839         struct sigvec tmp;
840         int (*old)();
841
842         if ((unsigned) sig >= 32) {
843                 errno = EINVAL;
844                 return -1;
845         }
846         old = _sigfunc[sig];
847         if (vec) {
848                 tmp = *vec;
849                 vec = &tmp;
850                 if (vec->handler && vec->handler != (int (*)()) 1) {
851                         _sigfunc[sig] = vec->handler;
852                         vec->handler = _sigtramp;
853                 }
854         }
855         if (_syscall(SYS_sigvec,sig,vec,ovec) < 0) {
856                 _sigfunc[sig] = old;
857                 return -1;
858         }
859         if (ovec && ovec->handler == _sigtramp) {
860                 ovec->handler = old;
861         }
862         return 0;
863 }
864 \0socket.s\0\0\0.s\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
865 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
866 .define _socket
867 _socket: SYSTEM(SYS_socket)
868 tsocketpair.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\8b\0#include "syscall.h"
869 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
870 .define _socketpair
871 _socketpair: SYSTEM(SYS_socketpair)
872 )sstk.s\0air.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0y\0#include "syscall.h"
873 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
874 .define _sstk
875 _sstk: SYSTEM(SYS_sstk)
876 Mstat.s\0air.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0¾\0#include "syscall.h"
877 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
878 .define _stat
879 _stat: pea (SYS_stat); trap #0; bcc 1f; jmp (cerror)
880 1:
881         move.l  (sp)+,(sp)
882         jmp     (___statcvt)
883 statfs.s\0r.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
884 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
885 .define _statfs
886 _statfs: SYSTEM(SYS_statfs)
887 ;swapon.s\0r.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
888 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
889 .define _swapon
890 _swapon: SYSTEM(SYS_swapon)
891 ;symlink.s\0.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\82\0#include "syscall.h"
892 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
893 .define _symlink
894 _symlink: SYSTEM(SYS_symlink)
895 sync.s\0.s\0.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0y\0#include "syscall.h"
896 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
897 .define _sync
898 _sync: SYSTEM(SYS_sync)
899 ssyscall.s\0.s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0º\0.sect .text
900 .define _syscall
901 _syscall:
902         move.l  (4,sp),d0
903         move.l  (sp),(4,sp)
904         move.l  d0,(sp)
905         trap    #0
906         bcs     1f
907         move.l  (sp),a0
908         jmp     (a0)
909 1:
910         move.l  (sp),a0
911         move.l  a0,-(sp)
912         jmp     (cerror)
913 _syscall.s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0¼\0.sect .text
914 .define __syscall
915 __syscall:
916         move.l  (4,sp),d0
917         move.l  (sp),(4,sp)
918         move.l  d0,(sp)
919         trap    #0
920         bcs     1f
921         move.l  (sp),a0
922         jmp     (a0)
923 1:
924         move.l  (sp),a0
925         move.l  a0,-(sp)
926         jmp     (cerror)
927 time.c\0l.s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\9d\0long
928 time(loc)
929         long *loc;
930 {
931         struct { long l1,l2; } t1;
932
933         if (gettimeofday(&t1, (char *) 0) < 0) {
934                 return -1;
935         }
936         if (loc) *loc = t1.l1;
937         return t1.l1;
938 }
939         times.c\0.s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0b\ 1#include <sys/types.h>
940
941 #define Xval(xx)        ((xx).l1*60+(xx).l2/(100000/6))
942
943 times(bp)
944         struct { time_t l1,l2,l3,l4;} *bp;
945 {
946         struct { struct { long l1,l2; }s1,s2; long x[20]; } t;
947         if (getrusage(0,&t) < 0) return -1;
948         bp->l1 = Xval(t.s1);
949         bp->l2 = Xval(t.s2);
950         if (getrusage(-1,&t) < 0) return -1;
951         bp->l3 = Xval(t.s1);
952         bp->l4 = Xval(t.s2);
953         return 0;
954 }
955 _times.c\0s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0e\ 1#include <sys/types.h>
956
957 #define Xval(xx)        ((xx).l1*60+(xx).l2/(100000/6))
958
959 _times(bp)
960         struct { time_t l1,l2,l3,l4;} *bp;
961 {
962         struct { struct { long l1,l2; }s1,s2; long x[20]; } t;
963         if (_getrusage(0,&t) < 0) return -1;
964         bp->l1 = Xval(t.s1);
965         bp->l2 = Xval(t.s2);
966         if (_getrusage(-1,&t) < 0) return -1;
967         bp->l3 = Xval(t.s1);
968         bp->l4 = Xval(t.s2);
969         return 0;
970 }
971
972 truncate.s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\85\0#include "syscall.h"
973 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
974 .define _truncate
975 _truncate: SYSTEM(SYS_truncate)
976 sumask.s\0.s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0|\0#include "syscall.h"
977 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
978 .define _umask
979 _umask: SYSTEM(SYS_umask)
980 unlink.s\0s\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
981 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
982 .define _unlink
983 _unlink: SYSTEM(SYS_unlink)
984 c_unlink.s\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\81\0#include "syscall.h"
985 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
986 .define __unlink
987 __unlink: SYSTEM(SYS_unlink)
988 tumount.s\0\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
989 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
990 .define _umount
991 _umount: SYSTEM(SYS_umount)
992 )unmount.s\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\81\0#include "syscall.h"
993 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
994 .define _unmount
995 _unmount: SYSTEM(SYS_umount)
996 tustat.s\0s\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0|\0#include "syscall.h"
997 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
998 .define _ustat
999 _ustat: SYSTEM(SYS_ustat)
1000 utime.c\0s\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0¿\0#include <sys/types.h>
1001
1002 utime(file, timep)
1003         char *file;
1004         time_t timep[2];
1005 {
1006         struct { long l1,l2,l3,l4; } x;
1007
1008         x.l2 = x.l4 = 0;
1009         x.l1 = timep[0];
1010         x.l3 = timep[1];
1011         return utimes(file,&x);
1012 }
1013 autimes.s\0\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
1014 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
1015 .define _utimes
1016 _utimes: SYSTEM(SYS_utimes)
1017
1018 vhangup.s\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\82\0#include "syscall.h"
1019 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
1020 .define _vhangup
1021 _vhangup: SYSTEM(SYS_vhangup)
1022 wait.s\0.s\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0Û\0#include "syscall.h"
1023 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
1024 .define _wait
1025 _wait:  
1026         pea     (SYS_wait)
1027         trap    #0
1028         bcs     1f
1029         tst.l   (4,sp)
1030         beq     2f
1031         move.l  (4,sp),a0
1032         move.l  d1,(a0)
1033 2:
1034         rts
1035 1:
1036         jmp     (cerror)
1037 p_wait.s\0s\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0Ý\0#include "syscall.h"
1038 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
1039 .define __wait
1040 __wait: 
1041         pea     (SYS_wait)
1042         trap    #0
1043         bcs     1f
1044         tst.l   (4,sp)
1045         beq     2f
1046         move.l  (4,sp),a0
1047         move.l  d1,(a0)
1048 2:
1049         rts
1050 1:
1051         jmp     (cerror)
1052 >write.s\0s\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0|\0#include "syscall.h"
1053 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
1054 .define _write
1055 _write: SYSTEM(SYS_write)
1056 _write.s\0\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0~\0#include "syscall.h"
1057 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
1058 .define __write
1059 __write: SYSTEM(SYS_write)
1060 writev.s\0\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\7f\0#include "syscall.h"
1061 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
1062 .define _writev
1063 _writev: SYSTEM(SYS_writev)
1064 p_exit.s\0\0\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\91\0#include "syscall.h"
1065 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
1066 .define __exit
1067 __exit:
1068         pea     (SYS_exit)
1069         trap    #0
1070         jmp     (cerror)
1071 lstty.c\0\0\0\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0x\0#include <sgtty.h>
1072 int stty(fildes,argp)
1073         int fildes ;
1074         struct sgttyb *argp ;
1075 {
1076         return ioctl(fildes,TIOCSETP,argp) ;
1077 }
1078 gtty.c\0\0\0\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0x\0#include <sgtty.h>
1079 int
1080 gtty(fildes,argp)
1081         int fildes ;
1082         struct sgttyb *argp ;
1083 {
1084         return ioctl(fildes,TIOCGETP,argp) ;
1085 }
1086 _gtty.c\0\0\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0z\0#include <sgtty.h>
1087 int
1088 _gtty(fildes,argp)
1089         int fildes ;
1090         struct sgttyb *argp ;
1091 {
1092         return _ioctl(fildes,TIOCGETP,argp) ;
1093 }
1094 getegid.s\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\9c\0#include "syscall.h"
1095 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
1096 .define _getegid
1097 _getegid:
1098         pea     (SYS_getgid)
1099         trap    #0
1100         move.l  d1,d0
1101         rts
1102 geteuid.s\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\9c\0#include "syscall.h"
1103 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
1104 .define _geteuid
1105 _geteuid:
1106         pea     (SYS_getuid)
1107         trap    #0
1108         move.l  d1,d0
1109         rts
1110 getppid.s\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\9c\0#include "syscall.h"
1111 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
1112 .define _getppid
1113 _getppid:
1114         pea     (SYS_getpid)
1115         trap    #0
1116         move.l  d1,d0
1117         rts
1118 lockf.c\0s\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0;\ 2#include <errno.h>
1119 lockf(fildes, mode, size)
1120         long size;
1121 {
1122         struct {
1123                 short type, whence; long start, end; short pid;
1124         } x;
1125         int i = 8;
1126         extern int errno;
1127
1128         x.type = 2;
1129         x.whence = 1;
1130         x.start = 0;
1131         x.end = size;
1132         switch(mode) {
1133         case 0:
1134                 x.type = 3;
1135                 break;
1136         case 1:
1137                 i = 9;
1138                 break;
1139         case 2:
1140                 break;
1141         case 3:
1142                 if (fcntl(fildes,7,&x) == -1) {
1143                         return -1;
1144                 }
1145                 if (x.type == 3) {
1146                         return 0;
1147                 }
1148                 errno = EACCES;
1149                 return -1;
1150         default:
1151                 errno = EINVAL;
1152                 return -1;
1153         }
1154         if (fcntl(fildes,i,&x) == -1) {
1155                 if (errno = 79) {
1156                         errno = 78;
1157                 }
1158                 return -1;
1159         }
1160 }
1161 smsg.s\0c\0s\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\ e\ 1.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
1162 .define _msgget,_msgctl,_msgrcv,_msgsnd
1163 _msgget:
1164         pea     (0)
1165         bra     1f
1166 _msgctl:
1167         pea     (1)
1168         bra     1f
1169 _msgrcv:
1170         pea     (2)
1171         bra     1f
1172 _msgsnd:
1173         pea     (3)
1174 1:
1175         move.l  (4,sp),d0
1176         move.l  (sp),(4,sp)
1177         move.l  d0,(sp)
1178         jmp     (_msgsys)
1179 plock.c\0s\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0Q\0#include <errno.h>
1180 plock(op)
1181 {
1182         extern int errno;
1183
1184         errno = EPERM;
1185         return -1;
1186 }
1187 gsem.s\0c\0s\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0ê\0.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
1188 .define _semget,_semctl,_semop
1189 _semget:
1190         pea     (1)
1191         bra     1f
1192 _semctl:
1193         pea     (0)
1194         bra     1f
1195 _semop:
1196         pea     (2)
1197 1:
1198         move.l  (4,sp),d0
1199         move.l  (sp),(4,sp)
1200         move.l  d0,(sp)
1201         jmp     (_semsys)
1202 setgid.c\0\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0%\0setgid(u)
1203 {
1204         return setregid(u,u);
1205 }
1206  setuid.c\0\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0%\0setuid(u)
1207 {
1208         return setreuid(u,u);
1209 }
1210  shm.s\0.c\0\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\f\ 1.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
1211 .define _shmget,_shmctl,_shmrcv,_shmsnd
1212 _shmget:
1213         pea     (3)
1214         bra     1f
1215 _shmctl:
1216         pea     (1)
1217         bra     1f
1218 _shmat:
1219         pea     (4)
1220         bra     1f
1221 _shmdt:
1222         pea     (2)
1223 1:
1224         move.l  (4,sp),d0
1225         move.l  (sp),(4,sp)
1226         move.l  d0,(sp)
1227         jmp     (_shmsys)
1228 stime.c\0\0\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0s\0stime(tp)
1229         long *tp;
1230 {
1231         struct { long l1,l2; } x;
1232
1233         x.l1 = *tp;
1234         x.l2 = 0;
1235         return settimeofday(&x, (char *) 0);
1236 }
1237         tell.c\0\0\0\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0:\0long
1238 tell(f)
1239 {
1240         long lseek();
1241
1242         return lseek(f, 0L, 1);
1243 }
1244 ulimit.c\0\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0°\ 1#include <errno.h>
1245
1246 ulimit(cmd, newlimit)
1247         long newlimit;
1248 {
1249         extern int errno;
1250         struct {
1251                 long soft, hard;
1252         } x;
1253                 
1254         switch(cmd) {
1255         case 1:
1256                 if (getrlimit(1, &x) < 0) return -1;
1257                 return ((x.soft + 511) & ~511) >> 9;
1258         case 2:
1259                 x.soft = x.hard = (newlimit << 9);
1260                 if (setrlimit(1, &x) < 0) return -1;
1261                 return x.soft;
1262         case 3:
1263                 if (getrlimit(2, &x) < 0) return -1;
1264                 return x.soft;
1265         default:
1266                 errno = EINVAL;
1267                 return -1;
1268         }
1269 }
1270 uname.c\0\0\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0+\ 2extern int errno;
1271
1272 struct utsname {
1273         char sysname[9],nodename[9],release[9],version[9],machine[9];
1274 };
1275
1276 static char def_node[] = "unknown";
1277 static char rel[] = "4.2BSD";
1278 static char ver[] = "vm";
1279 static char mach[] = "sun";
1280
1281 uname(nm)
1282         register struct utsname *nm;
1283 {
1284         register char *p = nm->nodename;
1285
1286         while (p <= nm->release) *p++ = 0;
1287         if (gethostname(nm->nodename,9) == -1) {
1288                 strcpy(nm->nodename, def_node);
1289         }
1290         strncpy(nm->sysname,nm->nodename,9);
1291         strncpy(nm->release,rel,9);
1292         strncpy(nm->version,ver,9);
1293         strncpy(nm->machine,mach,9);
1294         return 0;
1295 }
1296 rvadvise.s\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\82\0#include "syscall.h"
1297 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
1298 .define _vadvise
1299 _vadvise: SYSTEM(SYS_vadvise)
1300 vfork.s\0s\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\0\ 1#include "syscall.h"
1301 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
1302 .define _vfork
1303 _vfork:
1304         move.l  (sp)+,a0
1305         pea     (SYS_vfork)
1306         trap    #0
1307         bcs     1f
1308         tst.l   d1
1309         bne     2f
1310         jmp     (a0)
1311 1:
1312         move.l  d0,(_errno)
1313         move.l  #-1,d0
1314         jmp     (a0)
1315 2:
1316         clr.l   d0
1317         jmp     (a0)
1318 wait3.s\0s\0\0s\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0\11\ 1#include "syscall.h"
1319 .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
1320 .define _wait3
1321 _wait3:
1322         move.l  (8,sp),d0
1323         move.l  (12,sp),d1
1324         pea     (SYS_wait)
1325         or.b    #0x1f,ccr
1326         trap    #0
1327         bcc     1f
1328         jmp     (cerror)
1329 1:
1330         tst.l   (4,sp)
1331         beq     1f
1332         move.l  (4,sp),a0
1333         move.l  d1,(a0)
1334 1:
1335         rts
1336 e__statcvt.s\0\0\0\0\0\0\0\ 2\ 2¤\ 1\0\0ó\ 1.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
1337 .define ___statcvt
1338 ___statcvt:
1339 move.l (4,sp),a0
1340 lea (60,a0),a0
1341 lea (4,a0),a1
1342 move.l -(a0),-(a1)
1343 move.l -(a0),-(a1)
1344 move.l -(a0),-(a1)
1345 move.l -(a0),-(a1)
1346 move.l -(a0),-(a1)
1347 move.l -(a0),-(a1)
1348 move.l -(a0),-(a1)
1349 move.l -(a0),-(a1)
1350 move.l -(a0),-(a1)
1351 move.l -(a0),-(a1)
1352 move.l -(a0),-(a1)
1353 move.w -(a0),-(a1)
1354 clr.w -(a1)
1355 move.l -(a0),-(a1)
1356 move.l -(a0),-(a1)
1357 move.l -(a0),-(a1)
1358 move.w -(a0),-(a1)
1359 clr.w -(a1)
1360 move.w -(a0),-(a1)
1361 clr.l d0
1362 rts
1363 s