reactos/sdk/lib/drivers/ntoskrnl_vista/ke.c
Victor Perevertkin be276dde28
[XDK][NTOSKRNL_VISTA] Put NTKRNLVISTAAPI to XDK headers
for vista+ APIs implemented in ntoskrnl_vista.
Now if you statically link ntoskrnl_vista into a driver,
NTKERNELAPI will automatically be removed from an API definition
2020-09-24 21:51:57 +03:00

57 lines
1.1 KiB
C

/*
* PROJECT: ReactOS Kernel - Vista+ APIs
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Ke functions of Vista+
* COPYRIGHT: 2016 Pierre Schweitzer (pierre@reactos.org)
* 2020 Victor Perevertkin (victor.perevertkin@reactos.org)
*/
#include <ntdef.h>
#include <ntifs.h>
NTKRNLVISTAAPI
ULONG
NTAPI
KeQueryActiveProcessorCount(OUT PKAFFINITY ActiveProcessors OPTIONAL)
{
RTL_BITMAP Bitmap;
KAFFINITY ActiveMap = KeQueryActiveProcessors();
if (ActiveProcessors != NULL)
{
*ActiveProcessors = ActiveMap;
}
RtlInitializeBitMap(&Bitmap, (PULONG)&ActiveMap, sizeof(ActiveMap) * 8);
return RtlNumberOfSetBits(&Bitmap);
}
NTKRNLVISTAAPI
USHORT
NTAPI
KeQueryHighestNodeNumber()
{
return 0;
}
NTKRNLVISTAAPI
USHORT
NTAPI
KeGetCurrentNodeNumber()
{
return 0;
}
_IRQL_requires_max_(DISPATCH_LEVEL)
NTKRNLVISTAAPI
BOOLEAN
NTAPI
KeSetCoalescableTimer(
_Inout_ PKTIMER Timer,
_In_ LARGE_INTEGER DueTime,
_In_ ULONG Period,
_In_ ULONG TolerableDelay,
_In_opt_ PKDPC Dpc)
{
return KeSetTimerEx(Timer, DueTime, Period, Dpc);
}