2002-12-19 Joel Sherrill <joel@OARcorp.com>

* console/console.c: Removed __assert() which conflicts with newlib.
This commit is contained in:
Joel Sherrill
2002-12-19 14:49:13 +00:00
parent 28ed8f3ab2
commit c4e9f685d1
7 changed files with 16 additions and 89 deletions

View File

@@ -1,3 +1,7 @@
2002-12-19 Joel Sherrill <joel@OARcorp.com>
* console/console.c: Removed __assert() which conflicts with newlib.
2002-12-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* clock/Makefile.am: Don't include @RTEMS_BSP@.cfg.

View File

@@ -36,10 +36,6 @@
#include <stdlib.h>
#include <assert.h>
/* workaround for gcc development tools */
#undef __assert
void __assert (const char *file, int line, const char *msg);
#include <bsp.h>
#include <irq.h>
#include <rtems/libio.h>
@@ -96,32 +92,6 @@ isr_is_on(const rtems_irq_connect_data *irq)
return BSP_irq_enabled_at_i8259s(irq->name);
}
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("\nShould jump to reset now!\n");
}
/*-------------------------------------------------------------------------+
| Console device driver INITIALIZE entry point.
+--------------------------------------------------------------------------+

View File

@@ -1,3 +1,7 @@
2002-12-19 Joel Sherrill <joel@OARcorp.com>
* console/console.c: Removed __assert() which conflicts with newlib.
2002-12-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* clock/Makefile.am: Don't include @RTEMS_BSP@.cfg.

View File

@@ -37,10 +37,6 @@
#include <assert.h>
#include <rtems/error.h>
/* workaround for gcc development tools */
#undef __assert
void __assert (const char *file, int line, const char *msg);
#include <bsp.h>
#include <irq.h>
#include <rtems/libio.h>
@@ -96,32 +92,6 @@ isr_is_on(const rtems_irq_connect_data *irq)
return BSP_irq_enabled_at_i8259s(irq->name);
}
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("\nShould jump to reset now!\n");
}
/*-------------------------------------------------------------------------+
| Console device driver INITIALIZE entry point.
+--------------------------------------------------------------------------+

View File

@@ -1,3 +1,7 @@
2002-12-19 Joel Sherrill <joel@OARcorp.com>
* console/console.c: Removed __assert() which conflicts with newlib.
2002-12-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* bootloader/Makefile.am: Don't include @RTEMS_BSP@.cfg.

View File

@@ -1,3 +1,7 @@
2002-12-19 Joel Sherrill <joel@OARcorp.com>
* console/console.c: Removed __assert() which conflicts with newlib.
2002-11-17 Greg Menke <gregory.menke@gsfc.nasa.gov>
* irq/irq_init.c, motorola/motorola.c: Support for MTX603e.

View File

@@ -26,8 +26,6 @@
#include <assert.h>
#include <stdlib.h>
#undef __assert
void __assert (const char *file, int line, const char *msg);
extern int close(int fd);
#include <bsp.h>
@@ -56,33 +54,6 @@ int BSPBaseBaud = BSP_UART_BAUD_BASE;
static int conSetAttr(int minor, const struct termios *);
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 = debug_getc();
printk("\n\n");
rtemsReboot();
}
typedef struct TtySTblRec_ {
char *name;
void (*isr)(void); /* STUPID API doesn't pass a parameter :-( */