Date: Mon, 7 Jan 2002 15:01:32 -0500 (EST) From: Daniel Eischen <eischen@pcnet1.pcnet.com> To: Nate Williams <nate@yogotech.com> Cc: Dan Eischen <eischen@vigrid.com>, Peter Wemm <peter@wemm.org>, Archie Cobbs <archie@dellroad.org>, Alfred Perlstein <bright@mu.org>, arch@FreeBSD.ORG Subject: Re: Request for review: getcontext, setcontext, etc Message-ID: <Pine.SUN.3.91.1020107144700.10060A-100000@pcnet1.pcnet.com> In-Reply-To: <15417.64110.441186.451573@caddis.yogotech.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.1020107144700.10060A-100000>