1*11be35a1SLionel Sambuc #ifndef H_COMMON_H 2*11be35a1SLionel Sambuc #define H_COMMON_H 3*11be35a1SLionel Sambuc 4*11be35a1SLionel Sambuc #include <string.h> 5*11be35a1SLionel Sambuc 6*11be35a1SLionel Sambuc #define PTHREAD_REQUIRE(x) \ 7*11be35a1SLionel Sambuc do { \ 8*11be35a1SLionel Sambuc int ret = (x); \ 9*11be35a1SLionel Sambuc ATF_REQUIRE_MSG(ret == 0, "%s: %s", #x, strerror(ret)); \ 10*11be35a1SLionel Sambuc } while (0) 11*11be35a1SLionel Sambuc 12*11be35a1SLionel Sambuc #endif // H_COMMON_H 13