[cfe-dev] __thread support in Clang
David Chisnall
theraven at sucs.org
Wed Mar 2 09:20:11 PST 2011
On 2 Mar 2011, at 16:37, Sebastian Redl wrote:
> 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.
C1X also has a _Thread_local storage qualifier, which has the same semantics as __thread.
David
-- Sent from my PDP-11
More information about the cfe-dev
mailing list