pthread: allow NULL thread to compare equal.

- POSIX says the behavior for pthread_equal is undefined for
uninitialized arguments.
- However, gcc C++11 threads supports expects C++-compatible behavior,
that is, two uninitialized pthread_t should compare equal.

Avoids some runtime asserts in latest WebKit version.
This commit is contained in:
Adrien Destugues
2014-03-09 22:26:36 +01:00
parent 0012ba6a87
commit ba5172cccb
+1 -1
View File
@@ -181,7 +181,7 @@ pthread_self(void)
int
pthread_equal(pthread_t t1, pthread_t t2)
{
return t1 != NULL && t2 != NULL && t1 == t2;
return t1 == t2;
}