]> git.proxmox.com Git - wasi-libc.git/blobdiff - libc-top-half/musl/arch/riscv64/pthread_arch.h
Update to musl 1.2.2.
[wasi-libc.git] / libc-top-half / musl / arch / riscv64 / pthread_arch.h
index db414b170281af8f29d9fbbd1d65d1145ad7bd7f..a20d7fba0d942ab944ba1b651229f3aafde07feb 100644 (file)
@@ -1,13 +1,12 @@
-static inline struct pthread *__pthread_self()
+static inline uintptr_t __get_tp()
 {
-       char *tp;
+       uintptr_t tp;
        __asm__ __volatile__("mv %0, tp" : "=r"(tp));
-       return (void *)(tp - sizeof(struct pthread));
+       return tp;
 }
 
 #define TLS_ABOVE_TP
 #define GAP_ABOVE_TP 0
-#define TP_ADJ(p) ((char *)p + sizeof(struct pthread))
 
 #define DTP_OFFSET 0x800