diff options
author | Jay Krell <jay.krell@cornell.edu> | 2018-07-19 19:09:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-19 19:09:11 +0300 |
commit | 57be17b069fbd35d90d036140a31085401b8e6cf (patch) | |
tree | 58b102b825a550961ee4d0da9398f76551b57512 /winconfig.h | |
parent | f9040e5fb3b4c2516659edf6b1df5314ac7a6136 (diff) |
Use __declspec(thread) with Visual C++, and __thread with Win32/gcc, (#9594)
* Use __declspec(thread) with Visual C++, and __thread with Win32/gcc,
instead of much slower TlsGetValue / TlsSetValue
* Avoid affecting Boehm.
* Replace HAVE_KW_THREAD and USE_KW_THREAD with MONO_KEYWORD_THREAD.
Diffstat (limited to 'winconfig.h')
-rw-r--r-- | winconfig.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/winconfig.h b/winconfig.h index b6f56ca5a47..24a29a399a6 100644 --- a/winconfig.h +++ b/winconfig.h @@ -289,7 +289,11 @@ /* #undef HAVE_KQUEUE */ /* Have __thread keyword */ -/* #undef HAVE_KW_THREAD */ +#ifdef _MSC_VER +#define MONO_KEYWORD_THREAD __declspec (thread) +#else +#define MONO_KEYWORD_THREAD __thread +#endif /* Have large file support */ /* #undef HAVE_LARGE_FILE_SUPPORT */ |