1#include <sysdep.h>
2#include <tls.h>
3#include <kernel-features.h>
4
5--
6
7-- Abuse tls.h macros to derive offsets relative to the thread register.
8# undef __thread_register
9# define __thread_register	((void *) 0)
10# define thread_offsetof(mem)	((ptrdiff_t) THREAD_SELF + offsetof (struct pthread, mem))
11
12
13#if TLS_MULTIPLE_THREADS_IN_TCB
14MULTIPLE_THREADS_OFFSET		thread_offsetof (header.multiple_threads)
15#endif
16TID				thread_offsetof (tid)
17POINTER_GUARD			(offsetof (tcbhead_t, pointer_guard) - TLS_TCB_OFFSET - sizeof (tcbhead_t))
18TAR_SAVE			(offsetof (tcbhead_t, tar_save) - TLS_TCB_OFFSET - sizeof (tcbhead_t))
19DSO_SLOT1			(offsetof (tcbhead_t, dso_slot1) - TLS_TCB_OFFSET - sizeof (tcbhead_t))
20DSO_SLOT2			(offsetof (tcbhead_t, dso_slot2) - TLS_TCB_OFFSET - sizeof (tcbhead_t))
21#ifdef __powerpc64__
22TCB_AT_PLATFORM			(offsetof (tcbhead_t, at_platform) - TLS_TCB_OFFSET - sizeof(tcbhead_t))
23#endif
24#ifndef __powerpc64__
25TCB_AT_PLATFORM			(offsetof (tcbhead_t, at_platform) - TLS_TCB_OFFSET - sizeof(tcbhead_t))
26PADDING				(offsetof (tcbhead_t, padding) - TLS_TCB_OFFSET - sizeof(tcbhead_t))
27#endif
28TCB_HWCAP			(offsetof (tcbhead_t, hwcap) - TLS_TCB_OFFSET - sizeof (tcbhead_t))
29