2.9
[glibc/nacl-glibc.git] / nptl / sysdeps / alpha / tcb-offsets.sym
blobc21a791040672f35b22887fc2b53232311d2636f
1 #include <sysdep.h>
2 #include <tls.h>
4 --
6 -- Abuse tls.h macros to derive offsets relative to the thread register.
7 -- # define __builtin_thread_pointer()  ((void *) 0)
8 -- # define thread_offsetof(mem)     ((void *) &THREAD_SELF->mem - (void *) 0)
9 -- Ho hum, this doesn't work in gcc4, so Know Things about THREAD_SELF
10 #define thread_offsetof(mem)    (long)(offsetof(struct pthread, mem) - sizeof(struct pthread))
12 MULTIPLE_THREADS_OFFSET         thread_offsetof (header.multiple_threads)
13 PID_OFFSET                      thread_offsetof (pid)
14 TID_OFFSET                      thread_offsetof (tid)