[RFC,v2,05/27] Add Infinity THREAD_SELF macros to sysdeps/hppa/nptl/tls.h
Commit Message
This commit adds Infinity THREAD_SELF macros for hppa.
---
sysdeps/hppa/nptl/tls.h | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
@@ -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) \