Use a TLS value to retrieve the current thread.

Change-Id: Iaea97c0f5e10ea59ebf6c623d802f51f87bd4214
diff --git a/src/thread.h b/src/thread.h
index 55c1b11..a862e0a 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -83,8 +83,8 @@
   static Thread* Attach();
 
   static Thread* Current() {
-    static Thread self;
-    return &self; // TODO
+    void* thread = pthread_getspecific(Thread::pthread_key_self_);
+    return reinterpret_cast<Thread*>(thread);
   }
 
   uint32_t GetId() const {