abstract thread_local support
authorElizabeth Smith <elizabeths@fb.com>
Thu, 17 Apr 2014 14:49:10 +0000 (07:49 -0700)
committerSara Golemon <sgolemon@fb.com>
Fri, 18 Apr 2014 19:04:15 +0000 (12:04 -0700)
commitec06f66c17f2469fc62221259c66d6bb417f7692
tree5b7c713a2d567718ba53ebeeabe04b445494d355
parentf585e98a169e2c6a932658c317d91936e308f81c
abstract thread_local support

Summary:
change from using __thread to using FOLLY_THREAD_LOCAL macro, this will allow abstraction over gcc and msvc implementations of thread local (__thread and __declspec(thread)) which have the same semantices and will also allow drop in replacement of thread_local when compiler support for the feature is complete  This doesn't do anything about apple, however, which still has broken __thread support

This doesn't actually change any implementation for now, simply allows for correct compilation

Test Plan: fbmake runtests

Reviewed By: delong.j@fb.com

FB internal diff: D1278726
12 files changed:
folly/Portability.h
folly/ThreadLocal.h
folly/detail/CacheLocality.cpp
folly/detail/CacheLocality.h
folly/detail/MemoryIdler.cpp
folly/detail/ThreadLocalDetail.h
folly/experimental/exception_tracer/ExceptionTracerLib.cpp
folly/test/CacheLocalityTest.cpp
folly/test/DeterministicSchedule.cpp
folly/test/DeterministicSchedule.h
folly/test/MPMCQueueTest.cpp
folly/test/ThreadCachedIntTest.cpp