Roderick Colenbrander : ntdll: Fix parsing thread_siblings bitmaps on high core count systems.
Alexandre Julliard
julliard at winehq.org
Tue Dec 4 16:33:55 CST 2018
Module: wine
Branch: master
Commit: b9af36933fdf47cbbe139626e98750da72142dce
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b9af36933fdf47cbbe139626e98750da72142dce
Author: Roderick Colenbrander <thunderbird2k at gmail.com>
Date: Sun Dec 2 22:53:16 2018 -0800
ntdll: Fix parsing thread_siblings bitmaps on high core count systems.
Linux compiled for a high number of CPU cores, the bitmap is broken
into sections of 32-bit by commas. Handle parsing this.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45453
Signed-off-by: Roderick Colenbrander <thunderbird2k at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/nt.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 0e11e0e..db51a98 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -1704,13 +1704,8 @@ static NTSTATUS create_logical_proc_info(SYSTEM_LOGICAL_PROCESSOR_INFORMATION **
/* Mask of logical threads sharing same physical core in kernel core numbering. */
sprintf(name, core_info, i, "thread_siblings");
- f = fopen(name, "r");
- if(f)
- {
- fscanf(f, "%lx", &thread_mask);
- fclose(f);
- }
- else thread_mask = 1<<i;
+ if(!sysfs_parse_bitmap(name, &thread_mask))
+ thread_mask = 1<<i;
if(!logical_proc_info_add_by_id(data, dataex, &len, max_len, RelationProcessorCore, phys_core, thread_mask))
{
fclose(fcpu_list);
More information about the wine-cvs
mailing list