Obtaining Information about a Thread

OS/2 creates and maintains a thread information block for each thread. An application can use DosGetInfoBlocks to access the thread information block. This function returns a pointer to a TIB data structure.

The code fragment below returns the address of the thread information block of the current thread. The calling thread can subsequently browse the TIB.

DosGetInfoBlocks also returns the address of the process information block of the current process.


[Back: Creating a Thread]
[Next: Changing the Priority of a Thread]