opnsense-src/contrib/netbsd-tests/lib/libpthread/h_common.h
Enji Cooper cdebaff820 Upgrade NetBSD tests to 01.11.2017_23.20 snapshot
This contains some new testcases in /usr/tests/...:

- .../lib/libc
- .../lib/libthr
- .../lib/msun
- .../sys/kern

Tested on:	amd64, i386
MFC after:	1 month
2017-01-13 03:33:57 +00:00

18 lines
389 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)
#define PTHREAD_REQUIRE_STATUS(x, v) \
do { \
int ret = (x); \
ATF_REQUIRE_MSG(ret == (v), "%s: %s", #x, strerror(ret)); \
} while (0)
#endif // H_COMMON_H