svn commit: branches/uClibc-nptl/libc/sysdeps/linux/mips

sjhill at uclibc.org sjhill at uclibc.org
Tue Sep 6 02:18:03 UTC 2005


Author: sjhill
Date: 2005-09-05 19:18:02 -0700 (Mon, 05 Sep 2005)
New Revision: 11343

Log:
Fix 'vfork' for MIPS. The SAVE_PID and RESTORE_PID macros should not be in the libc version at all. Only the libpthread 'pt-vfork.S' will define these. Silly Steven, Trix are for kids.


Modified:
   branches/uClibc-nptl/libc/sysdeps/linux/mips/vfork.S


Changeset:
Modified: branches/uClibc-nptl/libc/sysdeps/linux/mips/vfork.S
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/mips/vfork.S	2005-09-06 02:15:55 UTC (rev 11342)
+++ branches/uClibc-nptl/libc/sysdeps/linux/mips/vfork.S	2005-09-06 02:18:02 UTC (rev 11343)
@@ -22,36 +22,7 @@
 #include <sysdep.h>
 #include <sgidefs.h>
 
-#ifdef __PTHREADS_NATIVE__
-#include <tls.h>
-
-/* Save the PID value.  */
 #ifndef SAVE_PID
-#define SAVE_PID \
-	READ_THREAD_POINTER(v1);	/* Get the thread pointer.  */	\
-	lw	a2, PID_OFFSET(v1);	/* Load the saved PID.  */	\
-	subu	a2, $0, a2;		/* Negate it.  */		\
-	bnez	a2, 1f;			/* If it was zero... */		\
-	lui	a2, 0x8000;		/* use 0x80000000 instead.  */	\
-1:	sw	a2, PID_OFFSET(v1);	/* Store the temporary PID.  */
-#endif
-
-/* Restore the old PID value in the parent.  */
-#ifndef RESTORE_PID
-#define RESTORE_PID \
-	beqz	v0, 1f;			/* If we are the parent... */	\
-	READ_THREAD_POINTER(v1);	/* Get the thread pointer.  */	\
-	lw	a2, PID_OFFSET(v1);	/* Load the saved PID.  */	\
-	subu	a2, $0, a2;		/* Re-negate it.  */		\
-	lui	a0, 0x8000;		/* Load 0x80000000... */	\
-	bne	a2, a0, 2f;		/* ... compare against it... */	\
-	li	a2, 0;			/* ... use 0 instead.  */	\
-2:	sw	a2, PID_OFFSET(v1);	/* Restore the PID.  */		\
-1:
-#endif
-#endif
-
-#ifndef SAVE_PID
 #define SAVE_PID
 #endif
 




More information about the uClibc-cvs mailing list