properly access mcontext_t program counter in cancellation handler
[oweals/musl.git] / arch / powerpc / pthread_arch.h
index bb7405d112d7f4244afbccbd15a459e2ce5fddb7..7c5c4fadb2116382e4a3a15a8e2a7adbaa95bb06 100644 (file)
@@ -15,9 +15,8 @@ static inline struct pthread *__pthread_self()
 
 #define DTP_OFFSET 0x8000
 
-// offset of the PC register in mcontext_t, divided by the system wordsize
 // the kernel calls the ip "nip", it's the first saved value after the 32
 // GPRs.
-#define CANCEL_REG_IP 32
+#define MC_PC gregs[32]
 
 #define CANARY canary_at_end