mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
kernel32-Processor_Group: Remove patch 0001.
This has no effect now other than to return ERROR_INVALID_PARAMETER in some cases, which is not really more correct.
This commit is contained in:
parent
b582d2d018
commit
e353590528
@ -1,85 +0,0 @@
|
||||
From 6411e2db0852c46aeb6d228a52d4a32e12a6aaaa Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 4 Feb 2017 16:20:37 +0100
|
||||
Subject: [PATCH] kernel32: Implement some processor group functions.
|
||||
|
||||
---
|
||||
dlls/kernel32/process.c | 14 ++++++++++----
|
||||
dlls/kernel32/tests/process.c | 21 +++++++++++++++++++++
|
||||
2 files changed, 31 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
|
||||
index f07a997bea3..dcaf898e32b 100644
|
||||
--- a/dlls/kernel32/process.c
|
||||
+++ b/dlls/kernel32/process.c
|
||||
@@ -609,7 +609,9 @@ HRESULT WINAPI RegisterApplicationRecoveryCallback(APPLICATION_RECOVERY_CALLBACK
|
||||
*/
|
||||
WORD WINAPI GetActiveProcessorGroupCount(void)
|
||||
{
|
||||
- FIXME("semi-stub, always returning 1\n");
|
||||
+ TRACE("()\n");
|
||||
+
|
||||
+ /* systems with less than 64 logical processors only have group 0 */
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -618,10 +620,14 @@ WORD WINAPI GetActiveProcessorGroupCount(void)
|
||||
*/
|
||||
DWORD WINAPI GetActiveProcessorCount(WORD group)
|
||||
{
|
||||
- DWORD cpus = system_info.NumberOfProcessors;
|
||||
+ TRACE("(%u)\n", group);
|
||||
|
||||
- FIXME("semi-stub, returning %u\n", cpus);
|
||||
- return cpus;
|
||||
+ if (group && group != ALL_PROCESSOR_GROUPS)
|
||||
+ {
|
||||
+ SetLastError(ERROR_INVALID_PARAMETER);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ return system_info.NumberOfProcessors;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c
|
||||
index 433c12ff1fb..5049265684f 100644
|
||||
--- a/dlls/kernel32/tests/process.c
|
||||
+++ b/dlls/kernel32/tests/process.c
|
||||
@@ -4297,6 +4297,26 @@ static void test_dead_process(void)
|
||||
CloseHandle(pi.hThread);
|
||||
}
|
||||
|
||||
+static void test_GetActiveProcessorCount(void)
|
||||
+{
|
||||
+ DWORD count;
|
||||
+
|
||||
+ if (!pGetActiveProcessorCount)
|
||||
+ {
|
||||
+ win_skip("GetActiveProcessorCount not available, skipping test\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ count = pGetActiveProcessorCount(0);
|
||||
+ ok(count, "GetActiveProcessorCount failed, error %u\n", GetLastError());
|
||||
+
|
||||
+ /* Test would fail on systems with more than 6400 processors */
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ count = pGetActiveProcessorCount(101);
|
||||
+ ok(count == 0, "Expeced GetActiveProcessorCount to fail\n");
|
||||
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
|
||||
+}
|
||||
+
|
||||
START_TEST(process)
|
||||
{
|
||||
HANDLE job, hproc, h, h2;
|
||||
@@ -4414,6 +4434,7 @@ START_TEST(process)
|
||||
test_session_info();
|
||||
test_GetLogicalProcessorInformationEx();
|
||||
test_GetSystemCpuSetInformation();
|
||||
+ test_GetActiveProcessorCount();
|
||||
test_largepages();
|
||||
test_ProcThreadAttributeList();
|
||||
test_SuspendProcessState();
|
||||
--
|
||||
2.30.2
|
||||
|
@ -1,2 +1 @@
|
||||
Fixes: Implement some processor group functions and SetThreadIdealProcessorEx
|
||||
Depends: api-ms-win-Stub_DLLs
|
||||
|
@ -1438,13 +1438,6 @@ if test "$enable_ntdll_WRITECOPY" -eq 1; then
|
||||
enable_ntdll_ForceBottomUpAlloc=1
|
||||
fi
|
||||
|
||||
if test "$enable_kernel32_Processor_Group" -eq 1; then
|
||||
if test "$enable_api_ms_win_Stub_DLLs" -gt 1; then
|
||||
abort "Patchset api-ms-win-Stub_DLLs disabled, but kernel32-Processor_Group depends on that."
|
||||
fi
|
||||
enable_api_ms_win_Stub_DLLs=1
|
||||
fi
|
||||
|
||||
if test "$enable_kernel32_CopyFileEx" -eq 1; then
|
||||
if test "$enable_ntdll_FileDispositionInformation" -gt 1; then
|
||||
abort "Patchset ntdll-FileDispositionInformation disabled, but kernel32-CopyFileEx depends on that."
|
||||
@ -2649,14 +2642,10 @@ fi
|
||||
|
||||
# Patchset kernel32-Processor_Group
|
||||
# |
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
# | * api-ms-win-Stub_DLLs
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/kernel32/process.c, dlls/kernel32/tests/process.c, dlls/kernelbase/thread.c
|
||||
# | * dlls/kernelbase/thread.c
|
||||
# |
|
||||
if test "$enable_kernel32_Processor_Group" -eq 1; then
|
||||
patch_apply kernel32-Processor_Group/0001-kernel32-Implement-some-processor-group-functions.patch
|
||||
patch_apply kernel32-Processor_Group/0002-kernel32-Add-stub-for-SetThreadIdealProcessorEx.patch
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user