about summary refs log tree commit diff
path: root/arch/sh/pthread_arch.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/pthread_arch.h')
-rw-r--r--arch/sh/pthread_arch.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/sh/pthread_arch.h b/arch/sh/pthread_arch.h
index c2252908..0fcf70d2 100644
--- a/arch/sh/pthread_arch.h
+++ b/arch/sh/pthread_arch.h
@@ -1,8 +1,8 @@
-static inline struct pthread *__pthread_self()
+static inline uintptr_t __get_tp()
 {
-	char *self;
-	__asm__ ("stc gbr,%0" : "=r" (self) );
-	return (struct pthread *) (self - sizeof(struct pthread));
+	uintptr_t tp;
+	__asm__ ("stc gbr,%0" : "=r" (tp) );
+	return tp;
 }
 
 #define TLS_ABOVE_TP