forked from Imagelibrary/rtems
score: Delete INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP
This error case is no longer required since rtems_shutdown_executive() can be called anytime, anywhere
This commit is contained in:
@@ -14,26 +14,11 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <rtems/init.h>
|
#include <rtems/init.h>
|
||||||
#include <rtems/score/sysstate.h>
|
|
||||||
#include <rtems/score/interr.h>
|
#include <rtems/score/interr.h>
|
||||||
|
|
||||||
void rtems_shutdown_executive( uint32_t result )
|
void rtems_shutdown_executive( uint32_t result )
|
||||||
{
|
{
|
||||||
Internal_errors_Source source;
|
_Internal_error_Occurred( RTEMS_FATAL_SOURCE_EXIT, false, result );
|
||||||
bool is_internal;
|
|
||||||
Internal_errors_t code;
|
|
||||||
|
|
||||||
if ( _System_state_Is_up( _System_state_Get() ) ) {
|
|
||||||
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 );
|
|
||||||
|
|
||||||
/***************************************************************
|
/***************************************************************
|
||||||
***************************************************************
|
***************************************************************
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ static const char *const internal_error_text[] = {
|
|||||||
"INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL",
|
"INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL",
|
||||||
"INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE",
|
"INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE",
|
||||||
"INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0",
|
"INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0",
|
||||||
"INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP",
|
"OBSOLETE_INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP",
|
||||||
"INTERNAL_ERROR_GXX_KEY_ADD_FAILED",
|
"INTERNAL_ERROR_GXX_KEY_ADD_FAILED",
|
||||||
"INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED",
|
"INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED",
|
||||||
"INTERNAL_ERROR_NO_MEMORY_FOR_HEAP",
|
"INTERNAL_ERROR_NO_MEMORY_FOR_HEAP",
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ typedef enum {
|
|||||||
INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL,
|
INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL,
|
||||||
INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE,
|
INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE,
|
||||||
INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0,
|
INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0,
|
||||||
INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP,
|
OBSOLETE_INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP,
|
||||||
INTERNAL_ERROR_GXX_KEY_ADD_FAILED,
|
INTERNAL_ERROR_GXX_KEY_ADD_FAILED,
|
||||||
INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED,
|
INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED,
|
||||||
INTERNAL_ERROR_NO_MEMORY_FOR_HEAP,
|
INTERNAL_ERROR_NO_MEMORY_FOR_HEAP,
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ SUBDIRS = \
|
|||||||
spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
|
spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
|
||||||
spfatal08 spfatal09 spfatal10 spfatal11 spfatal12 spfatal13 spfatal14 \
|
spfatal08 spfatal09 spfatal10 spfatal11 spfatal12 spfatal13 spfatal14 \
|
||||||
spfatal15 spfatal16 spfatal17 spfatal18 spfatal19 spfatal20 \
|
spfatal15 spfatal16 spfatal17 spfatal18 spfatal19 spfatal20 \
|
||||||
spfatal22 spfatal23 spfatal24 spfatal25 \
|
spfatal22 spfatal24 spfatal25 \
|
||||||
spfifo01 spfifo02 spfifo03 spfifo04 spfifo05 \
|
spfifo01 spfifo02 spfifo03 spfifo04 spfifo05 \
|
||||||
spfreechain01 \
|
spfreechain01 \
|
||||||
spintrcritical01 spintrcritical02 spintrcritical03 spintrcritical04 \
|
spintrcritical01 spintrcritical02 spintrcritical03 spintrcritical04 \
|
||||||
|
|||||||
@@ -161,7 +161,6 @@ spfatal18/Makefile
|
|||||||
spfatal19/Makefile
|
spfatal19/Makefile
|
||||||
spfatal20/Makefile
|
spfatal20/Makefile
|
||||||
spfatal22/Makefile
|
spfatal22/Makefile
|
||||||
spfatal23/Makefile
|
|
||||||
spfatal24/Makefile
|
spfatal24/Makefile
|
||||||
spfatal25/Makefile
|
spfatal25/Makefile
|
||||||
spfifo01/Makefile
|
spfifo01/Makefile
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
rtems_tests_PROGRAMS = spfatal23
|
|
||||||
spfatal23_SOURCES = ../spfatal_support/init.c \
|
|
||||||
../spfatal_support/system.h testcase.h
|
|
||||||
|
|
||||||
dist_rtems_tests_DATA = spfatal23.scn
|
|
||||||
dist_rtems_tests_DATA += spfatal23.doc
|
|
||||||
|
|
||||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
|
||||||
include $(top_srcdir)/../automake/compile.am
|
|
||||||
include $(top_srcdir)/../automake/leaf.am
|
|
||||||
|
|
||||||
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
|
|
||||||
|
|
||||||
LINK_OBJS = $(spfatal23_OBJECTS)
|
|
||||||
LINK_LIBS = $(spfatal23_LDLIBS)
|
|
||||||
|
|
||||||
spfatal23$(EXEEXT): $(spfatal23_OBJECTS) $(spfatal23_DEPENDENCIES)
|
|
||||||
@rm -f spfatal23$(EXEEXT)
|
|
||||||
$(make-exe)
|
|
||||||
|
|
||||||
include $(top_srcdir)/../automake/local.am
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# COPYRIGHT (c) 1989-2010.
|
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
|
|
||||||
This file describes the directives and concepts tested by this test set.
|
|
||||||
|
|
||||||
test set name: spfatal23
|
|
||||||
|
|
||||||
directives:
|
|
||||||
|
|
||||||
_System_state_Set
|
|
||||||
rtems_shutdown_executive
|
|
||||||
|
|
||||||
concepts:
|
|
||||||
|
|
||||||
+ Ensure that shutting RTEMS down when the system state indicates it is
|
|
||||||
already shutdown is a fatal error.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
*** TEST FATAL SHUTDOWN WHEN NOT UP ***
|
|
||||||
Fatal error (SHUTDOWN WHEN NOT UP) hit
|
|
||||||
*** END OF TEST FATAL SHUTDOWN WHEN NOT UP ***
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
* COPYRIGHT (c) 1989-2010.
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <rtems/score/sysstate.h>
|
|
||||||
|
|
||||||
#define FATAL_ERROR_TEST_NAME "SHUTDOWN WHEN NOT UP"
|
|
||||||
#define FATAL_ERROR_DESCRIPTION "SHUTDOWN WHEN NOT UP"
|
|
||||||
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
|
|
||||||
#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
|
|
||||||
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP
|
|
||||||
|
|
||||||
void force_error()
|
|
||||||
{
|
|
||||||
_System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING );
|
|
||||||
rtems_shutdown_executive( 0 );
|
|
||||||
/* we will not run this far */
|
|
||||||
}
|
|
||||||
@@ -19,7 +19,7 @@ INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
|
|||||||
INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL
|
INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL
|
||||||
INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE
|
INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE
|
||||||
INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0
|
INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0
|
||||||
INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP
|
OBSOLETE_INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP
|
||||||
INTERNAL_ERROR_GXX_KEY_ADD_FAILED
|
INTERNAL_ERROR_GXX_KEY_ADD_FAILED
|
||||||
INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED
|
INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED
|
||||||
INTERNAL_ERROR_NO_MEMORY_FOR_HEAP
|
INTERNAL_ERROR_NO_MEMORY_FOR_HEAP
|
||||||
|
|||||||
Reference in New Issue
Block a user