Commit c43e3f85 authored by Junqi Wang's avatar Junqi Wang Committed by Facebook Github Bot

Back out "[Folly] Enforce SingletonThreadLocal uniqueness without FOLLY_TLS"

Summary: Original commit changeset: 04dbc7bc7752

Reviewed By: vchynarov

Differential Revision: D15168113

fbshipit-source-id: a69618eabec30e7599c13bb32c25f6efd6da561e
parent 7406e351
...@@ -158,12 +158,12 @@ class SingletonThreadLocal : private detail::SingletonThreadLocalBase { ...@@ -158,12 +158,12 @@ class SingletonThreadLocal : private detail::SingletonThreadLocalBase {
} }
FOLLY_NOINLINE static Wrapper& getWrapper() { FOLLY_NOINLINE static Wrapper& getWrapper() {
(void)unique; // force the object not to be thrown out as unused
return *getWrapperTL(); return *getWrapperTL();
} }
#ifdef FOLLY_TLS #ifdef FOLLY_TLS
FOLLY_NOINLINE static T& getSlow(Wrapper*& cache) { FOLLY_NOINLINE static T& getSlow(Wrapper*& cache) {
(void)unique; // force the object not to be thrown out as unused
static thread_local Wrapper** check = &cache; static thread_local Wrapper** check = &cache;
CHECK_EQ(check, &cache) << "inline function static thread_local merging"; CHECK_EQ(check, &cache) << "inline function static thread_local merging";
static thread_local bool stale; static thread_local bool stale;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment