[PATCH1/3] include/winternl: Add Logical Processor Information to SYSTEM_CPU_INFORMATION
rm at eightyfive.net
Sat Oct 2 08:41:04 CDT 2010
On Saturday 02 October 2010 15:15:48 Dmitry Timoshkov wrote:
> Rudolf Mayerhofer <rm at eightyfive.net> wrote:
> > This is used in NTDLL and Kernel32 to provide an Implementation for
> > kernel32's GetLogicalProcessorInformation().
> Are the additions to the structures your own invention?
Yes, as SystemClass 0x01 and struct SYSTEM_CPU_INFORMATION seem to be Wine-
only (I could not find anything related to that on MSDN and Googling it brings
just references to Wine up). So it seems this struct was added for internal
use in Wine (wineboot to be exact).
Using NtQuerySystemInfo for Class SystemCpuInformation seemed logical for use
because Logical Processor Information is related to CPU Information and also
because GetLogicalProcessorInformation needs to know if the processor is
Hyperthreading capable (which is found in Element FeatureSet) to set a flag.
As stated above the struct seems to be wine-internal anyway, so i simply added
the missing elements for Cores, Processor Packages, Numa Nodes and Cache
After that was done. The only things left to do were (Patches 2 and 3):
- Implementing GetLogicalProcessorInformation() in kernel32/process.c with
- Adding the parser for SysFS Information to fill_cpu_info() in ntdll/nt.c
(which already parses /proc/cpuinfo for the data in struct
More information about the wine-devel