|
|
1.1 root 1: # C library -- wait3
2:
3: # pid = wait3(&status, flags, &vmstat);
4: #
5: # pid == -1 if error
6: # status indicates fate of process, if given
7: # flags may indicate process is not to hang or
8: # that untraced stopped children are to be reported.
9: # vmstat optionally returns detailed resource usage information
10: #
11:
12: wait3 = 7 | same as wait!
13: .globl _wait3
14: .globl cerror
15:
16: _wait3:
17: linkw a6,#0
18: movl sp@(12),d0 | make it easy for system to get
19: movl sp@(16),d1 | these extra arguments
20: pea wait3
21: orb #0x1f,cc | flags wait3()
22: trap #0
23: bcc noerror
24: jmp cerror
25: noerror:
26: tstl sp@(8) | status desired?
27: beql nostatus | no
28: movl sp@(8),a1
29: movl d1,a1@ | store child's status
30: nostatus:
31: unlk a6
32: rts
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.