[Prev] [Contents] [Next]

Thread ID value and size

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

In order to assist in the portability problem with the application and to allow retrieval of the integral thread id, the AS/400 implementation has provided the pthread_getunique_np() function to retrieve the integral thread id from the Pthread handle. This integral thread id is actually a 64 bit integer value. Since 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.



[Prev] [Contents] [Next]
Copyright © 1998, IBM Corporation. All rights reserved.
Comments? Contact
rchthrds@us.ibm.com