From owner-freebsd-threads@FreeBSD.ORG Wed Jun 18 01:50:12 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 D91E637B407 for ; Wed, 18 Jun 2003 01:50:12 -0700 (PDT) Received: from bluejay.mail.pas.earthlink.net (bluejay.mail.pas.earthlink.net [207.217.120.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id C03E443F93 for ; Wed, 18 Jun 2003 01:50:11 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfl1t.dialup.mindspring.com ([165.247.212.61] helo=mindspring.com) by bluejay.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19SYds-0004lh-00; Wed, 18 Jun 2003 01:50:09 -0700 Message-ID: <3EF0272C.16D9D299@mindspring.com> Date: Wed, 18 Jun 2003 01:47:40 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Julian Elischer References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a400d9487570c1371517d48034843f82433ca473d225a0f487350badd9bab72f9c350badd9bab72f9c cc: threads@FreeBSD.org cc: Marcel Moolenaar Subject: Re: Nvidia, TLS and __thread keyword -- an observation 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: Wed, 18 Jun 2003 08:50:13 -0000 [ ... removed poor nVidia folks ... ] Julian Elischer wrote: > Libthr and libkse (i386) can be modified to both have the same > support. The spec requires that %gs:0 is the address of a pointer to > the thread control block (TCB). In kse this is easily achieved > by puting such a pointer at the front of the KSE mailbox. (where %gs > points), and in libthr the pointer points directly to the TCB itself > (as far as I see) and there could be a pointer to itself set there. I don't understand this statement. Specifically, %gs points to a KSE that may have multiple threads associated with it, and must therefore have multiple implicit TLS instances associated with it. You can't do this without some sort of indirection, above and beyond just %gs, unless you agree to have a 1:1 relationship between threads and KSEs. -- Terry