Skip to content

Commit

Permalink
Merge pull request #1883 from zao/clang-thread_local
Browse files Browse the repository at this point in the history
Add feature test for thread_local on Clang for TLS
  • Loading branch information
hkaiser committed Dec 3, 2015
2 parents 1579364 + eb19038 commit 7c70f2a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion hpx/util/thread_specific_ptr.hpp
Expand Up @@ -25,7 +25,9 @@

#if (!defined(__ANDROID__) && !defined(ANDROID)) && !defined(__bgq__)

#if defined(_GLIBCXX_HAVE_TLS)
#if defined(__has_feature) && __has_feature(cxx_thread_local)
# define HPX_NATIVE_TLS thread_local
#elif defined(_GLIBCXX_HAVE_TLS)
# define HPX_NATIVE_TLS __thread
#elif defined(BOOST_WINDOWS)
# define HPX_NATIVE_TLS __declspec(thread)
Expand Down
4 changes: 3 additions & 1 deletion tests/performance/local/native_tls_overhead.cpp
Expand Up @@ -17,7 +17,9 @@

#include <hpx/util/high_resolution_timer.hpp>

#if defined(_GLIBCXX_HAVE_TLS)
#if defined(__has_feature) && __has_feature(cxx_thread_local)
#define HPX_NATIVE_TLS thread_local
#elif defined(_GLIBCXX_HAVE_TLS)
#define HPX_NATIVE_TLS __thread
#elif defined(BOOST_WINDOWS)
#define HPX_NATIVE_TLS __declspec(thread)
Expand Down

0 comments on commit 7c70f2a

Please sign in to comment.