Changeset 514705d in rtems for cpukit/sapi
- Timestamp:
- 02/12/14 15:05:35 (10 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 38ee758
- Parents:
- 92f50c3
- git-author:
- Sebastian Huber <sebastian.huber@…> (02/12/14 15:05:35)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (02/19/14 08:59:39)
- Location:
- cpukit/sapi/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/sapi/src/exinit.c
r92f50c3 r514705d 34 34 #include <rtems/debug.h> 35 35 #include <rtems/extensionimpl.h> 36 #include <rtems/fatal.h>37 36 #include <rtems/init.h> 38 37 #include <rtems/io.h> … … 216 215 void rtems_initialize_start_multitasking(void) 217 216 { 218 uint32_t status;219 220 217 _System_state_Set( SYSTEM_STATE_UP ); 221 218 … … 224 221 #endif 225 222 226 _Thread_Start_multitasking( &_Thread_BSP_context);223 _Thread_Start_multitasking(); 227 224 228 225 /******************************************************************* … … 230 227 ******************************************************************* 231 228 ****** APPLICATION RUNS HERE ****** 232 ****** RETURNS WHEN SYSTEM IS SHUT DOWN******229 ****** THE FUNCTION NEVER RETURNS ****** 233 230 ******************************************************************* 234 231 ******************************************************************* 235 232 *******************************************************************/ 236 237 status = _Thread_Get_global_exit_status(); 238 rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, status ); 239 } 233 } -
cpukit/sapi/src/exshutdown.c
r92f50c3 r514705d 16 16 #include <rtems/init.h> 17 17 #include <rtems/score/sysstate.h> 18 #include <rtems/score/threadimpl.h>19 18 #include <rtems/score/interr.h> 20 19 … … 23 22 #endif 24 23 25 /* 26 * rtems_shutdown_executive 27 * 28 * This kernel routine shutdowns the executive. It halts multitasking 29 * and returns control to the application execution "thread" which 30 * initialially invoked the rtems_initialize_executive directive. 31 * 32 * Input parameters: NONE 33 * 34 * Output parameters: NONE 35 */ 24 void rtems_shutdown_executive( uint32_t result ) 25 { 26 Internal_errors_Source source; 27 bool is_internal; 28 Internal_errors_t code; 36 29 37 void rtems_shutdown_executive(38 uint32_t result39 )40 {41 30 if ( _System_state_Is_up( _System_state_Get() ) ) { 42 31 #if defined(RTEMS_SMP) … … 44 33 #endif 45 34 46 _Thread_Set_global_exit_status( result ); 47 _Thread_Stop_multitasking(); 35 source = RTEMS_FATAL_SOURCE_EXIT; 36 is_internal = false; 37 code = result; 38 } else { 39 source = INTERNAL_ERROR_CORE; 40 is_internal = true; 41 code = INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP; 42 } 48 43 49 /******************************************************************* 50 ******************************************************************* 51 ****** RETURN TO RTEMS_INITIALIZE_START_MULTITASKING() ****** 52 ****** AND THEN TO BOOT_CARD() ****** 53 ******************************************************************* 54 *******************************************************************/ 55 } 56 _Internal_error_Occurred( 57 INTERNAL_ERROR_CORE, 58 true, 59 INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP 60 ); 44 _Internal_error_Occurred( source, is_internal, code ); 45 46 /*************************************************************** 47 *************************************************************** 48 * SYSTEM SHUTS DOWN!!! WE DO NOT RETURN TO THIS POINT!!! * 49 *************************************************************** 50 ***************************************************************/ 61 51 }
Note: See TracChangeset
for help on using the changeset viewer.