Roderick Colenbrander : ntdll: GetLogicalProcessorInformationEx report LTP_PC_SMT for SMT cores.

Alexandre Julliard julliard at winehq.org
Fri Jun 22 18:32:38 CDT 2018


Module: wine
Branch: master
Commit: 13bd1b9f752560083ef16bd9ddd56823bc88309c
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=13bd1b9f752560083ef16bd9ddd56823bc88309c

Author: Roderick Colenbrander <thunderbird2k at gmail.com>
Date:   Wed Jun 20 22:29:45 2018 -0700

ntdll: GetLogicalProcessorInformationEx report LTP_PC_SMT for SMT cores.

Signed-off-by: Roderick Colenbrander <thunderbird2k at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/nt.c | 5 ++++-
 include/winnt.h | 2 ++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 82f1b02..5712e4c 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -1388,7 +1388,10 @@ static inline BOOL logical_proc_info_add_by_id(SYSTEM_LOGICAL_PROCESSOR_INFORMAT
 
         dataex->Relationship = rel;
         dataex->Size = log_proc_ex_size_plus(sizeof(PROCESSOR_RELATIONSHIP));
-        dataex->u.Processor.Flags = 0; /* TODO */
+        if (rel == RelationProcessorCore)
+            dataex->u.Processor.Flags = count_bits(mask) > 1 ? LTP_PC_SMT : 0;
+        else
+            dataex->u.Processor.Flags = 0;
         dataex->u.Processor.EfficiencyClass = 0;
         dataex->u.Processor.GroupCount = 1;
         dataex->u.Processor.GroupMask[0].Mask = mask;
diff --git a/include/winnt.h b/include/winnt.h
index 4492f86..80a2fc3 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -6050,6 +6050,8 @@ typedef enum _LOGICAL_PROCESSOR_RELATIONSHIP
     RelationAll              = 0xffff
 } LOGICAL_PROCESSOR_RELATIONSHIP;
 
+#define LTP_PC_SMT 0x1
+
 typedef enum _PROCESSOR_CACHE_TYPE
 {
     CacheUnified,




More information about the wine-cvs mailing list