Big merge: thanks alex and greatlord. Not a complete merge but most
[reactos.git] / reactos / ntoskrnl / include / internal / ntoskrnl.h
index 2fa20e4..b6cc142 100644 (file)
@@ -23,6 +23,7 @@
 #endif
 #include "ob.h"
 #include "mm.h"
+#include "ex.h"
 #include "ps.h"
 #include "cc.h"
 #include "io.h"
@@ -30,7 +31,6 @@
 #include "se.h"
 #include "ldr.h"
 #include "kd.h"
-#include "ex.h"
 #include "fsrtl.h"
 #include "lpc.h"
 #include "rtl.h"
@@ -41,6 +41,7 @@
 #include "tag.h"
 #include "test.h"
 #include "inbv.h"
+#include "vdm.h"
 
 #include <pshpack1.h>
 /*
@@ -107,6 +108,26 @@ InterlockedAnd(IN OUT LONG volatile *Target,
     return j;
 }
 
+FORCEINLINE
+LONG
+InterlockedOr(IN OUT LONG volatile *Target,
+              IN LONG Set)
+{
+    LONG i;
+    LONG j;
+
+    j = *Target;
+    do {
+        i = j;
+        j = InterlockedCompareExchange((PLONG)Target,
+                                       i | Set,
+                                       i);
+
+    } while (i != j);
+
+    return j;
+}
+
 /*
  * generic information class probing code
  */
@@ -126,11 +147,20 @@ typedef struct _INFORMATION_CLASS_INFO
   ULONG Flags;
 } INFORMATION_CLASS_INFO, *PINFORMATION_CLASS_INFO;
 
-#define ICI_SQ_SAME(Size, Alignment, Flags)                                    \
-  { Size, Size, Alignment, Alignment, Flags }
+#define ICI_SQ_SAME(Type, Alignment, Flags)                                    \
+  { Type, Type, Alignment, Alignment, Flags }
+
+#define ICI_SQ(TypeQuery, TypeSet, AlignmentQuery, AlignmentSet, Flags)        \
+  { TypeQuery, TypeSet, AlignmentQuery, AlignmentSet, Flags }
+
+//
+// TEMPORARY
+//
+#define IQS_SAME(Type, Alignment, Flags)                                    \
+  { sizeof(Type), sizeof(Type), sizeof(Alignment), sizeof(Alignment), Flags }
 
-#define ICI_SQ(SizeQuery, SizeSet, AlignmentQuery, AlignmentSet, Flags)        \
-  { SizeQuery, SizeSet, AlignmentQuery, AlignmentSet, Flags }
+#define IQS(TypeQuery, TypeSet, AlignmentQuery, AlignmentSet, Flags)        \
+  { sizeof(TypeQuery), sizeof(TypeSet), sizeof(AlignmentQuery), sizeof(AlignmentSet), Flags }
 
 static __inline NTSTATUS
 DefaultSetInfoBufferCheck(UINT Class,