NAME
pthread_self() — obtain the thread ID for the calling thread
SYNOPSIS
#include <pthread.h>
pthread_t pthread_self(void);
DESCRIPTION
pthread_self()
returns the
thread ID
of the calling thread. The thread ID returned is the
same ID that is returned in the
thread
parameter to the creating thread at thread creation time.
Thread IDs are guaranteed to be unique only within a process.
RETURN VALUE
pthread_self()
always returns the thread ID of the current thread.
AUTHOR
pthread_self()
was derived from the IEEE POSIX P1003.1c standard.
STANDARDS CONFORMANCE
pthread_self(): POSIX 1003.1c.