From owner-cvs-all Tue Mar 4 20:39:27 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 88BC437B401; Tue, 4 Mar 2003 20:39:25 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 36BF643FDD; Tue, 4 Mar 2003 20:39:24 -0800 (PST) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h254dO0U001082; Tue, 4 Mar 2003 20:39:24 -0800 (PST) (envelope-from marcel@repoman.freebsd.org) Received: (from marcel@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h254dOir001081; Tue, 4 Mar 2003 20:39:24 -0800 (PST) Message-Id: <200303050439.h254dOir001081@repoman.freebsd.org> From: Marcel Moolenaar Date: Tue, 4 Mar 2003 20:39:24 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/ia64/include setjmp.h src/lib/libc/ia64/gen _setjmp.S src/lib/libc_r/uthread pthread_private.h X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG marcel 2003/03/04 20:39:24 PST FreeBSD src repository Modified files: sys/ia64/include setjmp.h lib/libc/ia64/gen _setjmp.S lib/libc_r/uthread pthread_private.h Log: Fix threaded applications on ia64 that are linked dynamicly. We did not save (restore) the global pointer (GP) in the jmpbuf in setjmp (longjmp) because it's not needed in general. GP is considered a scratch register at callsites and hence is always restored after a call (when it's possible that the call resolves to a symbol in a different loadmodule; otherwise GP does not have to be saved and restored at all), including calls to setjmp/longjmp. There's just one problem with this now that we use setjmp/longjmp for context switching: A new context must have GP defined properly for the thread's entry point. This means that we need to put GP in the jmpbuf and consequently that we have to restore is in longjmp. This automaticly requires us to save it as well. When setjmp/longjmp isn't used for context switching, this can be reverted again. Revision Changes Path 1.10 +5 -3 src/lib/libc/ia64/gen/_setjmp.S 1.79 +1 -0 src/lib/libc_r/uthread/pthread_private.h 1.10 +2 -1 src/sys/ia64/include/setjmp.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message