seL4/src/assert.c
Gerwin Klein 79da079239 Convert license tags to SPDX identifiers
This commit also converts our own copyright headers to directly use
SPDX, but leaves all other copyright header intact, only adding the
SPDX ident. As far as possible this commit also merges multiple
Data61 copyright statements/headers into one for consistency.
2020-03-09 13:21:49 +08:00

43 lines
737 B
C

/*
* Copyright 2014, General Dynamics C4 Systems
*
* SPDX-License-Identifier: GPL-2.0-only
*/
#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