]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/uclibc/lib/contrib/uclibc/libpthread/nptl/sysdeps/alpha/tcb-offsets.sym
update
[l4.git] / l4 / pkg / uclibc / lib / contrib / uclibc / libpthread / nptl / sysdeps / alpha / tcb-offsets.sym
1 #include <sysdep.h>
2 #include <tls.h>
3
4 --
5
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))
11
12 MULTIPLE_THREADS_OFFSET         thread_offsetof (header.multiple_threads)
13 PID_OFFSET                      thread_offsetof (pid)
14 TID_OFFSET                      thread_offsetof (tid)