[NTOSKRNL_VISTA]

Implement KeQueryActiveProcessorCount().

CORE-11674

svn path=/trunk/; revision=72001
This commit is contained in:
Pierre Schweitzer 2016-07-25 20:45:48 +00:00
parent b79e7d2eee
commit 4e4861b392
2 changed files with 28 additions and 0 deletions

View file

@ -5,6 +5,7 @@ add_definitions(-DUNICODE -D_UNICODE -D__NTOSKRNL__ -D_NTOSKRNL_ -D_NTSYSTEM_)
list(APPEND SOURCE
fsrtl.c
ke.c
rtl.c)
add_library(ntoskrnl_vista ${SOURCE})

View file

@ -0,0 +1,27 @@
/*
* PROJECT: ReactOS Kernel - Vista+ APIs
* LICENSE: GPL v2 - See COPYING in the top level directory
* FILE: lib/drivers/ntoskrnl_vista/ke.c
* PURPOSE: Ke functions of Vista+
* PROGRAMMERS: Pierre Schweitzer <pierre@reactos.org>
*/
#include <ntdef.h>
#include <ntifs.h>
NTKERNELAPI
ULONG
NTAPI
KeQueryActiveProcessorCount(OUT PKAFFINITY ActiveProcessors OPTIONAL)
{
RTL_BITMAP Bitmap;
KAFFINITY ActiveMap = KeQueryActiveProcessors();
if (ActiveProcessors != NULL)
{
*ActiveProcessors = ActiveMap;
}
RtlInitializeBitMap(&Bitmap, &ActiveMap, sizeof(ActiveMap) * 8);
return RtlNumberOfSetBits(&Bitmap);
}