The Second THREADINFO Flags

Version 6.1 introduced to the THREADINFO structure what may be intended as an elaboration of the age-old TIF_flags. Type information in symbol files for WIN32K.SYS in Windows 7 (only) shows the flags as ULONG bit fields in union with a ulThreadFlags2. Many more bit fields have been defined since—and since those symbol files place the ulThreadFlags2 incorrectly within the THREADINFO, it’s hardly obvious that they can be trusted to have enumerated the bit fields correctly, let alone completely.

It seems unlikely that I shall ever attempt to describe the additions, let alone attempt an enumeration of which flags are defined in which versions, but you never know.

Mask Definition Versions
0x00000001
 ULONG fSpecialInitialization : 1;
 
0x00000002
ULONG fgfSwitchInProgressSetter : 1;
 
 
ULONG fPack : 26;
 
0x10000000
ULONG fThreadCleanupFinished : 1;
 
 
ULONG fETWReserved : 3;