[PATCH v3 0/1] MR1139: ntoskrnl.exe: add KeNumberProcessors export.
I haven't seen any software that uses this, but some older software out there might use it, so it's good idea to export it. -- v3: ntoskrnl.exe: add KeNumberProcessors export. https://gitlab.winehq.org/wine/wine/-/merge_requests/1139
From: Etaash Mathamsetty <etaash.mathamsetty(a)gmail.com> fix various issues with original implementation use winxp+ behavior --- dlls/ntoskrnl.exe/ntoskrnl.c | 3 +++ dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 9320e02dca9..ae508a1a432 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -2595,6 +2595,8 @@ KAFFINITY WINAPI KeQueryActiveProcessors( void ) return affinity_mask; } +volatile CCHAR KeNumberProcessors = 0; + ULONG WINAPI KeQueryActiveProcessorCountEx(USHORT group_number) { TRACE("group_number %u.\n", group_number); @@ -4544,6 +4546,7 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved ) NtBuildNumber = NtCurrentTeb()->Peb->OSBuildNumber; ntoskrnl_heap = HeapCreate( HEAP_CREATE_ENABLE_EXECUTE, 0, 0 ); dpc_call_tls_index = TlsAlloc(); + KeNumberProcessors = (CCHAR)min( 64UL, KeQueryActiveProcessorCountEx(ALL_PROCESSOR_GROUPS) ); LdrRegisterDllNotification( 0, ldr_notify_callback, NULL, &ldr_notify_cookie ); break; case DLL_PROCESS_DETACH: diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index 8f8edcac7a0..322ed5329de 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -593,7 +593,7 @@ @ stdcall KeLeaveCriticalRegion() @ stub KeLoaderBlock @ stdcall -arch=x86_64 KeLowerIrql(long) -@ stub KeNumberProcessors +@ extern KeNumberProcessors @ stub KeProfileInterrupt @ stub KeProfileInterruptWithSource @ stub KePulseEvent -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/1139
Hi, It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated. The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=125259 Your paranoid android. === debian11 (build log) === Task: Could not create the win32 wineprefix: Failed to disable the crash dialogs: Task: WineTest did not produce the win32 report
participants (3)
-
Etaash Mathamsetty -
Etaash Mathamsetty (@etaash.mathamsetty) -
Marvin