[fdb] use native assert if FDB_USING_NATIVE_ASSERT is set (#228)
This commit is contained in:
parent
d01c0d48aa
commit
a4e68ae965
|
@ -62,12 +62,16 @@ extern "C" {
|
||||||
/* routine print function. Must be implement by user. */
|
/* routine print function. Must be implement by user. */
|
||||||
#define FDB_INFO(...) FDB_LOG_PREFIX();FDB_PRINT(__VA_ARGS__)
|
#define FDB_INFO(...) FDB_LOG_PREFIX();FDB_PRINT(__VA_ARGS__)
|
||||||
/* assert for developer. */
|
/* assert for developer. */
|
||||||
|
#ifdef FDB_USING_NATIVE_ASSERT
|
||||||
|
#define FDB_ASSERT(EXPR) assert(EXPR);
|
||||||
|
#else
|
||||||
#define FDB_ASSERT(EXPR) \
|
#define FDB_ASSERT(EXPR) \
|
||||||
if (!(EXPR)) \
|
if (!(EXPR)) \
|
||||||
{ \
|
{ \
|
||||||
FDB_INFO("(%s) has assert failed at %s.\n", #EXPR, __func__); \
|
FDB_INFO("(%s) has assert failed at %s.\n", #EXPR, __func__); \
|
||||||
while (1); \
|
while (1); \
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#define FDB_KVDB_CTRL_SET_SEC_SIZE 0x00 /**< set sector size control command, this change MUST before database initialization */
|
#define FDB_KVDB_CTRL_SET_SEC_SIZE 0x00 /**< set sector size control command, this change MUST before database initialization */
|
||||||
#define FDB_KVDB_CTRL_GET_SEC_SIZE 0x01 /**< get sector size control command */
|
#define FDB_KVDB_CTRL_GET_SEC_SIZE 0x01 /**< get sector size control command */
|
||||||
|
|
Loading…
Reference in New Issue