aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/arena.cc
diff options
context:
space:
mode:
authorAustin Schuh <austin@peloton-tech.com>2015-06-08 18:49:16 -0700
committerAustin Schuh <austin@peloton-tech.com>2015-06-08 18:49:16 -0700
commitfd73235f6b2534aa63af41359d9f386ade43a5cc (patch)
tree17eef748320d5e3ac728e12f04e88fa5fa301871 /src/google/protobuf/arena.cc
parent9cbdaedb86debc56ffec91935ee9546f3c92eb0a (diff)
downloadprotobuf-fd73235f6b2534aa63af41359d9f386ade43a5cc.tar.gz
protobuf-fd73235f6b2534aa63af41359d9f386ade43a5cc.tar.bz2
protobuf-fd73235f6b2534aa63af41359d9f386ade43a5cc.zip
Refactored threadlocal logic.
Refactored the threadlocal logic for Android and IOS into logic in platform_macro.h which computes a GOOGLE_PROTOBUF_NO_THREADLOCAL define which is then used elsewhere. This allows new platforms without THREADLOCAL to be easily defined.
Diffstat (limited to 'src/google/protobuf/arena.cc')
-rwxr-xr-xsrc/google/protobuf/arena.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/google/protobuf/arena.cc b/src/google/protobuf/arena.cc
index 96009645..ed1c5ef2 100755
--- a/src/google/protobuf/arena.cc
+++ b/src/google/protobuf/arena.cc
@@ -43,7 +43,7 @@ Arena::ThreadCache& Arena::thread_cache() {
static GOOGLE_THREAD_LOCAL ThreadCache thread_cache_ = { -1, NULL };
return thread_cache_;
}
-#elif defined(GOOGLE_PROTOBUF_OS_ANDROID) || defined(GOOGLE_PROTOBUF_OS_IPHONE)
+#elif defined(GOOGLE_PROTOBUF_NO_THREADLOCAL)
Arena::ThreadCache& Arena::thread_cache() {
static internal::ThreadLocalStorage<ThreadCache>* thread_cache_ =
new internal::ThreadLocalStorage<ThreadCache>();