summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/shared
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-12-06 17:47:30 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-12-07 09:38:41 +0100
commit48bff53b3dec885085b87db413329830110c9bb0 (patch)
treeba0c249c350b9f4f84bedb5569f11e611874617e /c/src/lib/libbsp/shared
parentbsp/gdbarmsim: Do not call bsp_cleanup() (diff)
downloadrtems-48bff53b3dec885085b87db413329830110c9bb0.tar.bz2
score: rtems_initialize_start_multitasking()
Do not return from rtems_initialize_start_multitasking() and call rtems_fatal() instead with a fatal source of RTEMS_FATAL_SOURCE_EXIT and a fatal code with the exit status. Remove all bsp_cleanup() functions. The boot_card() is now a no return function.
Diffstat (limited to 'c/src/lib/libbsp/shared')
-rw-r--r--c/src/lib/libbsp/shared/bootcard.c23
-rw-r--r--c/src/lib/libbsp/shared/bspclean.c7
-rw-r--r--c/src/lib/libbsp/shared/include/bootcard.h9
3 files changed, 7 insertions, 32 deletions
diff --git a/c/src/lib/libbsp/shared/bootcard.c b/c/src/lib/libbsp/shared/bootcard.c
index 33ad0ee128..a928bb2924 100644
--- a/c/src/lib/libbsp/shared/bootcard.c
+++ b/c/src/lib/libbsp/shared/bootcard.c
@@ -31,8 +31,7 @@
* - 1st task executes C++ global constructors
* .... appplication runs ...
* - exit
- * + back to here eventually
- * + bspclean.c: bsp_cleanup
+ * + will not return to here
*
* This style of initialization ensures that the C++ global
* constructors are executed after RTEMS is initialized.
@@ -69,12 +68,11 @@ const char *bsp_boot_cmdline;
* the system while maximizing shared code and keeping BSP code in C
* as much as possible.
*/
-uint32_t boot_card(
+void boot_card(
const char *cmdline
)
{
rtems_interrupt_level bsp_isr_level;
- uint32_t status = 0;
/*
* Special case for PowerPC: The interrupt disable mask is stored in SPRG0.
@@ -164,22 +162,11 @@ uint32_t boot_card(
* Complete initialization of RTEMS and switch to the first task.
* Global C++ constructors will be executed in the context of that task.
*/
- status = rtems_initialize_start_multitasking();
+ rtems_initialize_start_multitasking();
/***************************************************************
***************************************************************
- * APPLICATION RUNS HERE!!! When it shuts down, we return!!! *
+ * APPLICATION RUNS NOW!!! We will not return to here!!! *
***************************************************************
- ***************************************************************
- */
-
- /*
- * Perform any BSP specific shutdown actions which are written in C.
- */
- bsp_cleanup( status );
-
- /*
- * Now return to the start code.
- */
- return status;
+ ***************************************************************/
}
diff --git a/c/src/lib/libbsp/shared/bspclean.c b/c/src/lib/libbsp/shared/bspclean.c
index 3e48c2993d..40955c685e 100644
--- a/c/src/lib/libbsp/shared/bspclean.c
+++ b/c/src/lib/libbsp/shared/bspclean.c
@@ -1,6 +1,4 @@
/*
- * This is a dummy bsp_cleanup routine.
- *
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -45,8 +43,3 @@ void bsp_fatal_extension(
bsp_reset();
#endif
}
-
-void bsp_cleanup( uint32_t status )
-{
- rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, status );
-}
diff --git a/c/src/lib/libbsp/shared/include/bootcard.h b/c/src/lib/libbsp/shared/include/bootcard.h
index ff9235c3ed..f3de76036c 100644
--- a/c/src/lib/libbsp/shared/include/bootcard.h
+++ b/c/src/lib/libbsp/shared/include/bootcard.h
@@ -72,8 +72,6 @@ void bsp_predriver_hook(void);
void bsp_postdriver_hook(void);
-void bsp_cleanup(uint32_t status);
-
void bsp_reset(void);
/**
@@ -108,15 +106,12 @@ void bsp_reset(void);
* - 1st task executes C++ global constructors
* - .... application runs ...
* - exit
- * - back to here eventually
- * - bsp_cleanup()
- *
- * If something goes wrong bsp_cleanup() will be called out of order.
+ * - will not return to here
*
* This style of initialization ensures that the C++ global constructors are
* executed after RTEMS is initialized.
*/
-uint32_t boot_card(const char *cmdline);
+void boot_card(const char *cmdline) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
#ifdef CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK
/**