1pthread_equal(3)           Library Functions Manual           pthread_equal(3)
2
3
4

NAME

6       pthread_equal - compare thread IDs
7

LIBRARY

9       POSIX threads library (libpthread, -lpthread)
10

SYNOPSIS

12       #include <pthread.h>
13
14       int pthread_equal(pthread_t t1, pthread_t t2);
15

DESCRIPTION

17       The pthread_equal() function compares two thread identifiers.
18

RETURN VALUE

20       If  the  two  thread  IDs  are equal, pthread_equal() returns a nonzero
21       value; otherwise, it returns 0.
22

ERRORS

24       This function always succeeds.
25

ATTRIBUTES

27       For an  explanation  of  the  terms  used  in  this  section,  see  at‐
28       tributes(7).
29
30       ┌────────────────────────────────────────────┬───────────────┬─────────┐
31Interface                                   Attribute     Value   
32       ├────────────────────────────────────────────┼───────────────┼─────────┤
33pthread_equal()                             │ Thread safety │ MT-Safe │
34       └────────────────────────────────────────────┴───────────────┴─────────┘
35

STANDARDS

37       POSIX.1-2008.
38

HISTORY

40       POSIX.1-2001.
41

NOTES

43       The  pthread_equal() function is necessary because thread IDs should be
44       considered opaque: there is no portable way for applications to direct‐
45       ly compare two pthread_t values.
46

SEE ALSO

48       pthread_create(3), pthread_self(3), pthreads(7)
49
50
51
52Linux man-pages 6.04              2023-03-30                  pthread_equal(3)
Impressum