avoid slow TLS with MinGW
Recent versions of MinGW-W64 use emutls for `__thread` variables, and that's much slower than Windows-native TLS. Go back to the inline-assembly implementation of therad-local access.
This commit is contained in:
parent
5d74897aa4
commit
b8ba78d1d3
|
@ -30,12 +30,13 @@ extern "C" {
|
|||
# ifdef _WIN32
|
||||
# if defined(_WIN64)
|
||||
# if defined(__MINGW32__)
|
||||
# define THREAD_LOCAL __thread
|
||||
# define THREAD_LOCAL /* empty */
|
||||
# define IMPLEMENT_THREAD_LOCAL_VIA_WIN_TLS
|
||||
# else
|
||||
# define THREAD_LOCAL __declspec(thread)
|
||||
# define MZ_THREAD_EXTERN extern
|
||||
# define IMPLEMENT_THREAD_LOCAL_EXTERNALLY_VIA_PROC
|
||||
# endif
|
||||
# define MZ_THREAD_EXTERN extern
|
||||
# define IMPLEMENT_THREAD_LOCAL_EXTERNALLY_VIA_PROC
|
||||
# else
|
||||
# define THREAD_LOCAL /* empty */
|
||||
# define IMPLEMENT_THREAD_LOCAL_VIA_WIN_TLS
|
||||
|
|
Loading…
Reference in New Issue
Block a user