Post · 3 min read· pp. 1517–1519

Miscellaneous Flags in the KTHREAD

Windows Vista started a new series of bit fields in the KTHREAD, presumably to complement the slightly older Thread Flags. Several had been BOOLEAN members of the KTHREAD. Curiously, some of the bit fields that started as Miscellaneous Flags have moved to the Thread Flags, and vice versa.

The MiscFlags member, which is a LONG for simultaneous access to all the bits described below, has moved around a little within the KTHREAD:

VersionOffset (x86)Offset (x64)
early 6.0 (before SP1); late 6.0 (SP1 and higher)0x680x90
6.10x3C0x4C
6.2 and higher0x580x74

Early and late builds of version 6.0 are distinguished above because even though the MiscFlags don’t move between the builds, one new bit gets defined.

Bit Fields

MaskDefinitionVersionsRemarks
0x00000001ULONG KernelStackResident : 1;6.0 to 6.3previously as BOOLEAN; next in ThreadFlags
ULONG AutoBoostActive : 1;10.0 and higher
0x00000002ULONG ReadyTransition : 1;6.0 and higher
0x00000004ULONG ProcessReadyQueue : 1;6.0 to 6.3previously as BOOLEAN
0x00000008 (6.0 to 6.3); 0x00000004ULONG WaitNext : 1;6.0 and higherpreviously as BOOLEAN
0x00000010 (6.0 to 6.3); 0x00000008ULONG SystemAffinityActive : 1;6.0 and higherpreviously as BOOLEAN
0x00000020 (6.0 to 6.3); 0x00000010ULONG Alertable : 1;6.0 and higherpreviously as BOOLEAN
0x00000040ULONG GdiFlushActive : 1;6.0 to 6.1
ULONG CodePatchInProgress : 1;6.2 onlypreviously as BOOLEAN
0x00000080 (late 6.0 to 6.2); 0x00000040 (6.3); 0x00000020ULONG UserStackWalkActive : 1;late 6.0 and higher
0x00000100 (6.1 to 6.2); 0x00000080 (6.3); 0x00000040ULONG ApcInterruptRequest : 1;6.1 and higher
0x00000200 (6.1)ULONG ForceDeferSchedule : 1;6.1 onlynext in ThreadFlags
0x00000400 (6.1); 0x00000200 (6.2); 0x00000100 (6.3); 0x00000080ULONG QuantumEndMigrate : 1;6.1 and higher
0x00000800 (6.1); 0x00000400 (6.2); 0x00000200 (6.3); 0x00000100ULONG UmsDirectedSwitchEnable : 1;6.1 and higher
0x00001000 (6.1); 0x00000800 (6.2); 0x00000400 (6.3); 0x00000200ULONG TimerActive : 1;6.1 and higher
0x00001000 (6.2); 0x00000800 (6.3); 0x00000400ULONG SystemThread : 1;6.2 and higher
0x00002000 (6.2); 0x00001000 (6.3); 0x00000800ULONG ProcessDetachActive : 1;6.2 and higher
0x00004000 (6.2); 0x00002000 (6.3); 0x00001000ULONG CalloutActive : 1;6.2 and higherpreviously in ThreadFlags
0x00008000 (6.2); 0x00004000 (6.3); 0x00002000ULONG ScbReadyQueue : 1;6.2 and higher
0x00010000 (6.2); 0x00008000 (6.3); 0x00004000ULONG ApcQueueable : 1;6.2 and higherpreviously in ThreadFlags
0x00020000 (6.2); 0x00010000 (6.3); 0x00008000ULONG ReservedStackInUse : 1;6.2 and higher
0x00040000 (6.2); 0x00020000 (6.3); 0x00010000ULONG UmsPerformingSyscall : 1;6.2 and higherpreviously in ThreadFlags
0x00040000 (6.3); 0x00020000ULONG ApcPendingReload : 1;6.3 only
ULONG TimerSuspended : 1;10.0 and higher
0x00040000ULONG SuspendedWaitMode : 1;10.0 and higher
0x00080000ULONG SuspendApcSchedulerWait : 1;10.0 and higher
0x00100000ULONG CetShadowStack : 1;1809 only
ULONG CetUserShadowStack : 1;1903 and higher
0x00200000ULONG BypassProcessFreeze : 1;1903 and higher
ULONG Reserved : 25;early 6.0 only
ULONG Reserved : 24;late 6.0 only
ULONG Reserved : 19;6.1 only
ULONG Reserved : 13;6.2 to 6.3
ULONG Reserved : 12;10.0 to 1803
ULONG Reserved : 11;1809 only
ULONG Reserved : 10;1903 and higher