34 #if defined(__GNUC__) && (__GNUC__ > 2)
38 # define UT_DBG_FAIL(EXPR) UNIV_UNLIKELY(!((ulint)(EXPR)))
45 # define UT_DBG_FAIL(EXPR) !((ulint)(EXPR) + ut_dbg_zero)
61 #if defined(__WIN__) || defined(__INTEL_COMPILER)
62 # undef UT_DBG_USE_ABORT
63 #elif defined(__GNUC__) && (__GNUC__ > 2)
64 # define UT_DBG_USE_ABORT
67 #ifndef UT_DBG_USE_ABORT
72 #if defined(UNIV_SYNC_DEBUG) || !defined(UT_DBG_USE_ABORT)
87 #ifdef UT_DBG_USE_ABORT
89 # define UT_DBG_PANIC abort()
91 # define UT_DBG_STOP do {} while (0)
94 # define UT_DBG_PANIC \
95 if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = NULL
97 # define UT_DBG_STOP do \
98 if (UNIV_UNLIKELY(ut_dbg_stop_threads)) { \
99 ut_dbg_stop_thread(__FILE__, (ulint) __LINE__); \
105 #define ut_a(EXPR) do { \
106 if (UT_DBG_FAIL(EXPR)) { \
107 ut_dbg_assertion_failed(#EXPR, \
108 __FILE__, (ulint) __LINE__); \
115 #define ut_error do { \
116 ut_dbg_assertion_failed(0, __FILE__, (ulint) __LINE__); \
122 #define ut_ad(EXPR) ut_a(EXPR)
124 #define ut_d(EXPR) do {EXPR;} while (0)
134 #define UT_NOT_USED(A) A = A
136 #ifdef UNIV_COMPILE_TEST_FUNCS
138 #include <sys/types.h>
139 #include <sys/time.h>
140 #include <sys/resource.h>
143 typedef struct speedo_struct {
163 const speedo_t* speedo);
ibool ut_dbg_stop_threads
UNIV_INTERN void ut_dbg_stop_thread(const char *file, ulint line)
UNIV_INTERN void ut_dbg_assertion_failed(const char *expr, const char *file, ulint line)