[rtems commit] Remove <rtems/debug.h>

Sebastian Huber sebh at rtems.org
Mon Dec 7 12:13:42 UTC 2015


Module:    rtems
Branch:    master
Commit:    8054b1c7181b7c36e413ce15b686f99d06f4a7d2
Changeset: http://git.rtems.org/rtems/commit/?id=8054b1c7181b7c36e413ce15b686f99d06f4a7d2

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Nov 26 14:08:56 2015 +0100

Remove <rtems/debug.h>

Close #2477.

---

 c/src/lib/libbsp/shared/bootcard.c            | 13 ----
 c/src/lib/libbsp/shared/include/bootcard.h    |  2 -
 cpukit/rtems/include/rtems.h                  |  1 -
 cpukit/rtems/include/rtems/rtems/regionimpl.h |  1 -
 cpukit/sapi/Makefile.am                       |  2 +-
 cpukit/sapi/include/rtems/sptables.h          |  2 -
 cpukit/sapi/src/debug.c                       | 51 ---------------
 cpukit/sapi/src/exinit.c                      |  7 ---
 cpukit/score/Makefile.am                      |  2 +-
 cpukit/score/include/rtems/debug.h            | 91 ---------------------------
 cpukit/score/preinstall.am                    |  4 --
 testsuites/sptests/Makefile.am                |  2 +-
 testsuites/sptests/configure.ac               |  1 -
 testsuites/sptests/sp10/Makefile.am           | 22 -------
 testsuites/sptests/sp10/init.c                | 69 --------------------
 testsuites/sptests/sp10/sp10.doc              | 21 -------
 testsuites/sptests/sp10/sp10.scn              |  8 ---
 testsuites/sptests/spregion_err01/init.c      |  6 --
 testsuites/sptests/spsize/size.c              |  2 -
 19 files changed, 3 insertions(+), 304 deletions(-)

diff --git a/c/src/lib/libbsp/shared/bootcard.c b/c/src/lib/libbsp/shared/bootcard.c
index 0ee5e12..eeb5746 100644
--- a/c/src/lib/libbsp/shared/bootcard.c
+++ b/c/src/lib/libbsp/shared/bootcard.c
@@ -18,8 +18,6 @@
  *      + allocate memory to C Program Heap
  *      + initialize C Library and C Program Heap
  *      + bsp_pretasking_hook
- *      + if defined( RTEMS_DEBUG )
- *        - rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
  *      + rtems_initialize_before_drivers
  *      + bsp_predriver_hook
  *      + rtems_initialize_device_drivers
