diff options
Diffstat (limited to 'arch/sh/pthread_arch.h')
-rw-r--r-- | arch/sh/pthread_arch.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/sh/pthread_arch.h b/arch/sh/pthread_arch.h index 2756e7ec..41fefacf 100644 --- a/arch/sh/pthread_arch.h +++ b/arch/sh/pthread_arch.h @@ -2,10 +2,11 @@ static inline struct pthread *__pthread_self() { char *self; __asm__ __volatile__ ("stc gbr,%0" : "=r" (self) ); - return (struct pthread *) (self + 8 - sizeof(struct pthread)); + return (struct pthread *) (self - sizeof(struct pthread)); } #define TLS_ABOVE_TP -#define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread) - 8) +#define GAP_ABOVE_TP 8 +#define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread)) #define MC_PC sc_pc |