x86 / ntdllntoskrnl /

_KTHREAD

← 10.0.18362.1016 26 builds latest →
struct _KTHREAD {
void* SListFaultAddress;/* 0x10 4 */
/* 4 bytes padding */
unsigned __int64 QuantumTarget;/* 0x18 8 */
void* InitialStack;/* 0x20 4 */
void* StackLimit;/* 0x24 4 */
void* StackBase;/* 0x28 4 */
unsigned long ThreadLock;/* 0x2c 4 */
volatile unsigned __int64 CycleTime;/* 0x30 8 */
volatile unsigned long HighCycleTime;/* 0x38 4 */
void* ServiceTable;/* 0x3c 4 */
/* ── cacheline 1 boundary (64 bytes) ── */
unsigned long CurrentRunTime;/* 0x40 4 */
unsigned long ExpectedRunTime;/* 0x44 4 */
void* KernelStack;/* 0x48 4 */
volatile unsigned char Running;/* 0x55 1 */
unsigned char Alerted[2];/* 0x56 2 */
union {
struct {
unsigned long AutoBoostActive : 1;/* 0x58:0 4 */
unsigned long ReadyTransition : 1;/* 0x58:1 4 */
unsigned long WaitNext : 1;/* 0x58:2 4 */
unsigned long SystemAffinityActive : 1;/* 0x58:3 4 */
unsigned long Alertable : 1;/* 0x58:4 4 */
unsigned long UserStackWalkActive : 1;/* 0x58:5 4 */
unsigned long ApcInterruptRequest : 1;/* 0x58:6 4 */
unsigned long QuantumEndMigrate : 1;/* 0x58:7 4 */
unsigned long UmsDirectedSwitchEnable : 1;/* 0x58:8 4 */
unsigned long TimerActive : 1;/* 0x58:9 4 */
unsigned long SystemThread : 1;/* 0x58:10 4 */
unsigned long ProcessDetachActive : 1;/* 0x58:11 4 */
unsigned long CalloutActive : 1;/* 0x58:12 4 */
unsigned long ScbReadyQueue : 1;/* 0x58:13 4 */
unsigned long ApcQueueable : 1;/* 0x58:14 4 */
unsigned long ReservedStackInUse : 1;/* 0x58:15 4 */
unsigned long UmsPerformingSyscall : 1;/* 0x58:16 4 */
unsigned long TimerSuspended : 1;/* 0x58:17 4 */
unsigned long SuspendedWaitMode : 1;/* 0x58:18 4 */
unsigned long SuspendSchedulerApcWait : 1;/* 0x58:19 4 */
unsigned long CetUserShadowStack : 1;/* 0x58:20 4 */
unsigned long BypassProcessFreeze : 1;/* 0x58:21 4 */
unsigned long Reserved : 10;/* 0x58:22 4 */
};/* 0x58 4 */
long MiscFlags;/* 0x58 4 */
};/* 0x58 4 */
union {
struct {
unsigned long ThreadFlagsSpare : 2;/* 0x5c:0 4 */
unsigned long AutoAlignment : 1;/* 0x5c:2 4 */
unsigned long DisableBoost : 1;/* 0x5c:3 4 */
unsigned long AlertedByThreadId : 1;/* 0x5c:4 4 */
unsigned long QuantumDonation : 1;/* 0x5c:5 4 */
unsigned long EnableStackSwap : 1;/* 0x5c:6 4 */
unsigned long GuiThread : 1;/* 0x5c:7 4 */
unsigned long DisableQuantum : 1;/* 0x5c:8 4 */
unsigned long ChargeOnlySchedulingGroup : 1;/* 0x5c:9 4 */
unsigned long DeferPreemption : 1;/* 0x5c:10 4 */
unsigned long QueueDeferPreemption : 1;/* 0x5c:11 4 */
unsigned long ForceDeferSchedule : 1;/* 0x5c:12 4 */
unsigned long SharedReadyQueueAffinity : 1;/* 0x5c:13 4 */
unsigned long FreezeCount : 1;/* 0x5c:14 4 */
unsigned long TerminationApcRequest : 1;/* 0x5c:15 4 */
unsigned long AutoBoostEntriesExhausted : 1;/* 0x5c:16 4 */
unsigned long KernelStackResident : 1;/* 0x5c:17 4 */
unsigned long TerminateRequestReason : 2;/* 0x5c:18 4 */
unsigned long ProcessStackCountDecremented : 1;/* 0x5c:20 4 */
unsigned long RestrictedGuiThread : 1;/* 0x5c:21 4 */
unsigned long VpBackingThread : 1;/* 0x5c:22 4 */
unsigned long ThreadFlagsSpare2 : 1;/* 0x5c:23 4 */
unsigned long EtwStackTraceApcInserted : 8;/* 0x5c:24 4 */
};/* 0x5c 4 */
volatile long ThreadFlags;/* 0x5c 4 */
};/* 0x5c 4 */
volatile unsigned char Tag;/* 0x60 1 */
unsigned char SystemHeteroCpuPolicy;/* 0x61 1 */
unsigned char UserHeteroCpuPolicy : 7;/* 0x62:0 1 */
unsigned char ExplicitSystemHeteroCpuPolicy : 1;/* 0x62:7 1 */
unsigned char Spare0;/* 0x63 1 */
unsigned long SystemCallNumber;/* 0x64 4 */
void* FirstArgument;/* 0x68 4 */
union {
struct {
unsigned char ApcStateFill[23];/* 0x70 23 */
char Priority;/* 0x87 1 */
};/* 0x70 24 */
};/* 0x70 24 */
/* ── cacheline 2 boundary (128 bytes) ── */
unsigned long UserIdealProcessor;/* 0x88 4 */
unsigned long ContextSwitches;/* 0x8c 4 */
volatile unsigned char State;/* 0x90 1 */
char Spare12;/* 0x91 1 */
unsigned char WaitIrql;/* 0x92 1 */
char WaitMode;/* 0x93 1 */
volatile long WaitStatus;/* 0x94 4 */
union {
};/* 0x9c 8 */
void* Teb;/* 0xa8 4 */
/* 4 bytes padding */
unsigned __int64 RelativeTimerBias;/* 0xb0 8 */
/* ── cacheline 3 boundary (192 bytes) ── */
union {
struct {
unsigned char WaitBlockFill8[20];/* 0xe0 20 */
};/* 0xe0 24 */
struct {
unsigned char WaitBlockFill9[44];/* 0xe0 44 */
};/* 0xe0 48 */
struct {
unsigned char WaitBlockFill10[68];/* 0xe0 68 */
void* Win32Thread;/* 0x124 4 */
};/* 0xe0 72 */
struct {
unsigned char WaitBlockFill11[88];/* 0xe0 88 */
unsigned long WaitTime;/* 0x138 4 */
union {
struct {
short KernelApcDisable;/* 0x13c 2 */
short SpecialApcDisable;/* 0x13e 2 */
};/* 0x13c 4 */
unsigned long CombinedApcDisable;/* 0x13c 4 */
};/* 0x13c 4 */
};/* 0xe0 96 */
};/* 0xe0 96 */
/* ── cacheline 5 boundary (320 bytes) ── */
union {
volatile unsigned long NextProcessor;/* 0x148 4 */
struct {
unsigned long NextProcessorNumber : 31;/* 0x148:0 4 */
unsigned long SharedReadyQueue : 1;/* 0x148:31 4 */
};/* 0x148 4 */
};/* 0x148 4 */
long QueuePriority;/* 0x14c 4 */
union {
struct {
unsigned char UserAffinityFill[6];/* 0x154 6 */
char PreviousMode;/* 0x15a 1 */
char BasePriority;/* 0x15b 1 */
union {
char PriorityDecrement;/* 0x15c 1 */
struct {
unsigned char ForegroundBoost : 4;/* 0x15c:0 1 */
unsigned char UnusualBoost : 4;/* 0x15c:4 1 */
};/* 0x15c 1 */
};/* 0x15c 1 */
unsigned char Preempted;/* 0x15d 1 */
unsigned char AdjustReason;/* 0x15e 1 */
char AdjustIncrement;/* 0x15f 1 */
};/* 0x154 12 */
};/* 0x154 12 */
unsigned long AffinityVersion;/* 0x160 4 */
union {
struct {
unsigned char AffinityFill[6];/* 0x164 6 */
unsigned char ApcStateIndex;/* 0x16a 1 */
unsigned char WaitBlockCount;/* 0x16b 1 */
unsigned long IdealProcessor;/* 0x16c 4 */
};/* 0x164 12 */
};/* 0x164 12 */
unsigned long ReadyTime;/* 0x170 4 */
union {
struct {
unsigned char SavedApcStateFill[23];/* 0x174 23 */
unsigned char WaitReason;/* 0x18b 1 */
};/* 0x174 24 */
};/* 0x174 24 */
/* ── cacheline 6 boundary (384 bytes) ── */
char SuspendCount;/* 0x18c 1 */
char Saturation;/* 0x18d 1 */
unsigned short SListFaultCount;/* 0x18e 2 */
union {
struct {
unsigned char SchedulerApcFill1[3];/* 0x190 3 */
unsigned char QuantumReset;/* 0x193 1 */
};/* 0x190 4 */
struct {
unsigned char SchedulerApcFill2[4];/* 0x190 4 */
unsigned long KernelTime;/* 0x194 4 */
};/* 0x190 8 */
struct {
unsigned char SchedulerApcFill3[36];/* 0x190 36 */
};/* 0x190 40 */
struct {
unsigned char SchedulerApcFill4[40];/* 0x190 40 */
void* LegoData;/* 0x1b8 4 */
};/* 0x190 44 */
struct {
unsigned char SchedulerApcFill5[47];/* 0x190 47 */
unsigned char CallbackNestingLevel;/* 0x1bf 1 */
};/* 0x190 48 */
};/* 0x190 48 */
/* ── cacheline 7 boundary (448 bytes) ── */
unsigned long UserTime;/* 0x1c0 4 */
unsigned char AbEntrySummary;/* 0x1e4 1 */
unsigned char AbWaitEntryCount;/* 0x1e5 1 */
unsigned char AbAllocationRegionCount;/* 0x1e6 1 */
char SystemPriority;/* 0x1e7 1 */
unsigned char PriorityFloorCounts[16];/* 0x1f4 16 */
/* ── cacheline 8 boundary (512 bytes) ── */
unsigned char PriorityFloorCountsReserved[16];/* 0x204 16 */
unsigned long PriorityFloorSummary;/* 0x214 4 */
volatile long AbCompletedIoBoostCount;/* 0x218 4 */
volatile long AbCompletedIoQoSBoostCount;/* 0x21c 4 */
volatile short KeReferenceCount;/* 0x220 2 */
unsigned char AbOrphanedEntrySummary;/* 0x222 1 */
unsigned char AbOwnedEntryCount;/* 0x223 1 */
unsigned long ForegroundLossTime;/* 0x224 4 */
union {
struct {
unsigned long InGlobalForegroundList;/* 0x22c 4 */
};/* 0x228 8 */
};/* 0x228 8 */
/* 4 bytes padding */
unsigned __int64 NpxState;/* 0x238 8 */
/* ── cacheline 9 boundary (576 bytes) ── */
volatile unsigned long ThreadTimerDelay;/* 0x240 4 */
union {
volatile long ThreadFlags3;/* 0x244 4 */
struct {
unsigned long BamQosLevel : 8;/* 0x244:0 4 */
unsigned long PpmPolicy : 2;/* 0x244:8 4 */
unsigned long ThreadFlags3Reserved2 : 22;/* 0x244:10 4 */
};/* 0x244 4 */
};/* 0x244 4 */
void* AbWaitObject;/* 0x248 4 */
unsigned long ReservedPreviousReadyTimeValue;/* 0x24c 4 */
unsigned __int64 KernelWaitTime;/* 0x250 8 */
unsigned __int64 UserWaitTime;/* 0x258 8 */
unsigned long Spare29[3];/* 0x260 12 */
unsigned char ResourceIndex;/* 0x26c 1 */
unsigned char Spare31[3];/* 0x26d 3 */
unsigned long EndPadding[4];/* 0x270 16 */
};
size 640 (0x280)181 members3 holes (12 bytes)padding 010 cachelines
Used in (19)