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 05/27] Add Infinity THREAD_SELF macros to sysdeps/hppa/nptl/tls.h


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

diff --git a/sysdeps/hppa/nptl/tls.h b/sysdeps/hppa/nptl/tls.h
index 2e0c861..2ed0ef1 100644
--- a/sysdeps/hppa/nptl/tls.h
+++ b/sysdeps/hppa/nptl/tls.h
@@ -111,11 +111,16 @@ typedef struct
 	__self - 1;				\
    })
 
-/* Magic for libthread_db to know how to do THREAD_SELF.
+/* Magic for Infinity to know how to do THREAD_SELF.
    Our thread pointer is stored in cr27.  See asm/elf.h for the offset into
    elf_gregset_t.  The thread descriptor is sizeof (struct pthread) away.  */
+# define I8_THREAD_SELF I8_TS_REGISTER
+# define I8_TS_REG_OFFSET 53 * 4
+# define I8_TS_REG_BIAS -sizeof (struct pthread)
+
+/* Magic for libthread_db to know how to do THREAD_SELF.  */
 # define DB_THREAD_SELF \
-  REGISTER (32, 32, 53 * 4, -sizeof (struct pthread))
+  REGISTER (32, 32, I8_TS_REG_OFFSET, I8_TS_REG_BIAS)
 
 /* Access to data in the thread descriptor is easy.  */
 # define THREAD_GETMEM(descr, member) \
-- 
1.7.1


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