x64x86arm64ia64 / ntdllntoskrnl

_KTHREAD

← 5.2.3790.3959 3 builds latest →
struct _KTHREAD {
volatile unsigned __int64 CycleTime;/* 0x18 8 */
unsigned __int64 QuantumTarget;/* 0x20 8 */
void* InitialStack;/* 0x28 8 */
void* StackLimit;/* 0x30 8 */
void* KernelStack;/* 0x38 8 */
/* ── cacheline 1 boundary (64 bytes) ── */
unsigned __int64 ThreadLock;/* 0x40 8 */
void* InitialBStore;/* 0x48 8 */
void* BStoreLimit;/* 0x50 8 */
char Number;/* 0x58 1 */
unsigned char Spare0;/* 0x59 1 */
/* 6 bytes padding */
void* KernelBStore;/* 0x60 8 */
union {
struct {
unsigned char ApcStateFill[43];/* 0x68 43 */
char Priority;/* 0x93 1 */
volatile unsigned short NextProcessor;/* 0x94 2 */
volatile unsigned short DeferredProcessor;/* 0x96 2 */
};/* 0x68 48 */
};/* 0x68 48 */
/* ── cacheline 2 boundary (128 bytes) ── */
unsigned __int64 ApcQueueLock;/* 0x98 8 */
unsigned long ContextSwitches;/* 0xa0 4 */
volatile unsigned char State;/* 0xa4 1 */
unsigned char NpxState;/* 0xa5 1 */
unsigned char WaitIrql;/* 0xa6 1 */
char WaitMode;/* 0xa7 1 */
__int64 WaitStatus;/* 0xa8 8 */
union {
};/* 0xb0 8 */
union {
struct {
unsigned long KernelStackResident : 1;/* 0xb8:0 4 */
unsigned long ReadyTransition : 1;/* 0xb8:1 4 */
unsigned long ProcessReadyQueue : 1;/* 0xb8:2 4 */
unsigned long WaitNext : 1;/* 0xb8:3 4 */
unsigned long SystemAffinityActive : 1;/* 0xb8:4 4 */
unsigned long Alertable : 1;/* 0xb8:5 4 */
unsigned long GdiFlushActive : 1;/* 0xb8:6 4 */
unsigned long UserStackWalkActive : 1;/* 0xb8:7 4 */
unsigned long Reserved : 24;/* 0xb8:8 4 */
};/* 0xb8 4 */
long MiscFlags;/* 0xb8 4 */
};/* 0xb8 4 */
unsigned char WaitReason;/* 0xbc 1 */
volatile unsigned char SwapBusy;/* 0xbd 1 */
unsigned char Alerted[2];/* 0xbe 2 */
/* ── cacheline 3 boundary (192 bytes) ── */
union {
};/* 0xc0 16 */
unsigned long WaitTime;/* 0xd8 4 */
union {
struct {
short KernelApcDisable;/* 0xdc 2 */
short SpecialApcDisable;/* 0xde 2 */
};/* 0xdc 4 */
unsigned long CombinedApcDisable;/* 0xdc 4 */
};/* 0xdc 4 */
void* Teb;/* 0xe0 8 */
union {
struct {
unsigned char TimerFill[60];/* 0xe8 60 */
union {
struct {
volatile unsigned long AutoAlignment : 1;/* 0x124:0 4 */
volatile unsigned long DisableBoost : 1;/* 0x124:1 4 */
volatile unsigned long EtwStackTraceApc1Inserted : 1;/* 0x124:2 4 */
volatile unsigned long EtwStackTraceApc2Inserted : 1;/* 0x124:3 4 */
volatile unsigned long CycleChargePending : 1;/* 0x124:4 4 */
volatile unsigned long CalloutActive : 1;/* 0x124:5 4 */
volatile unsigned long ApcQueueable : 1;/* 0x124:6 4 */
volatile unsigned long EnableStackSwap : 1;/* 0x124:7 4 */
volatile unsigned long GuiThread : 1;/* 0x124:8 4 */
volatile unsigned long ReservedFlags : 23;/* 0x124:9 4 */
};/* 0x124 4 */
volatile long ThreadFlags;/* 0x124 4 */
};/* 0x124 4 */
};/* 0xe8 64 */
};/* 0xe8 64 */
/* ── cacheline 4 boundary (256 bytes) ── */
union {
struct {
unsigned char WaitBlockFill0[43];/* 0x128 43 */
unsigned char IdealProcessor;/* 0x153 1 */
};/* 0x128 44 */
struct {
unsigned char WaitBlockFill1[91];/* 0x128 91 */
char PreviousMode;/* 0x183 1 */
};/* 0x128 92 */
struct {
unsigned char WaitBlockFill2[139];/* 0x128 139 */
unsigned char ResourceIndex;/* 0x1b3 1 */
};/* 0x128 140 */
struct {
unsigned char WaitBlockFill3[187];/* 0x128 187 */
unsigned char LargeStack;/* 0x1e3 1 */
};/* 0x128 188 */
};/* 0x128 192 */
/* ── cacheline 7 boundary (448 bytes) ── */
/* ── cacheline 8 boundary (512 bytes) ── */
void* FirstArgument;/* 0x200 8 */
union {
void* CallbackStack;/* 0x208 8 */
unsigned __int64 CallbackDepth;/* 0x208 8 */
};/* 0x208 8 */
void* ServiceTable;/* 0x210 8 */
unsigned char ApcStateIndex;/* 0x218 1 */
char BasePriority;/* 0x219 1 */
char PriorityDecrement;/* 0x21a 1 */
unsigned char Preempted;/* 0x21b 1 */
unsigned char AdjustReason;/* 0x21c 1 */
char AdjustIncrement;/* 0x21d 1 */
unsigned char Spare01;/* 0x21e 1 */
char Saturation;/* 0x21f 1 */
unsigned long SystemCallNumber;/* 0x220 4 */
unsigned long FreezeCount;/* 0x224 4 */
unsigned __int64 UserAffinity;/* 0x228 8 */
volatile unsigned __int64 Affinity;/* 0x238 8 */
/* ── cacheline 9 boundary (576 bytes) ── */
union {
struct {
unsigned char SavedApcStateFill[43];/* 0x250 43 */
unsigned char Spare02;/* 0x27b 1 */
char SuspendCount;/* 0x27c 1 */
unsigned char UserIdealProcessor;/* 0x27d 1 */
unsigned char Spare03;/* 0x27e 1 */
unsigned char OtherPlatformFill;/* 0x27f 1 */
};/* 0x250 48 */
};/* 0x250 48 */
/* ── cacheline 10 boundary (640 bytes) ── */
void* CallbackBStore;/* 0x280 8 */
void* Win32Thread;/* 0x288 8 */
void* StackBase;/* 0x290 8 */
union {
struct {
unsigned char SuspendApcFill0[1];/* 0x298 1 */
char Spare04;/* 0x299 1 */
};/* 0x298 2 */
struct {
unsigned char SuspendApcFill1[3];/* 0x298 3 */
unsigned char QuantumReset;/* 0x29b 1 */
};/* 0x298 4 */
struct {
unsigned char SuspendApcFill2[4];/* 0x298 4 */
unsigned long KernelTime;/* 0x29c 4 */
};/* 0x298 8 */
struct {
unsigned char SuspendApcFill3[64];/* 0x298 64 */
};/* 0x298 72 */
struct {
unsigned char SuspendApcFill4[72];/* 0x298 72 */
void* LegoData;/* 0x2e0 8 */
};/* 0x298 80 */
struct {
unsigned char SuspendApcFill5[83];/* 0x298 83 */
unsigned char PowerState;/* 0x2eb 1 */
unsigned long UserTime;/* 0x2ec 4 */
};/* 0x298 88 */
};/* 0x298 88 */
/* ── cacheline 11 boundary (704 bytes) ── */
union {
struct {
unsigned char SuspendSemaphorefill[28];/* 0x2f0 28 */
unsigned long SListFaultCount;/* 0x30c 4 */
};/* 0x2f0 32 */
};/* 0x2f0 32 */
/* ── cacheline 12 boundary (768 bytes) ── */
void* SListFaultAddress;/* 0x330 8 */
__int64 ReadOperationCount;/* 0x338 8 */
/* ── cacheline 13 boundary (832 bytes) ── */
__int64 WriteOperationCount;/* 0x340 8 */
__int64 OtherOperationCount;/* 0x348 8 */
__int64 ReadTransferCount;/* 0x350 8 */
__int64 WriteTransferCount;/* 0x358 8 */
__int64 OtherTransferCount;/* 0x360 8 */
void* MdlForLockedTeb;/* 0x368 8 */
void* StateSaveArea;/* 0x370 8 */
};
size 896 (0x380)128 members1 hole (6 bytes)padding 014 cachelines
Used in (5)