old-libc-kernel/assert/assert.cpp
2016-07-27 12:12:22 +02:00

11 lines
No EOL
338 B
C++

#include <assert.h>
#include <base.hpp>
#include <text_DISP.hpp>
void "C" __assert(const char *msg, const char *file, int line, int res) {
if(!res) {
MTGosHAL::err << "assert(" << msg << ") failed in " << file << " at line " << line << "!\n";
MTGosHAL::err << "Kernel panic.\n";
for(;;);
}
assert(0);
}