This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC v2][PATCH 16/27] Add Infinity THREAD_SELF macros to sysdeps/tile/nptl/tls.h


This commit adds Infinity THREAD_SELF macros for tile.
---
 sysdeps/tile/nptl/tls.h |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/sysdeps/tile/nptl/tls.h b/sysdeps/tile/nptl/tls.h
index c908fb8..c98761b 100644
--- a/sysdeps/tile/nptl/tls.h
+++ b/sysdeps/tile/nptl/tls.h
@@ -122,13 +122,18 @@ register void *__thread_pointer asm ("tp");
     ((struct pthread *) (__thread_pointer \
 			 - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE))
 
+/* Magic for Infinity to know how to do THREAD_SELF.  */
+# define I8_THREAD_SELF I8_TS_REGISTER
+# define I8_TS_REG_OFFSET REG_TP * sizeof (void *)
+# define I8_TS_REG_BIAS -(TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE)
+
 /* Magic for libthread_db to know how to do THREAD_SELF.  */
 #ifdef __tilegx__
 # define DB_THREAD_SELF \
-  REGISTER (64, 64, REG_TP * 8, - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)
+  REGISTER (64, 64, REG_TP * 8, I8_TS_REG_BIAS)
 #else
 # define DB_THREAD_SELF \
-  REGISTER (32, 32, REG_TP * 4, - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)
+  REGISTER (32, 32, REG_TP * 4, I8_TS_REG_BIAS)
 #endif
 
 /* Read member of the thread descriptor directly.  */
-- 
1.7.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]