Eric Pouech : ntdll: In SYSTEM_BASIC_INFORMATION, the active processors field refers to the affinity mask.
Alexandre Julliard
julliard at winehq.org
Tue Sep 22 13:55:59 CDT 2009
Module: wine
Branch: master
Commit: f6ceedf6dd17d2255072bc3bef0b210ccdf11725
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f6ceedf6dd17d2255072bc3bef0b210ccdf11725
Author: Eric Pouech <eric.pouech at orange.fr>
Date: Tue Sep 15 21:37:55 2009 +0200
ntdll: In SYSTEM_BASIC_INFORMATION, the active processors field refers to the affinity mask.
---
dlls/kernel32/cpu.c | 2 +-
dlls/ntdll/virtual.c | 2 +-
include/winternl.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/kernel32/cpu.c b/dlls/kernel32/cpu.c
index 6648dc4..800828a 100644
--- a/dlls/kernel32/cpu.c
+++ b/dlls/kernel32/cpu.c
@@ -382,7 +382,7 @@ VOID WINAPI GetSystemInfo(
cachedsi.dwPageSize = sbi.PageSize;
cachedsi.lpMinimumApplicationAddress = sbi.LowestUserAddress;
cachedsi.lpMaximumApplicationAddress = sbi.HighestUserAddress;
- cachedsi.dwNumberOfProcessors = sbi.ActiveProcessors;
+ cachedsi.dwNumberOfProcessors = sbi.NumberOfProcessors;
cachedsi.dwAllocationGranularity = sbi.AllocationGranularity;
/* choose sensible defaults ...
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index dc9559e..fe2ef26 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -1380,7 +1380,7 @@ void virtual_get_system_info( SYSTEM_BASIC_INFORMATION *info )
info->AllocationGranularity = get_mask(0) + 1;
info->LowestUserAddress = (void *)0x10000;
info->HighestUserAddress = (char *)user_space_limit - 1;
- info->ActiveProcessors = NtCurrentTeb()->Peb->NumberOfProcessors;
+ info->ActiveProcessorsAffinityMask = (1 << NtCurrentTeb()->Peb->NumberOfProcessors) - 1;
info->NumberOfProcessors = NtCurrentTeb()->Peb->NumberOfProcessors;
}
diff --git a/include/winternl.h b/include/winternl.h
index 07c778c..d35adea 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -1196,7 +1196,7 @@ typedef struct _SYSTEM_BASIC_INFORMATION {
ULONG_PTR AllocationGranularity;
PVOID LowestUserAddress;
PVOID HighestUserAddress;
- ULONG_PTR ActiveProcessors;
+ ULONG_PTR ActiveProcessorsAffinityMask;
BYTE NumberOfProcessors;
#else
BYTE Reserved1[24];
More information about the wine-cvs
mailing list