From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 23 04:57:47 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7FBDD16A4CF for ; Fri, 23 Apr 2004 04:57:47 -0700 (PDT) Received: from hexagon.stack.nl (hexagon.stack.nl [131.155.140.144]) by mx1.FreeBSD.org (Postfix) with ESMTP id F019343D2D for ; Fri, 23 Apr 2004 04:57:46 -0700 (PDT) (envelope-from marcolz@stack.nl) Received: from hammer.stack.nl (hammer.stack.nl [IPv6:2001:610:1108:5010::153]) by hexagon.stack.nl (Postfix) with ESMTP id 408904BA#02F30515A for ; Fri, 23 Apr 2004 13:57:46 +0200 (CEST) Received: by hammer.stack.nl (Postfix, from userid 333) id D8A866372; Fri, 23 Apr 2004 13:57:44 +0200 (CEST) Date: Fri, 23 Apr 2004 13:57:44 +0200 From: Marc Olzheim To: hackers@freebsd.org Message-ID: <20040423115744.GA27689@stack.nl> References: <20040121211344.GA97203@stack.nl> <20040121220916.GC97291@stack.nl> <20040122101641.GA82155@stack.nl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="OXfL5xGRrasGEqWY" Content-Disposition: inline In-Reply-To: <20040122101641.GA82155@stack.nl> X-Operating-System: FreeBSD hammer.stack.nl 5.2-CURRENT FreeBSD 5.2-CURRENT X-URL: http://www.stack.nl/~marcolz/ User-Agent: Mutt/1.5.6i Subject: Re: libc_r/uthread/uthread_create.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Apr 2004 11:57:47 -0000 --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="pthread_ebp.patch" --- /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 #define GET_STACK_JB(jb) ((unsigned long)((jb)[0]._jb[R_SP + 4])) --OXfL5xGRrasGEqWY--