Supporting emulated tls

Iain Buclaw ibuclaw at ubuntu.com
Wed Mar 21 06:37:01 PDT 2012


On 21 March 2012 13:17, Johannes Pfau <nospam at example.com> wrote:
> Am Mon, 19 Mar 2012 16:14:36 +0000
> schrieb Iain Buclaw <ibuclaw at ubuntu.com>:
>
>
>>
>> Initial things to think about on the top of my head:
>>
>> * Speed to access symbols.
>
> It needs the normal code to access the TLS struct / get the address of
> the TLS struct + one add instruction which adds the offset for the
> specific variable. So it should be fast enough.
>
>> * Accessing thread local symbols across modules.
>
> Do we have to use module-local symbols? If we could use symbols with
> unique, mangled names, we could just access that symbol+offset from
> every module. This assumes the d/di files provide enough information to
> calculate the offset.
>

Oh yeah, that's it.  Perhaps the externally visible mangled names just
be references to the actual location?

I don't think there would be enough information to access via main
entry point symbol+offset.


-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';


More information about the D.gnu mailing list