From: Makoto Kato <raven@oldskool.jp>
To: pthreads-win32@sources.redhat.com
Subject: WinXP AMD64 port
Date: Wed, 05 May 2004 07:13:00 -0000 [thread overview]
Message-ID: <40989403.8000002@oldskool.jp> (raw)
[-- 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)
next reply other threads:[~2004-05-05 7:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-05 7:13 Makoto Kato [this message]
2004-05-06 1:01 ` Ross Johnson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40989403.8000002@oldskool.jp \
--to=raven@oldskool.jp \
--cc=pthreads-win32@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).