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