From owner-freebsd-threads@FreeBSD.ORG Fri Jul 18 15:08:50 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 301AE37B401; Fri, 18 Jul 2003 15:08:50 -0700 (PDT) Received: from rwcrmhc11.comcast.net (rwcrmhc11.comcast.net [204.127.198.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F96543FCB; Fri, 18 Jul 2003 15:08:49 -0700 (PDT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([12.233.125.100]) by attbi.com (rwcrmhc11) with ESMTP id <2003071822084801300nl6vce>; Fri, 18 Jul 2003 22:08:49 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id PAA15763; Fri, 18 Jul 2003 15:08:42 -0700 (PDT) Date: Fri, 18 Jul 2003 15:08:40 -0700 (PDT) From: Julian Elischer To: Marcel Moolenaar In-Reply-To: <20030718214516.GA35221@dhcp01.pn.xcllnt.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: deischen@freebsd.org cc: threads@freebsd.org Subject: Re: Rearranging kse mailbox X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jul 2003 22:08:50 -0000 On Fri, 18 Jul 2003, Marcel Moolenaar wrote: > On Fri, Jul 18, 2003 at 02:04:08PM -0700, Julian Elischer wrote: > > > > > > On Fri, 18 Jul 2003, Marcel Moolenaar wrote: > > > > > On Fri, Jul 18, 2003 at 12:52:00PM -0700, Julian Elischer wrote: > > > > for TLS we need to ensure that the first few (actually, 1 but a couple > > > > more can't hurt) entry in the KSE mailbox is available as a pointer to > > > > the TLS. (on 386 at least). Marcel probablyt has more to say on the > > > > topic. > > > > > > Good point. I forgot about TLS. I'll bump it up on my todo list. > > > > I don't have teh TLS spec with me here.. > > I don't know if other architectures would make other requirements.. > > I'll see if I can write something up this weekend. I found a copy :-) the ia64 requires that the thread pointer points to aome location that is 16 bytes long, the first 8 bytes of which is a pointer to the TLS Dynamic thread vector, and the 2nd 8 bytes is application specific, but in practice, must be a pointer to the Thread's or KSE's mailbox (I guess KSE to be similar to the others.) ia32 requires just that the thread control info pointed to by %gs SOMEWHERE contains a pointer to the dtv (where SOMEWHERE is a known offset). (In our case the offset would be 0) This means that for the UTS to find the active thread under ia64 takes an extra level of indirection. (node neither of these affect upcalls as teh UTS upcall target function has the mailbox as an argument and can access it independently of %gs or the tp. Am I right that "variant 2" (as seen in the ia32 case) applies to allarchitectures other than ia64? julian > > -- > Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net >