about summary refs log tree commit diff
path: root/sysdeps/hppa/nptl/tcb-offsets.sym
diff options
context:
space:
mode:
authorCarlos O'Donell <carlos@systemhalted.org>2014-04-29 03:08:48 -0400
committerCarlos O'Donell <carlos@systemhalted.org>2014-04-29 04:20:39 -0400
commit5abebba403181de898bbea4ee1bcce5f088c663b (patch)
tree0c4a8eac85e1f2db87621b524bfcbdeb24c2c8f9 /sysdeps/hppa/nptl/tcb-offsets.sym
parent4e4a58f4ee45cea6f3083af8f12d3834bb999555 (diff)
downloadglibc-5abebba403181de898bbea4ee1bcce5f088c663b.tar.gz
glibc-5abebba403181de898bbea4ee1bcce5f088c663b.tar.xz
glibc-5abebba403181de898bbea4ee1bcce5f088c663b.zip
Relocate hppa from ports to libc.
Diffstat (limited to 'sysdeps/hppa/nptl/tcb-offsets.sym')
-rw-r--r--sysdeps/hppa/nptl/tcb-offsets.sym19
1 files changed, 19 insertions, 0 deletions
diff --git a/sysdeps/hppa/nptl/tcb-offsets.sym b/sysdeps/hppa/nptl/tcb-offsets.sym
new file mode 100644
index 0000000000..f3cc82621a
--- /dev/null
+++ b/sysdeps/hppa/nptl/tcb-offsets.sym
@@ -0,0 +1,19 @@
+#include <sysdep.h>
+#include <tls.h>
+
+RESULT			offsetof (struct pthread, result)
+TID			offsetof (struct pthread, tid)
+PID			offsetof (struct pthread, pid)
+CANCELHANDLING		offsetof (struct pthread, cancelhandling)
+CLEANUP_JMP_BUF		offsetof (struct pthread, cleanup_jmp_buf)
+MULTIPLE_THREADS_OFFSET	offsetof (struct pthread, header.multiple_threads)
+TLS_PRE_TCB_SIZE	sizeof (struct pthread)
+MUTEX_FUTEX		offsetof (pthread_mutex_t, __data.__lock)
+
+-- Use a thread_offset when working with asm to make things simpler
+-- This way we get the offset of a member in the struct pthread that
+-- preceeds the thread pointer (which points to the dtv).
+#define thread_offsetof(mem)    (unsigned int)(offsetof(struct pthread, mem) - sizeof(struct pthread))
+PID_THREAD_OFFSET		thread_offsetof (pid)
+TID_THREAD_OFFSET		thread_offsetof (tid)
+MULTIPLE_THREADS_THREAD_OFFSET	thread_offsetof (header.multiple_threads)