pthread_equal Subroutine Purpose Compares two thread IDs. Library Threads Library (libpthreads.a) Syntax #include int pthread_equal (thread1, thread2) pthread_t thread1; pthread_t thread2; Description 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 (==). Note: The pthread.h header file must be the first included file of each source file using the threads library. Parameters thread1 Specifies the first ID to be compared. thread2 Specifies the second ID to be compared. Return Values If the two IDs are different, 0 is returned. Otherwise, a non-zero value is returned. Implementation Specifics This subroutine is part of the Base Operating System (BOS) Runtime. Related Information The pthread_self subroutine. Creating Threads. Threads Library Quick Reference.