PTHREAD_SELF
NAMESYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
ATTRIBUTES
CONFORMING TO
NOTES
SEE ALSO
COLOPHON
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
Multithreading
(see pthreads(7))
The pthread_self() function is thread-safe.
CONFORMING TO
POSIX.1-2001.
NOTES
POSIX.1 allows an implementation wide freedom in choosing the type used to represent a thread ID; for example, representation using either an arithmetic type or a structure is permitted. Therefore, variables of type pthread_t can’t portably be compared using the C equality operator (==); use pthread_equal(3) instead.
Thread identifiers should be considered opaque: any attempt to use a thread ID other than in pthreads calls is nonportable and can lead to unspecified results.
Thread IDs are guaranteed to be unique only within a process. A thread ID may be reused after a terminated thread has been joined, or a detached thread has terminated.
The thread ID returned by pthread_self() is not the same thing as the kernel thread ID returned by a call to gettid(2).
SEE ALSO
pthread_create(3), pthread_equal(3), pthreads(7)
COLOPHON
This page is part of release 3.69 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at http://www.kernel.org/doc/man−pages/.
More Linux Commands
manpages/setleds.1.html
setleds(1) - set the keyboard leds - Linux manual page......
Setleds reports and changes the led flag settings of a VT (namely NumLock, CapsLock and ScrollLock). Without arguments, setleds prints the current settings. Wit
manpages/SDLKey.3.html
SDLKey(3) - SDL Keysym Definitions - Linux manual page......
SDL Keysym definitions SDLKey ASCII value Common Name SDL modifier definitions SDL Modifier Meaning SDLK_BACKSPACE SDLK_TAB SDLK_CLEAR DLK_RETURN SDLK_PAUSE ...
manpages/glIndexd.3gl.html
glIndexd(3gl) - set the current color index - Linux man page
glIndex updates the current (single-valued) color index. It takes one argument, the new value for the current color index. The current index is stored as a floa
manpages/sq.1.html
sq(1) - squeeze or unsqueeze a sorted word list (Man Page)
sq compresses a sorted list of words (a dictionary). For example: sort -u /usr/dict/words | sq | gzip -9 > words.sq.Z will compress dict by about a factor of 5.
manpages/zypp-NameReqPrv.1.html
zypp-NameReqPrv(1) Investigate packages and dependencies in
Load all enabled repositories (without refresh) and search for occurrences of regular expression NAME in package names or dependencies. In case DIR denotes a di
manpages/mailstat.1.html
mailstat(1) - shows mail-arrival statistics - Linux man page
mailstat parses a procmail-generated $LOGFILE and displays a summary about the messages delivered to all folders (total size, average size, nr of messages). The
manpages/BC.3ncurses.html
BC(3ncurses) - direct curses interface to the terminfo capab
These routines are included as a conversion aid for programs that use the termcap library. Their parameters are the same and the routines are emulated using the
manpages/vgdisplay.8.html
vgdisplay(8) - display attributes of volume groups (ManPage)
vgdisplay allows you to see the attributes of VolumeGroupName (or all volume groups if none is given) with its physical and logical volumes and their sizes etc.
manpages/glRasterPos3iv.3gl.html
glRasterPos3iv(3gl) - specify the raster position for pixel
The GL maintains a 3D position in window coordinates. This position, called the raster position, is used to position pixel and bitmap write operations. It is ma
manpages/if_nameindex.3.html
if_nameindex(3) get network interface names and indexes.....
The if_nameindex() function returns an array of if_nameindex structures, each containing information about one of the network interfaces on the local system. Th
manpages/execle.3.html
execle(3) - execute a file (Library - Linux man page).......
The exec() family of functions replaces the current process image with a new process image. The functions described in this manual page are front-ends for execv
manpages/msgen.1.html
msgen(1) - create English message catalog - Linux man page
Creates an English translation catalog. The input file is the last created English PO file, or a PO Template file (generally created by xgettext). Untranslated
