ack/mach/vax4/libbsd4_1a/vfork.s
1987-04-27 13:11:17 +00:00

23 lines
275 B
ArmAsm

.globl _vfork
.set vfork,66
.align 1
_vfork:
.word 0x0000
movl 16(fp),r2
movab 1f,16(fp) # dirty. Only one process can do return,
# so do it before forking
ret
1:
chmk $vfork
bcs 3f
tstl r1
beql 1f
clrl r0
1:
jmp (r2)
3:
movl r0,_errno
mnegl $1,r0
jmp (r2)