Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 May 2001 18:59:02 -0400 (EDT)
From:      Daniel Eischen <eischen@vigrid.com>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        current@FreeBSD.ORG
Subject:   Re: Rfork'd threads, signals, and LDTs
Message-ID:  <Pine.SUN.3.91.1010504185251.18223A-100000@pcnet1.pcnet.com>
In-Reply-To: <Pine.BSF.4.21.0105042142550.60132-100000@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 4 May 2001, Bruce Evans wrote:
> On Wed, 2 May 2001, Daniel Eischen wrote:
> > On Wed, 2 May 2001, Bruce Evans wrote:
> > >
> > > There is also the osendsig() case, and corresponding code in several
> > > emulators.
> > 
> > I don't think we care too much about osendsig() since anything
> > that uses a new threads library will have to be recompiled
> > and wouldn't use the old routines.  I think the same is true
> > for emulators; an application that used the new threads library
> > wouldn't be running in emulation would it?
> 
> A library running under an emulator might.  Non-emulated Linux seems
> to pass %fs and %gs to signal handlers unchanged, so there is a precedent
> for doing things like you want.  Go ahead.  The Linux emulator certainly
> needs to do it the same as Linux.

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...

-- 
Dan Eischen

Index: linux/linux_sysvec.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/linux/linux_sysvec.c,v
retrieving revision 1.78
diff -u -r1.78 linux_sysvec.c
--- linux/linux_sysvec.c	2001/05/01 08:12:52	1.78
+++ linux/linux_sysvec.c	2001/05/04 22:49:41
@@ -338,8 +338,6 @@
 	regs->tf_cs = _ucodesel;
 	regs->tf_ds = _udatasel;
 	regs->tf_es = _udatasel;
-	regs->tf_fs = _udatasel;
-	load_gs(_udatasel);
 	regs->tf_ss = _udatasel;
 }
 
@@ -472,8 +470,6 @@
 	regs->tf_cs = _ucodesel;
 	regs->tf_ds = _udatasel;
 	regs->tf_es = _udatasel;
-	regs->tf_fs = _udatasel;
-	load_gs(_udatasel);
 	regs->tf_ss = _udatasel;
 }


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.1010504185251.18223A-100000>