mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-28 09:06:11 +08:00
2008-01-09 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/__assert.c: Newlib 1.16.0 adds __assert_func(). We need to have it also.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2008-01-09 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* libcsupport/src/__assert.c: Newlib 1.16.0 adds __assert_func(). We
|
||||
need to have it also.
|
||||
|
||||
2008-01-08 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* libcsupport/Makefile.am: Add malloc_sbrk_helpers.c.
|
||||
|
||||
@@ -17,9 +17,36 @@
|
||||
#include <rtems/bspIo.h>
|
||||
#include <rtems.h>
|
||||
|
||||
void __assert(const char *file, int line, const char *failedexpr)
|
||||
void __assert(
|
||||
const char *file,
|
||||
int line,
|
||||
|
||||
const char *failedexpr)
|
||||
{
|
||||
printk("assertion \"%s\" failed: file \"%s\", line %d\n",
|
||||
failedexpr, file, line);
|
||||
rtems_fatal_error_occurred(0);
|
||||
printk(
|
||||
"assertion \"%s\" failed: file \"%s\", line %d\n",
|
||||
failedexpr,
|
||||
file,
|
||||
line
|
||||
);
|
||||
rtems_fatal_error_occurred(0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Newlib 1.16.0 added this method
|
||||
*/
|
||||
void __assert_func(
|
||||
const char *file,
|
||||
int line,
|
||||
const char *func,
|
||||
const char *failedexpr
|
||||
)
|
||||
{
|
||||
printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n",
|
||||
failedexpr,
|
||||
file,
|
||||
line,
|
||||
func ? ", function: " : "", func ? func : ""
|
||||
);
|
||||
rtems_fatal_error_occurred(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user