summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Denis-Courmont <remi@remlab.net>2010-12-14 04:12:41 +0200
committerPeter Harris <pharris@opentext.com>2010-12-23 12:36:58 -0500
commita6bb464a892a2e564d2f7805ad7d0ace9106cf74 (patch)
treede84d4632966cebf8d948abbf1738cc85c6f445c
parent79b3c3831b49c3fd39d84584d93d93dd818508dd (diff)
pthread_equal(): do not assume pthread_t is a comparable type
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. Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Peter Harris <pharris@opentext.com>
-rw-r--r--stubs.c.m42
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