deduplicate __pthread_self thread pointer adjustment out of each arch
[musl] / arch / microblaze / pthread_arch.h
index c327f4e..ff26624 100644 (file)
@@ -1,8 +1,8 @@
-static inline struct pthread *__pthread_self()
+static inline uintptr_t __get_tp()
 {
-       struct pthread *self;
-       __asm__ ("ori %0, r21, 0" : "=r" (self) );
-       return self;
+       uintptr_t tp;
+       __asm__ ("ori %0, r21, 0" : "=r" (tp) );
+       return tp;
 }
 
 #define MC_PC regs.pc