1 #if ((__ARM_ARCH_6K__ || __ARM_ARCH_6KZ__ || __ARM_ARCH_6ZK__) && !__thumb__) \
2 || __ARM_ARCH_7A__ || __ARM_ARCH_7R__ || __ARM_ARCH >= 7
4 static inline pthread_t
__pthread_self()
7 __asm__ ( "mrc p15,0,%0,c13,c0,3" : "=r"(p
) );
8 return (void *)(p
-sizeof(struct pthread
));
13 #if __ARM_ARCH_4__ || __ARM_ARCH_4T__ || __ARM_ARCH == 4
14 #define BLX "mov lr,pc\n\tbx"
19 static inline pthread_t
__pthread_self()
21 extern hidden
uintptr_t __a_gettp_ptr
;
22 register uintptr_t p
__asm__("r0");
23 __asm__ ( BLX
" %1" : "=r"(p
) : "r"(__a_gettp_ptr
) : "cc", "lr" );
24 return (void *)(p
-sizeof(struct pthread
));
30 #define GAP_ABOVE_TP 8
31 #define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread))