From: Rich Felker Date: Sun, 14 Aug 2011 19:17:36 +0000 (-0400) Subject: macro for pthread_equal X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=commitdiff_plain;h=9205e486091c3901d0e5aa9a0384dc07dae6114d macro for pthread_equal no sense bloating apps with a function call for an equality comparison... --- 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 -int pthread_equal(pthread_t a, pthread_t b) +int (pthread_equal)(pthread_t a, pthread_t b) { return a==b; }