Author: tkreuzer
Date: Sat Dec 5 23:17:24 2015
New Revision: 70280
URL:
http://svn.reactos.org/svn/reactos?rev=70280&view=rev
Log:
[NDK]
Add more tests for structure offsets (not built by default)
Added:
trunk/reactos/include/ndk/tests/win10_x64.c (with props)
trunk/reactos/include/ndk/tests/win10_x86.c (with props)
trunk/reactos/include/ndk/tests/win81_x64.c (with props)
trunk/reactos/include/ndk/tests/win81_x86.c (with props)
trunk/reactos/include/ndk/tests/win8_x64.c (with props)
trunk/reactos/include/ndk/tests/win8_x86.c (with props)
Modified:
trunk/reactos/include/ndk/tests/CMakeLists.txt
Modified: trunk/reactos/include/ndk/tests/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/tests/CMakeLis…
==============================================================================
--- trunk/reactos/include/ndk/tests/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/tests/CMakeLists.txt [iso-8859-1] Sat Dec 5 23:17:24 2015
@@ -3,10 +3,16 @@
add_library(ndk_tests
win2003_x64.c
winvista_x64.c
- win7_x64.c)
+ win7_x64.c
+ win8_x64.c
+ win81_x64.c
+ win10_x64.c)
else()
add_library(ndk_tests
win2003_x86.c
winvista_x86.c
- win7_x86.c)
+ win7_x86.c
+ win8_x86.c
+ win81_x86.c
+ win10_x86.c)
endif()
Added: trunk/reactos/include/ndk/tests/win10_x64.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/tests/win10_x6…
==============================================================================
--- trunk/reactos/include/ndk/tests/win10_x64.c (added)
+++ trunk/reactos/include/ndk/tests/win10_x64.c [iso-8859-1] Sat Dec 5 23:17:24 2015
@@ -0,0 +1,119 @@
+/* Version definitions */
+#undef NTDDI_VERSION
+#define NTDDI_VERSION NTDDI_WIN10
+#undef _WIN32_WINNT
+#define _WIN32_WINNT _WIN32_WINNT_WIN10
+
+#include <ntifs.h>
+#include <ndk/ntndk.h>
+
+#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type,
MemberName) == Offset);
+
+/* KTHREAD */
+C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header)
+C_ASSERT_FIELD(KTHREAD, 0x018, PVOID, SListFaultAddress)
+C_ASSERT_FIELD(KTHREAD, 0x020, UINT64, QuantumTarget)
+C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, InitialStack)
+C_ASSERT_FIELD(KTHREAD, 0x030, PVOID, StackLimit)
+C_ASSERT_FIELD(KTHREAD, 0x038, PVOID, StackBase)
+C_ASSERT_FIELD(KTHREAD, 0x040, UINT64, ThreadLock)
+C_ASSERT_FIELD(KTHREAD, 0x048, UINT64, CycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x050, ULONG32, CurrentRunTime)
+C_ASSERT_FIELD(KTHREAD, 0x054, ULONG32, ExpectedRunTime)
+C_ASSERT_FIELD(KTHREAD, 0x058, PVOID, KernelStack)
+C_ASSERT_FIELD(KTHREAD, 0x060, XSAVE_FORMAT*, StateSaveArea)
+C_ASSERT_FIELD(KTHREAD, 0x068, KSCHEDULING_GROUP*, SchedulingGroup)
+C_ASSERT_FIELD(KTHREAD, 0x070, KWAIT_STATUS_REGISTER, WaitRegister)
+C_ASSERT_FIELD(KTHREAD, 0x071, UINT8, Running)
+C_ASSERT_FIELD(KTHREAD, 0x072, UINT8[2], Alerted)
+C_ASSERT_FIELD(KTHREAD, 0x074, LONG32, MiscFlags)
+C_ASSERT_FIELD(KTHREAD, 0x078, LONG32, ThreadFlags)
+C_ASSERT_FIELD(KTHREAD, 0x07C, UINT8, Tag)
+C_ASSERT_FIELD(KTHREAD, 0x07D, UINT8, SystemHeteroCpuPolicy)
+C_ASSERT_FIELD(KTHREAD, 0x080, ULONG32, SystemCallNumber)
+C_ASSERT_FIELD(KTHREAD, 0x088, PVOID, FirstArgument)
+C_ASSERT_FIELD(KTHREAD, 0x090, KTRAP_FRAME*, TrapFrame)
+C_ASSERT_FIELD(KTHREAD, 0x098, KAPC_STATE, ApcState)
+C_ASSERT_FIELD(KTHREAD, 0x0C3, CHAR, Priority)
+C_ASSERT_FIELD(KTHREAD, 0x0C4, ULONG32, UserIdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x0C8, INT64, WaitStatus)
+C_ASSERT_FIELD(KTHREAD, 0x0D0, KWAIT_BLOCK*, WaitBlockList)
+C_ASSERT_FIELD(KTHREAD, 0x0D8, LIST_ENTRY, WaitListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x0D8, SINGLE_LIST_ENTRY, SwapListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x0E8, DISPATCHER_HEADER*, Queue)
+C_ASSERT_FIELD(KTHREAD, 0x0F0, PVOID, Teb)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UINT64, RelativeTimerBias)
+C_ASSERT_FIELD(KTHREAD, 0x100, KTIMER, Timer)
+C_ASSERT_FIELD(KTHREAD, 0x140, KWAIT_BLOCK[4], WaitBlock)
+C_ASSERT_FIELD(KTHREAD, 0x154, ULONG32, ContextSwitches)
+C_ASSERT_FIELD(KTHREAD, 0x184, UINT8, State)
+C_ASSERT_FIELD(KTHREAD, 0x185, CHAR, Spare13)
+C_ASSERT_FIELD(KTHREAD, 0x186, UINT8, WaitIrql)
+C_ASSERT_FIELD(KTHREAD, 0x187, CHAR, WaitMode)
+C_ASSERT_FIELD(KTHREAD, 0x1B4, ULONG32, WaitTime)
+C_ASSERT_FIELD(KTHREAD, 0x1E4, INT16, KernelApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x1E6, INT16, SpecialApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x1E4, ULONG32, CombinedApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x168, KTHREAD_COUNTERS*, ThreadCounters)
+C_ASSERT_FIELD(KTHREAD, 0x198, XSTATE_SAVE*, XStateSave)
+C_ASSERT_FIELD(KTHREAD, 0x1C8, PVOID, Win32Thread)
+C_ASSERT_FIELD(KTHREAD, 0x1F0, UMS_CONTROL_BLOCK*, Ucb)
+C_ASSERT_FIELD(KTHREAD, 0x1F8, KUMS_CONTEXT_HEADER*, Uch)
+C_ASSERT_FIELD(KTHREAD, 0x200, PVOID, TebMappedLowVa)
+C_ASSERT_FIELD(KTHREAD, 0x208, LIST_ENTRY, QueueListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x218, ULONG32, NextProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x21C, LONG32, QueuePriority)
+C_ASSERT_FIELD(KTHREAD, 0x220, KPROCESS*, Process)
+C_ASSERT_FIELD(KTHREAD, 0x228, GROUP_AFFINITY, UserAffinity)
+C_ASSERT_FIELD(KTHREAD, 0x232, CHAR, PreviousMode)
+C_ASSERT_FIELD(KTHREAD, 0x233, CHAR, BasePriority)
+C_ASSERT_FIELD(KTHREAD, 0x234, CHAR, PriorityDecrement)
+C_ASSERT_FIELD(KTHREAD, 0x235, UINT8, Preempted)
+C_ASSERT_FIELD(KTHREAD, 0x236, UINT8, AdjustReason)
+C_ASSERT_FIELD(KTHREAD, 0x237, CHAR, AdjustIncrement)
+C_ASSERT_FIELD(KTHREAD, 0x238, UINT64, AffinityVersion)
+C_ASSERT_FIELD(KTHREAD, 0x240, GROUP_AFFINITY, Affinity)
+C_ASSERT_FIELD(KTHREAD, 0x24A, UINT8, ApcStateIndex)
+C_ASSERT_FIELD(KTHREAD, 0x24B, UINT8, WaitBlockCount)
+C_ASSERT_FIELD(KTHREAD, 0x24C, ULONG32, IdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x250, UINT64, NpxState)
+C_ASSERT_FIELD(KTHREAD, 0x258, KAPC_STATE, SavedApcState)
+C_ASSERT_FIELD(KTHREAD, 0x283, UINT8, WaitReason)
+C_ASSERT_FIELD(KTHREAD, 0x284, CHAR, SuspendCount)
+C_ASSERT_FIELD(KTHREAD, 0x285, CHAR, Saturation)
+C_ASSERT_FIELD(KTHREAD, 0x286, UINT16, SListFaultCount)
+C_ASSERT_FIELD(KTHREAD, 0x288, KAPC, SchedulerApc)
+C_ASSERT_FIELD(KTHREAD, 0x289, UINT8, ResourceIndex)
+C_ASSERT_FIELD(KTHREAD, 0x28B, UINT8, QuantumReset)
+C_ASSERT_FIELD(KTHREAD, 0x28C, ULONG32, KernelTime)
+C_ASSERT_FIELD(KTHREAD, 0x2C8, KPRCB*, WaitPrcb)
+C_ASSERT_FIELD(KTHREAD, 0x2D0, PVOID, LegoData)
+C_ASSERT_FIELD(KTHREAD, 0x2DB, UINT8, CallbackNestingLevel)
+C_ASSERT_FIELD(KTHREAD, 0x2DC, ULONG32, UserTime)
+C_ASSERT_FIELD(KTHREAD, 0x2E0, KEVENT, SuspendEvent)
+C_ASSERT_FIELD(KTHREAD, 0x2F8, LIST_ENTRY, ThreadListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x308, LIST_ENTRY, MutantListHead)
+C_ASSERT_FIELD(KTHREAD, 0x318, UINT8, AbEntrySummary)
+C_ASSERT_FIELD(KTHREAD, 0x319, UINT8, AbWaitEntryCount)
+C_ASSERT_FIELD(KTHREAD, 0x31A, UINT16, Spare20)
+C_ASSERT_FIELD(KTHREAD, 0x31C, ULONG32, SecureThreadCookie)
+C_ASSERT_FIELD(KTHREAD, 0x320, KLOCK_ENTRY[6], LockEntries)
+C_ASSERT_FIELD(KTHREAD, 0x560, SINGLE_LIST_ENTRY, PropagateBoostsEntry)
+C_ASSERT_FIELD(KTHREAD, 0x568, SINGLE_LIST_ENTRY, IoSelfBoostsEntry)
+C_ASSERT_FIELD(KTHREAD, 0x570, UINT8[16], PriorityFloorCounts)
+C_ASSERT_FIELD(KTHREAD, 0x580, ULONG32, PriorityFloorSummary)
+C_ASSERT_FIELD(KTHREAD, 0x584, LONG32, AbCompletedIoBoostCount)
+C_ASSERT_FIELD(KTHREAD, 0x588, INT16, KeReferenceCount)
+C_ASSERT_FIELD(KTHREAD, 0x58A, UINT8, AbOrphanedEntrySummary)
+C_ASSERT_FIELD(KTHREAD, 0x58B, UINT8, AbOwnedEntryCount)
+C_ASSERT_FIELD(KTHREAD, 0x58C, ULONG32, ForegroundLossTime)
+C_ASSERT_FIELD(KTHREAD, 0x590, LIST_ENTRY, GlobalForegroundListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x590, SINGLE_LIST_ENTRY, ForegroundDpcStackListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x598, UINT64, InGlobalForegroundList)
+C_ASSERT_FIELD(KTHREAD, 0x5A0, INT64, ReadOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x5A8, INT64, WriteOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x5B0, INT64, OtherOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x5B8, INT64, ReadTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x5C0, INT64, WriteTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x5C8, INT64, OtherTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x5D0, KSCB*, QueuedScb)
Propchange: trunk/reactos/include/ndk/tests/win10_x64.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/include/ndk/tests/win10_x86.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/tests/win10_x8…
==============================================================================
--- trunk/reactos/include/ndk/tests/win10_x86.c (added)
+++ trunk/reactos/include/ndk/tests/win10_x86.c [iso-8859-1] Sat Dec 5 23:17:24 2015
@@ -0,0 +1,111 @@
+/* Version definitions */
+#undef NTDDI_VERSION
+#define NTDDI_VERSION NTDDI_WIN10
+#undef _WIN32_WINNT
+#define _WIN32_WINNT _WIN32_WINNT_WIN10
+
+#include <ntifs.h>
+#include <ndk/ntndk.h>
+
+#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type,
MemberName) == Offset);
+
+/* KTHREAD */
+C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header)
+C_ASSERT_FIELD(KTHREAD, 0x010, PVOID, SListFaultAddress)
+C_ASSERT_FIELD(KTHREAD, 0x018, UINT64, QuantumTarget)
+C_ASSERT_FIELD(KTHREAD, 0x020, PVOID, InitialStack)
+C_ASSERT_FIELD(KTHREAD, 0x024, PVOID, StackLimit)
+C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, StackBase)
+C_ASSERT_FIELD(KTHREAD, 0x02C, ULONG32, ThreadLock)
+C_ASSERT_FIELD(KTHREAD, 0x030, UINT64, CycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x038, ULONG32, HighCycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x03C, PVOID, ServiceTable)
+C_ASSERT_FIELD(KTHREAD, 0x040, ULONG32, CurrentRunTime)
+C_ASSERT_FIELD(KTHREAD, 0x044, ULONG32, ExpectedRunTime)
+C_ASSERT_FIELD(KTHREAD, 0x048, PVOID, KernelStack)
+C_ASSERT_FIELD(KTHREAD, 0x04C, XSAVE_FORMAT*, StateSaveArea)
+C_ASSERT_FIELD(KTHREAD, 0x050, KSCHEDULING_GROUP*, SchedulingGroup)
+C_ASSERT_FIELD(KTHREAD, 0x054, KWAIT_STATUS_REGISTER, WaitRegister)
+C_ASSERT_FIELD(KTHREAD, 0x055, UINT8, Running)
+C_ASSERT_FIELD(KTHREAD, 0x056, UINT8[2], Alerted)
+C_ASSERT_FIELD(KTHREAD, 0x058, LONG32, MiscFlags)
+C_ASSERT_FIELD(KTHREAD, 0x05C, LONG32, ThreadFlags)
+C_ASSERT_FIELD(KTHREAD, 0x060, UINT8, Tag)
+C_ASSERT_FIELD(KTHREAD, 0x061, UINT8, SystemHeteroCpuPolicy)
+C_ASSERT_FIELD(KTHREAD, 0x063, UINT8, Spare0)
+C_ASSERT_FIELD(KTHREAD, 0x064, ULONG32, SystemCallNumber)
+C_ASSERT_FIELD(KTHREAD, 0x068, PVOID, FirstArgument)
+C_ASSERT_FIELD(KTHREAD, 0x06C, KTRAP_FRAME*, TrapFrame)
+C_ASSERT_FIELD(KTHREAD, 0x070, KAPC_STATE, ApcState)
+C_ASSERT_FIELD(KTHREAD, 0x088, ULONG32, UserIdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x08C, ULONG32, ContextSwitches)
+C_ASSERT_FIELD(KTHREAD, 0x090, UINT8, State)
+C_ASSERT_FIELD(KTHREAD, 0x091, CHAR, Spare12)
+C_ASSERT_FIELD(KTHREAD, 0x092, UINT8, WaitIrql)
+C_ASSERT_FIELD(KTHREAD, 0x093, CHAR, WaitMode)
+C_ASSERT_FIELD(KTHREAD, 0x094, LONG32, WaitStatus)
+C_ASSERT_FIELD(KTHREAD, 0x098, KWAIT_BLOCK*, WaitBlockList)
+C_ASSERT_FIELD(KTHREAD, 0x09C, LIST_ENTRY, WaitListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x09C, SINGLE_LIST_ENTRY, SwapListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x0A4, DISPATCHER_HEADER*, Queue)
+C_ASSERT_FIELD(KTHREAD, 0x0A8, PVOID, Teb)
+C_ASSERT_FIELD(KTHREAD, 0x0B0, UINT64, RelativeTimerBias)
+C_ASSERT_FIELD(KTHREAD, 0x0B8, KTIMER, Timer)
+C_ASSERT_FIELD(KTHREAD, 0x0E0, KWAIT_BLOCK[4], WaitBlock)
+C_ASSERT_FIELD(KTHREAD, 0x0F4, KTHREAD_COUNTERS*, ThreadCounters)
+C_ASSERT_FIELD(KTHREAD, 0x10C, XSTATE_SAVE*, XStateSave)
+C_ASSERT_FIELD(KTHREAD, 0x124, PVOID, Win32Thread)
+C_ASSERT_FIELD(KTHREAD, 0x138, ULONG32, WaitTime)
+C_ASSERT_FIELD(KTHREAD, 0x13C, INT16, KernelApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x13E, INT16, SpecialApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x13C, ULONG32, CombinedApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x140, LIST_ENTRY, QueueListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x148, ULONG32, NextProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x14C, LONG32, QueuePriority)
+C_ASSERT_FIELD(KTHREAD, 0x150, KPROCESS*, Process)
+C_ASSERT_FIELD(KTHREAD, 0x154, GROUP_AFFINITY, UserAffinity)
+C_ASSERT_FIELD(KTHREAD, 0x15A, CHAR, PreviousMode)
+C_ASSERT_FIELD(KTHREAD, 0x15B, CHAR, BasePriority)
+C_ASSERT_FIELD(KTHREAD, 0x15C, CHAR, PriorityDecrement)
+C_ASSERT_FIELD(KTHREAD, 0x15D, UINT8, Preempted)
+C_ASSERT_FIELD(KTHREAD, 0x15E, UINT8, AdjustReason)
+C_ASSERT_FIELD(KTHREAD, 0x15F, CHAR, AdjustIncrement)
+C_ASSERT_FIELD(KTHREAD, 0x160, ULONG32, AffinityVersion)
+C_ASSERT_FIELD(KTHREAD, 0x164, GROUP_AFFINITY, Affinity)
+C_ASSERT_FIELD(KTHREAD, 0x16A, UINT8, ApcStateIndex)
+C_ASSERT_FIELD(KTHREAD, 0x16B, UINT8, WaitBlockCount)
+C_ASSERT_FIELD(KTHREAD, 0x16C, ULONG32, IdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x174, KAPC_STATE, SavedApcState)
+C_ASSERT_FIELD(KTHREAD, 0x18B, UINT8, WaitReason)
+C_ASSERT_FIELD(KTHREAD, 0x18C, CHAR, SuspendCount)
+C_ASSERT_FIELD(KTHREAD, 0x18D, CHAR, Saturation)
+C_ASSERT_FIELD(KTHREAD, 0x18E, UINT16, SListFaultCount)
+C_ASSERT_FIELD(KTHREAD, 0x190, KAPC, SchedulerApc)
+C_ASSERT_FIELD(KTHREAD, 0x191, UINT8, ResourceIndex)
+C_ASSERT_FIELD(KTHREAD, 0x193, UINT8, QuantumReset)
+C_ASSERT_FIELD(KTHREAD, 0x194, ULONG32, KernelTime)
+C_ASSERT_FIELD(KTHREAD, 0x1B4, KPRCB*, WaitPrcb)
+C_ASSERT_FIELD(KTHREAD, 0x1B8, PVOID, LegoData)
+C_ASSERT_FIELD(KTHREAD, 0x1BF, UINT8, CallbackNestingLevel)
+C_ASSERT_FIELD(KTHREAD, 0x1C0, ULONG32, UserTime)
+C_ASSERT_FIELD(KTHREAD, 0x1C4, KEVENT, SuspendEvent)
+C_ASSERT_FIELD(KTHREAD, 0x1D4, LIST_ENTRY, ThreadListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x1DC, LIST_ENTRY, MutantListHead)
+C_ASSERT_FIELD(KTHREAD, 0x1E4, UINT8, AbEntrySummary)
+C_ASSERT_FIELD(KTHREAD, 0x1E5, UINT8, AbWaitEntryCount)
+C_ASSERT_FIELD(KTHREAD, 0x1E6, UINT16, Spare20)
+C_ASSERT_FIELD(KTHREAD, 0x1E8, KLOCK_ENTRY[6], LockEntries)
+C_ASSERT_FIELD(KTHREAD, 0x308, SINGLE_LIST_ENTRY, PropagateBoostsEntry)
+C_ASSERT_FIELD(KTHREAD, 0x30C, SINGLE_LIST_ENTRY, IoSelfBoostsEntry)
+C_ASSERT_FIELD(KTHREAD, 0x310, UINT8[16], PriorityFloorCounts)
+C_ASSERT_FIELD(KTHREAD, 0x320, ULONG32, PriorityFloorSummary)
+C_ASSERT_FIELD(KTHREAD, 0x324, LONG32, AbCompletedIoBoostCount)
+C_ASSERT_FIELD(KTHREAD, 0x328, INT16, KeReferenceCount)
+C_ASSERT_FIELD(KTHREAD, 0x32A, UINT8, AbOrphanedEntrySummary)
+C_ASSERT_FIELD(KTHREAD, 0x32B, UINT8, AbOwnedEntryCount)
+C_ASSERT_FIELD(KTHREAD, 0x32C, ULONG32, ForegroundLossTime)
+C_ASSERT_FIELD(KTHREAD, 0x330, LIST_ENTRY, GlobalForegroundListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x330, SINGLE_LIST_ENTRY, ForegroundDpcStackListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x334, ULONG32, InGlobalForegroundList)
+C_ASSERT_FIELD(KTHREAD, 0x338, KSCB*, QueuedScb)
+C_ASSERT_FIELD(KTHREAD, 0x340, UINT64, NpxState)
Propchange: trunk/reactos/include/ndk/tests/win10_x86.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/include/ndk/tests/win81_x64.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/tests/win81_x6…
==============================================================================
--- trunk/reactos/include/ndk/tests/win81_x64.c (added)
+++ trunk/reactos/include/ndk/tests/win81_x64.c [iso-8859-1] Sat Dec 5 23:17:24 2015
@@ -0,0 +1,114 @@
+/* Version definitions */
+#undef NTDDI_VERSION
+#define NTDDI_VERSION NTDDI_WINBLUE
+#undef _WIN32_WINNT
+#define _WIN32_WINNT _WIN32_WINNT_WINBLUE
+
+#include <ntifs.h>
+#include <ndk/ntndk.h>
+
+#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type,
MemberName) == Offset);
+
+/* KTHREAD */
+C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header)
+C_ASSERT_FIELD(KTHREAD, 0x018, PVOID, SListFaultAddress)
+C_ASSERT_FIELD(KTHREAD, 0x020, UINT64, QuantumTarget)
+C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, InitialStack)
+C_ASSERT_FIELD(KTHREAD, 0x030, PVOID, StackLimit)
+C_ASSERT_FIELD(KTHREAD, 0x038, PVOID, StackBase)
+C_ASSERT_FIELD(KTHREAD, 0x040, UINT64, ThreadLock)
+C_ASSERT_FIELD(KTHREAD, 0x048, UINT64, CycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x050, ULONG32, CurrentRunTime)
+C_ASSERT_FIELD(KTHREAD, 0x054, ULONG32, ExpectedRunTime)
+C_ASSERT_FIELD(KTHREAD, 0x058, PVOID, KernelStack)
+C_ASSERT_FIELD(KTHREAD, 0x060, XSAVE_FORMAT*, StateSaveArea)
+C_ASSERT_FIELD(KTHREAD, 0x068, KSCHEDULING_GROUP*, SchedulingGroup)
+C_ASSERT_FIELD(KTHREAD, 0x070, KWAIT_STATUS_REGISTER, WaitRegister)
+C_ASSERT_FIELD(KTHREAD, 0x071, UINT8, Running)
+C_ASSERT_FIELD(KTHREAD, 0x072, UINT8[2], Alerted)
+C_ASSERT_FIELD(KTHREAD, 0x074, LONG32, MiscFlags)
+C_ASSERT_FIELD(KTHREAD, 0x078, LONG32, ThreadFlags)
+C_ASSERT_FIELD(KTHREAD, 0x07C, ULONG32, Spare0)
+C_ASSERT_FIELD(KTHREAD, 0x080, ULONG32, SystemCallNumber)
+C_ASSERT_FIELD(KTHREAD, 0x084, ULONG32, Spare1)
+C_ASSERT_FIELD(KTHREAD, 0x088, PVOID, FirstArgument)
+C_ASSERT_FIELD(KTHREAD, 0x090, KTRAP_FRAME*, TrapFrame)
+C_ASSERT_FIELD(KTHREAD, 0x098, KAPC_STATE, ApcState)
+C_ASSERT_FIELD(KTHREAD, 0x0C3, CHAR, Priority)
+C_ASSERT_FIELD(KTHREAD, 0x0C4, ULONG32, UserIdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x0C8, INT64, WaitStatus)
+C_ASSERT_FIELD(KTHREAD, 0x0D0, KWAIT_BLOCK*, WaitBlockList)
+C_ASSERT_FIELD(KTHREAD, 0x0D8, LIST_ENTRY, WaitListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x0D8, SINGLE_LIST_ENTRY, SwapListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x0E8, DISPATCHER_HEADER*, Queue)
+C_ASSERT_FIELD(KTHREAD, 0x0F0, PVOID, Teb)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UINT64, RelativeTimerBias)
+C_ASSERT_FIELD(KTHREAD, 0x100, KTIMER, Timer)
+C_ASSERT_FIELD(KTHREAD, 0x140, KWAIT_BLOCK[4], WaitBlock)
+C_ASSERT_FIELD(KTHREAD, 0x154, ULONG32, ContextSwitches)
+C_ASSERT_FIELD(KTHREAD, 0x184, UINT8, State)
+C_ASSERT_FIELD(KTHREAD, 0x185, CHAR, NpxState)
+C_ASSERT_FIELD(KTHREAD, 0x186, UINT8, WaitIrql)
+C_ASSERT_FIELD(KTHREAD, 0x187, CHAR, WaitMode)
+C_ASSERT_FIELD(KTHREAD, 0x1B4, ULONG32, WaitTime)
+C_ASSERT_FIELD(KTHREAD, 0x1E4, INT16, KernelApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x1E6, INT16, SpecialApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x1E4, ULONG32, CombinedApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x168, KTHREAD_COUNTERS*, ThreadCounters)
+C_ASSERT_FIELD(KTHREAD, 0x198, XSTATE_SAVE*, XStateSave)
+C_ASSERT_FIELD(KTHREAD, 0x1C8, PVOID, Win32Thread)
+C_ASSERT_FIELD(KTHREAD, 0x1F0, UMS_CONTROL_BLOCK*, Ucb)
+C_ASSERT_FIELD(KTHREAD, 0x1F8, KUMS_CONTEXT_HEADER*, Uch)
+C_ASSERT_FIELD(KTHREAD, 0x200, PVOID, TebMappedLowVa)
+C_ASSERT_FIELD(KTHREAD, 0x208, LIST_ENTRY, QueueListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x218, ULONG32, NextProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x21C, LONG32, QueuePriority)
+C_ASSERT_FIELD(KTHREAD, 0x220, KPROCESS*, Process)
+C_ASSERT_FIELD(KTHREAD, 0x228, GROUP_AFFINITY, UserAffinity)
+C_ASSERT_FIELD(KTHREAD, 0x232, CHAR, PreviousMode)
+C_ASSERT_FIELD(KTHREAD, 0x233, CHAR, BasePriority)
+C_ASSERT_FIELD(KTHREAD, 0x234, CHAR, PriorityDecrement)
+C_ASSERT_FIELD(KTHREAD, 0x235, UINT8, Preempted)
+C_ASSERT_FIELD(KTHREAD, 0x236, UINT8, AdjustReason)
+C_ASSERT_FIELD(KTHREAD, 0x237, CHAR, AdjustIncrement)
+C_ASSERT_FIELD(KTHREAD, 0x238, GROUP_AFFINITY, Affinity)
+C_ASSERT_FIELD(KTHREAD, 0x242, UINT8, ApcStateIndex)
+C_ASSERT_FIELD(KTHREAD, 0x243, UINT8, WaitBlockCount)
+C_ASSERT_FIELD(KTHREAD, 0x244, ULONG32, IdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x248, KAPC_STATE*[2], ApcStatePointer)
+C_ASSERT_FIELD(KTHREAD, 0x258, KAPC_STATE, SavedApcState)
+C_ASSERT_FIELD(KTHREAD, 0x283, UINT8, WaitReason)
+C_ASSERT_FIELD(KTHREAD, 0x284, CHAR, SuspendCount)
+C_ASSERT_FIELD(KTHREAD, 0x285, CHAR, Saturation)
+C_ASSERT_FIELD(KTHREAD, 0x286, UINT16, SListFaultCount)
+C_ASSERT_FIELD(KTHREAD, 0x288, KAPC, SchedulerApc)
+C_ASSERT_FIELD(KTHREAD, 0x289, UINT8, ResourceIndex)
+C_ASSERT_FIELD(KTHREAD, 0x28B, UINT8, QuantumReset)
+C_ASSERT_FIELD(KTHREAD, 0x28C, ULONG32, KernelTime)
+C_ASSERT_FIELD(KTHREAD, 0x2C8, KPRCB*, WaitPrcb)
+C_ASSERT_FIELD(KTHREAD, 0x2D0, PVOID, LegoData)
+C_ASSERT_FIELD(KTHREAD, 0x2DB, UINT8, CallbackNestingLevel)
+C_ASSERT_FIELD(KTHREAD, 0x2DC, ULONG32, UserTime)
+C_ASSERT_FIELD(KTHREAD, 0x2E0, KEVENT, SuspendEvent)
+C_ASSERT_FIELD(KTHREAD, 0x2F8, LIST_ENTRY, ThreadListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x308, LIST_ENTRY, MutantListHead)
+C_ASSERT_FIELD(KTHREAD, 0x318, SINGLE_LIST_ENTRY, LockEntriesFreeList)
+C_ASSERT_FIELD(KTHREAD, 0x320, KLOCK_ENTRY[6], LockEntries)
+C_ASSERT_FIELD(KTHREAD, 0x560, SINGLE_LIST_ENTRY, PropagateBoostsEntry)
+C_ASSERT_FIELD(KTHREAD, 0x568, SINGLE_LIST_ENTRY, IoSelfBoostsEntry)
+C_ASSERT_FIELD(KTHREAD, 0x570, UINT8[16], PriorityFloorCounts)
+C_ASSERT_FIELD(KTHREAD, 0x580, ULONG32, PriorityFloorSummary)
+C_ASSERT_FIELD(KTHREAD, 0x584, LONG32, AbCompletedIoBoostCount)
+C_ASSERT_FIELD(KTHREAD, 0x588, INT16, AbReferenceCount)
+C_ASSERT_FIELD(KTHREAD, 0x58A, UINT8, AbFreeEntryCount)
+C_ASSERT_FIELD(KTHREAD, 0x58B, UINT8, AbWaitEntryCount)
+C_ASSERT_FIELD(KTHREAD, 0x58C, ULONG32, ForegroundLossTime)
+C_ASSERT_FIELD(KTHREAD, 0x590, LIST_ENTRY, GlobalForegroundListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x590, SINGLE_LIST_ENTRY, ForegroundDpcStackListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x598, UINT64, InGlobalForegroundList)
+C_ASSERT_FIELD(KTHREAD, 0x5A0, INT64, ReadOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x5A8, INT64, WriteOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x5B0, INT64, OtherOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x5B8, INT64, ReadTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x5C0, INT64, WriteTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x5C8, INT64, OtherTransferCount)
Propchange: trunk/reactos/include/ndk/tests/win81_x64.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/include/ndk/tests/win81_x86.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/tests/win81_x8…
==============================================================================
--- trunk/reactos/include/ndk/tests/win81_x86.c (added)
+++ trunk/reactos/include/ndk/tests/win81_x86.c [iso-8859-1] Sat Dec 5 23:17:24 2015
@@ -0,0 +1,107 @@
+/* Version definitions */
+#undef NTDDI_VERSION
+#define NTDDI_VERSION NTDDI_WINBLUE
+#undef _WIN32_WINNT
+#define _WIN32_WINNT _WIN32_WINNT_WINBLUE
+
+#include <ntifs.h>
+#include <ndk/ntndk.h>
+
+#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type,
MemberName) == Offset);
+
+/* KTHREAD */
+C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header)
+
+C_ASSERT_FIELD(KTHREAD, 0x010, PVOID, SListFaultAddress)
+C_ASSERT_FIELD(KTHREAD, 0x018, UINT64, QuantumTarget)
+C_ASSERT_FIELD(KTHREAD, 0x020, PVOID, InitialStack)
+C_ASSERT_FIELD(KTHREAD, 0x024, PVOID, StackLimit)
+C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, StackBase)
+C_ASSERT_FIELD(KTHREAD, 0x02C, ULONG32, ThreadLock)
+C_ASSERT_FIELD(KTHREAD, 0x030, UINT64, CycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x038, ULONG32, HighCycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x03C, PVOID, ServiceTable)
+C_ASSERT_FIELD(KTHREAD, 0x040, ULONG32, CurrentRunTime)
+C_ASSERT_FIELD(KTHREAD, 0x044, ULONG32, ExpectedRunTime)
+C_ASSERT_FIELD(KTHREAD, 0x048, PVOID, KernelStack)
+C_ASSERT_FIELD(KTHREAD, 0x04C, XSAVE_FORMAT*, StateSaveArea)
+C_ASSERT_FIELD(KTHREAD, 0x050, KSCHEDULING_GROUP*, SchedulingGroup)
+C_ASSERT_FIELD(KTHREAD, 0x054, KWAIT_STATUS_REGISTER, WaitRegister)
+C_ASSERT_FIELD(KTHREAD, 0x055, UINT8, Running)
+C_ASSERT_FIELD(KTHREAD, 0x056, UINT8[2], Alerted)
+C_ASSERT_FIELD(KTHREAD, 0x058, LONG32, MiscFlags)
+C_ASSERT_FIELD(KTHREAD, 0x05C, LONG32, ThreadFlags)
+C_ASSERT_FIELD(KTHREAD, 0x060, ULONG32, Spare0)
+C_ASSERT_FIELD(KTHREAD, 0x064, ULONG32, SystemCallNumber)
+C_ASSERT_FIELD(KTHREAD, 0x068, PVOID, FirstArgument)
+C_ASSERT_FIELD(KTHREAD, 0x06C, KTRAP_FRAME*, TrapFrame)
+C_ASSERT_FIELD(KTHREAD, 0x070, KAPC_STATE, ApcState)
+C_ASSERT_FIELD(KTHREAD, 0x087, CHAR, Priority)
+C_ASSERT_FIELD(KTHREAD, 0x088, ULONG32, UserIdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x08C, ULONG32, ContextSwitches)
+C_ASSERT_FIELD(KTHREAD, 0x090, UINT8, State)
+C_ASSERT_FIELD(KTHREAD, 0x091, CHAR, NpxState)
+C_ASSERT_FIELD(KTHREAD, 0x092, UINT8, WaitIrql)
+C_ASSERT_FIELD(KTHREAD, 0x093, CHAR, WaitMode)
+C_ASSERT_FIELD(KTHREAD, 0x094, LONG32, WaitStatus)
+C_ASSERT_FIELD(KTHREAD, 0x098, KWAIT_BLOCK*, WaitBlockList)
+C_ASSERT_FIELD(KTHREAD, 0x09C, LIST_ENTRY, WaitListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x09C, SINGLE_LIST_ENTRY, SwapListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x0A4, DISPATCHER_HEADER*, Queue)
+C_ASSERT_FIELD(KTHREAD, 0x0A8, PVOID, Teb)
+C_ASSERT_FIELD(KTHREAD, 0x0B0, UINT64, RelativeTimerBias)
+C_ASSERT_FIELD(KTHREAD, 0x0B8, KTIMER, Timer)
+C_ASSERT_FIELD(KTHREAD, 0x0E0, KWAIT_BLOCK[4], WaitBlock)
+C_ASSERT_FIELD(KTHREAD, 0x0F4, KTHREAD_COUNTERS*, ThreadCounters)
+C_ASSERT_FIELD(KTHREAD, 0x10C, XSTATE_SAVE*, XStateSave)
+C_ASSERT_FIELD(KTHREAD, 0x124, PVOID, Win32Thread)
+C_ASSERT_FIELD(KTHREAD, 0x138, ULONG32, WaitTime)
+C_ASSERT_FIELD(KTHREAD, 0x13C, INT16, KernelApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x13E, INT16, SpecialApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x13C, ULONG32, CombinedApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x140, LIST_ENTRY, QueueListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x148, ULONG32, NextProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x14C, LONG32, QueuePriority)
+C_ASSERT_FIELD(KTHREAD, 0x150, KPROCESS*, Process)
+C_ASSERT_FIELD(KTHREAD, 0x154, GROUP_AFFINITY, UserAffinity)
+C_ASSERT_FIELD(KTHREAD, 0x15A, CHAR, PreviousMode)
+C_ASSERT_FIELD(KTHREAD, 0x15B, CHAR, BasePriority)
+C_ASSERT_FIELD(KTHREAD, 0x15C, CHAR, PriorityDecrement)
+C_ASSERT_FIELD(KTHREAD, 0x15D, UINT8, Preempted)
+C_ASSERT_FIELD(KTHREAD, 0x15E, UINT8, AdjustReason)
+C_ASSERT_FIELD(KTHREAD, 0x15F, CHAR, AdjustIncrement)
+C_ASSERT_FIELD(KTHREAD, 0x160, GROUP_AFFINITY, Affinity)
+C_ASSERT_FIELD(KTHREAD, 0x166, UINT8, ApcStateIndex)
+C_ASSERT_FIELD(KTHREAD, 0x167, UINT8, WaitBlockCount)
+C_ASSERT_FIELD(KTHREAD, 0x168, ULONG32, IdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x16C, KAPC_STATE*[2], ApcStatePointer)
+C_ASSERT_FIELD(KTHREAD, 0x174, KAPC_STATE, SavedApcState)
+C_ASSERT_FIELD(KTHREAD, 0x18B, UINT8, WaitReason)
+C_ASSERT_FIELD(KTHREAD, 0x18C, CHAR, SuspendCount)
+C_ASSERT_FIELD(KTHREAD, 0x18D, CHAR, Saturation)
+C_ASSERT_FIELD(KTHREAD, 0x18E, UINT16, SListFaultCount)
+C_ASSERT_FIELD(KTHREAD, 0x190, KAPC, SchedulerApc)
+C_ASSERT_FIELD(KTHREAD, 0x191, UINT8, ResourceIndex)
+C_ASSERT_FIELD(KTHREAD, 0x193, UINT8, QuantumReset)
+C_ASSERT_FIELD(KTHREAD, 0x194, ULONG32, KernelTime)
+C_ASSERT_FIELD(KTHREAD, 0x1B4, KPRCB*, WaitPrcb)
+C_ASSERT_FIELD(KTHREAD, 0x1B8, PVOID, LegoData)
+C_ASSERT_FIELD(KTHREAD, 0x1BF, UINT8, CallbackNestingLevel)
+C_ASSERT_FIELD(KTHREAD, 0x1C0, ULONG32, UserTime)
+C_ASSERT_FIELD(KTHREAD, 0x1C4, KEVENT, SuspendEvent)
+C_ASSERT_FIELD(KTHREAD, 0x1D4, LIST_ENTRY, ThreadListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x1DC, LIST_ENTRY, MutantListHead)
+C_ASSERT_FIELD(KTHREAD, 0x1E4, SINGLE_LIST_ENTRY, LockEntriesFreeList)
+C_ASSERT_FIELD(KTHREAD, 0x1E8, KLOCK_ENTRY[6], LockEntries)
+C_ASSERT_FIELD(KTHREAD, 0x308, SINGLE_LIST_ENTRY, PropagateBoostsEntry)
+C_ASSERT_FIELD(KTHREAD, 0x30C, SINGLE_LIST_ENTRY, IoSelfBoostsEntry)
+C_ASSERT_FIELD(KTHREAD, 0x310, UINT8[16], PriorityFloorCounts)
+C_ASSERT_FIELD(KTHREAD, 0x320, ULONG32, PriorityFloorSummary)
+C_ASSERT_FIELD(KTHREAD, 0x324, LONG32, AbCompletedIoBoostCount)
+C_ASSERT_FIELD(KTHREAD, 0x328, INT16, AbReferenceCount)
+C_ASSERT_FIELD(KTHREAD, 0x32A, UINT8, AbFreeEntryCount)
+C_ASSERT_FIELD(KTHREAD, 0x32B, UINT8, AbWaitEntryCount)
+C_ASSERT_FIELD(KTHREAD, 0x32C, ULONG32, ForegroundLossTime)
+C_ASSERT_FIELD(KTHREAD, 0x330, LIST_ENTRY, GlobalForegroundListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x330, SINGLE_LIST_ENTRY, ForegroundDpcStackListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x334, ULONG32, InGlobalForegroundList)
Propchange: trunk/reactos/include/ndk/tests/win81_x86.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/include/ndk/tests/win8_x64.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/tests/win8_x64…
==============================================================================
--- trunk/reactos/include/ndk/tests/win8_x64.c (added)
+++ trunk/reactos/include/ndk/tests/win8_x64.c [iso-8859-1] Sat Dec 5 23:17:24 2015
@@ -0,0 +1,100 @@
+/* Version definitions */
+#undef NTDDI_VERSION
+#define NTDDI_VERSION NTDDI_WIN8
+#undef _WIN32_WINNT
+#define _WIN32_WINNT _WIN32_WINNT_WIN8
+
+#include <ntifs.h>
+#include <ndk/ntndk.h>
+
+#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type,
MemberName) == Offset);
+
+/* KTHREAD */
+C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header)
+C_ASSERT_FIELD(KTHREAD, 0x018, PVOID, SListFaultAddress)
+C_ASSERT_FIELD(KTHREAD, 0x020, UINT64, QuantumTarget)
+C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, InitialStack)
+C_ASSERT_FIELD(KTHREAD, 0x030, PVOID, StackLimit)
+C_ASSERT_FIELD(KTHREAD, 0x038, PVOID, StackBase)
+C_ASSERT_FIELD(KTHREAD, 0x040, UINT64, ThreadLock)
+C_ASSERT_FIELD(KTHREAD, 0x048, UINT64, CycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x050, ULONG, CurrentRunTime)
+C_ASSERT_FIELD(KTHREAD, 0x054, ULONG, ExpectedRunTime)
+C_ASSERT_FIELD(KTHREAD, 0x058, PVOID, KernelStack)
+C_ASSERT_FIELD(KTHREAD, 0x060, XSAVE_FORMAT*, StateSaveArea)
+C_ASSERT_FIELD(KTHREAD, 0x068, KSCHEDULING_GROUP*, SchedulingGroup)
+C_ASSERT_FIELD(KTHREAD, 0x070, KWAIT_STATUS_REGISTER, WaitRegister)
+C_ASSERT_FIELD(KTHREAD, 0x071, UINT8, Running)
+C_ASSERT_FIELD(KTHREAD, 0x072, UINT8[2], Alerted)
+C_ASSERT_FIELD(KTHREAD, 0x074, LONG32, MiscFlags)
+C_ASSERT_FIELD(KTHREAD, 0x078, LONG32, ThreadFlags)
+C_ASSERT_FIELD(KTHREAD, 0x07C, ULONG, Spare0)
+C_ASSERT_FIELD(KTHREAD, 0x080, ULONG, SystemCallNumber)
+C_ASSERT_FIELD(KTHREAD, 0x084, ULONG, Spare1)
+C_ASSERT_FIELD(KTHREAD, 0x088, PVOID, FirstArgument)
+C_ASSERT_FIELD(KTHREAD, 0x090, KTRAP_FRAME*, TrapFrame)
+C_ASSERT_FIELD(KTHREAD, 0x098, KAPC_STATE, ApcState)
+C_ASSERT_FIELD(KTHREAD, 0x0C3, CHAR, Priority)
+C_ASSERT_FIELD(KTHREAD, 0x0C4, ULONG, UserIdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x0C8, INT64, WaitStatus)
+C_ASSERT_FIELD(KTHREAD, 0x0D0, KWAIT_BLOCK*, WaitBlockList)
+C_ASSERT_FIELD(KTHREAD, 0x0D8, LIST_ENTRY, WaitListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x0D8, SINGLE_LIST_ENTRY, SwapListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x0E8, KQUEUE*, Queue)
+C_ASSERT_FIELD(KTHREAD, 0x0F0, PVOID, Teb)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UINT64, RelativeTimerBias)
+C_ASSERT_FIELD(KTHREAD, 0x100, KTIMER, Timer)
+C_ASSERT_FIELD(KTHREAD, 0x140, KWAIT_BLOCK[4], WaitBlock)
+C_ASSERT_FIELD(KTHREAD, 0x154, ULONG, ContextSwitches)
+C_ASSERT_FIELD(KTHREAD, 0x184, UINT8, State)
+C_ASSERT_FIELD(KTHREAD, 0x185, CHAR, NpxState)
+C_ASSERT_FIELD(KTHREAD, 0x186, UINT8, WaitIrql)
+C_ASSERT_FIELD(KTHREAD, 0x187, CHAR, WaitMode)
+C_ASSERT_FIELD(KTHREAD, 0x1B4, ULONG, WaitTime)
+C_ASSERT_FIELD(KTHREAD, 0x1E4, INT16, KernelApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x1E6, INT16, SpecialApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x1E4, ULONG, CombinedApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x168, KTHREAD_COUNTERS*, ThreadCounters)
+C_ASSERT_FIELD(KTHREAD, 0x198, XSTATE_SAVE*, XStateSave)
+C_ASSERT_FIELD(KTHREAD, 0x1C8, PVOID, Win32Thread)
+C_ASSERT_FIELD(KTHREAD, 0x1F0, UMS_CONTROL_BLOCK*, Ucb)
+C_ASSERT_FIELD(KTHREAD, 0x1F8, KUMS_CONTEXT_HEADER*, Uch)
+C_ASSERT_FIELD(KTHREAD, 0x200, PVOID, TebMappedLowVa)
+C_ASSERT_FIELD(KTHREAD, 0x208, LIST_ENTRY, QueueListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x218, ULONG, NextProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x21C, ULONG, DeferredProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x220, KPROCESS*, Process)
+C_ASSERT_FIELD(KTHREAD, 0x228, GROUP_AFFINITY, UserAffinity)
+C_ASSERT_FIELD(KTHREAD, 0x232, CHAR, PreviousMode)
+C_ASSERT_FIELD(KTHREAD, 0x233, CHAR, BasePriority)
+C_ASSERT_FIELD(KTHREAD, 0x234, CHAR, PriorityDecrement)
+C_ASSERT_FIELD(KTHREAD, 0x235, UINT8, Preempted)
+C_ASSERT_FIELD(KTHREAD, 0x236, UINT8, AdjustReason)
+C_ASSERT_FIELD(KTHREAD, 0x237, CHAR, AdjustIncrement)
+C_ASSERT_FIELD(KTHREAD, 0x238, GROUP_AFFINITY, Affinity)
+C_ASSERT_FIELD(KTHREAD, 0x242, UINT8, ApcStateIndex)
+C_ASSERT_FIELD(KTHREAD, 0x243, UINT8, WaitBlockCount)
+C_ASSERT_FIELD(KTHREAD, 0x244, ULONG, IdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x248, KAPC_STATE*[2], ApcStatePointer)
+C_ASSERT_FIELD(KTHREAD, 0x258, KAPC_STATE, SavedApcState)
+C_ASSERT_FIELD(KTHREAD, 0x283, UINT8, WaitReason)
+C_ASSERT_FIELD(KTHREAD, 0x284, CHAR, SuspendCount)
+C_ASSERT_FIELD(KTHREAD, 0x285, CHAR, Saturation)
+C_ASSERT_FIELD(KTHREAD, 0x286, UINT16, SListFaultCount)
+C_ASSERT_FIELD(KTHREAD, 0x288, KAPC, SchedulerApc)
+C_ASSERT_FIELD(KTHREAD, 0x289, UINT8, ResourceIndex)
+C_ASSERT_FIELD(KTHREAD, 0x28B, UINT8, QuantumReset)
+C_ASSERT_FIELD(KTHREAD, 0x28C, ULONG, KernelTime)
+C_ASSERT_FIELD(KTHREAD, 0x2C8, KPRCB*, WaitPrcb)
+C_ASSERT_FIELD(KTHREAD, 0x2D0, PVOID, LegoData)
+C_ASSERT_FIELD(KTHREAD, 0x2DB, UINT8, CallbackNestingLevel)
+C_ASSERT_FIELD(KTHREAD, 0x2DC, ULONG, UserTime)
+C_ASSERT_FIELD(KTHREAD, 0x2E0, KEVENT, SuspendEvent)
+C_ASSERT_FIELD(KTHREAD, 0x2F8, LIST_ENTRY, ThreadListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x308, LIST_ENTRY, MutantListHead)
+C_ASSERT_FIELD(KTHREAD, 0x318, INT64, ReadOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x320, INT64, WriteOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x328, INT64, OtherOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x330, INT64, ReadTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x338, INT64, WriteTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x340, INT64, OtherTransferCount)
Propchange: trunk/reactos/include/ndk/tests/win8_x64.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/include/ndk/tests/win8_x86.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/tests/win8_x86…
==============================================================================
--- trunk/reactos/include/ndk/tests/win8_x86.c (added)
+++ trunk/reactos/include/ndk/tests/win8_x86.c [iso-8859-1] Sat Dec 5 23:17:24 2015
@@ -0,0 +1,91 @@
+/* Version definitions */
+#undef NTDDI_VERSION
+#define NTDDI_VERSION NTDDI_WIN8
+#undef _WIN32_WINNT
+#define _WIN32_WINNT _WIN32_WINNT_WIN8
+
+#include <ntifs.h>
+#include <ndk/ntndk.h>
+
+#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type,
MemberName) == Offset);
+
+/* KTHREAD */
+C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header)
+C_ASSERT_FIELD(KTHREAD, 0x010, UINT64, SListFaultAddress)
+C_ASSERT_FIELD(KTHREAD, 0x018, UINT64, QuantumTarget)
+C_ASSERT_FIELD(KTHREAD, 0x020, PVOID, InitialStack)
+C_ASSERT_FIELD(KTHREAD, 0x024, PVOID, StackLimit)
+C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, StackBase)
+C_ASSERT_FIELD(KTHREAD, 0x02C, PVOID, ThreadLock)
+C_ASSERT_FIELD(KTHREAD, 0x030, UINT64, CycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x038, ULONG, HighCycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x03C, PVOID, ServiceTable)
+C_ASSERT_FIELD(KTHREAD, 0x040, ULONG, CurrentRunTime)
+C_ASSERT_FIELD(KTHREAD, 0x044, ULONG, ExpectedRunTime)
+C_ASSERT_FIELD(KTHREAD, 0x048, PVOID, KernelStack)
+C_ASSERT_FIELD(KTHREAD, 0x04C, PXSAVE_FORMAT, StateSaveArea)
+C_ASSERT_FIELD(KTHREAD, 0x050, PKSCHEDULING_GROUP, SchedulingGroup)
+C_ASSERT_FIELD(KTHREAD, 0x054, KWAIT_STATUS_REGISTER, WaitRegister)
+C_ASSERT_FIELD(KTHREAD, 0x055, UCHAR, Running)
+C_ASSERT_FIELD(KTHREAD, 0x056, UCHAR[2], Alerted)
+C_ASSERT_FIELD(KTHREAD, 0x058, LONG, MiscFlags)
+C_ASSERT_FIELD(KTHREAD, 0x05C, LONG, ThreadFlags)
+C_ASSERT_FIELD(KTHREAD, 0x060, ULONG, Spare0)
+C_ASSERT_FIELD(KTHREAD, 0x064, ULONG, SystemCallNumber)
+C_ASSERT_FIELD(KTHREAD, 0x068, PVOID, FirstArgument)
+C_ASSERT_FIELD(KTHREAD, 0x06C, PKTRAP_FRAME, TrapFrame)
+C_ASSERT_FIELD(KTHREAD, 0x070, KAPC_STATE, ApcState)
+C_ASSERT_FIELD(KTHREAD, 0x087, CHAR, Priority)
+C_ASSERT_FIELD(KTHREAD, 0x088, ULONG, UserIdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x08C, ULONG, ContextSwitches)
+C_ASSERT_FIELD(KTHREAD, 0x090, UCHAR, State)
+C_ASSERT_FIELD(KTHREAD, 0x091, CHAR, NpxState)
+C_ASSERT_FIELD(KTHREAD, 0x092, UCHAR, WaitIrql)
+C_ASSERT_FIELD(KTHREAD, 0x093, CHAR, WaitMode)
+C_ASSERT_FIELD(KTHREAD, 0x094, LONG, WaitStatus)
+C_ASSERT_FIELD(KTHREAD, 0x098, PKWAIT_BLOCK, WaitBlockList)
+C_ASSERT_FIELD(KTHREAD, 0x09C, LIST_ENTRY, WaitListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x09C, SINGLE_LIST_ENTRY, SwapListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x0A4, PKQUEUE, Queue)
+C_ASSERT_FIELD(KTHREAD, 0x0A8, PVOID, Teb)
+C_ASSERT_FIELD(KTHREAD, 0x0B0, UINT64, RelativeTimerBias)
+C_ASSERT_FIELD(KTHREAD, 0x0B8, KTIMER, Timer)
+C_ASSERT_FIELD(KTHREAD, 0x0E0, KWAIT_BLOCK[4], WaitBlock)
+C_ASSERT_FIELD(KTHREAD, 0x0F4, PKTHREAD_COUNTERS, ThreadCounters)
+C_ASSERT_FIELD(KTHREAD, 0x10C, PXSTATE_SAVE, XStateSave)
+C_ASSERT_FIELD(KTHREAD, 0x124, PVOID, Win32Thread)
+C_ASSERT_FIELD(KTHREAD, 0x138, ULONG, WaitTime)
+C_ASSERT_FIELD(KTHREAD, 0x13C, SHORT, KernelApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x13E, SHORT, SpecialApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x13C, ULONG, CombinedApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x140, LIST_ENTRY, QueueListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x148, ULONG, NextProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x14C, ULONG, DeferredProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x150, PKPROCESS, Process)
+C_ASSERT_FIELD(KTHREAD, 0x154, GROUP_AFFINITY, UserAffinity)
+C_ASSERT_FIELD(KTHREAD, 0x15A, CHAR, PreviousMode)
+C_ASSERT_FIELD(KTHREAD, 0x15B, CHAR, BasePriority)
+C_ASSERT_FIELD(KTHREAD, 0x15C, CHAR, PriorityDecrement)
+C_ASSERT_FIELD(KTHREAD, 0x15D, UCHAR, Preempted)
+C_ASSERT_FIELD(KTHREAD, 0x15E, UCHAR, AdjustReason)
+C_ASSERT_FIELD(KTHREAD, 0x15F, CHAR, AdjustIncrement)
+C_ASSERT_FIELD(KTHREAD, 0x160, GROUP_AFFINITY, Affinity)
+C_ASSERT_FIELD(KTHREAD, 0x166, UCHAR, ApcStateIndex)
+C_ASSERT_FIELD(KTHREAD, 0x167, UCHAR, WaitBlockCount)
+C_ASSERT_FIELD(KTHREAD, 0x168, ULONG, IdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x174, KAPC_STATE, SavedApcState)
+C_ASSERT_FIELD(KTHREAD, 0x18B, UCHAR, WaitReason)
+C_ASSERT_FIELD(KTHREAD, 0x18C, CHAR, SuspendCount)
+C_ASSERT_FIELD(KTHREAD, 0x18D, CHAR, Saturation)
+C_ASSERT_FIELD(KTHREAD, 0x18E, USHORT, SListFaultCount)
+C_ASSERT_FIELD(KTHREAD, 0x190, KAPC, SchedulerApc)
+C_ASSERT_FIELD(KTHREAD, 0x191, UCHAR, ResourceIndex)
+C_ASSERT_FIELD(KTHREAD, 0x193, UCHAR, QuantumReset)
+C_ASSERT_FIELD(KTHREAD, 0x194, ULONG, KernelTime)
+C_ASSERT_FIELD(KTHREAD, 0x1B4, PKPRCB, WaitPrcb)
+C_ASSERT_FIELD(KTHREAD, 0x1B8, PVOID, LegoData)
+C_ASSERT_FIELD(KTHREAD, 0x1BF, UCHAR, CallbackNestingLevel)
+C_ASSERT_FIELD(KTHREAD, 0x1C0, ULONG32, UserTime)
+C_ASSERT_FIELD(KTHREAD, 0x1C4, KEVENT, SuspendEvent)
+C_ASSERT_FIELD(KTHREAD, 0x1D4, LIST_ENTRY, ThreadListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x1DC, LIST_ENTRY, MutantListHead)
Propchange: trunk/reactos/include/ndk/tests/win8_x86.c
------------------------------------------------------------------------------
svn:eol-style = native