diff options
Diffstat (limited to 'include/util.h')
-rw-r--r-- | include/util.h | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/include/util.h b/include/util.h index fd8f5d40c9..e031148e45 100644 --- a/include/util.h +++ b/include/util.h @@ -12,37 +12,9 @@ #include "compile_time_macros.h" #include "panic.h" +#include "builtin/assert.h" /* For ASSERT(). */ #include <stddef.h> -/** - * Trigger a debug exception if the condition - * is not verified at runtime. - */ -#ifdef CONFIG_DEBUG_ASSERT -#ifdef CONFIG_DEBUG_ASSERT_REBOOTS - -#ifdef CONFIG_DEBUG_ASSERT_BRIEF -#define ASSERT(cond) do { \ - if (!(cond)) \ - panic_assert_fail(__FILE__, __LINE__); \ - } while (0) -#else -#define ASSERT(cond) do { \ - if (!(cond)) \ - panic_assert_fail(#cond, __func__, __FILE__, \ - __LINE__); \ - } while (0) -#endif -#else -#define ASSERT(cond) do { \ - if (!(cond)) \ - __asm("bkpt"); \ - } while (0) -#endif -#else -#define ASSERT(cond) -#endif - /* Standard macros / definitions */ #ifndef MAX #define MAX(a, b) \ |