Hi! Hans-Joerg Frieden <Hans-JoergF@xxxxxxxxxxxxxxxxxxxxxxxxxx> schrieb: > Yes. I recently configured a project that tried to determine whether to > use pthread_setspecific or thread local storage, and since the __thread > keyword was accepted as functional by the compiler, it didn't even try > pthread_setspecific. Yes, I was also very surprised to when I saw that behavior, i.e., that the compiler accepts this keyword although it is configured to produce binaries for a single threaded model. Maybe we should ask the GCC guys if that really makes sense. I would have expected that __thread isn't possible for compiler following single threaded model, though I must admit that I don't understand what the threading model of the compiler exactly implies... > > I've looked into tls support once in the course of updating the baseline to > > gcc 4.4.3 (development is in a separate branch of adtools and not in trunk) > as > > I think that we need it sooner or later and it is handy for openmp support > (I > > think). But unfortunately, I was only looking at it :( > > > > Probably, yes. I suppose it could be implemented on top of pthreads, but > I am not 100 % sure how it works. When the thread keyword worked, the > library in question was missing a symbol __tls_get_addr, so I guess > there is a set of functions the c library needs to support which are > internally referenced by gcc. Shouldn't be too difficult. But there are also dedicated ELF relocation types and segments for TLS that are generated by the compiler as soon as you use the thread keyword. So I suppose that you need support in the loader as well. But I don't know whether they are really required or not to make __thread really working. But that's the point were I gave up last time... > Unfortunately I also don't have time right now. Between the X-1000 > version of AmigaOS and Timberwolf there isn't much time left :-( Yes, time is always the limiting factor :( Bye, Sebastian -- ______________________________________________________________________________ Amiga Development tools ML - //www.freelists.org/list/adtools Homepage...................: http://www.sourceforge.net/projects/adtools Listserver help............: mailto:adtools-request@xxxxxxxxxxxxx?Subject=HELP