From cb1bf2f321b45a06447133b3db00621b7300c456 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 2 Nov 2015 12:39:28 -0500 Subject: properly access mcontext_t program counter in cancellation handler using the actual mcontext_t definition rather than an overlaid pointer array both improves correctness/readability and eliminates some ugly hacks for archs with 64-bit registers bit 32-bit program counter. also fix UB due to comparison of pointers not in a common array object. --- arch/or1k/pthread_arch.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'arch/or1k/pthread_arch.h') diff --git a/arch/or1k/pthread_arch.h b/arch/or1k/pthread_arch.h index ad631694..7decd769 100644 --- a/arch/or1k/pthread_arch.h +++ b/arch/or1k/pthread_arch.h @@ -14,5 +14,4 @@ static inline struct pthread *__pthread_self() #define TLS_ABOVE_TP #define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread)) -/* word-offset to 'pc' in mcontext_t */ -#define CANCEL_REG_IP 32 +#define MC_PC regs.pc -- cgit v1.2.1