diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-11-04 13:12:58 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-11-04 13:12:58 +0100 |
commit | 8b4b684d6da2f2a3a885fc34ace202330e6806c5 (patch) | |
tree | eedb0febd1f49ae07d0080d0876b8b1e568d604c /Kernel/i386.cpp | |
parent | 7fe40633235d864c63e144295226426e456aed64 (diff) | |
download | serenity-8b4b684d6da2f2a3a885fc34ace202330e6806c5.zip |
Move assertion failures out-of-line to reduce binary bloat.
Diffstat (limited to 'Kernel/i386.cpp')
-rw-r--r-- | Kernel/i386.cpp | 7 |
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"); +} |