[uClibc-cvs] uClibc/libc/sysdeps/linux/i386 vfork.S,1.5,1.6

Erik Andersen andersen at uclibc.org
Tue Jun 3 19:13:17 UTC 2003


Update of /var/cvs/uClibc/libc/sysdeps/linux/i386
In directory winder:/tmp/cvs-serv19376/libc/sysdeps/linux/i386

Modified Files:
	vfork.S 
Log Message:
Kill the runtime fallback to fork and make it be compile time


Index: vfork.S
===================================================================
RCS file: /var/cvs/uClibc/libc/sysdeps/linux/i386/vfork.S,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- vfork.S	3 Jun 2003 17:59:37 -0000	1.5
+++ vfork.S	3 Jun 2003 19:13:14 -0000	1.6
@@ -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 <bits/errno.h>
 #include <sys/syscall.h>
 
+#ifndef __NR_vfork
+
+/* No vfork so use fork instead */
+.weak vfork ; vfork = __libc_fork
+
+#else
+
         .text
 	.globl __vfork;
 	.type __vfork, at 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 @@
 
 
 .weak vfork ; vfork = __vfork
-
-
+#endif



More information about the uClibc-cvs mailing list