support for __thread

Daniel Eischen eischen at
Wed Dec 24 09:33:21 PST 2003

On Wed, 24 Dec 2003, Alexander Kabaev wrote:

> Sorry for late response, but ...
> On Sun, 21 Dec 2003 17:31:03 -0500 (EST)
> Daniel Eischen <eischen at> wrote:
> > 
> > libkse is ready to add support for it but I believe there's
> > some additional work to be done in rtld-elf first.
> libkse in current shape is unable to support GNU TLS model, which is
> what our system GCC is configured to use by default. While I can

Right, I think we just need to add one more dereference if that
is what you mean.

> certainly switch it to less optimal in some cases model defined by

Please do :)

> Sun, I think maintaining binary compat in TLS are is an important
> feature given the fact that precompiled linux-only object files are
> getting more and more popular. Being binary compatible will give is at
> least a change to link Linux object file into native FreeBSD binary.

We don't want to have a separate LDT for each thread in libkse;
it adds overhead, limits number of threads, and isn't needed.
Also, while you may be able to have binary compat for TLS,
you will not for the rest of the threading system so any
advantage in that regard is marginal.

Dan Eischen

More information about the freebsd-hackers mailing list