https://git.reactos.org/?p=reactos.git;a=commitdiff;h=39b266b7284a7df7fb91a…
commit 39b266b7284a7df7fb91a08dc28cf5cd28d4cbcc
Author: George Bișoc <george.bisoc(a)reactos.org>
AuthorDate: Sun May 2 20:49:06 2021 +0200
Commit: George Bișoc <george.bisoc(a)reactos.org>
CommitDate: Sun May 2 20:49:06 2021 +0200
[NTOSKRNL] Move the ICIF related code and stuff into a separate header file
For easier accessibility for the APITESTs and whatnot.
---
ntoskrnl/include/internal/icif.h | 41 ++++++++++++++++++++++++++++++++++++
ntoskrnl/include/internal/ntoskrnl.h | 35 +-----------------------------
2 files changed, 42 insertions(+), 34 deletions(-)
diff --git a/ntoskrnl/include/internal/icif.h b/ntoskrnl/include/internal/icif.h
new file mode 100644
index 00000000000..119958e54b4
--- /dev/null
+++ b/ntoskrnl/include/internal/icif.h
@@ -0,0 +1,41 @@
+/*
+ * PROJECT: ReactOS Kernel
+ * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later)
+ * PURPOSE: Internal header for information classes info interface
+ * COPYRIGHT: Copyright ???
+ * Copyright 2020 George Bișoc <george.bisoc(a)reactos.org>
+ */
+
+#pragma once
+
+/*
+ * Implement generic information class probing code in a
+ * separate header within the NT kernel header internals.
+ * This makes it accessible to other sources by including
+ * the header.
+ */
+
+#define ICIF_NONE 0x0
+#define ICIF_QUERY 0x1
+#define ICIF_SET 0x2
+#define ICIF_QUERY_SIZE_VARIABLE 0x4
+#define ICIF_SET_SIZE_VARIABLE 0x8
+#define ICIF_SIZE_VARIABLE (ICIF_QUERY_SIZE_VARIABLE | ICIF_SET_SIZE_VARIABLE)
+
+typedef struct _INFORMATION_CLASS_INFO
+{
+ USHORT RequiredSizeQUERY;
+ UCHAR AlignmentQUERY;
+ USHORT RequiredSizeSET;
+ UCHAR AlignmentSET;
+ USHORT Flags;
+} INFORMATION_CLASS_INFO, *PINFORMATION_CLASS_INFO;
+
+#define IQS_SAME(Type, Alignment, Flags) \
+ { sizeof(Type), sizeof(Alignment), sizeof(Type), sizeof(Alignment), Flags }
+
+#define IQS(TypeQuery, AlignmentQuery, TypeSet, AlignmentSet, Flags) \
+ { sizeof(TypeQuery), sizeof(AlignmentQuery), sizeof(TypeSet), sizeof(AlignmentSet),
Flags }
+
+#define IQS_NONE \
+ { 0, 0, 0, 0, ICIF_NONE }
diff --git a/ntoskrnl/include/internal/ntoskrnl.h b/ntoskrnl/include/internal/ntoskrnl.h
index f0c754ffa40..a49bfb9b57e 100644
--- a/ntoskrnl/include/internal/ntoskrnl.h
+++ b/ntoskrnl/include/internal/ntoskrnl.h
@@ -78,43 +78,10 @@
#include "vdm.h"
#include "hal.h"
#include "hdl.h"
+#include "icif.h"
#include "arch/intrin_i.h"
#include <arbiter.h>
-/*
- * generic information class probing code
- */
-
-#define ICIF_QUERY 0x1
-#define ICIF_SET 0x2
-#define ICIF_QUERY_SIZE_VARIABLE 0x4
-#define ICIF_SET_SIZE_VARIABLE 0x8
-#define ICIF_SIZE_VARIABLE (ICIF_QUERY_SIZE_VARIABLE | ICIF_SET_SIZE_VARIABLE)
-
-typedef struct _INFORMATION_CLASS_INFO
-{
- ULONG RequiredSizeQUERY;
- ULONG RequiredSizeSET;
- ULONG AlignmentSET;
- ULONG AlignmentQUERY;
- ULONG Flags;
-} INFORMATION_CLASS_INFO, *PINFORMATION_CLASS_INFO;
-
-#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 IQS(TypeQuery, TypeSet, AlignmentQuery, AlignmentSet, Flags) \
- { sizeof(TypeQuery), sizeof(TypeSet), sizeof(AlignmentQuery), sizeof(AlignmentSet),
Flags }
-
/*
* Use IsPointerOffset to test whether a pointer should be interpreted as an offset
* or as a pointer