From owner-freebsd-arch Mon Jan 7 10:34:37 2002 Delivered-To: freebsd-arch@freebsd.org Received: from ns.yogotech.com (ns.yogotech.com [206.127.123.66]) by hub.freebsd.org (Postfix) with ESMTP id C821937B402 for ; Mon, 7 Jan 2002 10:34:34 -0800 (PST) Received: from caddis.yogotech.com (caddis.yogotech.com [206.127.123.130]) by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id LAA10614; Mon, 7 Jan 2002 11:34:26 -0700 (MST) (envelope-from nate@yogotech.com) Received: (from nate@localhost) by caddis.yogotech.com (8.11.6/8.11.6) id g07IYL798195; Mon, 7 Jan 2002 11:34:21 -0700 (MST) (envelope-from nate) From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15417.59947.662052.836634@caddis.yogotech.com> Date: Mon, 7 Jan 2002 11:34:19 -0700 To: Dan Eischen Cc: Peter Wemm , Archie Cobbs , Alfred Perlstein , arch@FreeBSD.ORG Subject: Re: Request for review: getcontext, setcontext, etc In-Reply-To: <3C390746.5FE7648C@vigrid.com> References: <20020106232937.9F87D38CC@overcee.netplex.com.au> <3C390746.5FE7648C@vigrid.com> X-Mailer: VM 6.96 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid Reply-To: nate@yogotech.com (Nate Williams) 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 > > Also, I noticed that the i386 patch doesn't save FP state (!) which is > > one of the primary reasons for get/setcontext(). I'm not sure if this > > can be efficiently done since this user-level function will not know if > > the current context has touched the FPU yet.. > > Neither does the kernel, does it? I thought I saw comments in the > kernel (was it alpha?) about it being too bad that we couldn't tell > if the FPU was used. In libc_r, we currently only save and restore the > FP state when the context is generated from a signal handler (or perhaps > in the case of KSEs, when the thread was preempted). Hmm, IIRC, Java's green threads saves the FP context everytime it does a thread switch, since it has no way of knowing if the thread was doing FP context. Is there a way to force get/setcontext to always/conditionally save the FP context, for applications that either know they need to have it saved? Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message