From 6679351d8445ea112b8af513ad87ffe11dc93fb8 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 3 Jun 2003 19:13:14 +0000 Subject: Kill the runtime fallback to fork and make it be compile time --- libc/sysdeps/linux/i386/vfork.S | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) (limited to 'libc/sysdeps') diff --git a/libc/sysdeps/linux/i386/vfork.S b/libc/sysdeps/linux/i386/vfork.S index c7002f189..d340a983d 100644 --- a/libc/sysdeps/linux/i386/vfork.S +++ b/libc/sysdeps/linux/i386/vfork.S @@ -1,8 +1,5 @@ /* - * June 27, 2001 Manuel Novoa III - * - * Modified to (hopefully) be PIC and REENTRANT safe. - * Modified again to better follow the glibc implementation. + * June 3, 2003 Erik Andersen * */ @@ -10,30 +7,24 @@ #include #include +#ifndef __NR_vfork + +/* No vfork so use fork instead */ +.weak vfork ; vfork = __libc_fork + +#else + .text .globl __vfork; .type __vfork,@function; .align 1<<4; __vfork: -#ifdef __NR_vfork popl %ecx movl $__NR_vfork,%eax int $0x80 pushl %ecx cmpl $-4095,%eax - jae .Lerror - ret - -.Lerror: - cmpl $-ENOSYS,%eax - jne __syscall_error -#endif - - /* Fall back on calling fork */ - movl $__NR_fork,%eax - int $0x80 - cmpl $-4095,%eax jae __syscall_error ret @@ -59,5 +50,4 @@ __syscall_error: .weak vfork ; vfork = __vfork - - +#endif -- cgit v1.2.3