table of contents
other versions
- buster 4.16-2
- buster-backports 5.04-1~bpo10+1
- testing 5.10-1
- unstable 5.10-1
NAME¶pthread_self - obtain ID of the calling thread
SYNOPSIS¶
#include <pthread.h>
pthread_t pthread_self(void);
Compile and link with -pthread.
DESCRIPTION¶The pthread_self() function returns the ID of the calling thread. This is the same value that is returned in *thread in the pthread_create(3) call that created this thread.
RETURN VALUE¶This function always succeeds, returning the calling thread's ID.
ERRORS¶This function always succeeds.
ATTRIBUTES¶For an explanation of the terms used in this section, see attributes(7).
CONFORMING TO¶POSIX.1-2001, POSIX.1-2008.
NOTES¶POS).