summaryrefslogtreecommitdiff
path: root/Kernel/i386.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-11-04 13:12:58 +0100
committerAndreas Kling <awesomekling@gmail.com>2018-11-04 13:12:58 +0100
commit8b4b684d6da2f2a3a885fc34ace202330e6806c5 (patch)
treeeedb0febd1f49ae07d0080d0876b8b1e568d604c /Kernel/i386.cpp
parent7fe40633235d864c63e144295226426e456aed64 (diff)
downloadserenity-8b4b684d6da2f2a3a885fc34ace202330e6806c5.zip
Move assertion failures out-of-line to reduce binary bloat.
Diffstat (limited to 'Kernel/i386.cpp')
-rw-r--r--Kernel/i386.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Kernel/i386.cpp b/Kernel/i386.cpp
index 2554b1b352..22caeb0c43 100644
--- a/Kernel/i386.cpp
+++ b/Kernel/i386.cpp
@@ -447,3 +447,10 @@ void handleIRQ()
s_irqHandler[irq]->handleIRQ();
PIC::eoi(irq);
}
+
+void __assertion_failed(const char* msg, const char* file, unsigned line, const char* func)
+{
+ asm volatile("cli");
+ kprintf("ASSERTION FAILED: %s\n%s:%u in %s\n", msg, file, line, func);
+ asm volatile("hlt");
+}