From owner-freebsd-threads@FreeBSD.ORG Mon Mar 29 13:16:29 2004 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 BC5D616A4D5 for ; Mon, 29 Mar 2004 13:16:29 -0800 (PST) Received: from herring.rabson.org (mailgate.nlsystems.com [80.177.232.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F79243D3F for ; Mon, 29 Mar 2004 13:16:29 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from herring.rabson.org (herring.rabson.org [10.0.0.2]) by herring.rabson.org (8.12.11/8.12.11) with ESMTP id i2TLGI8J011975; Mon, 29 Mar 2004 22:16:18 +0100 (BST) (envelope-from dfr@nlsystems.com) From: Doug Rabson To: Marcel Moolenaar Date: Mon, 29 Mar 2004 22:16:17 +0100 User-Agent: KMail/1.6.1 References: <200403292000.13794.dfr@nlsystems.com> <20040329193940.GA52335@ns1.xcllnt.net> In-Reply-To: <20040329193940.GA52335@ns1.xcllnt.net> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200403292216.17819.dfr@nlsystems.com> X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on herring.rabson.org X-Virus-Scanned: ClamAV version 'clamd / ClamAV version 0.65', clamav-milter version '0.60p' cc: freebsd-threads@freebsd.org Subject: Re: Thread Local Storage 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: Mon, 29 Mar 2004 21:16:29 -0000 On Monday 29 March 2004 20:39, Marcel Moolenaar wrote: > On Mon, Mar 29, 2004 at 08:00:13PM +0100, Doug Rabson wrote: > > I've also been looking at libpthread and I can see some potential > > problems with it. Currently libpthread on i386 uses %gs to point at > > a struct kcb which seems to be a per-kse structure. This structure > > contains a pointer to a per-thread struct tcb and this pointer is > > managed by the userland context switch code. Other arches are > > similar, e.g. ia64 uses $tp to point at struct kcb. > > On ia64, TP points to struct ia64_tp, which is the TLS. Yes, I saw that. I had the mistaken impression that this was contained in the kcb but now I look at it again, it all seems fine. My real problems were with the i386 though.