Explain why I gave up optimizing Thread::Current for x86.
Change-Id: Ib5da37f8363163f60107005ba0e8b10fc4b0ccc0
diff --git a/src/thread.h b/src/thread.h
index ef539c0..f621d60 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -114,6 +114,8 @@
void InitAfterFork();
static Thread* Current() {
+ // We rely on Thread::Current returning NULL for a detached thread, so it's not obvious
+ // that we can replace this with a direct %fs access on x86.
void* thread = pthread_getspecific(Thread::pthread_key_self_);
return reinterpret_cast<Thread*>(thread);
}