Now, assertions (ASSERT()) are only checked if the CONFIG_ASSERT macro
is defined. We leave this enabled for all builds for now.
void assert_hook(void);
+#ifdef CONFIG_ASSERT
#define ASSERT(expr) \
do { \
if (!(expr)) { \
exit(EXIT_FAILURE); \
} \
} while (0)
+#else
+#define ASSERT(expr) \
+ do { } while (0)
+#endif /* CONFIG_ASSERT */
#define error_msg(...) fprintf(stderr, "Error: " __VA_ARGS__)
/* #ifndef CONFIG_DEBUG
#define CONFIG_DEBUG
#endif
+
+ #ifndef CONFIG_ASSERT
+ #define CONFIG_ASSERT
+ #endif
*/
/** Turn on support for dumping cyclegraphs as dot files at each
/* Size of stack to allocate for a thread. */
#define STACK_SIZE (1024 * 1024)
+/** Enable debugging assertions (via ASSERT()) */
+#define CONFIG_ASSERT
#endif