1: / C library -- fork
2:
3: / pid = fork();
4: /
5: / pid == 0 in child process; pid == -1 means error return
6: / in child, parents id is in par_uid if needed
7:
8: .globl _fork, cerror, _par_uid
9:
10: _fork:
11: mov r5,-(sp)
12: mov sp,r5
13: sys fork
14: br 1f
15: bec 2f
16: jmp cerror
17: 1:
18: mov r0,_par_uid
19: clr r0
20: 2:
21: mov (sp)+,r5
22: rts pc
23: .bss
24: _par_uid: .=.+2
Defined functions
_fork
declared in line
8; defined in line
10; used 28 times
Defined variables
_par_uid
declared in line
8; defined in line
24; used 2 times