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 a0af20fe38e769ad787c6ec4310b6ad49d7bb44e..44a710197210a5cc1abd4edf6e52c74b8be2a701 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 a55d280c83bde62cdb5f8cbb0c4b212da8ecf26f..3e3df4fda37db0f3aafb47e8fda60c38ea575ae4 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;
 }