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 #if (defined (G4USE_STD11) && __INTEL_COMPILER>=1500)
67 # define G4ThreadLocalStatic static thread_local
68 # define G4ThreadLocal thread_local
70 # define G4ThreadLocalStatic static __thread
71 # define G4ThreadLocal __thread
74 #if defined (G4USE_STD11)
75 # define G4ThreadLocalStatic static thread_local
76 # define G4ThreadLocal thread_local
78 # define G4ThreadLocalStatic static __thread
79 # define G4ThreadLocal __thread
82 # define G4ThreadLocalStatic static __declspec(thread)
83 # define G4ThreadLocal __declspec(thread)
85 # error "No Thread Local Storage (TLS) technology supported for this platform. Use sequential build !"
88 # define G4ThreadLocalStatic static
89 # define G4ThreadLocal