Re: Does NetBSD understand the __thread variable declaration ?

From: llothar (llothar_at_web.de)
Date: 11/20/05


Date: 19 Nov 2005 17:01:02 -0800

No __thread is going deeper. It must be supported by specific sections
in the ELF executable, so it must be implemented in the loader.

The code is still cross plattform and portable, not to Net/Open BSD but
to any modern operating system. It doesn't matter how this is called,
its the concept that must be there and i think it is missing in NetBSD.

pthread_get/setspecific can never be as efficient as a __thread
declared variable which is a simple indirect access. It's easier to use
and does not have any of the restrictions
of the pthreads. And i have use cases where this is a critical factor.

I'm not talking with you about the usefullness of this feature, this is
already proven. I'm tired about explaining why 2+2 is 4. I'm currently
adding multithreading to the GNU Eiffel compiler and have to generate
the correct backend code (Eiffel compiles to C) and port some runtime
features.