From e64ac02c24b43659048622714afdc92fedf561fa Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sun, 1 Jul 2012 13:06:41 +0000 Subject: Move all files into ports/ subdirectory in preparation for merge with glibc --- ports/sysdeps/alpha/nptl/tcb-offsets.sym | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 ports/sysdeps/alpha/nptl/tcb-offsets.sym (limited to 'ports/sysdeps/alpha/nptl/tcb-offsets.sym') diff --git a/ports/sysdeps/alpha/nptl/tcb-offsets.sym b/ports/sysdeps/alpha/nptl/tcb-offsets.sym new file mode 100644 index 0000000000..c21a791040 --- /dev/null +++ b/ports/sysdeps/alpha/nptl/tcb-offsets.sym @@ -0,0 +1,14 @@ +#include +#include + +-- + +-- Abuse tls.h macros to derive offsets relative to the thread register. +-- # define __builtin_thread_pointer() ((void *) 0) +-- # define thread_offsetof(mem) ((void *) &THREAD_SELF->mem - (void *) 0) +-- Ho hum, this doesn't work in gcc4, so Know Things about THREAD_SELF +#define thread_offsetof(mem) (long)(offsetof(struct pthread, mem) - sizeof(struct pthread)) + +MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads) +PID_OFFSET thread_offsetof (pid) +TID_OFFSET thread_offsetof (tid) -- cgit v1.2.3