提交 9205e486 编写于 作者: R Rich Felker

macro for pthread_equal

no sense bloating apps with a function call for an equality comparison...
上级 ef9dd035
......@@ -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 *);
......
#include <pthread.h>
int pthread_equal(pthread_t a, pthread_t b)
int (pthread_equal)(pthread_t a, pthread_t b)
{
return a==b;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册