[PATCH 3/3] ntoskrnl.exe: Add KeQueryActiveProcessorCountEx() function.
Alexandre Julliard
julliard at winehq.org
Fri May 22 11:50:27 CDT 2020
Paul Gofman <pgofman at codeweavers.com> writes:
> Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
> ---
> dlls/ntoskrnl.exe/ntoskrnl.c | 12 +++++++++++
> dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 1 +
> dlls/ntoskrnl.exe/tests/driver.c | 31 +++++++++++++++++++++++++++++
> include/ddk/wdm.h | 1 +
> include/winnt.h | 2 ++
> 5 files changed, 47 insertions(+)
>
> diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
> index aa71b7c48c..830608ce50 100644
> --- a/dlls/ntoskrnl.exe/ntoskrnl.c
> +++ b/dlls/ntoskrnl.exe/ntoskrnl.c
> @@ -2385,6 +2385,18 @@ KAFFINITY WINAPI KeQueryActiveProcessors( void )
> return AffinityMask;
> }
>
> +ULONG WINAPI KeQueryActiveProcessorCountEx(USHORT group_number)
> +{
> + TRACE("group_number %u.\n", group_number);
> +
> + if (group_number && group_number != ALL_PROCESSOR_GROUPS)
> + {
> + FIXME("group_number %u not supported.\n", group_number);
> + return 0;
> + }
> +
> + return NtCurrentTeb()->Peb->NumberOfProcessors;
> +}
You should probably use GetActiveProcessorCount(), so that it will
automatically start working when that one is implemented.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list