mirror of
https://github.com/reactos/reactos.git
synced 2024-08-17 08:58:30 +00:00
125 lines
6.3 KiB
C
125 lines
6.3 KiB
C
/* 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); \
|
|
C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType));
|
|
|
|
C_ASSERT(sizeof(KLOCK_ENTRY_LOCK_STATE) == 0x008);
|
|
C_ASSERT_FIELD(KLOCK_ENTRY, 0x000, RTL_BALANCED_NODE, TreeNode)
|
|
C_ASSERT_FIELD(KLOCK_ENTRY, 0x00C, PVOID, ThreadUnsafe)
|
|
C_ASSERT_FIELD(KLOCK_ENTRY, 0x00D, UCHAR[2], Reserved1)
|
|
C_ASSERT_FIELD(KLOCK_ENTRY, 0x00F, UCHAR, AcquiredByte)
|
|
C_ASSERT_FIELD(KLOCK_ENTRY, 0x010, UCHAR, WaitingAndBusyByte)
|
|
C_ASSERT_FIELD(KLOCK_ENTRY, 0x011, UCHAR[2], Reserved)
|
|
C_ASSERT_FIELD(KLOCK_ENTRY, 0x013, UCHAR, InTreeByte)
|
|
C_ASSERT_FIELD(KLOCK_ENTRY, 0x014, PVOID, SessionState)
|
|
C_ASSERT_FIELD(KLOCK_ENTRY, 0x014, ULONG, SessionId)
|
|
C_ASSERT_FIELD(KLOCK_ENTRY, 0x018, RTL_RB_TREE, OwnerTree)
|
|
C_ASSERT_FIELD(KLOCK_ENTRY, 0x018, CHAR, CpuPriorityKey)
|
|
C_ASSERT_FIELD(KLOCK_ENTRY, 0x020, RTL_RB_TREE, WaiterTree)
|
|
C_ASSERT_FIELD(KLOCK_ENTRY, 0x028, ULONG, EntryLock)
|
|
C_ASSERT(sizeof(KLOCK_ENTRY) == 0x030);
|
|
|
|
/* KTHREAD */
|
|
C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header)
|
|
C_ASSERT_FIELD(KTHREAD, 0x010, PVOID, SListFaultAddress)
|
|
C_ASSERT_FIELD(KTHREAD, 0x018, ULONG64, 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, ULONG, ThreadLock)
|
|
C_ASSERT_FIELD(KTHREAD, 0x030, ULONG64, 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, struct _KSCHEDULING_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, PDISPATCHER_HEADER, Queue)
|
|
C_ASSERT_FIELD(KTHREAD, 0x0A8, PVOID, Teb)
|
|
C_ASSERT_FIELD(KTHREAD, 0x0B0, ULONG64, 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, LONG, QueuePriority)
|
|
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, 0x16C, PKAPC_STATE[2], ApcStatePointer)
|
|
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, ULONG, 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, UCHAR[16], PriorityFloorCounts)
|
|
C_ASSERT_FIELD(KTHREAD, 0x320, ULONG, PriorityFloorSummary)
|
|
C_ASSERT_FIELD(KTHREAD, 0x324, LONG, AbCompletedIoBoostCount)
|
|
C_ASSERT_FIELD(KTHREAD, 0x328, SHORT, AbReferenceCount)
|
|
C_ASSERT_FIELD(KTHREAD, 0x32A, UCHAR, AbFreeEntryCount)
|
|
C_ASSERT_FIELD(KTHREAD, 0x32B, UCHAR, AbWaitEntryCount)
|
|
C_ASSERT_FIELD(KTHREAD, 0x32C, ULONG, ForegroundLossTime)
|
|
C_ASSERT_FIELD(KTHREAD, 0x330, LIST_ENTRY, GlobalForegroundListEntry)
|
|
C_ASSERT_FIELD(KTHREAD, 0x330, SINGLE_LIST_ENTRY, ForegroundDpcStackListEntry)
|
|
C_ASSERT_FIELD(KTHREAD, 0x334, ULONG, InGlobalForegroundList)
|