tcb-offsets.sym 513 B

12345678910111213
  1. #include <sysdep.h>
  2. #include <tls.h>
  3. --
  4. -- Abuse tls.h macros to derive offsets relative to the thread register.
  5. -- # define __builtin_thread_pointer() ((void *) 0)
  6. -- # define thread_offsetof(mem) ((void *) &THREAD_SELF->mem - (void *) 0)
  7. -- Ho hum, this doesn't work in gcc4, so Know Things about THREAD_SELF
  8. #define thread_offsetof(mem) (long)(offsetof(struct pthread, mem) - sizeof(struct pthread))
  9. MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)
  10. TID_OFFSET thread_offsetof (tid)