From: Orvid King Date: Wed, 29 Jul 2015 21:44:59 +0000 (-0700) Subject: Switch a couple of uses of __thread to FOLLY_TLS X-Git-Tag: v0.53.0~33 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=commitdiff_plain;h=3f274113c79f2677547d6a1d849bf11c1f54dd73;ds=sidebyside Switch a couple of uses of __thread to FOLLY_TLS 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 --- diff --git a/folly/experimental/fibers/FiberManager.cpp b/folly/experimental/fibers/FiberManager.cpp index 9f71f3ba..2b19393a 100644 --- a/folly/experimental/fibers/FiberManager.cpp +++ b/folly/experimental/fibers/FiberManager.cpp @@ -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, Options options) : diff --git a/folly/experimental/fibers/FiberManager.h b/folly/experimental/fibers/FiberManager.h index fc889069..9c2ae756 100644 --- a/folly/experimental/fibers/FiberManager.h +++ b/folly/experimental/fibers/FiberManager.h @@ -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.