Thread ID value and size

In some threads implementations, the thread ID is a 4-byte integer that starts at 1 and increases by 1 every time a thread is created. This integer can be used in a non-portable fashion by an application.

To assist in the portability problem with the application and to allow retrieval of the thread ID, the iSeries implementation has provided the pthread_getunique_np() function to retrieve the thread ID from the Pthread handle. This thread ID is a 64-bit integer value. Because some compilers do not yet support a full 64-bit integer data type, the value is returned in a structure containing two 4-byte integers.


Pthread APIs | APIs by category