typedef struct _UMS_CONTROL_BLOCK
{
    RTL_UMS_CONTEXT *UmsContext;
    SINGLE_LIST_ENTRY *CompletionListEntry;
    KEVENT *CompletionListEvent;
    unsigned long ServiceSequenceNumber;
    union
    {
        struct
        {
            KQUEUE UmsQueue;
            LIST_ENTRY QueueEntry;
            RTL_UMS_CONTEXT *YieldingUmsContext;
            void *YieldingParam;
            void *UmsTeb;
            union
            {
                unsigned long PrimaryFlags;
                unsigned long UmsContextHeaderReady : 1;
            };
        };
        struct
        {
            KQUEUE *UmsAssociatedQueue;
            LIST_ENTRY *UmsQueueListEntry;
            KUMS_CONTEXT_HEADER *UmsContextHeader;
            KGATE UmsWaitGate;
            void *StagingArea;
            union
            {
                volatile long Flags;
                struct
                {
                    volatile unsigned long UmsForceQueueTermination : 1;
                    volatile unsigned long UmsAssociatedQueueUsed : 1;
                    volatile unsigned long UmsThreadParked : 1;
                    volatile unsigned long UmsPrimaryDeliveredContext : 1;
                    volatile unsigned long UmsPerformingSingleStep : 1;
                };
            };
        };
    };
    unsigned short TebSelector;
} UMS_CONTROL_BLOCK, *PUMS_CONTROL_BLOCK;