[cfe-dev] __thread support in Clang

Sebastian Redl sebastian.redl at getdesigned.at
Wed Mar 2 08:37:33 PST 2011


On 02.03.2011, at 08:31, Chris Lattner wrote:

> 
> On Mar 1, 2011, at 11:24 PM, Jeffrey Yasskin wrote:
> 
>>> 
>>> Yes, it uses an emulated tls that ends up being calls out to pthread
>>> and semaphore functions. I don't believe there's any plans to implement
>>> this sort of thing in clang - at the least I don't plan to :)
>> 
>> Presumably someone plans to implement C++0x's thread_local storage duration?
> 
> Implementing thread_local would be great if you're interested, please have it generate the same IR as __thread.


Implementing thread_local at this point would be premature, I think, since there is still an AFAIK unresolved issue about object lifetime. I see two proposals for resolution of this issue, but neither has been adopted into the working paper.

Doug may know more, though.

Sebastian



More information about the cfe-dev mailing list