summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests/lib/libpthread/h_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/netbsd-tests/lib/libpthread/h_common.h')
-rw-r--r--contrib/netbsd-tests/lib/libpthread/h_common.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/lib/libpthread/h_common.h b/contrib/netbsd-tests/lib/libpthread/h_common.h
new file mode 100644
index 0000000..f4d03bc
--- /dev/null
+++ b/contrib/netbsd-tests/lib/libpthread/h_common.h
@@ -0,0 +1,12 @@
+#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
OpenPOWER on IntegriCloud