NVIDIA and TLS

Gareth Hughes gareth at nvidia.com
Mon Jun 16 18:12:04 PDT 2003


On Mon, 16 Jun 2003, Julian Elischer wrote:
> 
> What I'm saying is that we can and probably should implement TLS using
> the general model to provide TLS at "sane" speed, (e.g.  5 instructions)
> but that I don't think we can implement the "1 instruction" version that
> you are asking for without breaking the binary compatibility that we
> currently have between our 3 pthread libraries. We can currently switch
> libraries between 3 very different threads libraries without recompiling
> the app or any other libraries involved. in fact we have a config file
> to the loader that specifies which one to use at run time **Per
> application**. Without using an entrypoint (or maybe self modifying
> code) (*EEK!*) I don't see how we can do it and keep that *Very useful*
> functionality.

Let me make our position crystal clear:

If FreeBSD support ELF TLS and __thread variables in ANY form, our
driver will use this support.  If the best you can do is a function
call per access, so be it.  It doesn't sound like there are any other
options, given the fact that you ship with three different thread
libraries.

-- 
Gareth Hughes (gareth at nvidia.com)
OpenGL Developer, NVIDIA Corporation


More information about the freebsd-threads mailing list