assert: rename __ASSERT to __ASSERT__ to avoid conflict
The definition of __ASSERT has special define in some OS and librarys, rename to __ASSERT__ to avoid conflict Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
parent
ad9f6b79e0
commit
fc80c70205
@ -76,28 +76,28 @@
|
|||||||
#define PANIC_WITH_REGS(msg, regs) _assert(__ASSERT_FILE__, \
|
#define PANIC_WITH_REGS(msg, regs) _assert(__ASSERT_FILE__, \
|
||||||
__ASSERT_LINE__, msg, regs)
|
__ASSERT_LINE__, msg, regs)
|
||||||
|
|
||||||
#define __ASSERT(f, file, line, _f) \
|
#define __ASSERT__(f, file, line, _f) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
if (predict_false(!(f))) \
|
if (predict_false(!(f))) \
|
||||||
__assert(file, line, _f); \
|
__assert(file, line, _f); \
|
||||||
} \
|
} \
|
||||||
while (0)
|
while (0)
|
||||||
|
|
||||||
#define __VERIFY(f, file, line, _f) \
|
#define __VERIFY__(f, file, line, _f) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
if (predict_false((f) < 0)) \
|
if (predict_false((f) < 0)) \
|
||||||
__assert(file, line, _f); \
|
__assert(file, line, _f); \
|
||||||
} \
|
} \
|
||||||
while (0)
|
while (0)
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_ASSERTIONS_EXPRESSION
|
#ifdef CONFIG_DEBUG_ASSERTIONS_EXPRESSION
|
||||||
# define _ASSERT(f,file,line) __ASSERT(f, file, line, #f)
|
# define _ASSERT(f,file,line) __ASSERT__(f, file, line, #f)
|
||||||
# define _VERIFY(f,file,line) __VERIFY(f, file, line, #f)
|
# define _VERIFY(f,file,line) __VERIFY__(f, file, line, #f)
|
||||||
#else
|
#else
|
||||||
# define _ASSERT(f,file,line) __ASSERT(f, file, line, NULL)
|
# define _ASSERT(f,file,line) __ASSERT__(f, file, line, NULL)
|
||||||
# define _VERIFY(f,file,line) __VERIFY(f, file, line, NULL)
|
# define _VERIFY(f,file,line) __VERIFY__(f, file, line, NULL)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_ASSERTIONS
|
#ifdef CONFIG_DEBUG_ASSERTIONS
|
||||||
|
Loading…
Reference in New Issue
Block a user