mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 23:23:13 +00:00
2007-05-28 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1244/bsps * console/console.c: Remove definition of __assert.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2007-05-28 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
|
PR 1244/bsps
|
||||||
|
* console/console.c: Remove definition of __assert.
|
||||||
|
|
||||||
2007-01-29 Ralf Corsépius <ralf.corsepius@rtems.org>
|
2007-01-29 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||||
|
|
||||||
* console/fb_vga.c: Eliminate __u16, __u32.
|
* console/fb_vga.c: Eliminate __u16, __u32.
|
||||||
|
|||||||
@@ -34,8 +34,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#undef __assert
|
|
||||||
void __assert (const char *file, int line, const char *msg);
|
|
||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
#include <bsp/irq.h>
|
#include <bsp/irq.h>
|
||||||
@@ -141,44 +139,6 @@ int kbd_poll_read( int minor )
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
static void* termios_ttyp_console = NULL;
|
|
||||||
void enq_key( char key )
|
|
||||||
{
|
|
||||||
if( termios_ttyp_console )
|
|
||||||
{
|
|
||||||
rtems_termios_enqueue_raw_characters(termios_ttyp_console, &key,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.
|
| Console device driver INITIALIZE entry point.
|
||||||
+--------------------------------------------------------------------------+
|
+--------------------------------------------------------------------------+
|
||||||
|
|||||||
Reference in New Issue
Block a user