summaryrefslogtreecommitdiff
path: root/pthread_cancel.c
diff options
context:
space:
mode:
authorrpj <rpj>2004-05-06 00:55:13 +0000
committerrpj <rpj>2004-05-06 00:55:13 +0000
commit78b1607406fe42603b8aedd7642d1e4f944ee810 (patch)
tree752d8558e70c5590fe02a0cd35808aa75312082a /pthread_cancel.c
parent87441bbe5d3dae5e60f8ccf398aa2e17c1ad7b7a (diff)
''
Diffstat (limited to 'pthread_cancel.c')
-rw-r--r--pthread_cancel.c6
1 files changed, 5 insertions, 1 deletions
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);