Commit be9e8ce5 authored by Michael Lee's avatar Michael Lee Committed by Facebook Github Bot

Unconditionally disable thread_local in hazard pointer when on mobile

Summary:
Sometimes the compiler lies to us and says it supports thread_local when it is not always fully implemented.

Unconditionally disable this when `FOLLY_MOBILE` is set

Reviewed By: yfeldblum

Differential Revision: D6875230

fbshipit-source-id: 051f79eac78da03973bad9090b6577393b88998b
parent caed689d
......@@ -30,9 +30,9 @@
#ifndef HAZPTR_TC
// If we are on an IOS device or simulator and don't have thread_local support
// then do not use thread caching
#if FOLLY_MOBILE && defined(__APPLE__) && !FOLLY_HAS_FEATURE(cxx_thread_local)
// If we are on an IOS device or simulator then do not use thread caching
// Performance is potentially suboptimal without thread local support
#if FOLLY_MOBILE && defined(__APPLE__)
#define HAZPTR_TC false
#else
#define HAZPTR_TC true
......@@ -44,9 +44,9 @@
#endif
#ifndef HAZPTR_PRIV
// If we are on an IOS device or simulator and don't have thread_local support
// then do not use private
#if FOLLY_MOBILE && defined(__APPLE__) && !FOLLY_HAS_FEATURE(cxx_thread_local)
// If we are on an IOS device or simulator then do not use thread caching
// Performance is potentially suboptimal without thread local support
#if FOLLY_MOBILE && defined(__APPLE__)
#define HAZPTR_PRIV false
#else
#define HAZPTR_PRIV true
......
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