1 #if ((__ARM_ARCH_6K__ || __ARM_ARCH_6ZK__) && !__thumb__) \
2 || __ARM_ARCH_7A__ || __ARM_ARCH_7R__ || __ARM_ARCH >= 7
4 static inline __attribute__((const)) pthread_t __pthread_self()
7 __asm__( "mrc p15,0,%0,c13,c0,3" : "=r"(p) );
8 return (void *)(p+8-sizeof(struct pthread));
13 static inline __attribute__((const)) pthread_t __pthread_self()
17 __asm__( "bl __a_gettp\n\tmov %0,r0" : "=r"(p) : : "cc", "r0", "lr" );
19 register char *p __asm__("r0");
20 __asm__( "bl __a_gettp" : "=r"(p) : : "cc", "lr" );
22 return (void *)(p+8-sizeof(struct pthread));
28 #define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread) - 8)
30 #define CANCEL_REG_IP 18