From: miguel s. <mig...@gm...> - 2011-03-18 16:42:15
|
On 03/18/2011 01:20 PM, Andreas Kupries wrote: > On 3/18/2011 6:29 AM, miguel sofer wrote: >> A note for testing: if your compiler understands __thread, do use > > There can we find information about __thread ? > >> -DHAVE_FAST_TSD for a big speedup. >> >> The corresponding autoconf'erry is not there yet :( > For a description of __thread see eg http://gcc.gnu.org/onlinedocs/gcc-3.3.1/gcc/Thread-Local.html http://en.wikipedia.org/wiki/Thread-local_storage Apparently __thread is in C99? Not sure I understand the meaning of http://gcc.gnu.org/onlinedocs/gcc/C99-Thread_002dLocal-Edits.html#C99-Thread_002dLocal-Edits OSX: http://lifecs.likai.org/2010/05/mac-os-x-thread-local-storage.html http://permalink.gmane.org/gmane.comp.compilers.clang.devel/13402 For windows (seems to require Vista+ or Server2008+ to work properly with dlls): #define __thread __declspec(thread) See http://msdn.microsoft.com/en-us/library/4ax54352%28VS.71%29.aspx http://www.helsinki.fi/atk/unix/dec_manuals/DOC_40D/AQTLMCTE/DOCU_018.HTM The "autoconf'erry" should just do a TRY_COMPILE: if it works, it works ... or else there is a compiler bug like http://mingw-users.1079350.n2.nabble.com/gcc-4-4-multi-threaded-exception-handling-amp-thread-specifier-not-working-td3440749.html |