From owner-freebsd-threads@FreeBSD.ORG Thu Jun 19 15:00:44 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 B820B37B404 for ; Thu, 19 Jun 2003 15:00:44 -0700 (PDT) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 938F043F75 for ; Thu, 19 Jun 2003 15:00:43 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by ns1.xcllnt.net (8.12.9/8.12.9) with ESMTP id h5JM09DZ071575; Thu, 19 Jun 2003 15:00:09 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) by dhcp01.pn.xcllnt.net (8.12.9/8.12.9) with ESMTP id h5JM0917001340; Thu, 19 Jun 2003 15:00:09 -0700 (PDT) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.9/8.12.9/Submit) id h5JM09Ju001339; Thu, 19 Jun 2003 15:00:09 -0700 (PDT) (envelope-from marcel) Date: Thu, 19 Jun 2003 15:00:08 -0700 From: Marcel Moolenaar To: Julian Elischer Message-ID: <20030619220008.GA1273@dhcp01.pn.xcllnt.net> References: <20030619202013.GA833@dhcp01.pn.xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i cc: threads@FreeBSD.org Subject: Re: Implementing TLS: step 1 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: Thu, 19 Jun 2003 22:00:45 -0000 On Thu, Jun 19, 2003 at 02:50:45PM -0700, Julian Elischer wrote: > > Libthr has the advantage that the register used for identifying the > current thread can be set DIRECTLY at the thread control block, where > libkse will (probably) require a single indirection. (by which I mean > that the register will point to the control structure for the Virtual > CPU that is running (KSE) and that in turn will have a pointer to the > thread that is currently running. On ia64, the runtime specification dictates that the TP registers points to the TLS. How the threads implementation relates this to the thread control structure (or other control structures) is up to the implementation. If libkse is ported to ia64, this will have to be the case as well. Hence the thread pointer will *not* point to the KSE. An indirection will be used to point from the TLS to the KSE. There is no other way. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net