From owner-freebsd-arch Sun Jan 6 5:40:23 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 C03D237B402 for ; Sun, 6 Jan 2002 05:40:20 -0800 (PST) Received: from vigrid.com (pm3-pt45.pcnet.net [206.105.29.119]) by pcnet1.pcnet.com (8.12.1/8.12.1) with ESMTP id g06DdDrU011540; Sun, 6 Jan 2002 08:39:13 -0500 (EST) Message-ID: <3C3856C1.D0F970B0@vigrid.com> Date: Sun, 06 Jan 2002 08:53:05 -0500 From: Dan Eischen X-Mailer: Mozilla 4.74 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: Bernd Walter Cc: Terry Lambert , Alfred Perlstein , arch@FreeBSD.ORG Subject: Re: Request for review: getcontext, setcontext, etc References: <3C37E559.B011DF29@vigrid.com> <20020106032709.A82406@elvis.mu.org> <3C381B48.AADDCA2B@mindspring.com> <20020106113847.A15885@cicely8.cicely.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 Bernd Walter wrote: > > On Sun, Jan 06, 2002 at 01:39:20AM -0800, Terry Lambert wrote: > > Alfred Perlstein wrote: > > > * Dan Eischen [020105 23:36] wrote: > > > > Is there a reason that getcontext and setcontext need to be > > > > system calls? > > > > > > Atomicity? I thought that too perhaps, but there's no mention of it in the (IEEE 2001 approved Austin draft 7 spec). Also, there's no guarantee that setjmp, longjmp, and their variants are atomic either. The Austin spec does say that getcontext and friends can also be implemented as macros, so I think we're safe in having them library-level functions in that regard. > > To flush register windows on setcontext() on SPARC. > > wflush isn't a priviledged instruction and usualy emulated on < sparcv9. > mit-pthreads use it from userland. Good, I'd really like to avoid having to make a system call to switch threads. > Are there any performance reasons to flush windows in kernel? > AFAIK wflush makes an exception for each window on it's own so I could > imagine a possible difference. > Or am I overseeing something? > > -- > B.Walter COSMO-Project http://www.cosmo-project.de > ticso@cicely.de Usergroup info@cosmo-project.de -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message