summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-08-14 15:17:36 -0400
committerRich Felker <dalias@aerifal.cx>2011-08-14 15:17:36 -0400
commit9205e486091c3901d0e5aa9a0384dc07dae6114d (patch)
tree6b8a66e6cd13395ba9cbc3dbafe0cdc1b558437c
parentef9dd035344de750ed9420bd3e4bc5c2b7475dba (diff)
downloadmusl-9205e486091c3901d0e5aa9a0384dc07dae6114d.tar.gz
macro for pthread_equal
no sense bloating apps with a function call for an equality comparison...
-rw-r--r--include/pthread.h2
-rw-r--r--src/thread/pthread_equal.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/include/pthread.h b/include/pthread.h
index a0af20fe..44a71019 100644
--- a/include/pthread.h
+++ b/include/pthread.h
@@ -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 *);
diff --git a/src/thread/pthread_equal.c b/src/thread/pthread_equal.c
index a55d280c..3e3df4fd 100644
--- a/src/thread/pthread_equal.c
+++ b/src/thread/pthread_equal.c
@@ -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;
}