This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[RFC v2][PATCH 05/27] Add Infinity THREAD_SELF macros to sysdeps/hppa/nptl/tls.h
- From: Gary Benson <gbenson at redhat dot com>
- To: libc-alpha at sourceware dot org
- Date: Mon, 13 Jun 2016 11:38:09 +0100
- Subject: [RFC v2][PATCH 05/27] Add Infinity THREAD_SELF macros to sysdeps/hppa/nptl/tls.h
- Authentication-results: sourceware.org; auth=none
- References: <1465814311-31470-1-git-send-email-gbenson at redhat dot com>
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