}
struct NonTrivialStruct {
- static __thread int count;
+ static FOLLY_TLS int count;
int elem_;
}
};
-__thread int NonTrivialStruct::count;
+FOLLY_TLS int NonTrivialStruct::count;
TEST(IndexedMemPool, eager_recycle) {
typedef IndexedMemPool<NonTrivialStruct> Pool;
}
struct RefCounted {
- static __thread int active_instances;
+ static FOLLY_TLS int active_instances;
mutable std::atomic<int> rc;
--active_instances;
}
};
-__thread int RefCounted::active_instances;
-
+FOLLY_TLS int RefCounted::active_instances;
void intrusive_ptr_add_ref(RefCounted const* p) {
p->rc++;
#include <thread>
-__thread long instance_counter_instances = 0;
+FOLLY_TLS long instance_counter_instances = 0;
class InstanceCounter {
public: