pthreadself
pthread_self is a function in the POSIX threads (pthreads) library that returns the thread identifier of the calling thread. The return type is pthread_t, an opaque value that uniquely identifies a thread within the calling process. The identifier remains valid for the lifetime of the thread, and can be used with other pthreads routines that accept a pthread_t argument. The function is thread-safe and does not require extra synchronization.
Because the pthread_t type is opaque, it should not be interpreted as a number. To compare thread
Notes and portability: pthread_self is defined by the POSIX standard and is available on systems implementing