include: Fix data structures for processor affinity on 64-bit.

This commit is contained in:
Alexandre Julliard 2009-01-04 14:10:20 +01:00
parent c0827c7a67
commit 935a406b27
3 changed files with 9 additions and 4 deletions

View File

@ -681,7 +681,7 @@ VOID WINAPI GetSystemInfo(
valSize = sizeof(int); valSize = sizeof(int);
if (sysctlbyname ("hw.activecpu", &value, &valSize, NULL, 0) == 0) if (sysctlbyname ("hw.activecpu", &value, &valSize, NULL, 0) == 0)
cachedsi.dwActiveProcessorMask = (1 << value) - 1; cachedsi.dwActiveProcessorMask = ((ULONG_PTR)1 << value) - 1;
valSize = sizeof(int); valSize = sizeof(int);
if (sysctlbyname ("hw.cputype", &cputype, &valSize, NULL, 0) == 0) if (sysctlbyname ("hw.cputype", &cputype, &valSize, NULL, 0) == 0)
@ -780,12 +780,12 @@ VOID WINAPI GetSystemInfo(
FIXME("not yet supported on this system\n"); FIXME("not yet supported on this system\n");
#endif #endif
if (!cachedsi.dwActiveProcessorMask) if (!cachedsi.dwActiveProcessorMask)
cachedsi.dwActiveProcessorMask = (1 << cachedsi.dwNumberOfProcessors) - 1; cachedsi.dwActiveProcessorMask = ((ULONG_PTR)1 << cachedsi.dwNumberOfProcessors) - 1;
*si = cachedsi; *si = cachedsi;
TRACE("<- CPU arch %d, res'd %d, pagesize %d, minappaddr %p, maxappaddr %p," TRACE("<- CPU arch %d, res'd %d, pagesize %d, minappaddr %p, maxappaddr %p,"
" act.cpumask %08x, numcpus %d, CPU type %d, allocgran. %d, CPU level %d, CPU rev %d\n", " act.cpumask %lx, numcpus %d, CPU type %d, allocgran. %d, CPU level %d, CPU rev %d\n",
si->u.s.wProcessorArchitecture, si->u.s.wReserved, si->dwPageSize, si->u.s.wProcessorArchitecture, si->u.s.wReserved, si->dwPageSize,
si->lpMinimumApplicationAddress, si->lpMaximumApplicationAddress, si->lpMinimumApplicationAddress, si->lpMaximumApplicationAddress,
si->dwActiveProcessorMask, si->dwNumberOfProcessors, si->dwProcessorType, si->dwActiveProcessorMask, si->dwNumberOfProcessors, si->dwProcessorType,

View File

@ -776,7 +776,7 @@ typedef struct _SYSTEM_INFO
DWORD dwPageSize; DWORD dwPageSize;
LPVOID lpMinimumApplicationAddress; LPVOID lpMinimumApplicationAddress;
LPVOID lpMaximumApplicationAddress; LPVOID lpMaximumApplicationAddress;
DWORD dwActiveProcessorMask; DWORD_PTR dwActiveProcessorMask;
DWORD dwNumberOfProcessors; DWORD dwNumberOfProcessors;
DWORD dwProcessorType; DWORD dwProcessorType;
DWORD dwAllocationGranularity; DWORD dwAllocationGranularity;

View File

@ -540,7 +540,12 @@ typedef DWORD FLONG;
#define PROCESSOR_ARM920 2336 /* 0x920 */ #define PROCESSOR_ARM920 2336 /* 0x920 */
#define PROCESSOR_ARM_7TDMI 70001 #define PROCESSOR_ARM_7TDMI 70001
#ifdef _WIN64
#define MAXIMUM_PROCESSORS 64
#else
#define MAXIMUM_PROCESSORS 32 #define MAXIMUM_PROCESSORS 32
#endif
typedef struct _MEMORY_BASIC_INFORMATION typedef struct _MEMORY_BASIC_INFORMATION
{ {
LPVOID BaseAddress; LPVOID BaseAddress;