forked from Imagelibrary/rtems
2008-02-15 Joel Sherrill <joel.sherrill@OARcorp.com>
* shared/comm/console.c: Do not have BSP specific __assert.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2008-02-15 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* shared/comm/console.c: Do not have BSP specific __assert.
|
||||
|
||||
2007-11-03 Ray Xu <rayx.cn@gmail.com>
|
||||
|
||||
* shared/abort/simple_abort.c: Add veneer for ARM<->Thumb
|
||||
|
||||
@@ -15,10 +15,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
#undef __assert
|
||||
void __assert (const char *file, int line, const char *msg);
|
||||
|
||||
#include <bsp.h>
|
||||
#include <rtems/bspIo.h>
|
||||
@@ -96,33 +93,6 @@ isr_is_on(const rtems_irq_connect_data *irq)
|
||||
return 1;
|
||||
}
|
||||
|
||||
void __assert (const char *file, int line, const char *msg)
|
||||
{
|
||||
static char exit_msg[] = "EXECUTIVE SHUTDOWN! Any key to reboot...";
|
||||
unsigned char ch;
|
||||
|
||||
/*
|
||||
* Note we cannot call exit or printf from here,
|
||||
* assert can fail inside ISR too
|
||||
*/
|
||||
|
||||
/*
|
||||
* Close console
|
||||
*/
|
||||
close(2);
|
||||
close(1);
|
||||
close(0);
|
||||
|
||||
printk("\nassert failed: %s: ", file);
|
||||
printk("%d: ", line);
|
||||
printk("%s\n\n", msg);
|
||||
printk(exit_msg);
|
||||
ch = BSP_poll_char();
|
||||
printk("\n\n");
|
||||
rtemsReboot();
|
||||
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Console device driver INITIALIZE entry point.
|
||||
+--------------------------------------------------------------------------+
|
||||
|
||||
Reference in New Issue
Block a user