Index: runtime/platform/thread_linux.h |
diff --git a/runtime/platform/thread_linux.h b/runtime/platform/thread_linux.h |
index a32c680b6d549fc9838c78467f96f36c517a2856..4b8c7d5d22e400188ce2c61e7b448d57e4921a0a 100644 |
--- a/runtime/platform/thread_linux.h |
+++ b/runtime/platform/thread_linux.h |
@@ -16,6 +16,26 @@ |
namespace dart { |
+typedef pthread_key_t ThreadLocalKey; |
+ |
+class ThreadInlineImpl { |
+ private: |
+ ThreadInlineImpl() {} |
+ ~ThreadInlineImpl() {} |
+ |
+ static uword GetThreadLocal(ThreadLocalKey key) { |
+ static ThreadLocalKey kUnsetThreadLocalKey = static_cast<pthread_key_t>(-1); |
+ ASSERT(key != kUnsetThreadLocalKey); |
+ return reinterpret_cast<uword>(pthread_getspecific(key)); |
+ } |
+ |
+ friend class Thread; |
+ |
+ DISALLOW_ALLOCATION(); |
+ DISALLOW_COPY_AND_ASSIGN(ThreadInlineImpl); |
+}; |
+ |
+ |
class MutexData { |
private: |
MutexData() {} |