From owner-freebsd-arch Mon Jan 7 12: 2:43 2002 Delivered-To: freebsd-arch@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 4B31437B417 for ; Mon, 7 Jan 2002 12:02:40 -0800 (PST) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.12.1/8.12.1) id g07K1WEN012884; Mon, 7 Jan 2002 15:01:32 -0500 (EST) Date: Mon, 7 Jan 2002 15:01:32 -0500 (EST) From: Daniel Eischen To: Nate Williams Cc: Dan Eischen , Peter Wemm , Archie Cobbs , Alfred Perlstein , arch@FreeBSD.ORG Subject: Re: Request for review: getcontext, setcontext, etc In-Reply-To: <15417.64110.441186.451573@caddis.yogotech.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 7 Jan 2002, Nate Williams wrote: > > > > > > Nope, but you need to be able to get the FPU context saved in setcontext. > > > > Well, that's what I mean. If somewhere else in the application > > there was a setcontext that returned to the getcontext above... > > I think I understand what you are asking. Are you asking if there is > application specific context that needs to be saved, such as GC state or > somesuch? Or, am I truly confused? > > > What I'm asking is, is there any FP state (other than the FP > > control word which does get saved/restored), from before the > > getcontext call that needs to be reloaded after the call, or > > does the compiler assume that state may have been changed > > by the call itself? Thread 1: --------- /* munch some FP stuff */ pthread_yield(); /* allow thread 2 to run */ /* munch some more FP stuff */ Assume that pthread_yield only saves the FP control word (which is what it does currently in libc_r). Thread 2: --------- /* FP munchy munchy */ pthread_yield(); /* allow thread 1 to run */ /* FP munchy munch munch */ What FP state exists in registers across the call to pthread_yield(). -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message