Is there a way to tell if the program is going to be multi-threaded? If not, it might be useful to introduce a compiler option such as -fmt which also enables -lpthread. Using tricks like weakrefs can introduce unnecessary runtime overhead.
David On Fri, Dec 28, 2012 at 8:26 AM, David Edelsohn <dje....@gmail.com> wrote: > David, > > Support for native TLS on AIX exposed a problem with this patch. A > similar problem exists on Solaris 9. > > Some helper functions for TLS on AIX and Solaris 9 only are provided > by libpthread. Promoting ic related variables to TLS breaks profiling > of non-pthread appications. I completely agree with reducing race > conditions and improving support for profiling of pthread > applications, but why should this change be enabled for applications > not built and run as multi-threaded? This feature should test more > than the existence of target TLS support. > > Thanks, David