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:
@@ -181,7 +181,7 @@ pthread_self(void)
|
|||||||
int
|
int
|
||||||
pthread_equal(pthread_t t1, pthread_t t2)
|
pthread_equal(pthread_t t1, pthread_t t2)
|
||||||
{
|
{
|
||||||
return t1 != NULL && t2 != NULL && t1 == t2;
|
return t1 == t2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user