Commit 0cc7d829 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

refs #5418 fix typo, include config.h from toku_assert.h so that we always...

refs #5418 fix typo, include config.h from toku_assert.h so that we always know whether or not to be paranoid

git-svn-id: file:///svn/toku/tokudb@50147 c7de825b-a66e-492c-adef-691d508d4ae1
parent 480b7b47
......@@ -2073,7 +2073,7 @@ ft_nonleaf_put_cmd (ft_compare_func compare_fun, DESCRIPTOR desc, FTNODE node, i
} else if (ft_msg_applies_all(cmd)) {
ft_nonleaf_cmd_all(compare_fun, desc, node, cmd, is_fresh, flow_deltas);
} else {
paranoid_invariant(ft_msg_applies_none(cmd));
paranoid_invariant(ft_msg_does_nothing(cmd));
}
}
......
......@@ -9,9 +9,10 @@
/* This version will complain if NDEBUG is set. */
/* It evaluates the argument and then calls a function toku_do_assert() which takes all the hits for the branches not taken. */
#include <stdint.h>
#include "errno.h"
#include "config.h"
#include <stdint.h>
#include <errno.h>
#ifdef NDEBUG
#error NDEBUG should not be set
......@@ -87,12 +88,12 @@ extern void (*do_assert_hook)(void); // Set this to a function you want called a
#define resource_assert_zero(a) assert_zero(a) // indicates resource must be available, otherwise unrecoverable
#define resource_assert_equals(a, b) assert_equals(a, b) // indicates resource must be available, otherwise unrecoverable
#ifdef TOKU_DEBUG_PARANOID
#if TOKU_DEBUG_PARANOID
#define paranoid_invariant(a) assert(a)
#define paranoid_invariant_null(a) assert_null(a)
#define paranoid_invariant_notnull(a) assert(a)
#define paranoid_invariant_zero(a) assert_zero(a)
#else
#else // !TOKU_DEBUG_PARANOID
#define paranoid_invariant(a) ((void) 0)
#define paranoid_invariant_null(a) ((void) 0)
#define paranoid_invariant_notnull(a) ((void) 0)
......
......@@ -8,7 +8,7 @@
#include "config.h"
#if defined(__linux__) && defined(USE_VALGRIND)
#if defined(__linux__) && USE_VALGRIND
# include <valgrind/helgrind.h>
# include <valgrind/drd.h>
......@@ -41,7 +41,7 @@
VALGRIND_HG_MUTEX_INIT_POST(mutex, 0); \
VALGRIND_HG_MUTEX_LOCK_POST(mutex);
#else
#else // !defined(__linux__) || !USE_VALGRIND
# define NVALGRIND 1
# define TOKU_ANNOTATE_NEW_MEMORY(p, size) ((void) 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment