Skip to content

Commit 29807ae

Browse files
committed
[NT:RTL] Add RtlIsProcessorFeaturePresent inline implementation
1 parent 0223050 commit 29807ae

File tree

5 files changed

+24
-3
lines changed

5 files changed

+24
-3
lines changed

Source/Include/KNSoft/NDK/NT/NT.inl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@
1313
#include "Rtl/Path.inl"
1414
#include "Rtl/Stack.inl"
1515
#include "Rtl/String.inl"
16+
#include "Rtl/SysInfo.inl"
1617
#include "Rtl/Wow.inl"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#pragma once
2+
3+
#include "../../NDK.h"
4+
5+
EXTERN_C_START
6+
7+
__inline
8+
BOOLEAN
9+
NTAPI
10+
_Inline_RtlIsProcessorFeaturePresent(
11+
_In_ ULONG ProcessorFeature)
12+
{
13+
return ProcessorFeature < PROCESSOR_FEATURE_MAX ?
14+
SharedUserData->ProcessorFeatures[ProcessorFeature] :
15+
FALSE;
16+
}
17+
18+
EXTERN_C_END

Source/Include/KNSoft/NDK/Win32/API/Kernel32.inl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,9 +1022,7 @@ WINAPI
10221022
_Inline_IsProcessorFeaturePresent(
10231023
_In_ DWORD ProcessorFeature)
10241024
{
1025-
return ProcessorFeature < PROCESSOR_FEATURE_MAX ?
1026-
SharedUserData->ProcessorFeatures[ProcessorFeature] :
1027-
FALSE;
1025+
return _Inline_RtlIsProcessorFeaturePresent(ProcessorFeature);
10281026
}
10291027

10301028
__inline

Source/KNSoft.NDK/KNSoft.NDK.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@
257257
<None Include="..\Include\KNSoft\NDK\NT\Rtl\Security\Sid.inl" />
258258
<None Include="..\Include\KNSoft\NDK\NT\Rtl\Stack.inl" />
259259
<None Include="..\Include\KNSoft\NDK\NT\Rtl\String.inl" />
260+
<None Include="..\Include\KNSoft\NDK\NT\Rtl\SysInfo.inl" />
260261
<None Include="..\Include\KNSoft\NDK\NT\Rtl\Wow.inl" />
261262
<None Include="..\Include\KNSoft\NDK\Package\ArgParse.inl" />
262263
<None Include="..\Include\KNSoft\NDK\Package\UnitTest.inl" />

Source/KNSoft.NDK/KNSoft.NDK.vcxproj.filters

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,9 @@
552552
<None Include="..\Include\KNSoft\NDK\NT\Rtl\Stack.inl">
553553
<Filter>NT\Rtl</Filter>
554554
</None>
555+
<None Include="..\Include\KNSoft\NDK\NT\Rtl\SysInfo.inl">
556+
<Filter>NT\Rtl</Filter>
557+
</None>
555558
</ItemGroup>
556559
<ItemGroup>
557560
<Precomp4C_LibCreate Include="WinAPI\KNSoft.NDK.Ntdll.Hash.xml">

0 commit comments

Comments
 (0)