Returns the calling thread's ID.
Threads Library (libpthreads.a)
#include <pthread.h>
pthread_t pthread_self (void);
The pthread_self subroutine returns the calling thread's ID.
Note: The pthread.h header file must be the first included file of each source file using the threads library. Otherwise, the -D_THREAD_SAFE compilation flag should be used, or the cc_r compiler used. In this case, the flag is automatically set.
The calling thread's ID is returned.
The pthread_self function will not return an error code of EINTR.
This subroutine is part of the Base Operating System (BOS) Runtime.
The pthread_create subroutine, pthread_equal subroutine, pthread.h file.
Creating Threads in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.
Threads Library Quick Reference in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.