Skip to content

Commit 69190ce

Browse files
committed
This reverts 0e5d4ea to fix the build on MacOSX
On Mac thread_local and __thread are not ABI compatible, in addition, thread_local comes with additional overhead, __thread seems to be the most suitable linkage to use regardless of c++/c
1 parent 9ecc0a4 commit 69190ce

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

TSRM/TSRM.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,10 @@ TSRM_API void *tsrm_get_ls_cache(void);
159159
TSRM_API uint8_t tsrm_is_main_thread(void);
160160
TSRM_API const char *tsrm_api_name(void);
161161

162-
#if defined(__cplusplus) && __cplusplus > 199711L
163-
# define TSRM_TLS thread_local
162+
#ifdef TSRM_WIN32
163+
# define TSRM_TLS __declspec(thread)
164164
#else
165-
# ifdef TSRM_WIN32
166-
# define TSRM_TLS __declspec(thread)
167-
# else
168-
# define TSRM_TLS __thread
169-
# endif
165+
# define TSRM_TLS __thread
170166
#endif
171167

172168
#define TSRM_SHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)+1)

0 commit comments

Comments
 (0)