pthread_self.3t (2010 09)
p
pthread_self(3T) pthread_self(3T)
(Pthread Library)
NAME
pthread_self() - obtain the thread ID for the calling thread
SYNOPSIS
#include <pthread.h>
pthread_t pthread_self(void);
PARAMETERS
None.
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.
ERRORS
None.
AUTHOR
pthread_self() was derived from the IEEE POSIX P1003.1c standard.
SEE ALSO
pthread_create(3T), pthread_equal(3T), getpid(2).
STANDARDS CONFORMANCE
pthread_self(): POSIX 1003.1c.
HP-UX 11i Version 3: September 2010 − 1 − Hewlett-Packard Company 1