diff options
author | Joe Watkins <krakjoe@php.net> | 2019-06-11 15:13:27 +0200 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2019-06-11 15:13:27 +0200 |
commit | 69190ce5c053a9bf97983932bd702137895b18df (patch) | |
tree | 21a6b1918cda2a21cf42499e7b7c4924f3d1ec62 /TSRM | |
parent | 9ecc0a4f296cf5c72572e75a9734b40d941e2427 (diff) | |
download | php-git-69190ce5c053a9bf97983932bd702137895b18df.tar.gz |
This reverts 0e5d4ea55554872fe72e5d984b73fc21abc561fe 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
Diffstat (limited to 'TSRM')
-rw-r--r-- | TSRM/TSRM.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/TSRM/TSRM.h b/TSRM/TSRM.h index 3e3e7d656e..d2be318440 100644 --- a/TSRM/TSRM.h +++ b/TSRM/TSRM.h @@ -159,14 +159,10 @@ TSRM_API void *tsrm_get_ls_cache(void); TSRM_API uint8_t tsrm_is_main_thread(void); TSRM_API const char *tsrm_api_name(void); -#if defined(__cplusplus) && __cplusplus > 199711L -# define TSRM_TLS thread_local +#ifdef TSRM_WIN32 +# define TSRM_TLS __declspec(thread) #else -# ifdef TSRM_WIN32 -# define TSRM_TLS __declspec(thread) -# else -# define TSRM_TLS __thread -# endif +# define TSRM_TLS __thread #endif #define TSRM_SHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)+1) |