2 Copyright © 2008, The AROS Development Team. All rights reserved.
5 Desc: POSIX function vfork(), i386 version
8 #include "aros/i386/asm.h"
12 .globl AROS_CDEFNAME(vfork)
13 _FUNCTION
(AROS_CDEFNAME
(vfork
))
18 lea
(-bufsize
)(%esp
), %esp
/* _JMPLEN + 1 longs on the stack
19 it's our temporary jmp_buf */
21 call setjmp
/* fill jmp_buf on the stack with
22 current register values */
24 mov bufsize
(%esp
), %eax
/* set return address in jmp_buf */
25 mov
%eax
, retaddr
(%esp
) /* to this function call return
27 lea bufsize
(%esp
), %eax
/* set stack value in jmp_buf */
28 /* to stack value from before */
29 mov
%eax
, stack
(%esp
) /* this function call */
35 call __vfork
/* __vfork call won't return */