From 9bbb5a7a09c4c8754e3b151822424f92093abc2a Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Tue, 28 Jul 2015 19:53:54 -0700 Subject: [PATCH] Bionic: Add a TLS slot for ART for Thread self To improve the performance of Thread::Current(), add a tls slot so ART can avoid a pthreads call. Change-Id: Icc86a2b7590734637366f9d5e41a5c6d18cc5772 --- libc/private/bionic_tls.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libc/private/bionic_tls.h b/libc/private/bionic_tls.h index d92d9d9a5..58670bb98 100644 --- a/libc/private/bionic_tls.h +++ b/libc/private/bionic_tls.h @@ -67,6 +67,9 @@ enum { TLS_SLOT_STACK_GUARD = 5, // GCC requires this specific slot for x86. TLS_SLOT_DLERROR, + // Fast storage for Thread::Current() in ART. + TLS_SLOT_ART_THREAD_SELF, + BIONIC_TLS_SLOTS // Must come last! };