[PATCH 07/17] score: Delete INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Feb 17 15:51:32 UTC 2014


This error case is no longer required since rtems_shutdown_executive()
can be called anytime, anywhere
---
 cpukit/sapi/src/exshutdown.c                       |   17 +-------------
 cpukit/sapi/src/interrtext.c                       |    2 +-
 cpukit/score/include/rtems/score/interr.h          |    2 +-
 testsuites/sptests/Makefile.am                     |    2 +-
 testsuites/sptests/configure.ac                    |    1 -
 testsuites/sptests/spfatal23/Makefile.am           |   21 ------------------
 testsuites/sptests/spfatal23/spfatal23.doc         |   21 ------------------
 testsuites/sptests/spfatal23/spfatal23.scn         |    3 --
 testsuites/sptests/spfatal23/testcase.h            |   23 --------------------
 .../spinternalerror02/spinternalerror02.scn        |    2 +-
 10 files changed, 5 insertions(+), 89 deletions(-)
 delete mode 100644 testsuites/sptests/spfatal23/Makefile.am
 delete mode 100644 testsuites/sptests/spfatal23/spfatal23.doc
 delete mode 100644 testsuites/sptests/spfatal23/spfatal23.scn
 delete mode 100644 testsuites/sptests/spfatal23/testcase.h

diff --git a/cpukit/sapi/src/exshutdown.c b/cpukit/sapi/src/exshutdown.c
index 80848f0..8b0b149 100644
--- a/cpukit/sapi/src/exshutdown.c
+++ b/cpukit/sapi/src/exshutdown.c
@@ -14,26 +14,11 @@
 #endif
 
 #include <rtems/init.h>
-#include <rtems/score/sysstate.h>
 #include <rtems/score/interr.h>
 
 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() ) ) {
-    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 );
+  _Internal_error_Occurred( RTEMS_FATAL_SOURCE_EXIT, false, result );
 
   /***************************************************************
    ***************************************************************
diff --git a/cpukit/sapi/src/interrtext.c b/cpukit/sapi/src/interrtext.c
index a66add5..66ce6da 100644
--- a/cpukit/sapi/src/interrtext.c
+++ b/cpukit/sapi/src/interrtext.c
@@ -47,7 +47,7 @@ static const char *const internal_error_text[] = {
   "INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL",
   "INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE",
   "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_MUTEX_INIT_FAILED",
   "INTERNAL_ERROR_NO_MEMORY_FOR_HEAP",
diff --git a/cpukit/score/include/rtems/score/interr.h b/cpukit/score/include/rtems/score/interr.h
index 26fe154..0e9a9cc 100644
--- a/cpukit/score/include/rtems/score/interr.h
+++ b/cpukit/score/include/rtems/score/interr.h
@@ -143,7 +143,7 @@ typedef enum {
   INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL,
   INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE,
   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_MUTEX_INIT_FAILED,
   INTERNAL_ERROR_NO_MEMORY_FOR_HEAP,
diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index 6cd3a05..22e867e 100644
--- a/testsuites/sptests/Makefile.am
+++ b/testsuites/sptests/Makefile.am
@@ -18,7 +18,7 @@ SUBDIRS = \
     spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
     spfatal08 spfatal09 spfatal10 spfatal11 spfatal12 spfatal13 spfatal14 \
     spfatal15 spfatal16 spfatal17 spfatal18 spfatal19 spfatal20 \
-    spfatal22 spfatal23 spfatal24 spfatal25 \
+    spfatal22 spfatal24 spfatal25 \
     spfifo01 spfifo02 spfifo03 spfifo04 spfifo05 \
     spfreechain01 \
     spintrcritical01 spintrcritical02 spintrcritical03 spintrcritical04 \
diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac
index 4637872..6eb4457 100644
--- a/testsuites/sptests/configure.ac
+++ b/testsuites/sptests/configure.ac
@@ -162,7 +162,6 @@ spfatal18/Makefile
 spfatal19/Makefile
 spfatal20/Makefile
 spfatal22/Makefile
-spfatal23/Makefile
 spfatal24/Makefile
 spfatal25/Makefile
 spfifo01/Makefile
diff --git a/testsuites/sptests/spfatal23/Makefile.am b/testsuites/sptests/spfatal23/Makefile.am
deleted file mode 100644
index ead41f5..0000000
--- a/testsuites/sptests/spfatal23/Makefile.am
+++ /dev/null
@@ -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 at .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
diff --git a/testsuites/sptests/spfatal23/spfatal23.doc b/testsuites/sptests/spfatal23/spfatal23.doc
deleted file mode 100644
index 7f34337..0000000
--- a/testsuites/sptests/spfatal23/spfatal23.doc
+++ /dev/null
@@ -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.
diff --git a/testsuites/sptests/spfatal23/spfatal23.scn b/testsuites/sptests/spfatal23/spfatal23.scn
deleted file mode 100644
index 6985cdd..0000000
--- a/testsuites/sptests/spfatal23/spfatal23.scn
+++ /dev/null
@@ -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 ***
diff --git a/testsuites/sptests/spfatal23/testcase.h b/testsuites/sptests/spfatal23/testcase.h
deleted file mode 100644
index 6be7d3a..0000000
--- a/testsuites/sptests/spfatal23/testcase.h
+++ /dev/null
@@ -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 */
-}
diff --git a/testsuites/sptests/spinternalerror02/spinternalerror02.scn b/testsuites/sptests/spinternalerror02/spinternalerror02.scn
index 65fd425..ecf3962 100644
--- a/testsuites/sptests/spinternalerror02/spinternalerror02.scn
+++ b/testsuites/sptests/spinternalerror02/spinternalerror02.scn
@@ -19,7 +19,7 @@ INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
 INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL
 INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE
 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_MUTEX_INIT_FAILED
 INTERNAL_ERROR_NO_MEMORY_FOR_HEAP
-- 
1.7.7




More information about the devel mailing list