xref: /freebsd/contrib/netbsd-tests/lib/libpthread/h_common.h (revision 8b25e8410533a6e69cceff910546b2dc485a5059)
1 #ifndef H_COMMON_H
2 #define H_COMMON_H
3 
4 #include <string.h>
5 
6 #define PTHREAD_REQUIRE(x) \
7     do { \
8         int ret = (x); \
9         ATF_REQUIRE_MSG(ret == 0, "%s: %s", #x, strerror(ret)); \
10     } while (0)
11 
12 #define PTHREAD_REQUIRE_STATUS(x, v) \
13     do { \
14         int ret = (x); \
15         ATF_REQUIRE_MSG(ret == (v), "%s: %s", #x, strerror(ret)); \
16     } while (0)
17 
18 #endif // H_COMMON_H
19