2 Copyright © 2008, The AROS Development Team. All rights reserved.
5 Desc: POSIX function vfork()
9 /******************************************************************************
34 ******************************************************************************/
36 #include "aros/i386/asm.h"
40 .globl AROS_CDEFNAME(vfork)
41 _FUNCTION
(AROS_CDEFNAME
(vfork
))
47 lea
(-bufsize
)(%esp
), %esp
/* _JMPLEN + 1 longs on the stack
48 it's our temporary jmp_buf */
50 call setjmp
/* fill jmp_buf on the stack with
51 current register values */
53 mov bufsize
(%esp
), %eax
/* set return address in jmp_buf */
54 mov
%eax
, retaddr
(%esp
) /* to this function call return
56 lea bufsize
(%esp
), %eax
/* set stack value in jmp_buf */
57 /* to stack value from before */
58 mov
%eax
, stack
(%esp
) /* this function call */
64 call __vfork
/* __vfork call won't return */