From f901156486b8a5f6ecbe2fb2657cda8d70fa449f Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Thu, 8 Aug 2019 20:33:13 -0500 Subject: [PATCH] Rebase against 6e3d68b14120563fd584fe9c5a27885f51e7ae66. --- ...d-stub-for-SetThreadIdealProcessorEx.patch | 54 ++++++------------- patches/patchinstall.sh | 4 +- 2 files changed, 19 insertions(+), 39 deletions(-) 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 index 8fa4a88f..bf7076a7 100644 --- a/patches/kernel32-Processor_Group/0002-kernel32-Add-stub-for-SetThreadIdealProcessorEx.patch +++ b/patches/kernel32-Processor_Group/0002-kernel32-Add-stub-for-SetThreadIdealProcessorEx.patch @@ -1,25 +1,23 @@ -From ac7b880c08822aac4e5241753dc919b7ab0e796e Mon Sep 17 00:00:00 2001 +From 16944e0e4b46d0fb0346937c7d288bfc08abe612 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: kernel32: Add stub for SetThreadIdealProcessorEx. +Subject: [PATCH] kernel32: Add stub for SetThreadIdealProcessorEx. --- - dlls/kernel32/thread.c | 32 ++++++++++++++++++++++---------- - 1 file changed, 22 insertions(+), 10 deletions(-) + dlls/kernelbase/thread.c | 19 ++++++++++++++++--- + 1 file changed, 16 insertions(+), 3 deletions(-) -diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c -index ac2c3687789..499fbe24d09 100644 ---- a/dlls/kernel32/thread.c -+++ b/dlls/kernel32/thread.c -@@ -450,6 +450,28 @@ DWORD_PTR WINAPI SetThreadAffinityMask( HANDLE hThread, DWORD_PTR dwThreadAffini - return tbi.AffinityMask; - } - -+/********************************************************************** -+ * SetThreadIdealProcessorEx (KERNEL32.@) -+ */ -+BOOL WINAPI SetThreadIdealProcessorEx(HANDLE thread, PROCESSOR_NUMBER *processor, PROCESSOR_NUMBER *previous) -+{ +diff --git a/dlls/kernelbase/thread.c b/dlls/kernelbase/thread.c +index 852ab354f..172a0f16b 100644 +--- a/dlls/kernelbase/thread.c ++++ b/dlls/kernelbase/thread.c +@@ -431,9 +431,22 @@ DWORD WINAPI DECLSPEC_HOTPATCH SetThreadIdealProcessor( HANDLE thread, DWORD pro + BOOL WINAPI DECLSPEC_HOTPATCH SetThreadIdealProcessorEx( HANDLE thread, PROCESSOR_NUMBER *ideal, + 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) @@ -36,27 +34,9 @@ index ac2c3687789..499fbe24d09 100644 + } + + return TRUE; -+} - - /********************************************************************** - * SetThreadIdealProcessor [KERNEL32.@] Sets preferred processor for thread. -@@ -472,16 +494,6 @@ DWORD WINAPI SetThreadIdealProcessor( } - /*********************************************************************** -- * SetThreadIdealProcessorEx (KERNEL32.@) -- */ --BOOL WINAPI SetThreadIdealProcessorEx( HANDLE thread, PROCESSOR_NUMBER *ideal, PROCESSOR_NUMBER *previous ) --{ -- FIXME("(%p %p %p): stub\n", thread, ideal, previous); -- SetLastError(ERROR_CALL_NOT_IMPLEMENTED); -- return FALSE; --} -- --/*********************************************************************** - * GetThreadSelectorEntry (KERNEL32.@) - */ - BOOL WINAPI GetThreadSelectorEntry( HANDLE hthread, DWORD sel, LPLDT_ENTRY ldtent ) + -- -2.12.2 +2.22.0 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index ead1dc0b..50be4d68 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "9855fbe252ff3664d879e8cd9f5d1ea879af47dd" + echo "6e3d68b14120563fd584fe9c5a27885f51e7ae66" } # Show version information @@ -4353,7 +4353,7 @@ fi # | Modified files: # | * dlls/api-ms-win-core-kernel32-legacy-l1-1-0/api-ms-win-core-kernel32-legacy-l1-1-0.spec, dlls/api-ms-win-core- # | kernel32-legacy-l1-1-1/api-ms-win-core-kernel32-legacy-l1-1-1.spec, dlls/kernel32/cpu.c, dlls/kernel32/kernel32.spec, -# | dlls/kernel32/tests/process.c, dlls/kernel32/thread.c, include/winnt.h +# | dlls/kernel32/tests/process.c, dlls/kernelbase/thread.c, include/winnt.h # | if test "$enable_kernel32_Processor_Group" -eq 1; then patch_apply kernel32-Processor_Group/0001-kernel32-Implement-some-processor-group-functions.patch