pthread_equal() = This compares two thread which is equal or not. This function compares two thread identifiers. It return ‘0’ and non zero value. If it is equal then return non zero value else return 0.
Syntax:- int pthread_equal (pthread_t t1, pthread_t t2);
First Method :- Compare with self thread
Second Method :- Compare with other thread
This article is contributed by Devanshu Agarwal. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Strict Aliasing Rule in C with Examples
- Difference between C and Dart
- Difference between Sentinel and Counter Controlled Loop in C
- Why do we need reference variables if we have pointers
- What are the differences between C and Embedded C?
- Macros and its types in C/C++
- Draw a smiley face using Graphics in C language
- NULL undeclared error in C/C++ and how to resolve it
- Draw a Chess Board using Graphics Programming in C
- Which will be faster while(1) or while(2)?
- what happens when you don't free memory after using malloc()
- Average of Cubes of first N natural numbers
- Top 10 Programming Languages for Blockchain Development
- How many levels of pointers can we have in C/C++
- std::string::crbegin() and std::string::crend() in C++ with Examples
Improved By : nidhi_biet