patch-1.3.34 linux/include/asm-i386/unistd.h

Next file: linux/include/linux/fd.h
Previous file: linux/include/asm-i386/page.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.33/linux/include/asm-i386/unistd.h linux/include/asm-i386/unistd.h
@@ -284,9 +284,10 @@
 	long retval;
 
 	__asm__ __volatile__(
+		"movl %%esp,%%esi\n\t"
 		"int $0x80\n\t"		/* Linux/i386 system call */
-		"testl %0,%0\n\t"	/* child or parent? */
-		"jne 1f\n\t"		/* parent - jump */
+		"cmpl %%esp,%%esi\n\t"	/* child or parent? */
+		"je 1f\n\t"		/* parent - jump */
 		"pushl %3\n\t"		/* push argument */
 		"call *%4\n\t"		/* call fn */
 		"movl %2,%0\n\t"	/* exit */
@@ -295,7 +296,8 @@
 		:"=a" (retval)
 		:"0" (__NR_clone), "i" (__NR_exit),
 		 "r" (arg), "r" (fn),
-		 "b" (flags | CLONE_VM));
+		 "b" (flags | CLONE_VM)
+		:"si");
 	return retval;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this