summaryrefslogtreecommitdiff
path: root/arch/or1k
diff options
context:
space:
mode:
Diffstat (limited to 'arch/or1k')
-rw-r--r--arch/or1k/pthread_arch.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/or1k/pthread_arch.h b/arch/or1k/pthread_arch.h
index 76d0a8bc..f75ea7e4 100644
--- a/arch/or1k/pthread_arch.h
+++ b/arch/or1k/pthread_arch.h
@@ -1,14 +1,13 @@
-/* or1k use variant I, but with the twist that tp points to the end of TCB */
-static inline struct pthread *__pthread_self()
+static inline uintptr_t __get_tp()
{
#ifdef __clang__
- char *tp;
+ uintptr_t tp;
__asm__ ("l.ori %0, r10, 0" : "=r" (tp) );
#else
- register char *tp __asm__("r10");
+ register uintptr_t tp __asm__("r10");
__asm__ ("" : "=r" (tp) );
#endif
- return (struct pthread *) (tp - sizeof(struct pthread));
+ return tp;
}
#define TLS_ABOVE_TP