diff options
Diffstat (limited to 'storage/innobase/include/ut0dbg.h')
-rw-r--r-- | storage/innobase/include/ut0dbg.h | 46 |
1 files changed, 17 insertions, 29 deletions
diff --git a/storage/innobase/include/ut0dbg.h b/storage/innobase/include/ut0dbg.h index 78b525c38ab..d7ec90db0fb 100644 --- a/storage/innobase/include/ut0dbg.h +++ b/storage/innobase/include/ut0dbg.h @@ -54,29 +54,18 @@ ut_dbg_assertion_failed( const char* file, /*!< in: source file containing the assertion */ ulint line); /*!< in: line number of the assertion */ -#ifdef __NETWARE__ -/** Flag for ignoring further assertion failures. This is set to TRUE -when on NetWare there happens an InnoDB assertion failure or other -fatal error condition that requires an immediate shutdown. */ -extern ibool panic_shutdown; -/* Abort the execution. */ -void ut_dbg_panic(void); -# define UT_DBG_PANIC ut_dbg_panic() -/* Stop threads in ut_a(). */ -# define UT_DBG_STOP do {} while (0) /* We do not do this on NetWare */ -#else /* __NETWARE__ */ -# if defined(__WIN__) || defined(__INTEL_COMPILER) -# undef UT_DBG_USE_ABORT -# elif defined(__GNUC__) && (__GNUC__ > 2) -# define UT_DBG_USE_ABORT -# endif - -# ifndef UT_DBG_USE_ABORT +#if defined(__WIN__) || defined(__INTEL_COMPILER) +# undef UT_DBG_USE_ABORT +#elif defined(__GNUC__) && (__GNUC__ > 2) +# define UT_DBG_USE_ABORT +#endif + +#ifndef UT_DBG_USE_ABORT /** A null pointer that will be dereferenced to trigger a memory trap */ extern ulint* ut_dbg_null_ptr; -# endif +#endif -# if defined(UNIV_SYNC_DEBUG) || !defined(UT_DBG_USE_ABORT) +#if defined(UNIV_SYNC_DEBUG) || !defined(UT_DBG_USE_ABORT) /** If this is set to TRUE by ut_dbg_assertion_failed(), all threads will stop at the next ut_a() or ut_ad(). */ extern ibool ut_dbg_stop_threads; @@ -89,24 +78,23 @@ ut_dbg_stop_thread( /*===============*/ const char* file, ulint line); -# endif +#endif -# ifdef UT_DBG_USE_ABORT +#ifdef UT_DBG_USE_ABORT /** Abort the execution. */ -# define UT_DBG_PANIC abort() +# define UT_DBG_PANIC abort() /** Stop threads (null operation) */ -# define UT_DBG_STOP do {} while (0) -# else /* UT_DBG_USE_ABORT */ +# define UT_DBG_STOP do {} while (0) +#else /* UT_DBG_USE_ABORT */ /** Abort the execution. */ -# define UT_DBG_PANIC \ +# define UT_DBG_PANIC \ if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = NULL /** Stop threads in ut_a(). */ -# define UT_DBG_STOP do \ +# define UT_DBG_STOP do \ if (UNIV_UNLIKELY(ut_dbg_stop_threads)) { \ ut_dbg_stop_thread(__FILE__, (ulint) __LINE__); \ } while (0) -# endif /* UT_DBG_USE_ABORT */ -#endif /* __NETWARE__ */ +#endif /* UT_DBG_USE_ABORT */ /** Abort execution if EXPR does not evaluate to nonzero. @param EXPR assertion expression that should hold */ |