This is the mail archive of the pthreads-win32@sources.redhat.com mailing list for the pthreas-win32 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

WinXP AMD64 port


Hi, all.

I attached a patch for WinXP AMD64 port for current CVS.

To commiter, can you check in?


-- Makoto Kato
 http://oldskool.jp/mozilla64/
 http://raven2000.hp.infoseek.co.jp/
Index: pthread.h
===================================================================
RCS file: /cvs/pthreads-win32/pthreads/pthread.h,v
retrieving revision 1.109
diff -u -r1.109 pthread.h
--- pthread.h	15 Oct 2003 03:02:29 -0000	1.109
+++ pthread.h	5 May 2004 07:07:58 -0000
@@ -155,6 +155,13 @@
 
 #ifdef PTW32_INCLUDE_WINDOWS_H
 #include <windows.h>
+
+#if _MSC_VER < 1300
+/*
+ * VC++6.0 or early compiler's header has no DWORD_PTR type.
+ */
+typedef unsigned long DWORD_PTR;
+#endif
 #endif
 
 /*
Index: pthread_cancel.c
===================================================================
RCS file: /cvs/pthreads-win32/pthreads/pthread_cancel.c,v
retrieving revision 1.3
diff -u -r1.3 pthread_cancel.c
--- pthread_cancel.c	19 Aug 2003 03:31:51 -0000	1.3
+++ pthread_cancel.c	5 May 2004 07:07:59 -0000
@@ -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 @@
               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);
Index: ptw32_getprocessors.c
===================================================================
RCS file: /cvs/pthreads-win32/pthreads/ptw32_getprocessors.c,v
retrieving revision 1.2
diff -u -r1.2 ptw32_getprocessors.c
--- ptw32_getprocessors.c	19 Aug 2003 03:31:51 -0000	1.2
+++ ptw32_getprocessors.c	5 May 2004 07:07:59 -0000
@@ -55,15 +55,15 @@
 int
 ptw32_getprocessors(int * count)
 {
-  DWORD vProcessCPUs;
-  DWORD vSystemCPUs;
+  DWORD_PTR vProcessCPUs;
+  DWORD_PTR vSystemCPUs;
   int result = 0;
 
   if (GetProcessAffinityMask(GetCurrentProcess(),
 			     &vProcessCPUs,
 			     &vSystemCPUs))
     {
-      DWORD bit;
+      DWORD_PTR bit;
       int CPUs = 0;
 
       for (bit = 1; bit != 0; bit <<= 1)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]