1PTHREAD_SELF(P)            POSIX Programmer's Manual           PTHREAD_SELF(P)
2
3
4

NAME

6       pthread_self - get the calling thread ID
7

SYNOPSIS

9       #include <pthread.h>
10
11       pthread_t pthread_self(void);
12
13

DESCRIPTION

15       The  pthread_self()  function shall return the thread ID of the calling
16       thread.
17

RETURN VALUE

19       Refer to the DESCRIPTION.
20

ERRORS

22       No errors are defined.
23
24       The pthread_self() function shall not return an error code of [EINTR].
25
26       The following sections are informative.
27

EXAMPLES

29       None.
30

APPLICATION USAGE

32       None.
33

RATIONALE

35       The pthread_self() function provides a capability similar to  the  get‐
36       pid()  function  for  processes and the rationale is the same: the cre‐
37       ation call does not provide the thread ID to the created thread.
38

FUTURE DIRECTIONS

40       None.
41

SEE ALSO

43       pthread_create() , pthread_equal() , the  Base  Definitions  volume  of
44       IEEE Std 1003.1-2001, <pthread.h>
45
47       Portions  of  this text are reprinted and reproduced in electronic form
48       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
49       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
50       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
51       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
52       event of any discrepancy between this version and the original IEEE and
53       The  Open Group Standard, the original IEEE and The Open Group Standard
54       is the referee document. The original Standard can be  obtained  online
55       at http://www.opengroup.org/unix/online.html .
56
57
58
59IEEE/The Open Group                  2003                      PTHREAD_SELF(P)
Impressum