On Tue, May 19, 2009 at 12:04 PM, Gary Funck <g...@intrepid.com> wrote:
> On 05/19/09 11:29:57, Andrew Pinski wrote:
>> On Tue, May 19, 2009 at 11:25 AM, Gary Funck <g...@intrepid.com> wrote:
>> >
>> > For UPC code generation, we're building an alternate
>> > method of accessing thread-local data that does not depend upon
>> > operating system support of the __thread qualifier.
>>
>> GCC has already added generic support for the __thread qualifier which
>> does not depend on the OS needing builtin support at all.
>
> Andrew, thanks.
>
> The only implementation that I'm aware of is described in
> Ulrich Drepper's 2005 paper,
> http://people.redhat.com/drepper/tls.pdf
>
> Is the __thread feature now more universally/portably
> supported?

Yes, see emutls.c and the VAR_DECL case in expand_expr_addr_expr_1 and
expand_expr_real_1 in expr.c.


> My impression is that this feature requires
> GNU/ELF linker and glibc support.  Is that correct?

For native support yes but not for the emulated support which is
implemented on the target side in emutls.c.

On the tree level __thread looks the same for both the emulated and
native supports.

Thanks,
Andrew Pinski

Reply via email to