macro for pthread_equal
authorRich Felker <dalias@aerifal.cx>
Sun, 14 Aug 2011 19:17:36 +0000 (15:17 -0400)
committerRich Felker <dalias@aerifal.cx>
Sun, 14 Aug 2011 19:17:36 +0000 (15:17 -0400)
no sense bloating apps with a function call for an equality comparison...

include/pthread.h
src/thread/pthread_equal.c

index a0af20f..44a7101 100644 (file)
@@ -80,7 +80,9 @@ int pthread_join(pthread_t, void **);
 __attribute__((const))
 #endif
 pthread_t pthread_self(void);
+
 int pthread_equal(pthread_t, pthread_t);
+#define pthread_equal(x,y) ((x)==(y))
 
 int pthread_setcancelstate(int, int *);
 int pthread_setcanceltype(int, int *);
index a55d280..3e3df4f 100644 (file)
@@ -1,6 +1,6 @@
 #include <pthread.h>
 
-int pthread_equal(pthread_t a, pthread_t b)
+int (pthread_equal)(pthread_t a, pthread_t b)
 {
        return a==b;
 }