@@ -108,17 +106,6 @@ void boot_card(
   bsp_pretasking_hook();
 
   /*
-   *  If debug is enabled, then enable all dynamic RTEMS debug
-   *  capabilities.
-   *
-   *  NOTE: Most debug features are conditionally compiled in
-   *        or enabled via configure time plugins.
-   */
-  #ifdef RTEMS_DEBUG
-    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
-  #endif
-
-  /*
    *  Let RTEMS perform initialization it requires before drivers
    *  are allowed to be initialized.
    */
diff --git a/c/src/lib/libbsp/shared/include/bootcard.h b/c/src/lib/libbsp/shared/include/bootcard.h
index 53a1844..93d5041 100644
--- a/c/src/lib/libbsp/shared/include/bootcard.h
+++ b/c/src/lib/libbsp/shared/include/bootcard.h
@@ -84,8 +84,6 @@ void bsp_reset(void);
  * - rtems_initialize_data_structures()
  * - initialize C Library
  * - bsp_pretasking_hook()
- * - if defined( RTEMS_DEBUG )
- *   - rtems_debug_enable( RTEMS_DEBUG_ALL_MASK )
  * - rtems_initialize_before_drivers()
  * - bsp_predriver_hook()
  * - rtems_initialize_device_drivers()
diff --git a/cpukit/rtems/include/rtems.h b/cpukit/rtems/include/rtems.h
index af05ee6..2c27e5f 100644
--- a/cpukit/rtems/include/rtems.h
+++ b/cpukit/rtems/include/rtems.h
@@ -31,7 +31,6 @@
 #include <rtems/rtems/types.h>
 
 #include <rtems/config.h>
-#include <rtems/debug.h>
 #include <rtems/init.h>
 #include <rtems/rtems/options.h>
 #include <rtems/rtems/tasks.h>
diff --git a/cpukit/rtems/include/rtems/rtems/regionimpl.h b/cpukit/rtems/include/rtems/rtems/regionimpl.h
index 078cf44..9f1c3b7 100644
--- a/cpukit/rtems/include/rtems/rtems/regionimpl.h
+++ b/cpukit/rtems/include/rtems/rtems/regionimpl.h
@@ -21,7 +21,6 @@
 #include <rtems/score/heapimpl.h>
 #include <rtems/score/objectimpl.h>
 #include <rtems/score/threadqimpl.h>
-#include <rtems/debug.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/cpukit/sapi/Makefile.am b/cpukit/sapi/Makefile.am
index 76ff2fe..ca7b421 100644
--- a/cpukit/sapi/Makefile.am
+++ b/cpukit/sapi/Makefile.am
@@ -26,7 +26,7 @@ include_rtems_HEADERS += include/rtems/timespec.h
 EXTRA_DIST = include/rtems/README
 
 noinst_LIBRARIES = libsapi.a
-libsapi_a_SOURCES = src/debug.c src/extension.c src/extensioncreate.c \
+libsapi_a_SOURCES = src/extension.c src/extensioncreate.c \
     src/extensiondelete.c src/extensionident.c src/fatal.c src/exinit.c \
     src/exshutdown.c src/io.c src/ioclose.c src/iocontrol.c src/iodata.c \
     src/ioinitialize.c src/ioopen.c src/ioread.c src/ioregisterdriver.c \
diff --git a/cpukit/sapi/include/rtems/sptables.h b/cpukit/sapi/include/rtems/sptables.h
index dc7ea59..733e613 100644
--- a/cpukit/sapi/include/rtems/sptables.h
+++ b/cpukit/sapi/include/rtems/sptables.h
@@ -24,8 +24,6 @@ extern "C" {
 #endif
 
 #include <rtems/config.h>
-
-#include <rtems/debug.h>
 #include <rtems/fatal.h>
 #include <rtems/init.h>
 #include <rtems/io.h>
diff --git a/cpukit/sapi/src/debug.c b/cpukit/sapi/src/debug.c
deleted file mode 100644
index f22f062..0000000
--- a/cpukit/sapi/src/debug.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * @file
- *
- * @brief Debug Manager
- *
- * @ingroup ClassicDebug
- */
-
-/*
- *  Debug Manager
- *
- *  COPYRIGHT (c) 1989-2009.
- *  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.org/license/LICENSE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/system.h>
-#include <rtems/debug.h>
-
-void _Debug_Manager_initialization( void )
-{
-  rtems_debug_disable( RTEMS_DEBUG_ALL_MASK );
-}
-
-void rtems_debug_enable (
-  rtems_debug_control  to_be_enabled
-)
-{
-  _Debug_Level |= to_be_enabled;
-}
-
-void rtems_debug_disable (
-  rtems_debug_control  to_be_disabled
-)
-{
-  _Debug_Level &= ~to_be_disabled;
-}
-
-bool rtems_debug_is_enabled(
-  rtems_debug_control  level
-)
-{
-  return (_Debug_Level & level) ? true : false;
-}
diff --git a/cpukit/sapi/src/exinit.c b/cpukit/sapi/src/exinit.c
index 3115899..98c4079 100644
--- a/cpukit/sapi/src/exinit.c
+++ b/cpukit/sapi/src/exinit.c
@@ -29,7 +29,6 @@
 
 #include <rtems/system.h>
 #include <rtems/config.h>
-#include <rtems/debug.h>
 #include <rtems/extensionimpl.h>
 #include <rtems/init.h>
 #include <rtems/score/sysstate.h>
@@ -102,12 +101,6 @@ void rtems_initialize_data_structures(void)
     _Objects_MP_Handler_early_initialization();
   #endif
 
-  /*
-   *  Do this as early as possible to ensure no debugging output
-   *  is even attempted to be printed.
-   */
-  _Debug_Manager_initialization();
-
   _API_extensions_Initialization();
 
   _Thread_Dispatch_initialization();
diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am
index f727e60..fb93b98 100644
--- a/cpukit/score/Makefile.am
+++ b/cpukit/score/Makefile.am
@@ -16,7 +16,7 @@ include_sys_HEADERS += include/sys/timex.h
 
 include_rtemsdir = $(includedir)/rtems
 
-include_rtems_HEADERS = include/rtems/debug.h
+include_rtems_HEADERS =
 include_rtems_HEADERS += include/rtems/system.h
 include_rtems_HEADERS += include/rtems/seterr.h
 
diff --git a/cpukit/score/include/rtems/debug.h b/cpukit/score/include/rtems/debug.h
deleted file mode 100644
index 067de4e..0000000
--- a/cpukit/score/include/rtems/debug.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- *  @file  rtems/debug.h
- *
- *  @brief Information Related to the Debug Support Within RTEMS
- *
- *  This include file contains the information pertaining to the debug
- *  support within RTEMS.  It is currently cast in the form of a
- *  Manager since it is externally accessible.
- */
-
-/*
- *  COPYRIGHT (c) 1989-2009.
- *  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.org/license/LICENSE.
- */
-
-#ifndef _RTEMS_DEBUG_H
-#define _RTEMS_DEBUG_H
-
-#include <rtems/score/basedefs.h>
-
-/**
- *  @defgroup ScoreDebug Debug Information
- *
- *  @ingroup Score
- */
-/**@{*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  The following type is used to manage the debug mask.
- */
-typedef uint32_t   rtems_debug_control;
-
-/*
- *  These constants represent various classes of debugging.
- */
-
-/** Macro which indicates that all debugging modes are enabled */
-#define RTEMS_DEBUG_ALL_MASK 0xffffffff
-
-/** Macro which indicates that debugging for heaps/regions is enabled */
-#define RTEMS_DEBUG_REGION   0x00000001
-
-/**
- *  This variable contains the current debug level.
- */
-SCORE_EXTERN rtems_debug_control _Debug_Level;
-
-/**
- *  @brief Initialize debug manager.
- */
-void _Debug_Manager_initialization( void );
-
-/**
- *  @brief Enable debugging.
- */
-void rtems_debug_enable(
-  rtems_debug_control  to_be_enabled
-);
-
-/**
- *  @brief Disable debugging.
- */
-void rtems_debug_disable(
-  rtems_debug_control  to_be_disabled
-);
-
-/**
- *  @brief Check if debug is enabled.
- *
- *  This routine returns TRUE if the requested debug level is
- *  enabled, and FALSE otherwise.
- */
-bool rtems_debug_is_enabled(
-  rtems_debug_control  level
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-/**@}*/
-#endif
-/* end of include file */
diff --git a/cpukit/score/preinstall.am b/cpukit/score/preinstall.am
index 062fe1b..4b96109 100644
--- a/cpukit/score/preinstall.am
+++ b/cpukit/score/preinstall.am
@@ -43,10 +43,6 @@ $(PROJECT_INCLUDE)/rtems/$(dirstamp):
 	@: > $(PROJECT_INCLUDE)/rtems/$(dirstamp)
 PREINSTALL_DIRS += $(PROJECT_INCLUDE)/rtems/$(dirstamp)
 
-$(PROJECT_INCLUDE)/rtems/debug.h: include/rtems/debug.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/debug.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/debug.h
-
 $(PROJECT_INCLUDE)/rtems/system.h: include/rtems/system.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/system.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/system.h
diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index 688c66f..54b8555 100644
--- a/testsuites/sptests/Makefile.am
+++ b/testsuites/sptests/Makefile.am
@@ -4,7 +4,7 @@ ACLOCAL_AMFLAGS = -I ../aclocal
 ## deleted over the years.
 _SUBDIRS = \
          sp01 sp02 sp03 sp04 sp05 sp06 sp07 sp08 \
-    sp10 sp11 sp12 sp13 sp14 sp15 sp16 sp17 sp18 sp19 \
+    sp11 sp12 sp13 sp14 sp15 sp16 sp17 sp18 sp19 \
     sp20 sp21 sp22 sp23 sp24 sp25 sp26 sp27 sp27a           \
     sp30 sp31 sp32 sp33 sp34 sp35      sp37 sp38 \
     sp40 sp41 sp42 sp43 sp44 sp45 sp46 sp47 sp48 sp49 \
diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac
index ea96dbf..e6c51b4 100644
--- a/testsuites/sptests/configure.ac
+++ b/testsuites/sptests/configure.ac
@@ -85,7 +85,6 @@ sp05/Makefile
 sp06/Makefile
 sp07/Makefile
 sp08/Makefile
-sp10/Makefile
 sp11/Makefile
 sp12/Makefile
 sp13/Makefile
diff --git a/testsuites/sptests/sp10/Makefile.am b/testsuites/sptests/sp10/Makefile.am
deleted file mode 100644
index a6f2f10..0000000
--- a/testsuites/sptests/sp10/Makefile.am
+++ /dev/null
@@ -1,22 +0,0 @@
-
-rtems_tests_PROGRAMS = sp10
-sp10_SOURCES = init.c
-
-dist_rtems_tests_DATA = sp10.scn
-dist_rtems_tests_DATA += sp10.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 = $(sp10_OBJECTS)
-LINK_LIBS = $(sp10_LDLIBS)
-
-sp10$(EXEEXT): $(sp10_OBJECTS) $(sp10_DEPENDENCIES)
-	@rm -f sp10$(EXEEXT)
-	$(make-exe)
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/sp10/init.c b/testsuites/sptests/sp10/init.c
deleted file mode 100644
index c11172c..0000000
--- a/testsuites/sptests/sp10/init.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- *  COPYRIGHT (c) 1989-2012.
- *  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.org/license/LICENSE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <tmacros.h>
-
-const char rtems_test_name[] = "SP 10";
-
-/* forward declarations to avoid warnings */
-rtems_task Init(rtems_task_argument argument);
-
-rtems_task Init(
-  rtems_task_argument ignored
-)
-{
-  bool                  is_set;
-
-  TEST_BEGIN();
-
-  puts( "Init - clear debug level" );
-  _Debug_Level = 0;
-
-  puts( "Init - rtems_debug_is_enabled - is 0x1 set? No" );
-  is_set = rtems_debug_is_enabled( 0x1 );
-  rtems_test_assert(is_set == false);
-
-  puts( "Init - rtems_debug_enable - set 0x1" );
-  rtems_debug_enable(0x1);
-  rtems_test_assert(_Debug_Level == 0x1);
-
-  puts( "Init - rtems_debug_is_enabled - is 0x1 set? Yes" );
-  is_set = rtems_debug_is_enabled( 0x1 );
-  rtems_test_assert(is_set == true);
-
-  puts( "Init - rtems_debug_disable - clear 0x1" );
-  rtems_debug_disable(0x1);
-  rtems_test_assert(_Debug_Level == 0x0);
-
-  puts( "Init - rtems_debug_is_enabled - is 0x1 set? No" );
-  is_set = rtems_debug_is_enabled( 0x1 );
-  rtems_test_assert(is_set == false);
-
-  TEST_END();
-  rtems_test_exit(0);
-}
-
-/* configuration information */
-
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS         1
-#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_INIT
-#include <rtems/confdefs.h>
-
-/* global variables */
diff --git a/testsuites/sptests/sp10/sp10.doc b/testsuites/sptests/sp10/sp10.doc
deleted file mode 100644
index f8af0f7..0000000
--- a/testsuites/sptests/sp10/sp10.doc
+++ /dev/null
@@ -1,21 +0,0 @@
-#  COPYRIGHT (c) 1989-2009.
-#  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.org/license/LICENSE.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name:  sp10
-
-directives:
-
-    rtems_debug_enable
-    rtems_debug_disable
-    rtems_debug_is_enabled
-
-concepts:
-
-+ Exercise the Debug Manager.
diff --git a/testsuites/sptests/sp10/sp10.scn b/testsuites/sptests/sp10/sp10.scn
deleted file mode 100644
index 3687434..0000000
--- a/testsuites/sptests/sp10/sp10.scn
+++ /dev/null
@@ -1,8 +0,0 @@
-*** TEST 10 ***
-Init - clear debug level
-Init - rtems_debug_is_enabled - is 0x1 set? No
-Init - rtems_debug_enable - set 0x1
-Init - rtems_debug_is_enabled - is 0x1 set? Yes
-Init - rtems_debug_disable - clear 0x1
-Init - rtems_debug_is_enabled - is 0x1 set? No
-*** END OF TEST 10 ***
diff --git a/testsuites/sptests/spregion_err01/init.c b/testsuites/sptests/spregion_err01/init.c
index 62ad6e1..6dd8db6 100644
--- a/testsuites/sptests/spregion_err01/init.c
+++ b/testsuites/sptests/spregion_err01/init.c
@@ -402,12 +402,6 @@ void region_error_tests(void)
  *  is subject to change if the heap code changes.
  */
 
-  puts( "TA1 - rtems_debug_disable - RTEMS_DEBUG_REGION" );
-  rtems_debug_disable( RTEMS_DEBUG_REGION );
-
-  puts( "TA1 - rtems_debug_enable - RTEMS_DEBUG_REGION" );
-  rtems_debug_enable( RTEMS_DEBUG_REGION );
-
   status = rtems_region_extend(
     100,
     Region_good_area,
diff --git a/testsuites/sptests/spsize/size.c b/testsuites/sptests/spsize/size.c
index 657fa42..660760a 100644
--- a/testsuites/sptests/spsize/size.c
+++ b/testsuites/sptests/spsize/size.c
@@ -264,8 +264,6 @@ uninitialized =
 
 /*copyrt.h*/    0                                         +
 
-/*debug.h*/     (sizeof _Debug_Level)                     +
-
 /*dpmemimpl.h*/ (sizeof _Dual_ported_memory_Information)  +
 
 #if defined(RTEMS_MULTIPROCESSING)




More information about the vc mailing list