Go to the documentation of this file.
36 #if defined (G4MULTITHREADED)
37 #if ( defined(__MACH__) && defined(__clang__) && defined(__x86_64__) ) || \
38 ( defined(__linux__) && defined(__clang__) )
39 #if (defined (G4USE_STD11) && __has_feature(cxx_thread_local))
40 # define G4ThreadLocalStatic static thread_local
41 # define G4ThreadLocal thread_local
43 # define G4ThreadLocalStatic static __thread
44 # define G4ThreadLocal __thread
46 #elif ( (defined(__linux__) || defined(__MACH__)) && \
47 defined(__GNUC__) && __GNUC__>=4 && __GNUC_MINOR__<9 )
48 #if defined (G4USE_STD11)
49 # define G4ThreadLocalStatic static __thread
50 # define G4ThreadLocal thread_local
52 # define G4ThreadLocalStatic static __thread
53 # define G4ThreadLocal __thread
55 #elif ( (defined(__linux__) || defined(__MACH__)) && \
56 defined(__GNUC__) && __GNUC__>=4 && __GNUC_MINOR__>=9 )
57 #if defined (G4USE_STD11)
58 # define G4ThreadLocalStatic static thread_local
59 # define G4ThreadLocal thread_local
61 # define G4ThreadLocalStatic static __thread
62 # define G4ThreadLocal __thread
64 #elif ( (defined(__linux__) || defined(__MACH__)) && \
65 defined(__INTEL_COMPILER) )
66 # define G4ThreadLocalStatic static __thread
67 # define G4ThreadLocal __thread
69 #if defined (G4USE_STD11)
70 # define G4ThreadLocalStatic static thread_local
71 # define G4ThreadLocal thread_local
73 # define G4ThreadLocalStatic static __thread
74 # define G4ThreadLocal __thread
77 # define G4ThreadLocalStatic static __declspec(thread)
78 # define G4ThreadLocal __declspec(thread)
80 # error "No Thread Local Storage (TLS) technology supported for this platform. Use sequential build !"
83 # define G4ThreadLocalStatic static
84 # define G4ThreadLocal