ReactOS  0.4.14-dev-815-ge410a12
misc.c File Reference
#include <ntoskrnl.h>
#include <debug.h>
Include dependency graph for misc.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

ULONG NTAPI RtlGetNtGlobalFlags (VOID)
 
NTSTATUS NTAPI RtlGetVersion (IN OUT PRTL_OSVERSIONINFOW lpVersionInformation)
 
VOID FASTCALL RtlPrefetchMemoryNonTemporal (IN PVOID Source, IN SIZE_T Length)
 

Variables

ULONG NtGlobalFlag
 
ULONG NtMajorVersion
 
ULONG NtMinorVersion
 
ULONG NtOSCSDVersion
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 13 of file misc.c.

Function Documentation

◆ RtlGetNtGlobalFlags()

ULONG NTAPI RtlGetNtGlobalFlags ( VOID  )

Definition at line 30 of file misc.c.

31 {
32  return NtGlobalFlag;
33 }
ULONG NtGlobalFlag
Definition: init.c:51

◆ RtlGetVersion()

NTSTATUS NTAPI RtlGetVersion ( IN OUT PRTL_OSVERSIONINFOW  lpVersionInformation)

Definition at line 40 of file misc.c.

41 {
42  PAGED_CODE();
43 
44  /* Return the basics */
45  lpVersionInformation->dwMajorVersion = NtMajorVersion;
46  lpVersionInformation->dwMinorVersion = NtMinorVersion;
47  lpVersionInformation->dwBuildNumber = NtBuildNumber & 0x3FFF;
48  lpVersionInformation->dwPlatformId = VER_PLATFORM_WIN32_NT;
49 
50  /* Check if this is the extended version */
51  if (lpVersionInformation->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOEXW))
52  {
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;
59  }
60 
61  /* Always succeed */
62  return STATUS_SUCCESS;
63 }
UCHAR wProductType
Definition: rtltypes.h:274
#define VER_PLATFORM_WIN32_NT
Definition: rtltypes.h:236
USHORT wSuiteMask
Definition: rtltypes.h:273
#define PAGED_CODE()
Definition: video.h:57
ULONG NtBuildNumber
Definition: init.c:47
#define SharedUserData
ULONG NtMinorVersion
Definition: init.c:43
ULONG NtMajorVersion
Definition: init.c:42
unsigned short USHORT
Definition: pedump.c:61
USHORT wServicePackMajor
Definition: rtltypes.h:271
struct _OSVERSIONINFOEXW * PRTL_OSVERSIONINFOEXW
ULONG CmNtCSDVersion
Definition: init.c:56
return STATUS_SUCCESS
Definition: btrfs.c:2938
USHORT wServicePackMinor
Definition: rtltypes.h:272

◆ RtlPrefetchMemoryNonTemporal()

VOID FASTCALL RtlPrefetchMemoryNonTemporal ( IN PVOID  Source,
IN SIZE_T  Length 
)

Definition at line 71 of file misc.c.

73 {
74  //
75  // Do nothing
76  //
79 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3167

Referenced by KiInitMachineDependent(), and START_TEST().

Variable Documentation

◆ NtGlobalFlag

◆ NtMajorVersion

ULONG NtMajorVersion

Definition at line 42 of file init.c.

Referenced by ExpInitializeExecutive(), MmCreatePeb(), PsGetVersion(), and RtlGetVersion().

◆ NtMinorVersion

ULONG NtMinorVersion

Definition at line 43 of file init.c.

Referenced by ExpInitializeExecutive(), MmCreatePeb(), PsGetVersion(), and RtlGetVersion().

◆ NtOSCSDVersion

ULONG NtOSCSDVersion