Date: Thu, 10 Jan 2002 18:09:24 -0500 (EST) From: Daniel Eischen <eischen@pcnet1.pcnet.com> To: Terry Lambert <tlambert2@mindspring.com> Cc: Dan Eischen <eischen@vigrid.com>, Peter Wemm <peter@wemm.org>, Nate Williams <nate@yogotech.com>, 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.1020110174901.18045A-100000@pcnet1.pcnet.com> In-Reply-To: <3C3E168B.B768CDC8@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 10 Jan 2002, Terry Lambert wrote: > Daniel Eischen wrote: > > > Type slowly, I'm old, and other people on this list are older... > > > > > > What problem? > > > > > > If signal code doesn't touch the FPU statem then it's totally > > > transparent to the lazy save of FPU context state. > > > > OK, so the signal handler saves the interrupted context > > and resumes/starts another context. With me so far? > > Yes. > > > Perhaps a few contexts later, and perhaps even a few > > signals later, > > Still with you... > > > and after doing some additional floating point stuff, > > Bzzt! OK, how does this "additional floating point stuff" > happen? I see exactly two cases: > > 1) It is the first occurance of floating point in the > context; this is complicated. > 2) It is an occurance subsequent to the first in the > context, in which case, when the context was brought > back, the state was brought back, as well, so it's > already dealt with, since the previous context > could have been lazy-save at that point. A different context (call it context B) is resumed/started from the signal handler. This second context does some FP stuff. A trap is made to the kernel, the old FPU state from the previous context (call it context A) is loaded and then returns. Context B does some FP stuff, and sometime later the originally interrupted context (call it context A) is resumed via setcontext(). Well the FPU state has changed and it was never saved in context A. -- 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.1020110174901.18045A-100000>