2003-03-17 11:22:52 +00:00
|
|
|
#include <sysdep.h>
|
|
|
|
#include <tls.h>
|
|
|
|
|
2003-04-25 22:28:13 +00:00
|
|
|
--
|
|
|
|
|
|
|
|
-- Abuse tls.h macros to derive offsets relative to the thread register.
|
|
|
|
# undef __thread_register
|
|
|
|
# define __thread_register ((void *) 0)
|
2005-02-14 22:44:25 +00:00
|
|
|
# define thread_offsetof(mem) ((ptrdiff_t) THREAD_SELF + offsetof (struct pthread, mem))
|
|
|
|
|
2003-04-25 22:28:13 +00:00
|
|
|
|
|
|
|
#if TLS_MULTIPLE_THREADS_IN_TCB
|
|
|
|
MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)
|
|
|
|
#endif
|
2004-03-10 23:14:28 +00:00
|
|
|
PID thread_offsetof (pid)
|
2004-12-15 07:04:50 +00:00
|
|
|
TID thread_offsetof (tid)
|
2005-12-20 07:21:59 +00:00
|
|
|
POINTER_GUARD (offsetof (tcbhead_t, pointer_guard) - TLS_TCB_OFFSET - sizeof (tcbhead_t))
|
2013-12-11 18:10:35 +00:00
|
|
|
TAR_SAVE (offsetof (tcbhead_t, tar_save) - TLS_TCB_OFFSET - sizeof (tcbhead_t))
|
|
|
|
DSO_SLOT1 (offsetof (tcbhead_t, dso_slot1) - TLS_TCB_OFFSET - sizeof (tcbhead_t))
|
|
|
|
DSO_SLOT2 (offsetof (tcbhead_t, dso_slot2) - TLS_TCB_OFFSET - sizeof (tcbhead_t))
|
2008-07-26 16:32:59 +00:00
|
|
|
#ifndef __ASSUME_PRIVATE_FUTEX
|
2007-05-26 20:13:27 +00:00
|
|
|
PRIVATE_FUTEX_OFFSET thread_offsetof (header.private_futex)
|
2008-07-26 16:32:59 +00:00
|
|
|
#endif
|