NetBSD/tests/lib/libpthread/h_common.h
jmmv ac555471ca Convert the libpthread tests to atf.
Initial work from the GSoC 2008 project by Lukasz Strzygowski.

I think that this, together with the previous conversion of librt, obsoletes
the tests in the semaphore/ directory.  Will investigate later.
2010-07-16 15:42:53 +00:00

13 lines
229 B
C

#ifndef H_COMMON_H
#define H_COMMON_H
#include <string.h>
#define PTHREAD_REQUIRE(x) \
do { \
int ret = (x); \
ATF_REQUIRE_MSG(ret == 0, "%s: %s", #x, strerror(ret)); \
} while (0)
#endif // H_COMMON_H