diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2010-07-07 09:26:05 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2010-07-07 09:26:05 +0000 |
commit | 3ac6eb90c5bd7a5de1187089e57043ca3e671b87 (patch) | |
tree | 8b41edce16e8e91c7df98e7e94080001bdeca50e | |
parent | 2010-07-07 Sebastian Huber <Sebastian.Huber@embedded-brains.de> (diff) | |
download | rtems-3ac6eb90c5bd7a5de1187089e57043ca3e671b87.tar.bz2 |
2010-07-07 Sebastian Huber <Sebastian.Huber@embedded-brains.de>
* minimum/init.c: Use fatal error extension to prevent infinite
runtime.
-rw-r--r-- | testsuites/samples/ChangeLog | 5 | ||||
-rw-r--r-- | testsuites/samples/minimum/init.c | 18 |
2 files changed, 23 insertions, 0 deletions
diff --git a/testsuites/samples/ChangeLog b/testsuites/samples/ChangeLog index c566d2c285..42c574e915 100644 --- a/testsuites/samples/ChangeLog +++ b/testsuites/samples/ChangeLog @@ -1,3 +1,8 @@ +2010-07-07 Sebastian Huber <Sebastian.Huber@embedded-brains.de> + + * minimum/init.c: Use fatal error extension to prevent infinite + runtime. + 2010-06-21 Joel Sherrill <joel.sherrill@oarcorp.com> * capture/capture.doc: Remove more ITRON references. diff --git a/testsuites/samples/minimum/init.c b/testsuites/samples/minimum/init.c index 7f25cc9670..24b38b2e21 100644 --- a/testsuites/samples/minimum/init.c +++ b/testsuites/samples/minimum/init.c @@ -10,7 +10,10 @@ * $Id$ */ +#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__ + #include <bsp.h> +#include <rtems/score/thread.h> rtems_task Init( rtems_task_argument ignored @@ -26,6 +29,21 @@ rtems_task Init( /* configuration information */ /* + * This fatal extension adds some bytes to the absolute minimum, but it + * prevents the _CPU_Fatal_halt(). + */ +static void Fatal_extension( + uint32_t source, + bool is_internal, + uint32_t error +) +{ + _Thread_Stop_multitasking(); +} + +#define CONFIGURE_INITIAL_EXTENSIONS { .fatal = Fatal_extension } + +/* * This application has no device drivers. */ /* NOTICE: the clock driver is explicitly disabled */ |