Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jun 2003 01:47:40 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Julian Elischer <julian@elischer.org>
Cc:        Marcel Moolenaar <marcel@xcllnt.net>
Subject:   Re: Nvidia, TLS and __thread keyword -- an observation
Message-ID:  <3EF0272C.16D9D299@mindspring.com>
References:  <Pine.BSF.4.21.0306171615580.31025-100000@InterJet.elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
[ ... 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3EF0272C.16D9D299>