On 09/30/2014 02:52 AM, Jakub Jelinek wrote: > On Tue, Sep 30, 2014 at 11:03:47AM +0400, Varvara Rainchik wrote: >> Corrected patch: call pthread_setspecific (gomp_tls_key, NULL) in >> gomp_thread_start if HAVE_TLS is not defined. >> >> 2014-09-19 Varvara Rainchik <varvara.rainc...@intel.com> >> >> * libgomp.h (gomp_thread): For non TLS case create thread data. >> * team.c (non_tls_thread_data_destructor, >> create_non_tls_thread_data): New functions. > > I actually wonder when we have emutls support in libgcc if it wouldn't > be better to just define HAVE_TLS always to 1 (i.e. remove all the > conditionals on it), then you wouldn't need to bother with this at all. > > I don't have an OS which doesn't support native TLS though, so somebody with > such a system would need to test it and benchmark if it doesn't make things > slower. > > Richard, thoughts on this?
I like that idea better as well. r~