2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: ntoskrnl/rtl/misc.c
5 * PURPOSE: Various functions
10 /* INCLUDES *****************************************************************/
16 /* GLOBALS *******************************************************************/
18 extern ULONG NtGlobalFlag
;
19 extern ULONG NtMajorVersion
;
20 extern ULONG NtMinorVersion
;
21 extern ULONG NtOSCSDVersion
;
23 /* FUNCTIONS *****************************************************************/
30 RtlGetNtGlobalFlags(VOID
)
40 RtlGetVersion(IN OUT PRTL_OSVERSIONINFOW lpVersionInformation
)
44 /* Return the basics */
45 lpVersionInformation
->dwMajorVersion
= NtMajorVersion
;
46 lpVersionInformation
->dwMinorVersion
= NtMinorVersion
;
47 lpVersionInformation
->dwBuildNumber
= NtBuildNumber
& 0x3FFF;
48 lpVersionInformation
->dwPlatformId
= VER_PLATFORM_WIN32_NT
;
50 /* Check if this is the extended version */
51 if (lpVersionInformation
->dwOSVersionInfoSize
== sizeof(RTL_OSVERSIONINFOEXW
))
53 PRTL_OSVERSIONINFOEXW InfoEx
= (PRTL_OSVERSIONINFOEXW
)lpVersionInformation
;
54 InfoEx
->wServicePackMajor
= (USHORT
)(CmNtCSDVersion
>> 8) & 0xFF;
55 InfoEx
->wServicePackMinor
= (USHORT
)(CmNtCSDVersion
& 0xFF);
56 InfoEx
->wSuiteMask
= (USHORT
)(SharedUserData
->SuiteMask
& 0xFFFF);
57 InfoEx
->wProductType
= SharedUserData
->NtProductType
;
58 InfoEx
->wReserved
= 0;
62 return STATUS_SUCCESS
;
67 // Stub for architectures which don't have this implemented
71 RtlPrefetchMemoryNonTemporal(IN PVOID Source
,
77 UNREFERENCED_PARAMETER(Source
);
78 UNREFERENCED_PARAMETER(Length
);