[RTL][NTDLL] Implement processor related NT6+ functions

Implements RtlGetCurrentProcessorNumberEx, RtlIsProcessorFeaturePresent
This commit is contained in:
Timo Kreuzer
2026-07-01 21:45:34 +00:00
parent dbb4d36927
commit ed51a5d1e2
6 changed files with 52 additions and 9 deletions
+2
View File
@@ -70,6 +70,7 @@ list(APPEND SOURCE
prefix.c
priv.c
process.c
processor.c
propvar.c
random.c
rangelist.c
@@ -138,6 +139,7 @@ list(APPEND SOURCE_VISTA
${RTL_WINE_SOURCE_VISTA}
condvar.c
locale.c
processor.c
runonce.c
slist.c
srw.c
-8
View File
@@ -486,14 +486,6 @@ RtlSetProcessIsCritical(IN BOOLEAN NewValue,
sizeof(ULONG));
}
ULONG
NTAPI
RtlGetCurrentProcessorNumber(VOID)
{
/* Forward to kernel */
return NtGetCurrentProcessorNumber();
}
_IRQL_requires_max_(APC_LEVEL)
ULONG
NTAPI
+45
View File
@@ -0,0 +1,45 @@
/*
* PROJECT: ReactOS runtime library (RTL)
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Implementation of processor related routines
* COPYRIGHT: Copyright 2026 Timo Kreuzer <[email protected]>
*/
/* INCLUDES *****************************************************************/
#include <rtl.h>
#define NDEBUG
#include <debug.h>
/* FUNCTIONS *****************************************************************/
BOOLEAN
NTAPI
RtlIsProcessorFeaturePresent(
_In_ ULONG ProcessorFeature)
{
if (ProcessorFeature >= RTL_NUMBER_OF(SharedUserData->ProcessorFeatures))
{
return FALSE;
}
return SharedUserData->ProcessorFeatures[ProcessorFeature] != 0;
}
ULONG
NTAPI
RtlGetCurrentProcessorNumber(
VOID)
{
return NtGetCurrentProcessorNumber();
}
VOID
NTAPI
RtlGetCurrentProcessorNumberEx(
_Out_ PPROCESSOR_NUMBER ProcessorNumber)
{
NtGetCurrentProcessorNumberEx(ProcessorNumber);
}