Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 06 Jan 2002 08:53:05 -0500
From:      Dan Eischen <eischen@vigrid.com>
To:        Bernd Walter <ticso@cicely8.cicely.de>
Cc:        Terry Lambert <tlambert2@mindspring.com>, Alfred Perlstein <bright@mu.org>, arch@FreeBSD.ORG
Subject:   Re: Request for review: getcontext, setcontext, etc
Message-ID:  <3C3856C1.D0F970B0@vigrid.com>
References:  <3C37E559.B011DF29@vigrid.com> <20020106032709.A82406@elvis.mu.org> <3C381B48.AADDCA2B@mindspring.com> <20020106113847.A15885@cicely8.cicely.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Bernd Walter wrote:
> 
> On Sun, Jan 06, 2002 at 01:39:20AM -0800, Terry Lambert wrote:
> > Alfred Perlstein wrote:
> > > * Dan Eischen <eischen@vigrid.com> [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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C3856C1.D0F970B0>