Alex Henrie : kernel32: Reimplement GetMaximumProcessorGroupCount on top of GetLogicalProcessorInformationEx.
Alexandre Julliard
julliard at winehq.org
Tue May 25 16:08:17 CDT 2021
Module: wine
Branch: master
Commit: 8ddff3f51faca2c0824e204a69f69e241fb93d15
URL: https://source.winehq.org/git/wine.git/?a=commit;h=8ddff3f51faca2c0824e204a69f69e241fb93d15
Author: Alex Henrie <alexhenrie24 at gmail.com>
Date: Mon May 24 02:10:44 2021 -0600
kernel32: Reimplement GetMaximumProcessorGroupCount on top of GetLogicalProcessorInformationEx.
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/kernel32/process.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index 6de094950e3..aa0922f5164 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -702,8 +702,24 @@ DWORD WINAPI GetMaximumProcessorCount(WORD group)
*/
WORD WINAPI GetMaximumProcessorGroupCount(void)
{
- FIXME("semi-stub, always returning 1\n");
- return 1;
+ WORD groups;
+ DWORD size = 0;
+ SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX *info;
+
+ TRACE("()\n");
+
+ if (!GetLogicalProcessorInformationEx(RelationGroup, NULL, &size)) return 0;
+ if (!(info = HeapAlloc(GetProcessHeap(), 0, size))) return 0;
+ if (!GetLogicalProcessorInformationEx(RelationGroup, info, &size))
+ {
+ HeapFree(GetProcessHeap(), 0, info);
+ return 0;
+ }
+
+ groups = info->Group.MaximumGroupCount;
+
+ HeapFree(GetProcessHeap(), 0, info);
+ return groups;
}
/***********************************************************************
More information about the wine-cvs
mailing list