summaryrefslogtreecommitdiff
path: root/include/mimalloc-internal.h
diff options
context:
space:
mode:
authordaan <daanl@outlook.com>2020-01-23 11:06:25 -0800
committerdaan <daanl@outlook.com>2020-01-23 11:06:25 -0800
commitc9106e74a8bd50d8da2360c19741c74ac1cd0592 (patch)
treeae3326b82f10abd74d68eb1e54a2225cf50cfdc9 /include/mimalloc-internal.h
parentcdc34595cfd3c26aa0d366fb70199509846b40db (diff)
remove __thread attribute from mimalloc.h
Diffstat (limited to 'include/mimalloc-internal.h')
-rw-r--r--include/mimalloc-internal.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/mimalloc-internal.h b/include/mimalloc-internal.h
index 88a0f86..6fca06b 100644
--- a/include/mimalloc-internal.h
+++ b/include/mimalloc-internal.h
@@ -21,12 +21,15 @@ terms of the MIT license. A copy of the license can be found in the file
#endif
#if defined(_MSC_VER)
-#pragma warning(disable:4127) // constant conditional due to MI_SECURE paths
-#define mi_decl_noinline __declspec(noinline)
+#pragma warning(disable:4127) // suppress constant conditional warning (due to MI_SECURE paths)
+#define mi_decl_noinline __declspec(noinline)
+#define mi_decl_thread __declspec(thread)
#elif (defined(__GNUC__) && (__GNUC__>=3)) // includes clang and icc
-#define mi_decl_noinline __attribute__((noinline))
+#define mi_decl_noinline __attribute__((noinline))
+#define mi_decl_thread __thread
#else
#define mi_decl_noinline
+#define mi_decl_thread __thread // hope for the best :-)
#endif