Alexandre Julliard : ntdll: Implement RtlIsProcessorFeaturePresent().
Alexandre Julliard
julliard at winehq.org
Thu Jan 24 14:42:52 CST 2019
Module: wine
Branch: master
Commit: b61d425502ce7e651a753c072e2840cb6274b3c9
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b61d425502ce7e651a753c072e2840cb6274b3c9
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Jan 24 17:33:16 2019 +0100
ntdll: Implement RtlIsProcessorFeaturePresent().
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/kernel32/cpu.c | 14 ++------------
dlls/ntdll/nt.c | 8 ++++++++
dlls/ntdll/ntdll.spec | 1 +
include/winternl.h | 1 +
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/dlls/kernel32/cpu.c b/dlls/kernel32/cpu.c
index 84385c7..9445d0b 100644
--- a/dlls/kernel32/cpu.c
+++ b/dlls/kernel32/cpu.c
@@ -46,8 +46,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(reg);
-#define SHARED_DATA ((KSHARED_USER_DATA*)0x7ffe0000)
-
/****************************************************************************
* QueryPerformanceCounter (KERNEL32.@)
*
@@ -200,18 +198,10 @@ VOID WINAPI GetNativeSystemInfo(
* IsProcessorFeaturePresent [KERNEL32.@]
*
* Determine if the cpu supports a given feature.
- *
- * RETURNS
- * TRUE, If the processor supports feature,
- * FALSE otherwise.
*/
-BOOL WINAPI IsProcessorFeaturePresent (
- DWORD feature /* [in] Feature number, (PF_ constants from "winnt.h") */)
+BOOL WINAPI IsProcessorFeaturePresent ( DWORD feature )
{
- if (feature < PROCESSOR_FEATURE_MAX)
- return SHARED_DATA->ProcessorFeatures[feature];
- else
- return FALSE;
+ return RtlIsProcessorFeaturePresent( feature );
}
/***********************************************************************
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index dcf9123..5138da4 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -2230,6 +2230,14 @@ static NTSTATUS get_firmware_info(SYSTEM_FIRMWARE_TABLE_INFORMATION *sfti, ULONG
#endif
+/***********************************************************************
+ * RtlIsProcessorFeaturePresent [NTDLL.@]
+ */
+BOOLEAN WINAPI RtlIsProcessorFeaturePresent( UINT feature )
+{
+ return feature < PROCESSOR_FEATURE_MAX && user_shared_data->ProcessorFeatures[feature];
+}
+
/******************************************************************************
* NtQuerySystemInformation [NTDLL.@]
* ZwQuerySystemInformation [NTDLL.@]
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 09f9098..649774f 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -756,6 +756,7 @@
@ stub RtlIsGenericTableEmpty
# @ stub RtlIsGenericTableEmptyAvl
@ stdcall RtlIsNameLegalDOS8Dot3(ptr ptr ptr)
+@ stdcall RtlIsProcessorFeaturePresent(long)
# @ stub RtlIsRangeAvailable
@ stdcall RtlIsTextUnicode(ptr long ptr)
# @ stub RtlIsThreadWithinLoaderCallout
diff --git a/include/winternl.h b/include/winternl.h
index 9c88613..a3adba3 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2741,6 +2741,7 @@ NTSYSAPI BOOL WINAPI RtlIsCriticalSectionLocked(RTL_CRITICAL_SECTION *);
NTSYSAPI BOOL WINAPI RtlIsCriticalSectionLockedByThread(RTL_CRITICAL_SECTION *);
NTSYSAPI ULONG WINAPI RtlIsDosDeviceName_U(PCWSTR);
NTSYSAPI BOOLEAN WINAPI RtlIsNameLegalDOS8Dot3(const UNICODE_STRING*,POEM_STRING,PBOOLEAN);
+NTSYSAPI BOOLEAN WINAPI RtlIsProcessorFeaturePresent(UINT);
NTSYSAPI BOOLEAN WINAPI RtlIsTextUnicode(LPCVOID,INT,INT *);
NTSYSAPI BOOLEAN WINAPI RtlIsValidHandle(const RTL_HANDLE_TABLE *, const RTL_HANDLE *);
NTSYSAPI BOOLEAN WINAPI RtlIsValidIndexHandle(const RTL_HANDLE_TABLE *, ULONG Index, RTL_HANDLE **);
More information about the wine-cvs
mailing list