[XDK][PSDK][DDK] Improve winnt.h and make it share more definitions with wdm.h.
authorAmine Khaldi <amine.khaldi@reactos.org>
Tue, 8 Mar 2016 15:35:17 +0000 (15:35 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Tue, 8 Mar 2016 15:35:17 +0000 (15:35 +0000)
svn path=/trunk/; revision=70972

reactos/include/xdk/ketypes.h
reactos/include/xdk/winnt.template.h
reactos/include/xdk/winnt_old.h

index 9885a9f..1033382 100644 (file)
@@ -30,14 +30,15 @@ typedef enum _MODE {
 #define SEMAPHORE_MODIFY_STATE (0x0002)
 #define SEMAPHORE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3)
 
-typedef enum _LOGICAL_PROCESSOR_RELATIONSHIP {
-  RelationProcessorCore,
-  RelationNumaNode,
-  RelationCache,
-  RelationProcessorPackage,
-  RelationGroup,
-  RelationAll = 0xffff
-} LOGICAL_PROCESSOR_RELATIONSHIP;
+$endif(_WDMDDK_)
+$if(_WDMDDK_ || _WINNT_)
+
+typedef struct _PROCESSOR_GROUP_INFO {
+  UCHAR MaximumProcessorCount;
+  UCHAR ActiveProcessorCount;
+  UCHAR Reserved[38];
+  KAFFINITY ActiveProcessorMask;
+} PROCESSOR_GROUP_INFO, *PPROCESSOR_GROUP_INFO;
 
 typedef enum _PROCESSOR_CACHE_TYPE {
   CacheUnified,
@@ -54,28 +55,6 @@ typedef struct _CACHE_DESCRIPTOR {
   PROCESSOR_CACHE_TYPE Type;
 } CACHE_DESCRIPTOR, *PCACHE_DESCRIPTOR;
 
-typedef struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION {
-  ULONG_PTR ProcessorMask;
-  LOGICAL_PROCESSOR_RELATIONSHIP Relationship;
-  _ANONYMOUS_UNION union {
-    struct {
-      UCHAR Flags;
-    } ProcessorCore;
-    struct {
-      ULONG NodeNumber;
-    } NumaNode;
-    CACHE_DESCRIPTOR Cache;
-    ULONGLONG Reserved[2];
-  } DUMMYUNIONNAME;
-} SYSTEM_LOGICAL_PROCESSOR_INFORMATION, *PSYSTEM_LOGICAL_PROCESSOR_INFORMATION;
-
-typedef struct _PROCESSOR_RELATIONSHIP {
-  UCHAR Flags;
-  UCHAR Reserved[21];
-  USHORT GroupCount;
-  _Field_size_(GroupCount) GROUP_AFFINITY GroupMask[ANYSIZE_ARRAY];
-} PROCESSOR_RELATIONSHIP, *PPROCESSOR_RELATIONSHIP;
-
 typedef struct _NUMA_NODE_RELATIONSHIP {
   ULONG NodeNumber;
   UCHAR Reserved[20];
@@ -92,13 +71,6 @@ typedef struct _CACHE_RELATIONSHIP {
   GROUP_AFFINITY GroupMask;
 } CACHE_RELATIONSHIP, *PCACHE_RELATIONSHIP;
 
-typedef struct _PROCESSOR_GROUP_INFO {
-  UCHAR MaximumProcessorCount;
-  UCHAR ActiveProcessorCount;
-  UCHAR Reserved[38];
-  KAFFINITY ActiveProcessorMask;
-} PROCESSOR_GROUP_INFO, *PPROCESSOR_GROUP_INFO;
-
 typedef struct _GROUP_RELATIONSHIP {
   USHORT MaximumGroupCount;
   USHORT ActiveGroupCount;
@@ -106,6 +78,37 @@ typedef struct _GROUP_RELATIONSHIP {
   PROCESSOR_GROUP_INFO GroupInfo[ANYSIZE_ARRAY];
 } GROUP_RELATIONSHIP, *PGROUP_RELATIONSHIP;
 
+typedef enum _LOGICAL_PROCESSOR_RELATIONSHIP {
+  RelationProcessorCore,
+  RelationNumaNode,
+  RelationCache,
+  RelationProcessorPackage,
+  RelationGroup,
+  RelationAll = 0xffff
+} LOGICAL_PROCESSOR_RELATIONSHIP;
+
+typedef struct _PROCESSOR_RELATIONSHIP {
+  UCHAR Flags;
+  UCHAR Reserved[21];
+  USHORT GroupCount;
+  _Field_size_(GroupCount) GROUP_AFFINITY GroupMask[ANYSIZE_ARRAY];
+} PROCESSOR_RELATIONSHIP, *PPROCESSOR_RELATIONSHIP;
+
+typedef struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION {
+  ULONG_PTR ProcessorMask;
+  LOGICAL_PROCESSOR_RELATIONSHIP Relationship;
+  _ANONYMOUS_UNION union {
+    struct {
+      UCHAR Flags;
+    } ProcessorCore;
+    struct {
+      ULONG NodeNumber;
+    } NumaNode;
+    CACHE_DESCRIPTOR Cache;
+    ULONGLONG Reserved[2];
+  } DUMMYUNIONNAME;
+} SYSTEM_LOGICAL_PROCESSOR_INFORMATION, *PSYSTEM_LOGICAL_PROCESSOR_INFORMATION;
+
 typedef struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX {
   LOGICAL_PROCESSOR_RELATIONSHIP Relationship;
   ULONG Size;
@@ -117,6 +120,9 @@ typedef struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX {
   } DUMMYUNIONNAME;
 } SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX, *PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX;
 
+$endif(_WDMDDK_ || _WINNT_)
+$if(_WDMDDK_)
+
 /* Processor features */
 #define PF_FLOATING_POINT_PRECISION_ERRATA       0
 #define PF_FLOATING_POINT_EMULATED               1
index 9f22850..8d71671 100644 (file)
@@ -71,6 +71,7 @@ $define(USHORT=WORD)
 $define(UCHAR=BYTE)
 $include(ntbasedef.h)
 $include(interlocked.h)
+$include(ketypes.h)
 $include(winnt_old.h)
 
 #ifdef __cplusplus
index 384d97b..7bc9890 100644 (file)
@@ -1100,6 +1100,9 @@ typedef VOID (NTAPI *WORKERCALLBACKFUNC)(PVOID);
 #define IO_REPARSE_TAG_SYMBOLIC_LINK IO_REPARSE_TAG_RESERVED_ZERO
 #define IO_REPARSE_TAG_MOUNT_POINT 0xA0000003
 #define IO_REPARSE_TAG_SYMLINK 0xA000000CL
+
+#define RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO 0x01000000
+
 #ifndef RC_INVOKED
 
 #ifdef _GUID_DEFINED
@@ -3926,47 +3929,8 @@ typedef enum _HEAP_INFORMATION_CLASS {
   HeapEnableTerminationOnCorruption
 } HEAP_INFORMATION_CLASS;
 
-typedef enum _PROCESSOR_CACHE_TYPE {
-  CacheUnified,
-  CacheInstruction,
-  CacheData,
-  CacheTrace
-} PROCESSOR_CACHE_TYPE;
-
-typedef enum _LOGICAL_PROCESSOR_RELATIONSHIP {
-  RelationProcessorCore,
-  RelationNumaNode,
-  RelationCache,
-  RelationProcessorPackage,
-  RelationGroup,
-  RelationAll = 0xffff
-} LOGICAL_PROCESSOR_RELATIONSHIP;
-
 #define CACHE_FULLY_ASSOCIATIVE 0xFF
 
-typedef struct _CACHE_DESCRIPTOR {
-  BYTE Level;
-  BYTE Associativity;
-  WORD LineSize;
-  DWORD Size;
-  PROCESSOR_CACHE_TYPE Type;
-} CACHE_DESCRIPTOR, *PCACHE_DESCRIPTOR;
-
-typedef struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION {
-  ULONG_PTR ProcessorMask;
-  LOGICAL_PROCESSOR_RELATIONSHIP Relationship;
-  _ANONYMOUS_UNION union {
-    struct {
-      BYTE Flags;
-    } ProcessorCore;
-    struct {
-      DWORD NodeNumber;
-    } NumaNode;
-    CACHE_DESCRIPTOR Cache;
-    ULONGLONG Reserved[2];
-  } DUMMYUNIONNAME;
-} SYSTEM_LOGICAL_PROCESSOR_INFORMATION, *PSYSTEM_LOGICAL_PROCESSOR_INFORMATION;
-
 _Check_return_
 NTSYSAPI
 SIZE_T