Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature test for thread_local on Clang for TLS #1883

Merged
merged 1 commit into from Dec 3, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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