2011-07-13 Joel Sherrill <joel.sherrilL@OARcorp.com>

PR 1824/cpukit
	* sapi/include/rtems/init.h, sapi/src/exinit.c, sapi/src/exshutdown.c:
	Return exit/shutdown status back to boot_card().
This commit is contained in:
Joel Sherrill
2011-07-13 18:34:22 +00:00
parent 44209ab286
commit f58ef8ae7a
4 changed files with 16 additions and 3 deletions

View File

@@ -1,3 +1,9 @@
2011-07-13 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1824/cpukit
* sapi/include/rtems/init.h, sapi/src/exinit.c, sapi/src/exshutdown.c:
Return exit/shutdown status back to boot_card().
2011-07-11 Sebastien Bourdeauducq <sebastien.bourdeauducq@gmail.com> 2011-07-11 Sebastien Bourdeauducq <sebastien.bourdeauducq@gmail.com>
PR 1823/cpukit PR 1823/cpukit

View File

@@ -76,8 +76,11 @@ void rtems_initialize_device_drivers(void);
* This routine implements the early portion of rtems_initialize_executive * This routine implements the early portion of rtems_initialize_executive
* directive up to the pretasking hook. This directive is invoked at system * directive up to the pretasking hook. This directive is invoked at system
* startup to initialize the RTEMS multitasking environment. * startup to initialize the RTEMS multitasking environment.
*
* @return This method returns the status code passed into the
* @ref rtems_shutdown_executive directive.
*/ */
void rtems_initialize_start_multitasking(void); uint32_t rtems_initialize_start_multitasking(void);
/** /**
* @brief rtems_shutdown_executive * @brief rtems_shutdown_executive

View File

@@ -225,9 +225,8 @@ void rtems_initialize_device_drivers(void)
_API_extensions_Run_postdriver(); _API_extensions_Run_postdriver();
} }
void rtems_initialize_start_multitasking(void) uint32_t rtems_initialize_start_multitasking(void)
{ {
_System_state_Set( SYSTEM_STATE_BEGIN_MULTITASKING ); _System_state_Set( SYSTEM_STATE_BEGIN_MULTITASKING );
_Thread_Start_multitasking(); _Thread_Start_multitasking();
@@ -240,4 +239,6 @@ void rtems_initialize_start_multitasking(void)
******************************************************************* *******************************************************************
******************************************************************* *******************************************************************
*******************************************************************/ *******************************************************************/
return _Per_CPU_Information[0].idle->Wait.return_code;
} }

View File

@@ -44,6 +44,9 @@ void rtems_shutdown_executive(
#if defined(RTEMS_SMP) #if defined(RTEMS_SMP)
_SMP_Request_other_cores_to_shutdown(); _SMP_Request_other_cores_to_shutdown();
#endif #endif
_Per_CPU_Information[0].idle->Wait.return_code = result;
_System_state_Set( SYSTEM_STATE_SHUTDOWN ); _System_state_Set( SYSTEM_STATE_SHUTDOWN );
_Thread_Stop_multitasking(); _Thread_Stop_multitasking();
} }