#define _ASSERT_H
#include <cdefs.h>
+#include <fiasco_defs.h>
#if (__GNUC__>=3)
# define ASSERT_EXPECT_FALSE(exp) __builtin_expect((exp), 0)
#else
__BEGIN_DECLS
/* This prints an "Assertion failed" message and aborts. */
-void __assert_fail (const char *__assertion, const char *__file,
+void FIASCO_COLD __assert_fail (const char *__assertion, const char *__file,
unsigned int __line, void *ret)
__attribute__ ((__noreturn__));
* can be found by searching the EIP in the kernel image. */
# undef assert
# ifdef NDEBUG
-# define assert(expr) do { } while (0)
+# define assert(expr) do {} while (0)
# define check(expr) (void)(expr)
# else
# define assert(expr) \
- ((void) ((ASSERT_EXPECT_FALSE(!(expr))) \
- ? (__assert_fail (#expr, __FILE__, __LINE__, __builtin_return_address(0)), 0) \
- : 0))
+ do { if (ASSERT_EXPECT_FALSE(!(expr))) __assert_fail (#expr, __FILE__, __LINE__, __builtin_return_address(0)); } while (0)
# endif
#endif