Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Revert "thread_local is C++11, remove the portability layer"
[simgrid.git] / include / xbt / base.h
index 5a95c38..bada2f8 100644 (file)
 # endif
 # undef _XBT_NEED_INIT_PRAGMA
 
-/* inline and __FUNCTION__ are only in GCC when -ansi is off */
-
-#if defined(__GNUC__) && ! defined(__STRICT_ANSI__)
-# define _XBT_FUNCTION __FUNCTION__
-#elif (defined(__STDC__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
-# define _XBT_FUNCTION __func__ /* ISO-C99 compliant */
+#if defined(__GNUC__)
+#   define XBT_ALWAYS_INLINE inline __attribute__ ((always_inline))
 #else
-# define _XBT_FUNCTION "function"
+#   define XBT_ALWAYS_INLINE inline
 #endif
 
 #if defined(__GNUC__)
-#   define XBT_ALWAYS_INLINE inline __attribute__ ((always_inline))
+#   define XBT_THREAD_LOCAL __thread
 #else
-#   define XBT_ALWAYS_INLINE inline
+#   define XBT_THREAD_LOCAL No thread local on this architecture
 #endif
 
 /* improvable on gcc (by evaluating arguments only once), but wouldn't be portable */