Compares two thread IDs.
Threads Library (libpthreads.a)
#include <pthread.h>
int pthread_equal (thread1, thread2)
pthread_t thread1;
pthread_t thread2;
The pthread_equal subroutine compares the thread IDs thread1 and thread2. Since the thread IDs are opaque objects, it should not be assumed that they can be compared using the equality operator (==).
Item | Description |
---|---|
thread1 | Specifies the first ID to be compared. |
thread2 | Specifies the second ID to be compared. |
The pthread_equal function returns a nonzero value if thread1 and thread2 are equal; otherwise, zero is returned.
If either thread1 or thread2 are not valid thread IDs, the behavior is undefined.