* WinXP AMD64 port
@ 2004-05-05 7:13 Makoto Kato
2004-05-06 1:01 ` Ross Johnson
0 siblings, 1 reply; 2+ messages in thread
From: Makoto Kato @ 2004-05-05 7:13 UTC (permalink / raw)
To: pthreads-win32
[-- Attachment #1: Type: text/plain, Size: 184 bytes --]
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/
[-- Attachment #2: pthread.patch --]
[-- Type: text/plain, Size: 2343 bytes --]
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: WinXP AMD64 port
2004-05-05 7:13 WinXP AMD64 port Makoto Kato
@ 2004-05-06 1:01 ` Ross Johnson
0 siblings, 0 replies; 2+ messages in thread
From: Ross Johnson @ 2004-05-06 1:01 UTC (permalink / raw)
To: Makoto Kato; +Cc: pthreads-win32
Makoto's patch is now in CVS.
Ross
Makoto Kato wrote:
>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/
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-05-06 1:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-05 7:13 WinXP AMD64 port Makoto Kato
2004-05-06 1:01 ` Ross Johnson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).