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

NAME

6       pthread_equal - compare thread IDs
7

SYNOPSIS

9       #include <pthread.h>
10
11       int pthread_equal(pthread_t t1, pthread_t t2);
12
13

DESCRIPTION

15       This function shall compare the thread IDs t1 and t2.
16

RETURN VALUE

18       The pthread_equal() function shall return a non-zero value if t1 and t2
19       are equal; otherwise, zero shall be returned.
20
21       If either t1 or t2 are not valid thread IDs, the behavior is undefined.
22

ERRORS

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

EXAMPLES

31       None.
32

APPLICATION USAGE

34       None.
35

RATIONALE

37       Implementations may choose to define a thread ID as a  structure.  This
38       allows  additional  flexibility  and  robustness over using an int. For
39       example, a thread ID could include a sequence number that allows detecā€
40       tion  of "dangling IDs" (copies of a thread ID that has been detached).
41       Since the C language does not support comparison  on  structure  types,
42       the pthread_equal() function is provided to compare thread IDs.
43

FUTURE DIRECTIONS

45       None.
46

SEE ALSO

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