ack/mach/vax4/libbsd4_1a/vfork.s

25 lines
335 B
ArmAsm
Raw Normal View History

1990-01-11 16:00:19 +00:00
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
.define _vfork
vfork = 66
1986-12-12 12:49:50 +00:00
.align 1
_vfork:
1990-01-11 16:00:19 +00:00
.data2 0x0000
1986-12-12 12:49:50 +00:00
movl 16(fp),r2
1990-01-11 16:00:19 +00:00
movab 1f,16(fp) ! dirty. Only one process can do return,
! so do it before forking
1986-12-12 12:49:50 +00:00
ret
1:
chmk $vfork
bcs 3f
tstl r1
1987-04-27 13:11:17 +00:00
beql 1f
1986-12-12 12:49:50 +00:00
clrl r0
1:
jmp (r2)
3:
movl r0,_errno
mnegl $1,r0
jmp (r2)