From owner-freebsd-arch Mon Jan 7 6:30:11 2002 Delivered-To: freebsd-arch@freebsd.org Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by hub.freebsd.org (Postfix) with ESMTP id 4C7E337B405 for ; Mon, 7 Jan 2002 06:30:07 -0800 (PST) Received: (from uucp@localhost) by srv1.cosmo-project.de (8.11.6/8.11.6) with UUCP id g07ETQ454208; Mon, 7 Jan 2002 15:29:27 +0100 (CET) (envelope-from ticso@cicely8.cicely.de) Received: from mail.cicely.de (cicely20.cicely.de [10.1.1.22]) by cicely5.cicely.de (8.12.1/8.12.1) with ESMTP id g07EOftx091165; Mon, 7 Jan 2002 15:24:41 +0100 (CET)?g (envelope-from ticso@cicely8.cicely.de) Received: from cicely8.cicely.de (cicely8.cicely.de [10.1.2.10]) by mail.cicely.de (8.11.0/8.11.0) with ESMTP id g07EOfW21194; Mon, 7 Jan 2002 15:24:41 +0100 (CET) Received: (from ticso@localhost) by cicely8.cicely.de (8.11.6/8.11.6) id g07EOZm21501; Mon, 7 Jan 2002 15:24:35 +0100 (CET) (envelope-from ticso) Date: Mon, 7 Jan 2002 15:24:34 +0100 From: Bernd Walter To: Terry Lambert Cc: Jake Burkholder , Alfred Perlstein , Dan Eischen , arch@FreeBSD.ORG Subject: Re: Request for review: getcontext, setcontext, etc Message-ID: <20020107152434.B19289@cicely8.cicely.de> References: <3C37E559.B011DF29@vigrid.com> <20020106032709.A82406@elvis.mu.org> <3C381B48.AADDCA2B@mindspring.com> <20020106113847.A15885@cicely8.cicely.de> <20020107015228.E39321@locore.ca> <3C396554.9B6A9053@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C396554.9B6A9053@mindspring.com> User-Agent: Mutt/1.3.23i X-Operating-System: FreeBSD cicely8.cicely.de 5.0-CURRENT i386 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, Jan 07, 2002 at 01:07:32AM -0800, Terry Lambert wrote: > The "flushw" is not enough. > > The following paper discusses the original implementation of the > "liblwp" code on SunOS 4.x: > > http://www.cs.washington.edu/research/compiler/papers.d/thread-regwin.html It's uses a flushw emulation, because it had to deal with CPUs which don't have a flushw instruction. Well in fact it's wrong from the 1991 standpoint to name this emulation, because I asume sparcv9 wasn't there, but the result is the same. > The basic problem is that stack is cached in registers, not flushed > to RAM, and you may be resuming on another processor while another > one still hasn't written the register caches back so that the > memory image you load on the new processor is valid. flushw does window exceptions until only the last is in CPU. It wasn't available when the documents you pointed where written. -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message