~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/include/ut0dbg.h

  • Committer: Brian Aker
  • Date: 2010-12-18 00:43:02 UTC
  • Revision ID: brian@tangent.org-20101218004302-4ivzuuzdkblyqe18
Refactor naming for integers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
        const char* file,       /*!< in: source file containing the assertion */
55
55
        ulint line);            /*!< in: line number of the assertion */
56
56
 
57
 
#ifdef __NETWARE__
58
 
/** Flag for ignoring further assertion failures.  This is set to TRUE
59
 
when on NetWare there happens an InnoDB assertion failure or other
60
 
fatal error condition that requires an immediate shutdown. */
61
 
extern ibool    panic_shutdown;
62
 
/* Abort the execution. */
63
 
void ut_dbg_panic(void);
64
 
# define UT_DBG_PANIC ut_dbg_panic()
65
 
/* Stop threads in ut_a(). */
66
 
# define UT_DBG_STOP    do {} while (0) /* We do not do this on NetWare */
67
 
#else /* __NETWARE__ */
68
 
# if defined(__WIN__) || defined(__INTEL_COMPILER)
69
 
#  undef UT_DBG_USE_ABORT
70
 
# elif defined(__GNUC__) && (__GNUC__ > 2)
71
 
#  define UT_DBG_USE_ABORT
72
 
# endif
 
57
#if defined(__WIN__) || defined(__INTEL_COMPILER)
 
58
# undef UT_DBG_USE_ABORT
 
59
#elif defined(__GNUC__) && (__GNUC__ > 2)
 
60
# define UT_DBG_USE_ABORT
 
61
#endif
73
62
 
74
 
# ifndef UT_DBG_USE_ABORT
 
63
#ifndef UT_DBG_USE_ABORT
75
64
/** A null pointer that will be dereferenced to trigger a memory trap */
76
65
extern ulint*   ut_dbg_null_ptr;
77
 
# endif
 
66
#endif
78
67
 
79
 
# if defined(UNIV_SYNC_DEBUG) || !defined(UT_DBG_USE_ABORT)
 
68
#if defined(UNIV_SYNC_DEBUG) || !defined(UT_DBG_USE_ABORT)
80
69
/** If this is set to TRUE by ut_dbg_assertion_failed(), all threads
81
70
will stop at the next ut_a() or ut_ad(). */
82
71
extern ibool    ut_dbg_stop_threads;
89
78
/*===============*/
90
79
        const char*     file,
91
80
        ulint           line);
92
 
# endif
 
81
#endif
93
82
 
94
 
# ifdef UT_DBG_USE_ABORT
 
83
#ifdef UT_DBG_USE_ABORT
95
84
/** Abort the execution. */
96
 
#  define UT_DBG_PANIC abort()
 
85
# define UT_DBG_PANIC abort()
97
86
/** Stop threads (null operation) */
98
 
#  define UT_DBG_STOP do {} while (0)
99
 
# else /* UT_DBG_USE_ABORT */
 
87
# define UT_DBG_STOP do {} while (0)
 
88
#else /* UT_DBG_USE_ABORT */
100
89
/** Abort the execution. */
101
 
#  define UT_DBG_PANIC                                  \
 
90
# define UT_DBG_PANIC                                   \
102
91
        if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = NULL
103
92
/** Stop threads in ut_a(). */
104
 
#  define UT_DBG_STOP do                                                \
 
93
# define UT_DBG_STOP do                                         \
105
94
        if (UNIV_UNLIKELY(ut_dbg_stop_threads)) {               \
106
95
                ut_dbg_stop_thread(__FILE__, (ulint) __LINE__); \
107
96
        } while (0)
108
 
# endif /* UT_DBG_USE_ABORT */
109
 
#endif /* __NETWARE__ */
 
97
#endif /* UT_DBG_USE_ABORT */
110
98
 
111
99
/** Abort execution if EXPR does not evaluate to nonzero.
112
100
@param EXPR     assertion expression that should hold */