|
|
1.1 root 1: # C library -- wait
2:
3: # pid = wait(0);
4: # or,
5: # pid = wait(&status);
6: #
7: # pid == -1 if error
8: # status indicates fate of process, if given
9:
10: .set wait,7
11: .globl _wait
12: .globl cerror
13:
14: .align 1
15: _wait:
16: .word 0x0000
17: chmk $wait
18: bcc noerror
19: jmp cerror
20: noerror:
21: tstl 4(ap) # status desired?
22: beql nostatus # no
23: movl r1,*4(ap) # store child's status
24: nostatus:
25: ret
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.