libc_r/uthread/uthread_create.c

Marc Olzheim marcolz at stack.nl
Fri Apr 23 04:57:47 PDT 2004


On Thu, Jan 22, 2004 at 11:16:41AM +0100, Marc Olzheim wrote:
> Daniel Eischen proposed a simpler patch, which does the same trick...

Could this be committed in -STABLE by someone ? Or must this wait until
after 4.10 ?

(CURRENT: pthread_private.h -r 1.82 -r 1.81)

Marc
-------------- next part --------------
--- /usr/src/lib/libc_r/uthread/pthread_private.h	Tue Oct 22 16:44:02 2002
+++ /usr/src/lib/libc_r/uthread/pthread_private.h	Fri Apr 23 13:49:26 2004
@@ -84,7 +84,10 @@
 	fdata = (char *) (ucp)->uc_mcontext.mc_fpregs;	\
 	__asm__("frstor %0": :"m"(*fdata));		\
 } while (0)
-#define SET_RETURN_ADDR_JB(jb, ra)	(jb)[0]._jb[0] = (int)(ra)
+#define SET_RETURN_ADDR_JB(jb, ra)	do {		\
+	(jb)[0]._jb[0] = (int)(ra);			\
+	(jb)[0]._jb[3] = 0;				\
+} while (0)
 #elif	defined(__alpha__)
 #include <machine/reg.h>
 #define	GET_STACK_JB(jb)	((unsigned long)((jb)[0]._jb[R_SP + 4]))


More information about the freebsd-hackers mailing list