Commit 1456e23f authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

closes[t:2625] move the new assert macros to the toku_assert.h

git-svn-id: file:///svn/toku/tokudb@20353 c7de825b-a66e-492c-adef-691d508d4ae1
parent a1b14101
...@@ -57,10 +57,6 @@ extern "C" { ...@@ -57,10 +57,6 @@ extern "C" {
#endif #endif
#endif #endif
#define lazy_assert(a) assert(a) // indicates code is incomplete
#define invariant(a) assert(a) // indicates a code invariant that must be true
#define resource_assert(a) assert(a) // indicates resource must be available, otherwise unrecoverable
static size_t (*os_fwrite_fun)(const void *,size_t,size_t,FILE*)=NULL; static size_t (*os_fwrite_fun)(const void *,size_t,size_t,FILE*)=NULL;
void brtloader_set_os_fwrite (size_t (*fwrite_fun)(const void*,size_t,size_t,FILE*)) { void brtloader_set_os_fwrite (size_t (*fwrite_fun)(const void*,size_t,size_t,FILE*)) {
os_fwrite_fun=fwrite_fun; os_fwrite_fun=fwrite_fun;
......
...@@ -33,8 +33,12 @@ void toku_do_assert(int,const char*/*expr_as_string*/,const char */*fun*/,const ...@@ -33,8 +33,12 @@ void toku_do_assert(int,const char*/*expr_as_string*/,const char */*fun*/,const
#define WHEN_NOT_GCOV(x) x #define WHEN_NOT_GCOV(x) x
#endif #endif
#define lazy_assert(a) assert(a) // indicates code is incomplete
#define invariant(a) assert(a) // indicates a code invariant that must be true
#define resource_assert(a) assert(a) // indicates resource must be available, otherwise unrecoverable
#if defined(__cplusplus) || defined(__cilkplusplus) #if defined(__cplusplus) || defined(__cilkplusplus)
}; }
#endif #endif
#endif #endif
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