A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[MSVC] correct support for thread-local storage
[simgrid.git]
/
include
/
xbt
/
base.h
diff --git
a/include/xbt/base.h
b/include/xbt/base.h
index
69e6900
..
54ab270
100644
(file)
--- a/
include/xbt/base.h
+++ b/
include/xbt/base.h
@@
-103,6
+103,14
@@
# define XBT_ALWAYS_INLINE XBT_INLINE
#endif
# define XBT_ALWAYS_INLINE XBT_INLINE
#endif
+#if defined(__GNUC__)
+# define XBT_THREAD_LOCAL __thread
+#elif defined(_MSC_VER)
+# define XBT_THREAD_LOCAL __declspec(thread)
+#else
+# define XBT_THREAD_LOCAL No thread local on this architecture
+#endif
+
/* improvable on gcc (by evaluating arguments only once), but wouldn't be portable */
#ifdef MIN
# undef MIN
/* improvable on gcc (by evaluating arguments only once), but wouldn't be portable */
#ifdef MIN
# undef MIN