Controlling Threads

Under previous versions of OS/2, control information for threads was stored in a number of different locations and accessed via a number of function calls. Under Version 2.0, much of this information has been combined into a thread information block (TIB). The TIB contains the following information for the current thread:

  • Process identifier
  • Parent process identifier
  • Module handle
  • Command line pointer
  • Environment block pointer
  • Thread identifier
  • Priority
  • Base address of the thread's stack
  • Stack size
  • Pointer to the exception handler chain for the thread.

    The TIB is accessed using the DosGetInfoBlocks() function, which replaces the DosGetPrty(), DosGetPID(), DosGetPPID() and DosGetInfoSeg() functions.


    [Back: Creating Threads]
    [Next: Waiting On and Terminating Threads]