summaryrefslogtreecommitdiff
path: root/lib/int_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/int_lib.h')
-rw-r--r--lib/int_lib.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/int_lib.h b/lib/int_lib.h
index f6c2dd45..912a12f5 100644
--- a/lib/int_lib.h
+++ b/lib/int_lib.h
@@ -23,7 +23,14 @@
#include "endianness.h"
#include <math.h>
+/* If compiling for kernel use, call panic() instead of abort(). */
+#ifdef KERNEL_USE
+extern void panic (const char *, ...);
+#define compilerrt_abort() \
+ panic("%s:%d: abort in %s", __FILE__, __LINE__, __FUNCTION__)
+#else
#define compilerrt_abort() abort()
+#endif
#if !defined(INFINITY) && defined(HUGE_VAL)
#define INFINITY HUGE_VAL