Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Krell <jay.krell@cornell.edu>2018-07-19 19:09:11 +0300
committerGitHub <noreply@github.com>2018-07-19 19:09:11 +0300
commit57be17b069fbd35d90d036140a31085401b8e6cf (patch)
tree58b102b825a550961ee4d0da9398f76551b57512 /winconfig.h
parentf9040e5fb3b4c2516659edf6b1df5314ac7a6136 (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.h6
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 */