1987-02-23 18:58:58 +00:00
|
|
|
#include "syscall.h"
|
|
|
|
DEFINE(_vfork)
|
|
|
|
movl 16(fp),r2
|
1990-01-11 16:00:19 +00:00
|
|
|
movab Inewret,16(fp)
|
|
|
|
ret ! cleans stack
|
|
|
|
Inewret:
|
1987-02-23 18:58:58 +00:00
|
|
|
chmk $SYS_vfork
|
1990-01-11 16:00:19 +00:00
|
|
|
bcs Ierr
|
1987-02-23 18:58:58 +00:00
|
|
|
tstl r1
|
1990-01-11 16:00:19 +00:00
|
|
|
beql Iparent
|
1987-02-23 18:58:58 +00:00
|
|
|
clrl r0
|
1990-01-11 16:00:19 +00:00
|
|
|
Iparent:
|
1987-02-23 18:58:58 +00:00
|
|
|
jmp (r2)
|
1990-01-11 16:00:19 +00:00
|
|
|
Ierr:
|
1987-02-23 18:58:58 +00:00
|
|
|
movl r0,_errno
|
|
|
|
mnegl $1,r0
|
|
|
|
jmp (r2)
|