typedef struct _RTL_UMS_CONTEXT
{
    SINGLE_LIST_ENTRY Link;
    CONTEXT Context;
    void *Teb;
    void *UserContext;
    union
    {
        struct
        {
            volatile unsigned long ScheduledThread : 1;
            volatile unsigned long HasQuantumReq : 1;
            volatile unsigned long HasAffinityReq : 1;
            volatile unsigned long HasPriorityReq : 1;
            volatile unsigned long Suspended : 1;
            volatile unsigned long VolatileContext : 1;
            volatile unsigned long Terminated : 1;
            volatile unsigned long DebugActive : 1;
            volatile unsigned long RunningOnSelfThread : 1;
            volatile unsigned long DenyRunningOnSelfThread : 1;
            volatile unsigned long ReservedFlags : 22;
        };
        volatile long Flags;
    };
    union
    {
        struct
        {
            volatile unsigned __int64 KernelUpdateLock : 1;
            volatile unsigned __int64 Reserved : 1;
            volatile unsigned __int64 PrimaryClientID : 62;
        };
        volatile unsigned __int64 ContextLock;
    };
    unsigned __int64 QuantumValue;
    GROUP_AFFINITY AffinityMask;
    long Priority;
    RTL_UMS_CONTEXT *PrimaryUmsContext;
    unsigned long SwitchCount;
    unsigned long KernelYieldCount;
    unsigned long MixedYieldCount;
    unsigned long YieldCount;
} RTL_UMS_CONTEXT, *PRTL_UMS_CONTEXT;