Files
jsix_import/src/kernel/assert.cpp
Justin C. Miller 346c172b32 [libc] Add new libc
This new libc is mostly from scratch, with *printf() functions provided
by Marco Paland and Eyal Rozenberg's tiny printf library, and malloc and
friends provided by dlmalloc.
2022-02-06 21:39:04 -08:00

22 lines
489 B
C++

#include "assert.h"
#include "idt.h"
namespace panic {
uint32_t *apic_icr = reinterpret_cast<uint32_t*>(0xffffc000fee00300);
void const *symbol_table = nullptr;
void
install(uintptr_t entrypoint, const void *symbol_data)
{
IDT::set_nmi_handler(entrypoint);
symbol_table = symbol_data;
}
} // namespace panic
extern "C"
void __assert_fail(const char *message, const char *file, unsigned line, const char *function) {
panic::panic(message, nullptr, function, file, line);
}