diff options
author | Bo Yang <teboring@google.com> | 2015-04-24 15:34:40 -0700 |
---|---|---|
committer | Bo Yang <teboring@google.com> | 2015-04-24 18:09:55 -0700 |
commit | d6c9f644ac62ec83196a75a47655a33a87875628 (patch) | |
tree | 742b0ab947ca26d5896c97e5909ca344bcc3ce3a /src/google/protobuf/arena.h | |
parent | fe7b5667eb446766a1c2f30c691662a36f3df1f8 (diff) |
internal changes
Change-Id: I66f216c70a19f44637090878d7e442d4d0f8991b
Diffstat (limited to 'src/google/protobuf/arena.h')
-rw-r--r-- | src/google/protobuf/arena.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/google/protobuf/arena.h b/src/google/protobuf/arena.h index bb15e80c..b48bef92 100644 --- a/src/google/protobuf/arena.h +++ b/src/google/protobuf/arena.h @@ -373,6 +373,11 @@ class LIBPROTOBUF_EXPORT Arena { // Thread local variables cannot be exposed through DLL interface but we can // wrap them in static functions. static ThreadCache& thread_cache(); +#elif defined(GOOGLE_PROTOBUF_OS_ANDROID) || defined(GOOGLE_PROTOBUF_OS_IPHONE) + // Android ndk does not support __thread keyword so we use a custom thread + // local storage class we implemented. + // iOS also does not support the __thread keyword. + static ThreadCache& thread_cache(); #else static GOOGLE_THREAD_LOCAL ThreadCache thread_cache_; static ThreadCache& thread_cache() { return thread_cache_; } |