1PTHREAD_EQUAL(3P)          POSIX Programmer's Manual         PTHREAD_EQUAL(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_equal — compare thread IDs
13

SYNOPSIS

15       #include <pthread.h>
16
17       int pthread_equal(pthread_t t1, pthread_t t2);
18

DESCRIPTION

20       This function shall compare the thread IDs t1 and t2.
21

RETURN VALUE

23       The pthread_equal() function shall return a non-zero value if t1 and t2
24       are equal; otherwise, zero shall be returned.
25
26       If either t1 or t2 are not valid thread IDs, the behavior is undefined.
27

ERRORS

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

EXAMPLES

36       None.
37

APPLICATION USAGE

39       None.
40

RATIONALE

42       Implementations  may  choose to define a thread ID as a structure. This
43       allows additional flexibility and robustness over using  an  int.   For
44       example, a thread ID could include a sequence number that allows detec‐
45       tion of  ``dangling  IDs''  (copies  of  a  thread  ID  that  has  been
46       detached).  Since  the C language does not support comparison on struc‐
47       ture types, the pthread_equal() function is provided to compare  thread
48       IDs.
49

FUTURE DIRECTIONS

51       None.
52

SEE ALSO

54       pthread_create(), pthread_self()
55
56       The Base Definitions volume of POSIX.1‐2017, <pthread.h>
57
59       Portions  of  this text are reprinted and reproduced in electronic form
60       from IEEE Std 1003.1-2017, Standard for Information Technology --  Por‐
61       table  Operating System Interface (POSIX), The Open Group Base Specifi‐
62       cations Issue 7, 2018 Edition, Copyright (C) 2018 by the  Institute  of
63       Electrical  and  Electronics Engineers, Inc and The Open Group.  In the
64       event of any discrepancy between this version and the original IEEE and
65       The  Open Group Standard, the original IEEE and The Open Group Standard
66       is the referee document. The original Standard can be  obtained  online
67       at http://www.opengroup.org/unix/online.html .
68
69       Any  typographical  or  formatting  errors that appear in this page are
70       most likely to have been introduced during the conversion of the source
71       files  to  man page format. To report such errors, see https://www.ker
72       nel.org/doc/man-pages/reporting_bugs.html .
73
74
75
76IEEE/The Open Group                  2017                    PTHREAD_EQUAL(3P)
Impressum