remove __thread attribute from mimalloc.h

This commit is contained in:
daan 2020-01-23 11:06:25 -08:00
parent cdc34595cf
commit c9106e74a8
2 changed files with 6 additions and 6 deletions

View File

@ -21,12 +21,15 @@ terms of the MIT license. A copy of the license can be found in the file
#endif #endif
#if defined(_MSC_VER) #if defined(_MSC_VER)
#pragma warning(disable:4127) // constant conditional due to MI_SECURE paths #pragma warning(disable:4127) // suppress constant conditional warning (due to MI_SECURE paths)
#define mi_decl_noinline __declspec(noinline) #define mi_decl_noinline __declspec(noinline)
#define mi_decl_thread __declspec(thread)
#elif (defined(__GNUC__) && (__GNUC__>=3)) // includes clang and icc #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 #else
#define mi_decl_noinline #define mi_decl_noinline
#define mi_decl_thread __thread // hope for the best :-)
#endif #endif

View File

@ -38,14 +38,12 @@ terms of the MIT license. A copy of the license can be found in the file
#define mi_decl_allocator __declspec(restrict) #define mi_decl_allocator __declspec(restrict)
#endif #endif
#define mi_cdecl __cdecl #define mi_cdecl __cdecl
#define mi_decl_thread __declspec(thread)
#define mi_attr_malloc #define mi_attr_malloc
#define mi_attr_alloc_size(s) #define mi_attr_alloc_size(s)
#define mi_attr_alloc_size2(s1,s2) #define mi_attr_alloc_size2(s1,s2)
#define mi_attr_alloc_align(p) #define mi_attr_alloc_align(p)
#elif defined(__GNUC__) // includes clang and icc #elif defined(__GNUC__) // includes clang and icc
#define mi_cdecl // leads to warnings... __attribute__((cdecl)) #define mi_cdecl // leads to warnings... __attribute__((cdecl))
#define mi_decl_thread __thread
#define mi_decl_export __attribute__((visibility("default"))) #define mi_decl_export __attribute__((visibility("default")))
#define mi_decl_allocator #define mi_decl_allocator
#define mi_attr_malloc __attribute__((malloc)) #define mi_attr_malloc __attribute__((malloc))
@ -64,7 +62,6 @@ terms of the MIT license. A copy of the license can be found in the file
#endif #endif
#else #else
#define mi_cdecl #define mi_cdecl
#define mi_decl_thread __thread
#define mi_decl_export #define mi_decl_export
#define mi_decl_allocator #define mi_decl_allocator
#define mi_attr_malloc #define mi_attr_malloc