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)