tcb-offsets.sym 627 B

1234567891011121314151617181920
  1. #include <sysdep.h>
  2. #include <tls.h>
  3. --
  4. -- Abuse tls.h macros to derive offsets relative to the thread register.
  5. # undef __thread_register
  6. # define __thread_register ((void *) 0)
  7. # define thread_offsetof(mem) ((ptrdiff_t) THREAD_SELF + offsetof (struct pthread, mem))
  8. #if TLS_MULTIPLE_THREADS_IN_TCB
  9. MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)
  10. #endif
  11. PID thread_offsetof (pid)
  12. TID thread_offsetof (tid)
  13. POINTER_GUARD (offsetof (tcbhead_t, pointer_guard) - TLS_TCB_OFFSET - sizeof (tcbhead_t))
  14. #ifndef __ASSUME_PRIVATE_FUTEX
  15. PRIVATE_FUTEX_OFFSET thread_offsetof (header.private_futex)
  16. #endif