fix error cases in gethostbyaddr_r
[musl] / arch / aarch64 / pthread_arch.h
index e8499d8..3909616 100644 (file)
@@ -1,12 +1,11 @@
-static inline struct pthread *__pthread_self()
+static inline uintptr_t __get_tp()
 {
-       char *self;
-       __asm__ __volatile__ ("mrs %0,tpidr_el0" : "=r"(self));
-       return (void*)(self - sizeof(struct pthread));
+       uintptr_t tp;
+       __asm__ ("mrs %0,tpidr_el0" : "=r"(tp));
+       return tp;
 }
 
 #define TLS_ABOVE_TP
 #define GAP_ABOVE_TP 16
-#define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread))
 
 #define MC_PC pc