Moved dcb_hashtable_stats from hastable.c to dcb.c to break dependency between hashtable and the rest of the maxscale. Added check fields to hashtable structure.

This commit is contained in:
vraatikka
2013-08-05 11:51:10 +03:00
parent ee68633c22
commit 401d4920e4
5 changed files with 97 additions and 23 deletions

View File

@ -113,7 +113,8 @@ typedef enum skygw_chk_t {
CHK_NUM_FNAMES,
CHK_NUM_LOGMANAGER,
CHK_NUM_FILE,
CHK_NUM_BLOCKBUF
CHK_NUM_BLOCKBUF,
CHK_NUM_HASHTABLE
} skygw_chk_t;
# define STRBOOL(b) ((b) ? "TRUE" : "FALSE")
@ -319,4 +320,10 @@ typedef enum skygw_chk_t {
"Block buf under- or overflow"); \
}
#define CHK_HASHTABLE(t) { \
ss_info_dassert(t->ht_chk_top == CHK_NUM_HASHTABLE && \
t->ht_chk_tail == CHK_NUM_HASHTABLE, \
"Hashtable under- or overflow"); \
}
#endif /* SKYGW_DEBUG_H */