Subj : Re: Can C++ local static objects be made thread safe? To : comp.programming.threads From : David Schwartz Date : Wed Feb 16 2005 02:28 am "Alexander Terekhov" wrote in message news:42131205.B72DB5C2@web.de... > David Schwartz wrote: > [...] >> Thread-local objects are not supposed to be shared. > > Sez who? I am saying that. That is what makes them thread local. >> As for it >> breaking >> POSIX, POSIX doesn't say what the __thread specifier should do, so >> nothing >> it could do would violate POSIX. > > Under C/POSIX different objects just can't have the same address. > And threads share the entire address space. By definition. That's ridiculous. Providing no strictly-conforming code can tell the difference, POSIX is silent. And strictly conforming POSIX code can't use the '__thread' specifier. In any event, many implementations have at least one page that is not shared by all the threads. This is a common way to, for example, tell which thread you are. DS .