INtime SDK Help
THREADINFO_SNAPSHOT structure

Syntax

typedef struct tagThreadInfo {
    RTHANDLE    OwnerProcess;
    RTHANDLE    NextThread;
    LPPROC      ExceptionHandler;
    WORD        ExceptionHandler_seg;
    BYTE        ExceptionMode;
    BYTE        _fill0;
    BYTE        StaticPriority;
    BYTE        DynamicPriority;
    BYTE        ThreadFlags;
    BYTE        InterruptThread;
    BYTE        PendingInterrupts;
    BYTE        MaxInterrupts;
    WORD        IntLevel;
    BYTE        ThreadState;
    BYTE        SuspendDepth;
    WORD        DelayRequest;
    RTHANDLE    LastExchange;
    DWORD       KnDelayRequest;
    KNHANDLE    LastKnExchange;
} THREADINFO_SNAPSHOT, far *LPTHREADINFO_SNAPSHOT;

Fields

OwnerProcess
Handle for the process containing the target thread.
NextThread
Handle for the next thread on the system thread list, which allows easy scanning of all threads in the system.
ExceptionHandler
Pointer to the thread's current exception handler. The ExceptionHandler field contains the selector for the full (48-bit) pointer.
fill0
Reserved.
ExceptionMode
The system exception mode for the thread. See description of ExceptionMode in EXCEPTION structure.
StaticPriority
The thread's assigned priority when it was created.
DynamicPriority
The thread's current priority, which can be dynamically raised by accessing a region.
ThreadFlags
The thread flags specified when the thread was created.
InterruptThread
One of these:
Non-zero The thread is an interrupt thread and the next three fields are valid.
0 (zero) The thread is not an interrupt thread; ignore the next three fields.
PendingInterrupts
Number of interrupts currently pending at the interrupt level associated with this interrupt thread.
MaxInterrupts
Maximum number of interrupts that can be pending at the interrupt level associated with this interrupt thread.
IntLevel
Interrupt level associated with this interrupt thread.
ThreadState
One of the following indicates the thread's current state:
Value Meaning
0x00 Ready and running
0x01 Ready and not running
0x02 Asleep
0x03 Waiting at an exchange object
0x04 Waiting at a region
0x05 Waiting at an object directory
0x06 Waiting at a port
0x07 Being deleted
0x08 Waiting at a kernel object
0x10 Suspended
0x11 Self-suspended
0x12 Asleep/Suspended
0x13 Waiting at an exchange and Suspended
0x14 Waiting at a region and Suspended
0x15 Waiting at an object directory and Suspended
0x16 Waiting at a port and Suspended
0x17 Being deleted and Suspended
0x20 Suspended after a fault occurred
0xff Thread state unknown
SuspendDepth
Suspension depth of the thread, which is non-zero only if the thread has been overtly suspended (as opposed to being suspended by the OS).
DelayRequest
Amount of time the thread has been waiting at an exchange. This field is zero if the thread has been waiting at any other type of object.
LastExchange
The handle for an exchange object (for example, mailbox or semaphore) at which the thread is waiting. This field is zero if the thread is not waiting at an exchange.
KnDelayRequest
Amount of time the thread has been waiting at a low-level exchange. This field is zero if the thread has been waiting at any other type of object.
LastKnExchange
The handle for a low-level exchange object (for example, mailbox or semaphore) at which the thread is waiting. This field is 0 (zero) if the thread is not waiting at a low-level exchange.

See Also

GetRtThreadInfo