blob: 41ee537e4406964fad4eb9ae38914e434131179e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/*
* Initialization Manager
*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/init.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/interr.h>
#if defined(RTEMS_SMP)
#include <rtems/score/smp.h>
#endif
void rtems_shutdown_executive( uint32_t result )
{
Internal_errors_Source source;
bool is_internal;
Internal_errors_t code;
if ( _System_state_Is_up( _System_state_Get() ) ) {
#if defined(RTEMS_SMP)
_SMP_Request_other_cores_to_shutdown();
#endif
source = RTEMS_FATAL_SOURCE_EXIT;
is_internal = false;
code = result;
} else {
source = INTERNAL_ERROR_CORE;
is_internal = true;
code = INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP;
}
_Internal_error_Occurred( source, is_internal, code );
/***************************************************************
***************************************************************
* SYSTEM SHUTS DOWN!!! WE DO NOT RETURN TO THIS POINT!!! *
***************************************************************
***************************************************************/
}
|