Switch a couple of uses of __thread to FOLLY_TLS
authorOrvid King <blah38621@gmail.com>
Wed, 29 Jul 2015 21:44:59 +0000 (14:44 -0700)
committerfacebook-github-bot-1 <folly-bot@fb.com>
Wed, 29 Jul 2015 22:22:09 +0000 (15:22 -0700)
Summary: Because MSVC doesn't support `__thread`, and `FOLLY_TLS` is already setup to use the MSVC syntax when needed.
Closes #269

Reviewed By: @yfeldblum

Differential Revision: D2283919

Pulled By: @sgolemon

folly/experimental/fibers/FiberManager.cpp
folly/experimental/fibers/FiberManager.h

index 9f71f3ba3663620a91c15b2a2a913b2c16b12ca5..2b19393a61ae3bb761d49e369685273cb188a7eb 100644 (file)
@@ -28,7 +28,7 @@
 
 namespace folly { namespace fibers {
 
-__thread FiberManager* FiberManager::currentFiberManager_ = nullptr;
+FOLLY_TLS FiberManager* FiberManager::currentFiberManager_ = nullptr;
 
 FiberManager::FiberManager(std::unique_ptr<LoopController> loopController,
                            Options options) :
index fc8890696a9d241cef6316c372da13f42f9895d2..9c2ae7567fbd693e0fee9f17d9931ee3a9000f37 100644 (file)
@@ -307,7 +307,7 @@ class FiberManager : public ::folly::Executor {
    * When we are inside FiberManager loop this points to FiberManager. Otherwise
    * it's nullptr
    */
-  static __thread FiberManager* currentFiberManager_;
+  static FOLLY_TLS FiberManager* currentFiberManager_;
 
   /**
    * runInMainContext implementation for non-void functions.