1: / C library -- wait
2:
3: / pid = wait();
4: / or,
5: / pid = wait(&status);
6: /
7: / pid == -1 if error
8: / status indicates fate of process, if given
9:
10: .globl _wait, _nargs, cerror
11:
12: _wait:
13: mov r5,-(sp)
14: mov sp,r5
15: jsr pc,_nargs
16: mov r0,-(sp)
17: sys wait
18: bec 1f
19: tst (sp)+
20: jmp cerror
21: 1:
22: tst (sp)+
23: beq 2f
24: mov r1,*4(r5) / status return
25: 2:
26: mov (sp)+,r5
27: rts pc
Defined functions
_wait
declared in line
10; defined in line
12; used 24 times