On 21 March 2012 13:17, Johannes Pfau <nos...@example.com> wrote: > Am Mon, 19 Mar 2012 16:14:36 +0000 > schrieb Iain Buclaw <ibuc...@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';