--- old/src/hotspot/share/runtime/thread.cpp 2019-09-12 00:18:26.678153111 +0200 +++ new/src/hotspot/share/runtime/thread.cpp 2019-09-12 00:18:26.422144777 +0200 @@ -166,7 +166,7 @@ #ifndef USE_LIBRARY_BASED_TLS_ONLY // Current thread is maintained as a thread-local variable -THREAD_LOCAL_DECL Thread* Thread::_thr_current = NULL; +thread_local Thread* Thread::_thr_current = NULL; #endif // ======= Thread ======== --- old/src/hotspot/share/runtime/thread.hpp 2019-09-12 00:18:27.130167825 +0200 +++ new/src/hotspot/share/runtime/thread.hpp 2019-09-12 00:18:26.836158255 +0200 @@ -142,7 +142,7 @@ #ifndef USE_LIBRARY_BASED_TLS_ONLY // Current thread is maintained as a thread-local variable - static THREAD_LOCAL_DECL Thread* _thr_current; + static thread_local Thread* _thr_current; #endif // Thread local data area available to the GC. The internal --- old/src/hotspot/share/utilities/globalDefinitions_gcc.hpp 2019-09-12 00:18:27.578182409 +0200 +++ new/src/hotspot/share/utilities/globalDefinitions_gcc.hpp 2019-09-12 00:18:27.263172155 +0200 @@ -254,8 +254,8 @@ #define JLONG_FORMAT_W(width) "%" #width "ld" #endif // _LP64 && __APPLE__ -#ifndef USE_LIBRARY_BASED_TLS_ONLY -#define THREAD_LOCAL_DECL __thread +#if __cplusplus < 201103L +#define thread_local __thread #endif // Inlining support --- old/src/hotspot/share/utilities/globalDefinitions_solstudio.hpp 2019-09-12 00:18:27.956194715 +0200 +++ new/src/hotspot/share/utilities/globalDefinitions_solstudio.hpp 2019-09-12 00:18:27.695186218 +0200 @@ -245,8 +245,8 @@ #define offset_of(klass,field) offsetof(klass,field) -#ifndef USE_LIBRARY_BASED_TLS_ONLY -#define THREAD_LOCAL_DECL __thread +#if __cplusplus < 201103L +#define thread_local __thread #endif // Inlining support --- old/src/hotspot/share/utilities/globalDefinitions_visCPP.hpp 2019-09-12 00:18:28.379208485 +0200 +++ new/src/hotspot/share/utilities/globalDefinitions_visCPP.hpp 2019-09-12 00:18:28.073198524 +0200 @@ -153,8 +153,8 @@ #define offset_of(klass,field) offsetof(klass,field) -#ifndef USE_LIBRARY_BASED_TLS_ONLY -#define THREAD_LOCAL_DECL __declspec( thread ) +#if _MSC_VER < 1900 +#define thread_local __declspec(thread) #endif // Inlining support --- old/src/hotspot/share/utilities/globalDefinitions_xlc.hpp 2019-09-12 00:18:28.792221930 +0200 +++ new/src/hotspot/share/utilities/globalDefinitions_xlc.hpp 2019-09-12 00:18:28.494212229 +0200 @@ -130,10 +130,6 @@ // AIX 5.3 has buggy __thread support. (see JDK-8176442). #define USE_LIBRARY_BASED_TLS_ONLY 1 -#ifndef USE_LIBRARY_BASED_TLS_ONLY -#define THREAD_LOCAL_DECL __thread -#endif - // Inlining support // // Be aware that for function/method declarations, xlC only supports the following