From owner-freebsd-current Fri May 4 15:59:46 2001 Delivered-To: freebsd-current@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 6A40B37B422 for ; Fri, 4 May 2001 15:59:43 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id SAA19339; Fri, 4 May 2001 18:59:04 -0400 (EDT) Date: Fri, 4 May 2001 18:59:02 -0400 (EDT) From: Daniel Eischen To: Bruce Evans Cc: current@FreeBSD.ORG Subject: Re: Rfork'd threads, signals, and LDTs In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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