OSDN Git Service

Add a TLS slot for TSAN.
authorDan Albert <danalbert@google.com>
Tue, 18 Aug 2015 22:09:00 +0000 (15:09 -0700)
committerDan Albert <danalbert@google.com>
Tue, 18 Aug 2015 22:09:00 +0000 (15:09 -0700)
This is so TSAN won't need to rely on pthread_getspecific for finding
the current thread state.

Change-Id: Id3befeabec0a9f7ca77b5549fbc427e22e6aaa34

libc/private/bionic_tls.h

index 58670bb..2ca7728 100644 (file)
@@ -70,6 +70,10 @@ enum {
   // Fast storage for Thread::Current() in ART.
   TLS_SLOT_ART_THREAD_SELF,
 
+  // Lets TSAN avoid using pthread_getspecific for finding the current thread
+  // state.
+  TLS_SLOT_TSAN,
+
   BIONIC_TLS_SLOTS // Must come last!
 };