diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-12-06 17:47:30 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-12-07 09:38:41 +0100 |
commit | 48bff53b3dec885085b87db413329830110c9bb0 (patch) | |
tree | ba0c249c350b9f4f84bedb5569f11e611874617e /cpukit | |
parent | bsp/gdbarmsim: Do not call bsp_cleanup() (diff) | |
download | rtems-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 'cpukit')
-rw-r--r-- | cpukit/sapi/include/rtems/init.h | 20 | ||||
-rw-r--r-- | cpukit/sapi/src/exinit.c | 7 |
2 files changed, 18 insertions, 9 deletions
diff --git a/cpukit/sapi/include/rtems/init.h b/cpukit/sapi/include/rtems/init.h index e3a5fdfa12..95b7cc79e6 100644 --- a/cpukit/sapi/include/rtems/init.h +++ b/cpukit/sapi/include/rtems/init.h @@ -69,16 +69,22 @@ void rtems_initialize_before_drivers(void); void rtems_initialize_device_drivers(void); /** - * @brief rtems_initialize_start_multitasking + * @brief Starts the multitasking. * - * This routine implements the early portion of rtems_initialize_executive - * directive up to the pretasking hook. This directive is invoked at system - * startup to initialize the RTEMS multitasking environment. + * This directive initiates multitasking and performs a context switch to the + * first user application task and may enable interrupts as a side-effect of + * that context switch. The context switch saves the executing context. The + * application runs now. The directive rtems_shutdown_executive() will return + * to the saved context. The exit() function will use this directive. * - * @return This method returns the status code passed into the - * @ref rtems_shutdown_executive directive. + * After a return to the saved context a fatal system state is reached. The + * fatal source is RTEMS_FATAL_SOURCE_EXIT with a fatal code set to the value + * passed to rtems_shutdown_executive(). + * + * This directive does not return. */ -uint32_t rtems_initialize_start_multitasking(void); +void rtems_initialize_start_multitasking(void) + RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; /** * @brief rtems_shutdown_executive diff --git a/cpukit/sapi/src/exinit.c b/cpukit/sapi/src/exinit.c index 2c68434899..a48ad9b56e 100644 --- a/cpukit/sapi/src/exinit.c +++ b/cpukit/sapi/src/exinit.c @@ -217,8 +217,10 @@ void rtems_initialize_device_drivers(void) _API_extensions_Run_postdriver(); } -uint32_t rtems_initialize_start_multitasking(void) +void rtems_initialize_start_multitasking(void) { + uint32_t status; + _System_state_Set( SYSTEM_STATE_BEGIN_MULTITASKING ); _Thread_Start_multitasking(); @@ -232,5 +234,6 @@ uint32_t rtems_initialize_start_multitasking(void) ******************************************************************* *******************************************************************/ - return _Per_CPU_Information[0].idle->Wait.return_code; + status = _Per_CPU_Information[0].idle->Wait.return_code; + rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, status ); } |