Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 May 2001 07:51:40 -0400 (EDT)
From:      Daniel Eischen <eischen@vigrid.com>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Andrew Gallatin <gallatin@cs.duke.edu>, current@FreeBSD.ORG
Subject:   Re: Rfork'd threads, signals, and LDTs
Message-ID:  <Pine.SUN.3.91.1010507073832.26371A-100000@pcnet1.pcnet.com>
In-Reply-To: <Pine.BSF.4.21.0105071657210.84927-100000@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 7 May 2001, Bruce Evans wrote:
> On Sat, 5 May 2001, Daniel Eischen wrote:
> 
> > On Sat, 5 May 2001, Andrew Gallatin wrote:
> > > 
> > > Daniel Eischen writes:
> > >  > 
> > >  > OK, thanks.  Here's my guess at what should be changed for the Linux
> > >  > emulator.  If this looks correct, I'll commit it.
> > >  > 
> > >  > Hmm, I wonder how linuxthreads works under FreeBSD without this
> > >  > change...
> > > 
> > > This breaks at least one version of the IBM JDK that I have
> > > laying around..  
> > > 
> > > If anything, we may have two errors (at least partially) canceling
> > > each other out. I think it needs more work/thought prior to
> > > committing.
> >
> > We're still OK with the change to FreeBSDs native signal trampoline
> > though, right?  I'll hold off on the Linux emulator changes until
> > we can figure out what the problem is.
> 
> I was confused about what Linux does.  Now I think it only copies %fs
> to the signal context struct.  It loads %fs with USER_DS for the signal
> handler.  It passes the previous (process) value of %gs to the signal
> handler.  (Its early mistake of of switching %fs on every entry to the
> kernel was moved to FreeBSD.)

I think the only reason we used %fs instead of %gs was WINE.  I think
Linux uses %gs for TSD, so if WINE were to ever depend on linuxthreads,
one of them would have to change.  We can easily switch to using %gs
instead of %fs if necessary.

I'll make the appropriate change to the Linux emulator.

Thanks
-- 
Dan Eischen

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" 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.1010507073832.26371A-100000>