From 5a1530d636fd80dc76742af6fe48fe43693ffe95 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Sun, 18 Feb 2024 18:28:06 -0600 Subject: [PATCH] kernel32-Processor_Group: Remove patch. This seems to be another one of those cases where Sebastian added a patch for an application [1], then never submitted the patch upstream, and then someone else submitted a different patch upstream [2], but Sebastian didn't bother checking if his version was actually still necessary, and instead assumed it was (or just decided it was better) and rebased the patch [3], and of course still never submitted it upstream. In this case the patch is for Terragen 4. That application does not, according to my testing, actually depend on success from SetThreadIdealProcessorEx(). The patch does not add a correct implementation, is trivial to recreate, and is easy to re-debug (the function still prints a FIXME), so it's not adding any value. Remove it. [1] https://gitlab.winehq.org/wine/wine-staging/-/commit/a12dca03ce2c24baf73d296e0d391fd0a67842db [2] https://source.winehq.org/git/wine.git/commitdiff/980754bff773402efb52457b4536368900f3a1a3 [3] https://gitlab.winehq.org/wine/wine-staging/-/commit/0c46d1e8a20f3d85ad9e3f91b7b71a67fc10377b --- ...d-stub-for-SetThreadIdealProcessorEx.patch | 46 ------------------- patches/kernel32-Processor_Group/definition | 1 - 2 files changed, 47 deletions(-) delete mode 100644 patches/kernel32-Processor_Group/0002-kernel32-Add-stub-for-SetThreadIdealProcessorEx.patch delete mode 100644 patches/kernel32-Processor_Group/definition diff --git a/patches/kernel32-Processor_Group/0002-kernel32-Add-stub-for-SetThreadIdealProcessorEx.patch b/patches/kernel32-Processor_Group/0002-kernel32-Add-stub-for-SetThreadIdealProcessorEx.patch deleted file mode 100644 index f423420a..00000000 --- a/patches/kernel32-Processor_Group/0002-kernel32-Add-stub-for-SetThreadIdealProcessorEx.patch +++ /dev/null @@ -1,46 +0,0 @@ -From b23c9ccff82d2262c48ae2a32ab642cc6ba07556 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -Date: Sat, 4 Feb 2017 16:31:59 +0100 -Subject: [PATCH] kernel32: Add stub for SetThreadIdealProcessorEx. - ---- - dlls/kernelbase/thread.c | 21 +++++++++++++++++---- - 1 file changed, 17 insertions(+), 4 deletions(-) - -diff --git a/dlls/kernelbase/thread.c b/dlls/kernelbase/thread.c -index cf8e6be2b..d775b3c0e 100644 ---- a/dlls/kernelbase/thread.c -+++ b/dlls/kernelbase/thread.c -@@ -437,12 +437,25 @@ DWORD WINAPI DECLSPEC_HOTPATCH SetThreadIdealProcessor( HANDLE thread, DWORD pro - /*********************************************************************** - * SetThreadIdealProcessorEx (kernelbase.@) - */ --BOOL WINAPI DECLSPEC_HOTPATCH SetThreadIdealProcessorEx( HANDLE thread, PROCESSOR_NUMBER *ideal, -+BOOL WINAPI DECLSPEC_HOTPATCH SetThreadIdealProcessorEx( HANDLE thread, PROCESSOR_NUMBER *processor, - PROCESSOR_NUMBER *previous ) - { -- FIXME( "(%p %p %p): stub\n", thread, ideal, previous ); -- SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); -- return FALSE; -+ FIXME("(%p, %p, %p): stub\n", thread, processor, previous); -+ -+ if (!processor || processor->Group > 0 || processor->Number > MAXIMUM_PROCESSORS) -+ { -+ SetLastError(ERROR_INVALID_PARAMETER); -+ return FALSE; -+ } -+ -+ if (previous) -+ { -+ previous->Group = 0; -+ previous->Number = 0; -+ previous->Reserved = 0; -+ } -+ -+ return TRUE; - } - - --- -2.22.0 - diff --git a/patches/kernel32-Processor_Group/definition b/patches/kernel32-Processor_Group/definition deleted file mode 100644 index 27b27991..00000000 --- a/patches/kernel32-Processor_Group/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: Implement some processor group functions and SetThreadIdealProcessorEx