source: rtems/cpukit/score/src/interr.c @ fce900b5

5
Last change on this file since fce900b5 was 3a659b04, checked in by Sebastian Huber <sebastian.huber@…>, on 12/09/16 at 06:19:22

score: Introduce _Internal_error()

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/**
2 * @file
3 *
4 * @brief Initiates system termination
5 * @ingroup ScoreIntErr
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-1999.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.org/license/LICENSE.
15 */
16
17#if HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21#include <rtems/score/interr.h>
22#include <rtems/score/smpimpl.h>
23#include <rtems/score/sysstate.h>
24#include <rtems/score/userextimpl.h>
25
26System_state_Codes _System_state_Current;
27
28Internal_errors_Information _Internal_errors_What_happened;
29
30void _Terminate(
31  Internal_errors_Source the_source,
32  Internal_errors_t      the_error
33)
34{
35  _User_extensions_Fatal( the_source, the_error );
36
37  _Internal_errors_What_happened.the_source = the_source;
38  _Internal_errors_What_happened.the_error  = the_error;
39
40  _System_state_Set( SYSTEM_STATE_TERMINATED );
41
42  _SMP_Request_shutdown();
43
44  _CPU_Fatal_halt( the_source, the_error );
45
46  /* will not return from this routine */
47  while (true);
48}
49
50void _Internal_error( Internal_errors_Core_list core_error )
51{
52  _Terminate( INTERNAL_ERROR_CORE, core_error );
53}
Note: See TracBrowser for help on using the repository browser.