Each of the threads in a process has a unique thread identifier (stored in the type *pthread_t*). This identifier is returned to the caller of [pthread_create(3)](https://man7.org/linux/man-pages/man3/pthread_create.3.html), and a thread can obtain its own thread identifier using [pthread_self(3)](https://man7.org/linux/man-pages/man3/pthread_self.3.html). Thread IDs are guaranteed to be unique only within a process. (In all pthreads functions that accept a thread ID as an argument, that ID by definition refers to a thread in the same process as the caller.)