debug: make ASSERT empty under release version
ASSERT is only for debug purpose, for release version, it should try error handling instead of deadloop there. v1: - change the ASSERT under release version to empty code TODO: revise all ASSERT usage Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com> Acked-by: Eddie Dong (Eddie.dong@intel.com)
This commit is contained in:
parent
6ee72d7df9
commit
170c48a9fc
|
@ -40,12 +40,7 @@ void __assert(uint32_t line, const char *file, char *txt);
|
||||||
__assert(__LINE__, __FILE__, "fatal error");\
|
__assert(__LINE__, __FILE__, "fatal error");\
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define ASSERT(x, ...) \
|
#define ASSERT(x, ...) do { } while(0)
|
||||||
if (!(x)) { \
|
|
||||||
do { \
|
|
||||||
asm volatile ("pause" ::: "memory"); \
|
|
||||||
} while (1); \
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Force a compilation error if condition is false */
|
/* Force a compilation error if condition is false */
|
||||||
|
|
Loading…
Reference in New Issue