From owner-cvs-all Thu Nov 14 11:58:22 2002 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 CE26A37B401; Thu, 14 Nov 2002 11:58:20 -0800 (PST) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64C1643E9E; Thu, 14 Nov 2002 11:58:17 -0800 (PST) (envelope-from eischen@pcnet1.pcnet.com) Received: from localhost (eischen@localhost) by mail.pcnet.com (8.12.3/8.12.1) with ESMTP id gAEJwA3a013412; Thu, 14 Nov 2002 14:58:10 -0500 (EST) Date: Thu, 14 Nov 2002 14:58:10 -0500 (EST) From: Daniel Eischen To: Marcel Moolenaar Cc: Doug Rabson , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/ia64/gen _setjmp.S In-Reply-To: <20021114194057.GA856@dhcp01.pn.xcllnt.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Thu, 14 Nov 2002, Marcel Moolenaar wrote: > On Thu, Nov 14, 2002 at 06:28:55PM +0000, Doug Rabson wrote: > > > > > > Why do you need a flushrs in longjmp() anyway? > > > All you really need to achieve is that ar.bsp equals ar.bspstore > > > before you set ar.bspstore, right? > > > (note that the loadrs is missing a cover or an alloc) > > > > You would need a flushrs if you really wanted to use longjmp for thread > > switching, otherwise you would lose the stacked registers of the thread > > you were switching away from. > > But you need a setjmp to save that context, right? How would you otherwise > return to the thread? > > > > It's good to eventually optimize setjmp/longjmp for the common case, > > > but at this time it's all we have and I think we'd better focus on > > > being functionally complete. > > > > I don't think thread switching is (should be) part of the functional > > specification of setjmp/longjmp. > > I don't disagree, but deischen's swapcontext stuff is not here yet and > not having libc_r is hurting now. The i386 and alpha bits are done and will be committed as soon as I can get a 386 buildworld done to test the changes (hopefully within a couple of days or so). For now, the sparc64, ia64, and powerpc bits return ENOSYS, but it should be easy enough to implement them for those archs. The current changes are at: http://people.freebsd.org/~deischen/uc-sys.diffs That will get us the *context() functions as system calls. As userland bits for *context() become available (we already have them for i386 and alpha, but the alpha bits seem to be borken), we'll optimize the thread libraries to use those instead. -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message