Index: base/threading/thread_local.h |
diff --git a/base/threading/thread_local.h b/base/threading/thread_local.h |
index b13be1ab4678584d871147f928d6b839fe37e57d..df9c4b72573be242101b697fa6edcfd5445aeb78 100644 |
--- a/base/threading/thread_local.h |
+++ b/base/threading/thread_local.h |
@@ -26,6 +26,9 @@ |
// you must of course properly deal with safety and race conditions. This |
// means a function-level static initializer is generally inappropiate. |
// |
+// In Android, the system TLS is limited, the implementation is backed with |
+// ThreadLocalStorage. |
+// |
// Example usage: |
// // My class is logically attached to a single thread. We cache a pointer |
// // on the thread it was created on, so we can implement current(). |
@@ -50,6 +53,7 @@ |
#include "base/base_export.h" |
#include "base/basictypes.h" |
+#include "base/threading/thread_local_storage.h" |
#if defined(OS_POSIX) |
#include <pthread.h> |
@@ -62,6 +66,8 @@ namespace internal { |
struct BASE_EXPORT ThreadLocalPlatform { |
#if defined(OS_WIN) |
typedef unsigned long SlotType; |
+#elif defined(OS_ANDROID) |
+ typedef ThreadLocalStorage::StaticSlot SlotType; |
#elif defined(OS_POSIX) |
typedef pthread_key_t SlotType; |
#endif |