[Xcb] [PATCH 2/2] pthread_equal(): do not assume pthread_t is a comparable type

Rémi Denis-Courmont remi at remlab.net
Mon Dec 13 18:12:41 PST 2010


Anyway, the return value from pthread_self() being the only legal
pthread_t value in the case of stubs, all threads are one and the same.
In other words, pthread_equal() is always true.
---
 stubs.c.m4 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/stubs.c.m4 b/stubs.c.m4
index 8e51745..e069b9e 100644
--- a/stubs.c.m4
+++ b/stubs.c.m4
@@ -79,7 +79,7 @@ static pthread_t __pthread_self_stub(void)
 #ifdef NEED_EQUAL_STUB
 static int __pthread_equal_stub(pthread_t t1, pthread_t t2)
 {
-    return (t1 == t2);
+    return 1;
 }
 #endif
 
-- 
1.7.2.3



More information about the Xcb mailing list