Thread Information Block structure.

typedef struct _TIB {
  PVOID     tib_pexchain;     /*  Head of exception handler chain. */
  PVOID     tib_pstack;       /*  Pointer to the base of the stack. */
  PVOID     tib_pstacklimit;  /*  Pointer to the end of the stack. */
  PTIB2     tib_ptib2;        /*  Pointer to a system-specific thread information block. */
  ULONG     tib_version;      /*  Version number for this Thread Information Block. */
  ULONG     tib_ordinal;      /*  Thread ordinal number. */
} TIB;

typedef   TIB   * PTIB ;

A thread is a dispatchable unit of executable code that consists of set of instructions, related CPU register values, and a stack. Every process has at least one thread and can have many threads running at the same time. The application runs when the operating system gives control to a thread in a process. A thread is the basic unit of execution.

Information about a thread is kept in a read/write area of the process address space, called the Thread Information Block (TIB). The operating system creates and maintains a TIB for every thread in the system.

An application can access the TIB of a specific thread using DosGetInfoBlocks.

Note: The fields of this data structure should not be modified unless you are switching stacks, in which case only the tib_pstack and tib_pstacklimit should changed.