Author: tkreuzer
Date: Sun Apr 1 22:19:32 2012
New Revision: 56313
URL:
http://svn.reactos.org/svn/reactos?rev=56313&view=rev
Log:
[NDK]
Add structure layout tests for KTHREAD
Added:
trunk/reactos/include/ndk/tests/ (with props)
trunk/reactos/include/ndk/tests/CMakeLists.txt (with props)
trunk/reactos/include/ndk/tests/win2003_x64.c (with props)
trunk/reactos/include/ndk/tests/win2003_x86.c (with props)
trunk/reactos/include/ndk/tests/win7_x64.c (with props)
trunk/reactos/include/ndk/tests/win7_x86.c (with props)
trunk/reactos/include/ndk/tests/winvista_x64.c (with props)
trunk/reactos/include/ndk/tests/winvista_x86.c (with props)
Propchange: trunk/reactos/include/ndk/tests/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Sun Apr 1 22:19:32 2012
@@ -1,0 +1,2 @@
+([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))?
+(\d+)
Propchange: trunk/reactos/include/ndk/tests/
------------------------------------------------------------------------------
bugtraq:message = See issue #%BUGID% for more details.
Propchange: trunk/reactos/include/ndk/tests/
------------------------------------------------------------------------------
bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: trunk/reactos/include/ndk/tests/
------------------------------------------------------------------------------
tsvn:logminsize = 10
Added: 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 (added)
+++ trunk/reactos/include/ndk/tests/CMakeLists.txt [iso-8859-1] Sun Apr 1 22:19:32 2012
@@ -1,0 +1,12 @@
+
+if(ARCH MATCHES amd64)
+add_library(ndk_tests
+ win2003_x64.c
+ winvista_x64.c
+ win7_x64.c)
+else()
+add_library(ndk_tests
+ win2003_x86.c
+ winvista_x86.c
+ win7_x86.c)
+endif()
Propchange: trunk/reactos/include/ndk/tests/CMakeLists.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/include/ndk/tests/win2003_x64.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/tests/win2003_…
==============================================================================
--- trunk/reactos/include/ndk/tests/win2003_x64.c (added)
+++ trunk/reactos/include/ndk/tests/win2003_x64.c [iso-8859-1] Sun Apr 1 22:19:32 2012
@@ -1,0 +1,121 @@
+/* Version definitions */
+#undef NTDDI_VERSION
+#define NTDDI_VERSION NTDDI_WS03SP1
+#undef _WIN32_WINNT
+#define _WIN32_WINNT _WIN32_WINNT_WS03
+
+#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, LIST_ENTRY, MutantListHead)
+C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, InitialStack)
+C_ASSERT_FIELD(KTHREAD, 0x030, PVOID, StackLimit)
+C_ASSERT_FIELD(KTHREAD, 0x038, PVOID, KernelStack)
+C_ASSERT_FIELD(KTHREAD, 0x040, ULONG64, ThreadLock)
+C_ASSERT_FIELD(KTHREAD, 0x048, KAPC_STATE, ApcState)
+C_ASSERT_FIELD(KTHREAD, 0x048, UCHAR, ApcStateFill)
+C_ASSERT_FIELD(KTHREAD, 0x073, UCHAR, ApcQueueable)
+C_ASSERT_FIELD(KTHREAD, 0x074, UCHAR, NextProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x075, UCHAR, DeferredProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x076, UCHAR, AdjustReason)
+C_ASSERT_FIELD(KTHREAD, 0x077, CHAR, AdjustIncrement)
+C_ASSERT_FIELD(KTHREAD, 0x078, ULONG64, ApcQueueLock)
+C_ASSERT_FIELD(KTHREAD, 0x080, LONG64, WaitStatus)
+C_ASSERT_FIELD(KTHREAD, 0x088, KWAIT_BLOCK*, WaitBlockList)
+C_ASSERT_FIELD(KTHREAD, 0x088, KGATE*, GateObject)
+C_ASSERT_FIELD(KTHREAD, 0x090, UCHAR, Alertable)
+C_ASSERT_FIELD(KTHREAD, 0x091, UCHAR, WaitNext)
+C_ASSERT_FIELD(KTHREAD, 0x092, UCHAR, WaitReason)
+C_ASSERT_FIELD(KTHREAD, 0x093, CHAR, Priority)
+C_ASSERT_FIELD(KTHREAD, 0x094, UCHAR, EnableStackSwap)
+C_ASSERT_FIELD(KTHREAD, 0x095, UCHAR, SwapBusy)
+C_ASSERT_FIELD(KTHREAD, 0x096, UCHAR, Alerted)
+C_ASSERT_FIELD(KTHREAD, 0x098, LIST_ENTRY, WaitListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x098, SINGLE_LIST_ENTRY, SwapListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x0A8, KQUEUE*, Queue)
+C_ASSERT_FIELD(KTHREAD, 0x0B0, PVOID, Teb)
+C_ASSERT_FIELD(KTHREAD, 0x0B8, KTIMER, Timer)
+C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR, TimerFill)
+C_ASSERT_FIELD(KTHREAD, 0x0F4, LONG, ThreadFlags)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, KWAIT_BLOCK, WaitBlock)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill0)
+C_ASSERT_FIELD(KTHREAD, 0x123, UCHAR, SystemAffinityActive)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill1)
+C_ASSERT_FIELD(KTHREAD, 0x153, CHAR, PreviousMode)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill2)
+C_ASSERT_FIELD(KTHREAD, 0x183, UCHAR, ResourceIndex)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill3)
+C_ASSERT_FIELD(KTHREAD, 0x1B3, UCHAR, LargeStack)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill4)
+C_ASSERT_FIELD(KTHREAD, 0x124, ULONG, ContextSwitches)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill5)
+C_ASSERT_FIELD(KTHREAD, 0x154, UCHAR, State)
+C_ASSERT_FIELD(KTHREAD, 0x155, UCHAR, NpxState)
+C_ASSERT_FIELD(KTHREAD, 0x156, UCHAR, WaitIrql)
+C_ASSERT_FIELD(KTHREAD, 0x157, CHAR, WaitMode)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill6)
+C_ASSERT_FIELD(KTHREAD, 0x184, ULONG, WaitTime)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill7)
+C_ASSERT_FIELD(KTHREAD, 0x1B4, SHORT, KernelApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x1B6, SHORT, SpecialApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x1B4, ULONG, CombinedApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x1B8, LIST_ENTRY, QueueListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x1C8, KTRAP_FRAME*, TrapFrame)
+C_ASSERT_FIELD(KTHREAD, 0x1D0, PVOID, CallbackStack)
+C_ASSERT_FIELD(KTHREAD, 0x1D8, PVOID, ServiceTable)
+C_ASSERT_FIELD(KTHREAD, 0x1E0, ULONG, KernelLimit)
+C_ASSERT_FIELD(KTHREAD, 0x1E4, UCHAR, ApcStateIndex)
+C_ASSERT_FIELD(KTHREAD, 0x1E5, UCHAR, IdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x1E6, UCHAR, Preempted)
+C_ASSERT_FIELD(KTHREAD, 0x1E7, UCHAR, ProcessReadyQueue)
+C_ASSERT_FIELD(KTHREAD, 0x1E8, PVOID, Win32kTable)
+C_ASSERT_FIELD(KTHREAD, 0x1F0, ULONG, Win32kLimit)
+C_ASSERT_FIELD(KTHREAD, 0x1F4, UCHAR, KernelStackResident)
+C_ASSERT_FIELD(KTHREAD, 0x1F5, CHAR, BasePriority)
+C_ASSERT_FIELD(KTHREAD, 0x1F6, CHAR, PriorityDecrement)
+C_ASSERT_FIELD(KTHREAD, 0x1F7, CHAR, Saturation)
+C_ASSERT_FIELD(KTHREAD, 0x1F8, ULONG64, UserAffinity)
+C_ASSERT_FIELD(KTHREAD, 0x200, KPROCESS*, Process)
+C_ASSERT_FIELD(KTHREAD, 0x208, ULONG64, Affinity)
+C_ASSERT_FIELD(KTHREAD, 0x210, KAPC_STATE*, ApcStatePointer)
+C_ASSERT_FIELD(KTHREAD, 0x220, KAPC_STATE, SavedApcState)
+C_ASSERT_FIELD(KTHREAD, 0x220, UCHAR, SavedApcStateFill)
+C_ASSERT_FIELD(KTHREAD, 0x24B, CHAR, FreezeCount)
+C_ASSERT_FIELD(KTHREAD, 0x24C, CHAR, SuspendCount)
+C_ASSERT_FIELD(KTHREAD, 0x24D, UCHAR, UserIdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x24E, UCHAR, CalloutActive)
+C_ASSERT_FIELD(KTHREAD, 0x24F, UCHAR, CodePatchInProgress)
+C_ASSERT_FIELD(KTHREAD, 0x250, PVOID, Win32Thread)
+C_ASSERT_FIELD(KTHREAD, 0x258, PVOID, StackBase)
+C_ASSERT_FIELD(KTHREAD, 0x260, KAPC, SuspendApc)
+C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR, SuspendApcFill0)
+C_ASSERT_FIELD(KTHREAD, 0x261, CHAR, Quantum)
+C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR, SuspendApcFill1)
+C_ASSERT_FIELD(KTHREAD, 0x263, UCHAR, QuantumReset)
+C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR, SuspendApcFill2)
+C_ASSERT_FIELD(KTHREAD, 0x264, ULONG, KernelTime)
+C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR, SuspendApcFill3)
+C_ASSERT_FIELD(KTHREAD, 0x2A0, PVOID, TlsArray)
+C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR, SuspendApcFill4)
+C_ASSERT_FIELD(KTHREAD, 0x2A8, PVOID, LegoData)
+C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR, SuspendApcFill5)
+C_ASSERT_FIELD(KTHREAD, 0x2B3, UCHAR, PowerState)
+C_ASSERT_FIELD(KTHREAD, 0x2B4, ULONG, UserTime)
+C_ASSERT_FIELD(KTHREAD, 0x2B8, KSEMAPHORE, SuspendSemaphore)
+C_ASSERT_FIELD(KTHREAD, 0x2B8, UCHAR, SuspendSemaphorefill)
+C_ASSERT_FIELD(KTHREAD, 0x2D4, ULONG, SListFaultCount)
+C_ASSERT_FIELD(KTHREAD, 0x2D8, LIST_ENTRY, ThreadListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x2E8, PVOID, SListFaultAddress)
+C_ASSERT_FIELD(KTHREAD, 0x2F0, LONG64, ReadOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x2F8, LONG64, WriteOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x300, LONG64, OtherOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x308, LONG64, ReadTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x310, LONG64, WriteTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x318, LONG64, OtherTransferCount)
+
+
+
Propchange: trunk/reactos/include/ndk/tests/win2003_x64.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/include/ndk/tests/win2003_x86.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/tests/win2003_…
==============================================================================
--- trunk/reactos/include/ndk/tests/win2003_x86.c (added)
+++ trunk/reactos/include/ndk/tests/win2003_x86.c [iso-8859-1] Sun Apr 1 22:19:32 2012
@@ -1,0 +1,88 @@
+/* Version definitions */
+#undef NTDDI_VERSION
+#define NTDDI_VERSION NTDDI_WS03SP1
+#undef _WIN32_WINNT
+#define _WIN32_WINNT _WIN32_WINNT_WS03
+
+#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, LIST_ENTRY, MutantListHead)
+C_ASSERT_FIELD(KTHREAD, 0x018, PVOID, InitialStack)
+C_ASSERT_FIELD(KTHREAD, 0x01C, PVOID, StackLimit)
+C_ASSERT_FIELD(KTHREAD, 0x020, PVOID, KernelStack)
+C_ASSERT_FIELD(KTHREAD, 0x024, ULONG, ThreadLock)
+C_ASSERT_FIELD(KTHREAD, 0x028, KAPC_STATE, ApcState)
+C_ASSERT_FIELD(KTHREAD, 0x028, UCHAR, ApcStateFill)
+C_ASSERT_FIELD(KTHREAD, 0x03F, UCHAR, ApcQueueable)
+C_ASSERT_FIELD(KTHREAD, 0x040, UCHAR, NextProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x041, UCHAR, DeferredProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x042, UCHAR, AdjustReason)
+C_ASSERT_FIELD(KTHREAD, 0x043, CHAR, AdjustIncrement)
+C_ASSERT_FIELD(KTHREAD, 0x044, ULONG, ApcQueueLock)
+C_ASSERT_FIELD(KTHREAD, 0x048, ULONG, ContextSwitches)
+C_ASSERT_FIELD(KTHREAD, 0x04C, UCHAR, State)
+C_ASSERT_FIELD(KTHREAD, 0x04D, UCHAR, NpxState)
+C_ASSERT_FIELD(KTHREAD, 0x04E, UCHAR, WaitIrql)
+C_ASSERT_FIELD(KTHREAD, 0x04F, CHAR, WaitMode)
+C_ASSERT_FIELD(KTHREAD, 0x050, LONG, WaitStatus)
+C_ASSERT_FIELD(KTHREAD, 0x054, PKWAIT_BLOCK, WaitBlockList)
+C_ASSERT_FIELD(KTHREAD, 0x054, PKGATE, GateObject)
+C_ASSERT_FIELD(KTHREAD, 0x058, UCHAR, Alertable)
+C_ASSERT_FIELD(KTHREAD, 0x059, UCHAR, WaitNext)
+C_ASSERT_FIELD(KTHREAD, 0x05A, UCHAR, WaitReason)
+C_ASSERT_FIELD(KTHREAD, 0x05B, CHAR, Priority)
+C_ASSERT_FIELD(KTHREAD, 0x05C, UCHAR, EnableStackSwap)
+C_ASSERT_FIELD(KTHREAD, 0x05D, UCHAR, SwapBusy)
+C_ASSERT_FIELD(KTHREAD, 0x05E, UCHAR, Alerted)
+C_ASSERT_FIELD(KTHREAD, 0x060, LIST_ENTRY, WaitListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x060, SINGLE_LIST_ENTRY, SwapListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x068, KQUEUE*, Queue)
+C_ASSERT_FIELD(KTHREAD, 0x06C, ULONG, WaitTime)
+C_ASSERT_FIELD(KTHREAD, 0x070, INT16, KernelApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x072, INT16, SpecialApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x070, ULONG, CombinedApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x074, PVOID, Teb)
+C_ASSERT_FIELD(KTHREAD, 0x078, KTIMER, Timer)
+C_ASSERT_FIELD(KTHREAD, 0x078, UCHAR, TimerFill)
+//C_ASSERT_FIELD(KTHREAD, 0x0A0, LONG, AutoAlignment)
+//C_ASSERT_FIELD(KTHREAD, 0x0A0, LONG, DisableBoost)
+//C_ASSERT_FIELD(KTHREAD, 0x0A0, LONG, ReservedFlags)
+C_ASSERT_FIELD(KTHREAD, 0x0A0, LONG, ThreadFlags)
+C_ASSERT_FIELD(KTHREAD, 0x0A8, KWAIT_BLOCK, WaitBlock)
+C_ASSERT_FIELD(KTHREAD, 0x0A8, UCHAR, WaitBlockFill0)
+C_ASSERT_FIELD(KTHREAD, 0x0BF, UCHAR, SystemAffinityActive)
+C_ASSERT_FIELD(KTHREAD, 0x0A8, UCHAR, WaitBlockFill1)
+C_ASSERT_FIELD(KTHREAD, 0x0D7, CHAR, PreviousMode)
+C_ASSERT_FIELD(KTHREAD, 0x0A8, UCHAR, WaitBlockFill2)
+C_ASSERT_FIELD(KTHREAD, 0x0EF, UCHAR, ResourceIndex)
+C_ASSERT_FIELD(KTHREAD, 0x0A8, UCHAR, WaitBlockFill3)
+C_ASSERT_FIELD(KTHREAD, 0x107, UCHAR, LargeStack)
+C_ASSERT_FIELD(KTHREAD, 0x108, LIST_ENTRY, QueueListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x110, PKTRAP_FRAME, TrapFrame)
+C_ASSERT_FIELD(KTHREAD, 0x114, PVOID, CallbackStack)
+C_ASSERT_FIELD(KTHREAD, 0x118, PVOID, ServiceTable)
+C_ASSERT_FIELD(KTHREAD, 0x11C, UCHAR, ApcStateIndex)
+C_ASSERT_FIELD(KTHREAD, 0x11D, UCHAR, IdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x11E, UCHAR, Preempted)
+C_ASSERT_FIELD(KTHREAD, 0x11F, UCHAR, ProcessReadyQueue)
+C_ASSERT_FIELD(KTHREAD, 0x120, UCHAR, KernelStackResident)
+C_ASSERT_FIELD(KTHREAD, 0x121, CHAR, BasePriority)
+C_ASSERT_FIELD(KTHREAD, 0x122, CHAR, PriorityDecrement)
+C_ASSERT_FIELD(KTHREAD, 0x123, CHAR, Saturation)
+C_ASSERT_FIELD(KTHREAD, 0x124, ULONG, UserAffinity)
+C_ASSERT_FIELD(KTHREAD, 0x128, PKPROCESS, Process)
+C_ASSERT_FIELD(KTHREAD, 0x12C, ULONG, Affinity)
+C_ASSERT_FIELD(KTHREAD, 0x130, PKAPC_STATE, ApcStatePointer)
+C_ASSERT_FIELD(KTHREAD, 0x138, KAPC_STATE, SavedApcState)
+C_ASSERT_FIELD(KTHREAD, 0x138, UCHAR, SavedApcStateFill)
+C_ASSERT_FIELD(KTHREAD, 0x14F, CHAR, FreezeCount)
+C_ASSERT_FIELD(KTHREAD, 0x150, CHAR, SuspendCount)
+C_ASSERT_FIELD(KTHREAD, 0x151, UCHAR, UserIdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x152, UCHAR, CalloutActive)
+C_ASSERT_FIELD(KTHREAD, 0x153, UCHAR, Iopl)
+
Propchange: trunk/reactos/include/ndk/tests/win2003_x86.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/include/ndk/tests/win7_x64.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/tests/win7_x64…
==============================================================================
--- trunk/reactos/include/ndk/tests/win7_x64.c (added)
+++ trunk/reactos/include/ndk/tests/win7_x64.c [iso-8859-1] Sun Apr 1 22:19:32 2012
@@ -1,0 +1,113 @@
+/* Version definitions */
+#undef NTDDI_VERSION
+#define NTDDI_VERSION NTDDI_WIN7
+#undef _WIN32_WINNT
+#define _WIN32_WINNT _WIN32_WINNT_WIN7
+
+#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, ULONG64, CycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x020, ULONG64, QuantumTarget)
+C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, InitialStack)
+C_ASSERT_FIELD(KTHREAD, 0x030, PVOID, StackLimit)
+C_ASSERT_FIELD(KTHREAD, 0x038, PVOID, KernelStack)
+C_ASSERT_FIELD(KTHREAD, 0x040, ULONG64, ThreadLock)
+C_ASSERT_FIELD(KTHREAD, 0x048, KWAIT_STATUS_REGISTER, WaitRegister)
+C_ASSERT_FIELD(KTHREAD, 0x049, UCHAR, Running)
+C_ASSERT_FIELD(KTHREAD, 0x04A, UCHAR, Alerted)
+C_ASSERT_FIELD(KTHREAD, 0x04C, LONG, MiscFlags)
+C_ASSERT_FIELD(KTHREAD, 0x050, KAPC_STATE, ApcState)
+C_ASSERT_FIELD(KTHREAD, 0x050, UCHAR, ApcStateFill)
+C_ASSERT_FIELD(KTHREAD, 0x07B, CHAR, Priority)
+C_ASSERT_FIELD(KTHREAD, 0x07C, ULONG, NextProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x080, ULONG, DeferredProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x088, ULONG64, ApcQueueLock)
+C_ASSERT_FIELD(KTHREAD, 0x090, LONG64, WaitStatus)
+C_ASSERT_FIELD(KTHREAD, 0x098, KWAIT_BLOCK*, WaitBlockList)
+C_ASSERT_FIELD(KTHREAD, 0x0A0, LIST_ENTRY, WaitListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x0A0, SINGLE_LIST_ENTRY, SwapListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x0B0, KQUEUE*, Queue)
+C_ASSERT_FIELD(KTHREAD, 0x0B8, PVOID, Teb)
+C_ASSERT_FIELD(KTHREAD, 0x0C0, KTIMER, Timer)
+C_ASSERT_FIELD(KTHREAD, 0x100, LONG, ThreadFlags)
+C_ASSERT_FIELD(KTHREAD, 0x104, ULONG, Spare0)
+C_ASSERT_FIELD(KTHREAD, 0x108, KWAIT_BLOCK, WaitBlock)
+C_ASSERT_FIELD(KTHREAD, 0x108, UCHAR, WaitBlockFill4)
+C_ASSERT_FIELD(KTHREAD, 0x134, ULONG, ContextSwitches)
+C_ASSERT_FIELD(KTHREAD, 0x108, UCHAR, WaitBlockFill5)
+C_ASSERT_FIELD(KTHREAD, 0x164, UCHAR, State)
+C_ASSERT_FIELD(KTHREAD, 0x165, CHAR, NpxState)
+C_ASSERT_FIELD(KTHREAD, 0x166, UCHAR, WaitIrql)
+C_ASSERT_FIELD(KTHREAD, 0x167, CHAR, WaitMode)
+C_ASSERT_FIELD(KTHREAD, 0x108, UCHAR, WaitBlockFill6)
+C_ASSERT_FIELD(KTHREAD, 0x194, ULONG, WaitTime)
+C_ASSERT_FIELD(KTHREAD, 0x108, UCHAR, WaitBlockFill7)
+C_ASSERT_FIELD(KTHREAD, 0x1B0, PVOID, TebMappedLowVa)
+C_ASSERT_FIELD(KTHREAD, 0x1B8, UMS_CONTROL_BLOCK*, Ucb)
+C_ASSERT_FIELD(KTHREAD, 0x108, UCHAR, WaitBlockFill8)
+C_ASSERT_FIELD(KTHREAD, 0x1C4, SHORT, KernelApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x1C6, SHORT, SpecialApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x1C4, ULONG, CombinedApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x1C8, LIST_ENTRY, QueueListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x1D8, KTRAP_FRAME*, TrapFrame)
+C_ASSERT_FIELD(KTHREAD, 0x1E0, PVOID, FirstArgument)
+C_ASSERT_FIELD(KTHREAD, 0x1E8, PVOID, CallbackStack)
+C_ASSERT_FIELD(KTHREAD, 0x1E8, ULONG64, CallbackDepth)
+C_ASSERT_FIELD(KTHREAD, 0x1F0, UCHAR, ApcStateIndex)
+C_ASSERT_FIELD(KTHREAD, 0x1F1, CHAR, BasePriority)
+C_ASSERT_FIELD(KTHREAD, 0x1F2, CHAR, PriorityDecrement)
+C_ASSERT_FIELD(KTHREAD, 0x1F3, UCHAR, Preempted)
+C_ASSERT_FIELD(KTHREAD, 0x1F4, UCHAR, AdjustReason)
+C_ASSERT_FIELD(KTHREAD, 0x1F5, CHAR, AdjustIncrement)
+C_ASSERT_FIELD(KTHREAD, 0x1F6, CHAR, PreviousMode)
+C_ASSERT_FIELD(KTHREAD, 0x1F7, CHAR, Saturation)
+C_ASSERT_FIELD(KTHREAD, 0x1F8, ULONG, SystemCallNumber)
+C_ASSERT_FIELD(KTHREAD, 0x1FC, ULONG, FreezeCount)
+C_ASSERT_FIELD(KTHREAD, 0x200, GROUP_AFFINITY, UserAffinity)
+C_ASSERT_FIELD(KTHREAD, 0x210, KPROCESS*, Process)
+C_ASSERT_FIELD(KTHREAD, 0x218, GROUP_AFFINITY, Affinity)
+C_ASSERT_FIELD(KTHREAD, 0x228, ULONG, IdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x22C, ULONG, UserIdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x230, KAPC_STATE*, ApcStatePointer)
+C_ASSERT_FIELD(KTHREAD, 0x240, KAPC_STATE, SavedApcState)
+C_ASSERT_FIELD(KTHREAD, 0x240, UCHAR, SavedApcStateFill)
+C_ASSERT_FIELD(KTHREAD, 0x26B, UCHAR, WaitReason)
+C_ASSERT_FIELD(KTHREAD, 0x26C, CHAR, SuspendCount)
+C_ASSERT_FIELD(KTHREAD, 0x26D, CHAR, Spare1)
+C_ASSERT_FIELD(KTHREAD, 0x26E, UCHAR, CodePatchInProgress)
+C_ASSERT_FIELD(KTHREAD, 0x270, PVOID, Win32Thread)
+C_ASSERT_FIELD(KTHREAD, 0x278, PVOID, StackBase)
+C_ASSERT_FIELD(KTHREAD, 0x280, KAPC, SuspendApc)
+C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill0)
+C_ASSERT_FIELD(KTHREAD, 0x281, UCHAR, ResourceIndex)
+C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill1)
+C_ASSERT_FIELD(KTHREAD, 0x283, UCHAR, QuantumReset)
+C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill2)
+C_ASSERT_FIELD(KTHREAD, 0x284, ULONG, KernelTime)
+C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill3)
+C_ASSERT_FIELD(KTHREAD, 0x2C0, KPRCB*, WaitPrcb)
+C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill4)
+C_ASSERT_FIELD(KTHREAD, 0x2C8, PVOID, LegoData)
+C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill5)
+C_ASSERT_FIELD(KTHREAD, 0x2D3, UCHAR, LargeStack)
+C_ASSERT_FIELD(KTHREAD, 0x2D4, ULONG, UserTime)
+C_ASSERT_FIELD(KTHREAD, 0x2D8, KSEMAPHORE, SuspendSemaphore)
+C_ASSERT_FIELD(KTHREAD, 0x2D8, UCHAR, SuspendSemaphorefill)
+C_ASSERT_FIELD(KTHREAD, 0x2F4, ULONG, SListFaultCount)
+C_ASSERT_FIELD(KTHREAD, 0x2F8, LIST_ENTRY, ThreadListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x308, LIST_ENTRY, MutantListHead)
+C_ASSERT_FIELD(KTHREAD, 0x318, PVOID, SListFaultAddress)
+C_ASSERT_FIELD(KTHREAD, 0x320, LONG64, ReadOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x328, LONG64, WriteOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x330, LONG64, OtherOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x338, LONG64, ReadTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x340, LONG64, WriteTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x348, LONG64, OtherTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x350, KTHREAD_COUNTERS*, ThreadCounters)
+C_ASSERT_FIELD(KTHREAD, 0x358, XSTATE_SAVE*, XStateSave)
Propchange: trunk/reactos/include/ndk/tests/win7_x64.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/include/ndk/tests/win7_x86.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/tests/win7_x86…
==============================================================================
--- trunk/reactos/include/ndk/tests/win7_x86.c (added)
+++ trunk/reactos/include/ndk/tests/win7_x86.c [iso-8859-1] Sun Apr 1 22:19:32 2012
@@ -1,0 +1,100 @@
+/* Version definitions */
+#undef NTDDI_VERSION
+#define NTDDI_VERSION NTDDI_WIN7
+#undef _WIN32_WINNT
+#define _WIN32_WINNT _WIN32_WINNT_WIN7
+
+#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, ULONG64, CycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x018, ULONG, HighCycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x020, ULONG64, QuantumTarget)
+C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, InitialStack)
+C_ASSERT_FIELD(KTHREAD, 0x02C, PVOID, StackLimit)
+C_ASSERT_FIELD(KTHREAD, 0x030, PVOID, KernelStack)
+C_ASSERT_FIELD(KTHREAD, 0x034, ULONG, ThreadLock)
+C_ASSERT_FIELD(KTHREAD, 0x038, KWAIT_STATUS_REGISTER, WaitRegister)
+C_ASSERT_FIELD(KTHREAD, 0x039, UCHAR, Running)
+C_ASSERT_FIELD(KTHREAD, 0x03A, UCHAR, Alerted)
+C_ASSERT_FIELD(KTHREAD, 0x03C, LONG, MiscFlags)
+C_ASSERT_FIELD(KTHREAD, 0x040, KAPC_STATE, ApcState)
+C_ASSERT_FIELD(KTHREAD, 0x040, UCHAR, ApcStateFill)
+C_ASSERT_FIELD(KTHREAD, 0x057, CHAR, Priority)
+C_ASSERT_FIELD(KTHREAD, 0x058, ULONG, NextProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x05C, ULONG, DeferredProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x060, ULONG, ApcQueueLock)
+C_ASSERT_FIELD(KTHREAD, 0x064, ULONG, ContextSwitches)
+C_ASSERT_FIELD(KTHREAD, 0x068, UCHAR, State)
+C_ASSERT_FIELD(KTHREAD, 0x069, CHAR, NpxState)
+C_ASSERT_FIELD(KTHREAD, 0x06A, UCHAR, WaitIrql)
+C_ASSERT_FIELD(KTHREAD, 0x06B, CHAR, WaitMode)
+C_ASSERT_FIELD(KTHREAD, 0x06C, LONG, WaitStatus)
+C_ASSERT_FIELD(KTHREAD, 0x070, KWAIT_BLOCK*, WaitBlockList)
+C_ASSERT_FIELD(KTHREAD, 0x074, LIST_ENTRY, WaitListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x074, SINGLE_LIST_ENTRY, SwapListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x07C, KQUEUE*, Queue)
+C_ASSERT_FIELD(KTHREAD, 0x080, ULONG, WaitTime)
+C_ASSERT_FIELD(KTHREAD, 0x084, SHORT, KernelApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x086, SHORT, SpecialApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x084, ULONG, CombinedApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x088, PVOID, Teb)
+C_ASSERT_FIELD(KTHREAD, 0x090, KTIMER, Timer)
+C_ASSERT_FIELD(KTHREAD, 0x0B8, LONG, ThreadFlags)
+C_ASSERT_FIELD(KTHREAD, 0x0BC, PVOID, ServiceTable)
+C_ASSERT_FIELD(KTHREAD, 0x0C0, KWAIT_BLOCK, WaitBlock)
+C_ASSERT_FIELD(KTHREAD, 0x120, LIST_ENTRY, QueueListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x128, KTRAP_FRAME*, TrapFrame)
+C_ASSERT_FIELD(KTHREAD, 0x12C, PVOID, FirstArgument)
+C_ASSERT_FIELD(KTHREAD, 0x130, PVOID, CallbackStack)
+C_ASSERT_FIELD(KTHREAD, 0x130, ULONG, CallbackDepth)
+C_ASSERT_FIELD(KTHREAD, 0x134, UCHAR, ApcStateIndex)
+C_ASSERT_FIELD(KTHREAD, 0x135, CHAR, BasePriority)
+C_ASSERT_FIELD(KTHREAD, 0x136, CHAR, PriorityDecrement)
+C_ASSERT_FIELD(KTHREAD, 0x137, UCHAR, Preempted)
+C_ASSERT_FIELD(KTHREAD, 0x138, UCHAR, AdjustReason)
+C_ASSERT_FIELD(KTHREAD, 0x139, CHAR, AdjustIncrement)
+C_ASSERT_FIELD(KTHREAD, 0x13A, CHAR, PreviousMode)
+C_ASSERT_FIELD(KTHREAD, 0x13B, CHAR, Saturation)
+C_ASSERT_FIELD(KTHREAD, 0x13C, ULONG, SystemCallNumber)
+C_ASSERT_FIELD(KTHREAD, 0x140, ULONG, FreezeCount)
+C_ASSERT_FIELD(KTHREAD, 0x144, GROUP_AFFINITY, UserAffinity)
+C_ASSERT_FIELD(KTHREAD, 0x150, KPROCESS*, Process)
+C_ASSERT_FIELD(KTHREAD, 0x154, GROUP_AFFINITY, Affinity)
+C_ASSERT_FIELD(KTHREAD, 0x160, ULONG, IdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x164, ULONG, UserIdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x168, KAPC_STATE*, ApcStatePointer)
+C_ASSERT_FIELD(KTHREAD, 0x170, KAPC_STATE, SavedApcState)
+C_ASSERT_FIELD(KTHREAD, 0x170, UCHAR, SavedApcStateFill)
+C_ASSERT_FIELD(KTHREAD, 0x187, UCHAR, WaitReason)
+C_ASSERT_FIELD(KTHREAD, 0x188, CHAR, SuspendCount)
+C_ASSERT_FIELD(KTHREAD, 0x189, CHAR, Spare1)
+C_ASSERT_FIELD(KTHREAD, 0x18A, UCHAR, OtherPlatformFill)
+C_ASSERT_FIELD(KTHREAD, 0x18C, PVOID, Win32Thread)
+C_ASSERT_FIELD(KTHREAD, 0x190, PVOID, StackBase)
+C_ASSERT_FIELD(KTHREAD, 0x194, KAPC, SuspendApc)
+C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR, SuspendApcFill0)
+C_ASSERT_FIELD(KTHREAD, 0x195, UCHAR, ResourceIndex)
+C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR, SuspendApcFill1)
+C_ASSERT_FIELD(KTHREAD, 0x197, UCHAR, QuantumReset)
+C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR, SuspendApcFill2)
+C_ASSERT_FIELD(KTHREAD, 0x198, ULONG, KernelTime)
+C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR, SuspendApcFill3)
+C_ASSERT_FIELD(KTHREAD, 0x1B8, KPRCB*, WaitPrcb)
+C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR, SuspendApcFill4)
+C_ASSERT_FIELD(KTHREAD, 0x1BC, PVOID, LegoData)
+C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR, SuspendApcFill5)
+C_ASSERT_FIELD(KTHREAD, 0x1C3, UCHAR, LargeStack)
+C_ASSERT_FIELD(KTHREAD, 0x1C4, ULONG, UserTime)
+C_ASSERT_FIELD(KTHREAD, 0x1C8, KSEMAPHORE, SuspendSemaphore)
+C_ASSERT_FIELD(KTHREAD, 0x1C8, UCHAR, SuspendSemaphorefill)
+C_ASSERT_FIELD(KTHREAD, 0x1DC, ULONG, SListFaultCount)
+C_ASSERT_FIELD(KTHREAD, 0x1E0, LIST_ENTRY, ThreadListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x1E8, LIST_ENTRY, MutantListHead)
+C_ASSERT_FIELD(KTHREAD, 0x1F0, PVOID, SListFaultAddress)
+C_ASSERT_FIELD(KTHREAD, 0x1F4, KTHREAD_COUNTERS*, ThreadCounters)
+C_ASSERT_FIELD(KTHREAD, 0x1F8, XSTATE_SAVE*, XStateSave)
Propchange: trunk/reactos/include/ndk/tests/win7_x86.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/include/ndk/tests/winvista_x64.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/tests/winvista…
==============================================================================
--- trunk/reactos/include/ndk/tests/winvista_x64.c (added)
+++ trunk/reactos/include/ndk/tests/winvista_x64.c [iso-8859-1] Sun Apr 1 22:19:32 2012
@@ -1,0 +1,116 @@
+/* Version definitions */
+#undef NTDDI_VERSION
+#define NTDDI_VERSION NTDDI_VISTA
+#undef _WIN32_WINNT
+#define _WIN32_WINNT _WIN32_WINNT_VISTA
+
+#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, ULONG64, CycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x020, ULONG64, QuantumTarget)
+C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, InitialStack)
+C_ASSERT_FIELD(KTHREAD, 0x030, PVOID, StackLimit)
+C_ASSERT_FIELD(KTHREAD, 0x038, PVOID, KernelStack)
+C_ASSERT_FIELD(KTHREAD, 0x040, ULONG64, ThreadLock)
+C_ASSERT_FIELD(KTHREAD, 0x048, KAPC_STATE, ApcState)
+C_ASSERT_FIELD(KTHREAD, 0x048, UCHAR, ApcStateFill)
+C_ASSERT_FIELD(KTHREAD, 0x073, CHAR, Priority)
+C_ASSERT_FIELD(KTHREAD, 0x074, USHORT, NextProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x076, USHORT, DeferredProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x078, ULONG64, ApcQueueLock)
+C_ASSERT_FIELD(KTHREAD, 0x080, LONG64, WaitStatus)
+C_ASSERT_FIELD(KTHREAD, 0x088, KWAIT_BLOCK*, WaitBlockList)
+C_ASSERT_FIELD(KTHREAD, 0x088, KGATE*, GateObject)
+C_ASSERT_FIELD(KTHREAD, 0x090, LONG, MiscFlags)
+C_ASSERT_FIELD(KTHREAD, 0x094, UCHAR, WaitReason)
+C_ASSERT_FIELD(KTHREAD, 0x095, UCHAR, SwapBusy)
+C_ASSERT_FIELD(KTHREAD, 0x096, UCHAR, Alerted)
+C_ASSERT_FIELD(KTHREAD, 0x098, LIST_ENTRY, WaitListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x098, SINGLE_LIST_ENTRY, SwapListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x0A8, KQUEUE*, Queue)
+C_ASSERT_FIELD(KTHREAD, 0x0B0, PVOID, Teb)
+C_ASSERT_FIELD(KTHREAD, 0x0B8, KTIMER, Timer)
+C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR, TimerFill)
+C_ASSERT_FIELD(KTHREAD, 0x0F4, LONG, ThreadFlags)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, KWAIT_BLOCK, WaitBlock)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill0)
+C_ASSERT_FIELD(KTHREAD, 0x123, UCHAR, IdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill1)
+C_ASSERT_FIELD(KTHREAD, 0x153, CHAR, PreviousMode)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill2)
+C_ASSERT_FIELD(KTHREAD, 0x183, UCHAR, ResourceIndex)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill3)
+C_ASSERT_FIELD(KTHREAD, 0x1B3, UCHAR, LargeStack)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill4)
+C_ASSERT_FIELD(KTHREAD, 0x124, ULONG, ContextSwitches)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill5)
+C_ASSERT_FIELD(KTHREAD, 0x154, UCHAR, State)
+C_ASSERT_FIELD(KTHREAD, 0x155, UCHAR, NpxState)
+C_ASSERT_FIELD(KTHREAD, 0x156, UCHAR, WaitIrql)
+C_ASSERT_FIELD(KTHREAD, 0x157, CHAR, WaitMode)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill6)
+C_ASSERT_FIELD(KTHREAD, 0x184, ULONG, WaitTime)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill7)
+C_ASSERT_FIELD(KTHREAD, 0x1B4, SHORT, KernelApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x1B6, SHORT, SpecialApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x1B4, ULONG, CombinedApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x1B8, LIST_ENTRY, QueueListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x1C8, KTRAP_FRAME*, TrapFrame)
+C_ASSERT_FIELD(KTHREAD, 0x1D0, PVOID, FirstArgument)
+C_ASSERT_FIELD(KTHREAD, 0x1D8, PVOID, CallbackStack)
+C_ASSERT_FIELD(KTHREAD, 0x1D8, ULONG64, CallbackDepth)
+C_ASSERT_FIELD(KTHREAD, 0x1E0, UCHAR, ApcStateIndex)
+C_ASSERT_FIELD(KTHREAD, 0x1E1, CHAR, BasePriority)
+C_ASSERT_FIELD(KTHREAD, 0x1E2, CHAR, PriorityDecrement)
+C_ASSERT_FIELD(KTHREAD, 0x1E3, UCHAR, Preempted)
+C_ASSERT_FIELD(KTHREAD, 0x1E4, UCHAR, AdjustReason)
+C_ASSERT_FIELD(KTHREAD, 0x1E5, CHAR, AdjustIncrement)
+C_ASSERT_FIELD(KTHREAD, 0x1E6, UCHAR, Spare01)
+C_ASSERT_FIELD(KTHREAD, 0x1E7, CHAR, Saturation)
+C_ASSERT_FIELD(KTHREAD, 0x1E8, ULONG, SystemCallNumber)
+C_ASSERT_FIELD(KTHREAD, 0x1EC, ULONG, Spare02)
+C_ASSERT_FIELD(KTHREAD, 0x1F0, ULONG64, UserAffinity)
+C_ASSERT_FIELD(KTHREAD, 0x1F8, KPROCESS*, Process)
+C_ASSERT_FIELD(KTHREAD, 0x200, ULONG64, Affinity)
+C_ASSERT_FIELD(KTHREAD, 0x208, KAPC_STATE*, ApcStatePointer)
+C_ASSERT_FIELD(KTHREAD, 0x218, KAPC_STATE, SavedApcState)
+C_ASSERT_FIELD(KTHREAD, 0x218, UCHAR, SavedApcStateFill)
+C_ASSERT_FIELD(KTHREAD, 0x243, CHAR, FreezeCount)
+C_ASSERT_FIELD(KTHREAD, 0x244, CHAR, SuspendCount)
+C_ASSERT_FIELD(KTHREAD, 0x245, UCHAR, UserIdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x246, UCHAR, Spare03)
+C_ASSERT_FIELD(KTHREAD, 0x247, UCHAR, CodePatchInProgress)
+C_ASSERT_FIELD(KTHREAD, 0x248, PVOID, Win32Thread)
+C_ASSERT_FIELD(KTHREAD, 0x250, PVOID, StackBase)
+C_ASSERT_FIELD(KTHREAD, 0x258, KAPC, SuspendApc)
+C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR, SuspendApcFill0)
+C_ASSERT_FIELD(KTHREAD, 0x259, CHAR, Spare04)
+C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR, SuspendApcFill1)
+C_ASSERT_FIELD(KTHREAD, 0x25B, UCHAR, QuantumReset)
+C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR, SuspendApcFill2)
+C_ASSERT_FIELD(KTHREAD, 0x25C, ULONG, KernelTime)
+C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR, SuspendApcFill3)
+C_ASSERT_FIELD(KTHREAD, 0x298, KPRCB*, WaitPrcb)
+C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR, SuspendApcFill4)
+C_ASSERT_FIELD(KTHREAD, 0x2A0, PVOID, LegoData)
+C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR, SuspendApcFill5)
+C_ASSERT_FIELD(KTHREAD, 0x2AB, UCHAR, PowerState)
+C_ASSERT_FIELD(KTHREAD, 0x2AC, ULONG, UserTime)
+C_ASSERT_FIELD(KTHREAD, 0x2B0, KSEMAPHORE, SuspendSemaphore)
+C_ASSERT_FIELD(KTHREAD, 0x2B0, UCHAR, SuspendSemaphorefill)
+C_ASSERT_FIELD(KTHREAD, 0x2CC, ULONG, SListFaultCount)
+C_ASSERT_FIELD(KTHREAD, 0x2D0, LIST_ENTRY, ThreadListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x2E0, LIST_ENTRY, MutantListHead)
+C_ASSERT_FIELD(KTHREAD, 0x2F0, PVOID, SListFaultAddress)
+C_ASSERT_FIELD(KTHREAD, 0x2F8, LONG64, ReadOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x300, LONG64, WriteOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x308, LONG64, OtherOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x310, LONG64, ReadTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x318, LONG64, WriteTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x320, LONG64, OtherTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x328, PVOID, MdlForLockedTeb)
Propchange: trunk/reactos/include/ndk/tests/winvista_x64.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/include/ndk/tests/winvista_x86.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/tests/winvista…
==============================================================================
--- trunk/reactos/include/ndk/tests/winvista_x86.c (added)
+++ trunk/reactos/include/ndk/tests/winvista_x86.c [iso-8859-1] Sun Apr 1 22:19:32 2012
@@ -1,0 +1,110 @@
+/* Version definitions */
+#undef NTDDI_VERSION
+#define NTDDI_VERSION NTDDI_VISTA
+#undef _WIN32_WINNT
+#define _WIN32_WINNT _WIN32_WINNT_VISTA
+
+#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, CycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x018, ULONG, HighCycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x020, UINT64, QuantumTarget)
+C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, InitialStack)
+C_ASSERT_FIELD(KTHREAD, 0x02C, PVOID, StackLimit)
+C_ASSERT_FIELD(KTHREAD, 0x030, PVOID, KernelStack)
+C_ASSERT_FIELD(KTHREAD, 0x034, ULONG, ThreadLock)
+C_ASSERT_FIELD(KTHREAD, 0x038, KAPC_STATE, ApcState)
+C_ASSERT_FIELD(KTHREAD, 0x038, UCHAR, ApcStateFill)
+C_ASSERT_FIELD(KTHREAD, 0x04F, CHAR, Priority)
+C_ASSERT_FIELD(KTHREAD, 0x050, USHORT, NextProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x052, USHORT, DeferredProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x054, ULONG, ApcQueueLock)
+C_ASSERT_FIELD(KTHREAD, 0x058, ULONG, ContextSwitches)
+C_ASSERT_FIELD(KTHREAD, 0x05C, UCHAR, State)
+C_ASSERT_FIELD(KTHREAD, 0x05D, UCHAR, NpxState)
+C_ASSERT_FIELD(KTHREAD, 0x05E, UCHAR, WaitIrql)
+C_ASSERT_FIELD(KTHREAD, 0x05F, CHAR, WaitMode)
+C_ASSERT_FIELD(KTHREAD, 0x060, LONG32, WaitStatus)
+C_ASSERT_FIELD(KTHREAD, 0x064, KWAIT_BLOCK*, WaitBlockList)
+C_ASSERT_FIELD(KTHREAD, 0x064, KGATE*, GateObject)
+C_ASSERT_FIELD(KTHREAD, 0x068, LONG, MiscFlags)
+C_ASSERT_FIELD(KTHREAD, 0x06C, UCHAR, WaitReason)
+C_ASSERT_FIELD(KTHREAD, 0x06D, UCHAR, SwapBusy)
+C_ASSERT_FIELD(KTHREAD, 0x06E, UCHAR, Alerted)
+C_ASSERT_FIELD(KTHREAD, 0x070, LIST_ENTRY, WaitListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x070, SINGLE_LIST_ENTRY, SwapListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x078, KQUEUE*, Queue)
+C_ASSERT_FIELD(KTHREAD, 0x07C, ULONG, WaitTime)
+C_ASSERT_FIELD(KTHREAD, 0x080, INT16, KernelApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x082, INT16, SpecialApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x080, ULONG, CombinedApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x084, PVOID, Teb)
+C_ASSERT_FIELD(KTHREAD, 0x088, KTIMER, Timer)
+C_ASSERT_FIELD(KTHREAD, 0x088, UCHAR, TimerFill)
+C_ASSERT_FIELD(KTHREAD, 0x0B0, LONG32, ThreadFlags)
+C_ASSERT_FIELD(KTHREAD, 0x0B8, KWAIT_BLOCK, WaitBlock)
+C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR, WaitBlockFill0)
+C_ASSERT_FIELD(KTHREAD, 0x0CF, UCHAR, IdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR, WaitBlockFill1)
+C_ASSERT_FIELD(KTHREAD, 0x0E7, CHAR, PreviousMode)
+C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR, WaitBlockFill2)
+C_ASSERT_FIELD(KTHREAD, 0x0FF, UCHAR, ResourceIndex)
+C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR, WaitBlockFill3)
+C_ASSERT_FIELD(KTHREAD, 0x117, UCHAR, LargeStack)
+C_ASSERT_FIELD(KTHREAD, 0x118, LIST_ENTRY, QueueListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x120, KTRAP_FRAME*, TrapFrame)
+C_ASSERT_FIELD(KTHREAD, 0x124, PVOID, FirstArgument)
+C_ASSERT_FIELD(KTHREAD, 0x128, PVOID, CallbackStack)
+C_ASSERT_FIELD(KTHREAD, 0x128, ULONG, CallbackDepth)
+C_ASSERT_FIELD(KTHREAD, 0x12C, PVOID, ServiceTable)
+C_ASSERT_FIELD(KTHREAD, 0x130, UCHAR, ApcStateIndex)
+C_ASSERT_FIELD(KTHREAD, 0x131, CHAR, BasePriority)
+C_ASSERT_FIELD(KTHREAD, 0x132, CHAR, PriorityDecrement)
+C_ASSERT_FIELD(KTHREAD, 0x133, UCHAR, Preempted)
+C_ASSERT_FIELD(KTHREAD, 0x134, UCHAR, AdjustReason)
+C_ASSERT_FIELD(KTHREAD, 0x135, CHAR, AdjustIncrement)
+C_ASSERT_FIELD(KTHREAD, 0x136, UCHAR, Spare01)
+C_ASSERT_FIELD(KTHREAD, 0x137, CHAR, Saturation)
+C_ASSERT_FIELD(KTHREAD, 0x138, ULONG, SystemCallNumber)
+C_ASSERT_FIELD(KTHREAD, 0x13C, ULONG, Spare02)
+C_ASSERT_FIELD(KTHREAD, 0x140, ULONG, UserAffinity)
+C_ASSERT_FIELD(KTHREAD, 0x144, KPROCESS*, Process)
+C_ASSERT_FIELD(KTHREAD, 0x148, ULONG, Affinity)
+C_ASSERT_FIELD(KTHREAD, 0x14C, KAPC_STATE*, ApcStatePointer)
+C_ASSERT_FIELD(KTHREAD, 0x154, KAPC_STATE, SavedApcState)
+C_ASSERT_FIELD(KTHREAD, 0x154, UCHAR, SavedApcStateFill)
+C_ASSERT_FIELD(KTHREAD, 0x16B, CHAR, FreezeCount)
+C_ASSERT_FIELD(KTHREAD, 0x16C, CHAR, SuspendCount)
+C_ASSERT_FIELD(KTHREAD, 0x16D, UCHAR, UserIdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x16E, UCHAR, Spare03)
+C_ASSERT_FIELD(KTHREAD, 0x16F, UCHAR, OtherPlatformFill)
+C_ASSERT_FIELD(KTHREAD, 0x170, PVOID, Win32Thread)
+C_ASSERT_FIELD(KTHREAD, 0x174, PVOID, StackBase)
+C_ASSERT_FIELD(KTHREAD, 0x178, KAPC, SuspendApc)
+C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR, SuspendApcFill0)
+C_ASSERT_FIELD(KTHREAD, 0x179, CHAR, Spare04)
+C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR, SuspendApcFill1)
+C_ASSERT_FIELD(KTHREAD, 0x17B, UCHAR, QuantumReset)
+C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR, SuspendApcFill2)
+C_ASSERT_FIELD(KTHREAD, 0x17C, ULONG, KernelTime)
+C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR, SuspendApcFill3)
+C_ASSERT_FIELD(KTHREAD, 0x19C, KPRCB*, WaitPrcb)
+C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR, SuspendApcFill4)
+C_ASSERT_FIELD(KTHREAD, 0x1A0, PVOID, LegoData)
+C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR, SuspendApcFill5)
+C_ASSERT_FIELD(KTHREAD, 0x1A7, UCHAR, PowerState)
+C_ASSERT_FIELD(KTHREAD, 0x1A8, ULONG, UserTime)
+C_ASSERT_FIELD(KTHREAD, 0x1AC, KSEMAPHORE, SuspendSemaphore)
+C_ASSERT_FIELD(KTHREAD, 0x1AC, UCHAR, SuspendSemaphorefill)
+C_ASSERT_FIELD(KTHREAD, 0x1C0, ULONG, SListFaultCount)
+C_ASSERT_FIELD(KTHREAD, 0x1C4, LIST_ENTRY, ThreadListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x1CC, LIST_ENTRY, MutantListHead)
+C_ASSERT_FIELD(KTHREAD, 0x1D4, PVOID, SListFaultAddress)
+C_ASSERT_FIELD(KTHREAD, 0x1D8, PVOID, MdlForLockedTeb)
+
+
Propchange: trunk/reactos/include/ndk/tests/winvista_x86.c
------------------------------------------------------------------------------
svn:eol-style = native