From 78b1607406fe42603b8aedd7642d1e4f944ee810 Mon Sep 17 00:00:00 2001 From: rpj Date: Thu, 6 May 2004 00:55:13 +0000 Subject: '' --- pthread_cancel.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'pthread_cancel.c') diff --git a/pthread_cancel.c b/pthread_cancel.c index 6f59b30..6af159f 100644 --- a/pthread_cancel.c +++ b/pthread_cancel.c @@ -54,6 +54,10 @@ #define PTW32_PROGCTR(Context) ((Context).Iar) #endif +#if defined(_AMD64_) +#define PTW32_PROGCTR(Context) ((Context).Rip) +#endif + #if !defined(PTW32_PROGCTR) #error Module contains CPU-specific code; modify and recompile. #endif @@ -155,7 +159,7 @@ pthread_cancel (pthread_t thread) thread->cancelState = PTHREAD_CANCEL_DISABLE; context.ContextFlags = CONTEXT_CONTROL; GetThreadContext(threadH, &context); - PTW32_PROGCTR(context) = (DWORD) ptw32_cancel_self; + PTW32_PROGCTR(context) = (DWORD_PTR) ptw32_cancel_self; SetThreadContext(threadH, &context); (void) pthread_mutex_unlock(&thread->cancelLock); ResumeThread(threadH); -- cgit v1.2.3