tcb-offsets.sym 513 B

12345678910111213141516171819
  1. #include <sysdep.h>
  2. #include <tls.h>
  3. -- This line separates the #include lines from conditionals.
  4. # ifdef __UCLIBC_HAS_TLS__
  5. -- Abuse tls.h macros to derive offsets relative to the thread register.
  6. # undef __thread_register
  7. # define __thread_register ((void *) 0)
  8. # define thread_offsetof(mem) ((ptrdiff_t) THREAD_SELF + offsetof (struct _pthread_descr_struct, p_##mem))
  9. # else
  10. # define thread_offsetof(mem) offsetof (tcbhead_t, mem)
  11. # endif
  12. MULTIPLE_THREADS_OFFSET thread_offsetof (multiple_threads)