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

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       pthread_self - get the calling thread ID
13

SYNOPSIS

15       #include <pthread.h>
16
17       pthread_t pthread_self(void);
18
19

DESCRIPTION

21       The pthread_self() function shall return the thread ID of  the  calling
22       thread.
23

RETURN VALUE

25       Refer to the DESCRIPTION.
26

ERRORS

28       No errors are defined.
29
30       The pthread_self() function shall not return an error code of [EINTR].
31
32       The following sections are informative.
33

EXAMPLES

35       None.
36

APPLICATION USAGE

38       None.
39

RATIONALE

41       The  pthread_self()  function provides a capability similar to the get‐
42       pid() function for processes and the rationale is the  same:  the  cre‐
43       ation call does not provide the thread ID to the created thread.
44

FUTURE DIRECTIONS

46       None.
47

SEE ALSO

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