47 lines
910 B
C
47 lines
910 B
C
/*
|
|
* Copyright 2014, General Dynamics C4 Systems
|
|
*
|
|
* This software may be distributed and modified according to the terms of
|
|
* the GNU General Public License version 2. Note that NO WARRANTY is provided.
|
|
* See "LICENSE_GPLv2.txt" for details.
|
|
*
|
|
* @TAG(GD_GPL)
|
|
*/
|
|
|
|
#include <assert.h>
|
|
#include <machine/io.h>
|
|
|
|
#ifdef CONFIG_DEBUG_BUILD
|
|
|
|
void _fail(
|
|
const char *s,
|
|
const char *file,
|
|
unsigned int line,
|
|
const char *function)
|
|
{
|
|
printf(
|
|
"seL4 called fail at %s:%u in function %s, saying \"%s\"\n",
|
|
file,
|
|
line,
|
|
function,
|
|
s
|
|
);
|
|
halt();
|
|
}
|
|
|
|
void _assert_fail(
|
|
const char *assertion,
|
|
const char *file,
|
|
unsigned int line,
|
|
const char *function)
|
|
{
|
|
printf("seL4 failed assertion '%s' at %s:%u in function %s\n",
|
|
assertion,
|
|
file,
|
|
line,
|
|
function
|
|
);
|
|
halt();
|
|
}
|
|
|
|
#endif
|