Re: Supporting emulated tls

2012-03-23 Thread Johannes Pfau
Am Fri, 23 Mar 2012 13:05:55 +0100 schrieb "Martin Nowak" : > On Fri, 23 Mar 2012 11:02:44 +0100, Johannes Pfau > wrote: > > > For FreeBSD, this is easy again, dtv[1] contains the size of the > > dtv. But that's probably nonstandard. > > Yeah, seems to be non-standard. > There might also be is

Re: Supporting emulated tls

2012-03-23 Thread Martin Nowak
On Fri, 23 Mar 2012 11:02:44 +0100, Johannes Pfau wrote: For FreeBSD, this is easy again, dtv[1] contains the size of the dtv. But that's probably nonstandard. Yeah, seems to be non-standard. There might also be issues with outdated dtv's.

Re: Supporting emulated tls

2012-03-23 Thread Martin Nowak
Just another point about TLS. extern(C) /*__thread*/ int foo; At some point you want to be able to access C++ TLS variables so emulation should not replace native TLS support.

Re: Supporting emulated tls

2012-03-23 Thread Martin Nowak
I guess the OSX emulated tls code will also be adapted to support multiple modules? I guess we can just wait until your changes are merged into DMD and then think about emulated TLS again. We're already merging since 3 month or so.

Re: Supporting emulated tls

2012-03-23 Thread Johannes Pfau
Am Fri, 23 Mar 2012 05:48:46 +0100 schrieb "Martin Nowak" : > On Mon, 19 Mar 2012 16:57:29 +0100, Johannes Pfau > wrote: > > > The only way to access all loaded library is dl_iterate_phdr. But > > I'm not sure if it provides all necessary information. > > Yes it does. > > The drawback is that

Re: Supporting emulated tls

2012-03-23 Thread Johannes Pfau
Am Fri, 23 Mar 2012 06:06:39 +0100 schrieb "Martin Nowak" : > On Mon, 19 Mar 2012 09:15:08 +0100, Johannes Pfau > wrote: > > > And how do we get the TLS initialization data? If we placed it into > > an array, like DMD does on OSX, we could use dlsym for dlopened > > libraries, but what about ini