mirror of
https://github.com/reactos/reactos.git
synced 2024-10-01 06:57:08 +00:00
[NTOSKRNL_VISTA]
Implement KeQueryActiveProcessorCount(). CORE-11674 svn path=/trunk/; revision=72001
This commit is contained in:
parent
b79e7d2eee
commit
4e4861b392
|
@ -5,6 +5,7 @@ add_definitions(-DUNICODE -D_UNICODE -D__NTOSKRNL__ -D_NTOSKRNL_ -D_NTSYSTEM_)
|
||||||
|
|
||||||
list(APPEND SOURCE
|
list(APPEND SOURCE
|
||||||
fsrtl.c
|
fsrtl.c
|
||||||
|
ke.c
|
||||||
rtl.c)
|
rtl.c)
|
||||||
|
|
||||||
add_library(ntoskrnl_vista ${SOURCE})
|
add_library(ntoskrnl_vista ${SOURCE})
|
||||||
|
|
27
reactos/sdk/lib/drivers/ntoskrnl_vista/ke.c
Normal file
27
reactos/sdk/lib/drivers/ntoskrnl_vista/ke.c
Normal 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);
|
||||||
|
}
|
Loading…
Reference in a new issue