2021-06-02 12:34:44 +03:00
|
|
|
/**
|
|
|
|
* @file kernel/misc/assert.h
|
|
|
|
* @brief Kernel assertion handler.
|
2021-11-26 05:31:10 +03:00
|
|
|
*
|
|
|
|
* @copyright
|
|
|
|
* This file is part of ToaruOS and is released under the terms
|
|
|
|
* of the NCSA / University of Illinois License - see LICENSE.md
|
|
|
|
* Copyright (C) 2021 K. Lange
|
2021-06-02 12:34:44 +03:00
|
|
|
*/
|
|
|
|
#include <kernel/assert.h>
|
|
|
|
#include <kernel/printf.h>
|
|
|
|
#include <kernel/misc.h>
|
|
|
|
|
|
|
|
void __assert_failed(const char * file, int line, const char * func, const char * cond) {
|
|
|
|
arch_fatal_prepare();
|
2021-10-25 12:24:49 +03:00
|
|
|
dprintf("%s:%d (%s) Assertion failed: %s\n", file, line, func, cond);
|
2021-10-20 04:33:58 +03:00
|
|
|
arch_dump_traceback();
|
2021-06-02 12:34:44 +03:00
|
|
|
arch_fatal();
|
|
|
|
}
|