Commit 935a406b authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent c0827c7a
......@@ -681,7 +681,7 @@ VOID WINAPI GetSystemInfo(
valSize = sizeof(int);
if (sysctlbyname ("hw.activecpu", &value, &valSize, NULL, 0) == 0)
cachedsi.dwActiveProcessorMask = (1 << value) - 1;
cachedsi.dwActiveProcessorMask = ((ULONG_PTR)1 << value) - 1;
valSize = sizeof(int);
if (sysctlbyname ("hw.cputype", &cputype, &valSize, NULL, 0) == 0)
......@@ -780,12 +780,12 @@ VOID WINAPI GetSystemInfo(
FIXME("not yet supported on this system\n");
#endif
if (!cachedsi.dwActiveProcessorMask)
cachedsi.dwActiveProcessorMask = (1 << cachedsi.dwNumberOfProcessors) - 1;
cachedsi.dwActiveProcessorMask = ((ULONG_PTR)1 << cachedsi.dwNumberOfProcessors) - 1;
*si = cachedsi;
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->lpMinimumApplicationAddress, si->lpMaximumApplicationAddress,
si->dwActiveProcessorMask, si->dwNumberOfProcessors, si->dwProcessorType,
......
......@@ -776,7 +776,7 @@ typedef struct _SYSTEM_INFO
DWORD dwPageSize;
LPVOID lpMinimumApplicationAddress;
LPVOID lpMaximumApplicationAddress;
DWORD dwActiveProcessorMask;
DWORD_PTR dwActiveProcessorMask;
DWORD dwNumberOfProcessors;
DWORD dwProcessorType;
DWORD dwAllocationGranularity;
......
......@@ -540,7 +540,12 @@ typedef DWORD FLONG;
#define PROCESSOR_ARM920 2336 /* 0x920 */
#define PROCESSOR_ARM_7TDMI 70001
#ifdef _WIN64
#define MAXIMUM_PROCESSORS 64
#else
#define MAXIMUM_PROCESSORS 32
#endif
typedef struct _MEMORY_BASIC_INFORMATION
{
LPVOID BaseAddress;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment