diff options
Diffstat (limited to 'kernel/lib/cxxabi.cpp')
| -rw-r--r-- | kernel/lib/cxxabi.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/kernel/lib/cxxabi.cpp b/kernel/lib/cxxabi.cpp index e38813f..8a96628 100644 --- a/kernel/lib/cxxabi.cpp +++ b/kernel/lib/cxxabi.cpp @@ -14,6 +14,7 @@ #include <stddef.h> #include <stdint.h> +#include <kernel/kernel.h> extern "C" { @@ -22,14 +23,7 @@ extern "C" { * This should never happen in correct code — it's a fatal error. */ [[noreturn]] void __cxa_pure_virtual() { - /* TODO: call kernel_panic("pure virtual function called") */ - for (;;) { - #if defined(__x86_64__) - asm volatile("hlt"); - #elif defined(__aarch64__) - asm volatile("wfi"); - #endif - } + kernel::GetKernel().Panic("pure virtual function called"); } /* |
