Subj : Re: Non-strictly-conforming and unspecified versus undefined behavior To : comp.programming.threads From : David Schwartz Date : Mon Feb 21 2005 01:52 am "Alexander Terekhov" wrote in message news:4219A95A.49955203@web.de... > David Schwartz wrote: > [...] >> Honestly, I cannot tell what you're talking about. > lvalues referring to objects with thread storage duration. I can see people preferring either model from a software development standpoint. Some might find it convenient that different threads can use the same address to each access their own TSD element. Some might find it convenient that threads can pass the address of their TSD elements to each other. The documents cited are ambiguous, and don't seem to require one implementation over the other. There are benefits and costs with each one. For POSIX threads, I think having a different address for each TSD element makes the most sense, and is most consistent with the normal C understand of what constitutes an object. >> Also, the implication that a person likes the implementation >> possibilities he warns about is bogus. If I said you shouldn't assume >> 'char' >> is signed by default, would you argue that I somehow prefer unsigned >> characters over signed ones? > Sorry, I meant the author of "I liked the SGI Irix way where the > same address was mapped to different pysical memory for each thread." > statement, not you. On some platforms, this has a significant performance benefit. The cost of dereferencing TSD can be high. DS .