[rtems commit] Delete unused API extensions

Sebastian Huber sebh at rtems.org
Wed Feb 3 09:36:11 UTC 2016


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Jan 26 11:16:56 2016 +0100

Delete unused API extensions

---

 c/src/lib/libbsp/i386/shared/irq/irq.c             |  1 -
 c/src/lib/libbsp/powerpc/mvme5500/irq/BSP_irq.c    |  1 -
 c/src/lib/libcpu/powerpc/mpc5xx/irq/irq.c          |  1 -
 .../libcpu/powerpc/new-exceptions/bspsupport/irq.c |  1 -
 .../new-exceptions/bspsupport/ppc_exc_hdl.c        |  1 -
 cpukit/posix/include/rtems/posix/psignalimpl.h     |  1 -
 cpukit/posix/src/pthread.c                         |  1 -
 cpukit/posix/src/pthreadinitthreads.c              |  1 -
 cpukit/rtems/src/signalcatch.c                     |  1 -
 cpukit/rtems/src/taskident.c                       |  1 -
 cpukit/rtems/src/taskinitusers.c                   |  1 -
 cpukit/sapi/src/exinit.c                           | 34 ++-------
 cpukit/score/Makefile.am                           |  3 +-
 cpukit/score/include/rtems/score/apiext.h          | 89 ----------------------
 cpukit/score/preinstall.am                         |  4 -
 cpukit/score/src/apiext.c                          | 49 ------------
 cpukit/score/src/threaddispatch.c                  |  1 -
 testsuites/sptests/spsize/size.c                   |  1 -
 18 files changed, 9 insertions(+), 183 deletions(-)

diff --git a/c/src/lib/libbsp/i386/shared/irq/irq.c b/c/src/lib/libbsp/i386/shared/irq/irq.c
index 95ab6ac..2bee764 100644
--- a/c/src/lib/libbsp/i386/shared/irq/irq.c
+++ b/c/src/lib/libbsp/i386/shared/irq/irq.c
@@ -16,7 +16,6 @@
 #include <bsp/irq-generic.h>
 
 #include <stdlib.h>
-#include <rtems/score/apiext.h>
 #include <stdio.h>
 #include <inttypes.h>
 
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/irq/BSP_irq.c b/c/src/lib/libbsp/powerpc/mvme5500/irq/BSP_irq.c
index ca5fa70..eb36cc2 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/irq/BSP_irq.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/irq/BSP_irq.c
@@ -33,7 +33,6 @@
 #include <bsp.h>
 #include <bsp/irq.h>
 #include <rtems/score/thread.h>
-#include <rtems/score/apiext.h>
 #include <rtems/rtems/intr.h>
 #include <libcpu/io.h>
 #include <libcpu/byteorder.h>
diff --git a/c/src/lib/libcpu/powerpc/mpc5xx/irq/irq.c b/c/src/lib/libcpu/powerpc/mpc5xx/irq/irq.c
index 0eb444c..a75bc9e 100644
--- a/c/src/lib/libcpu/powerpc/mpc5xx/irq/irq.c
+++ b/c/src/lib/libcpu/powerpc/mpc5xx/irq/irq.c
@@ -16,7 +16,6 @@
  */
 
 #include <rtems.h>
-#include <rtems/score/apiext.h>
 #include <mpc5xx.h>
 #include <libcpu/vectors.h>
 #include <libcpu/raw_exception.h>
diff --git a/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/irq.c b/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/irq.c
index f8159a3..bb9b4d6 100644
--- a/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/irq.c
+++ b/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/irq.c
@@ -13,7 +13,6 @@
 
 #include <rtems.h>
 #include "irq_supp.h"
-#include <rtems/score/apiext.h>  /* for post ISR signal processing */
 #include <bsp/vectors.h>
 #include <stdlib.h>
 #include <rtems/bspIo.h> /* for printk */
diff --git a/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_hdl.c b/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_hdl.c
index 1833bc4..f78003f 100644
--- a/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_hdl.c
+++ b/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_hdl.c
@@ -10,7 +10,6 @@
 
 #include <bsp/vectors.h>
 
-#include <rtems/score/apiext.h>
 #include <rtems/score/threaddispatch.h>
 
 /* Provide temp. storage space for a few registers.
diff --git a/cpukit/posix/include/rtems/posix/psignalimpl.h b/cpukit/posix/include/rtems/posix/psignalimpl.h
index b887084..6104aca 100644
--- a/cpukit/posix/include/rtems/posix/psignalimpl.h
+++ b/cpukit/posix/include/rtems/posix/psignalimpl.h
@@ -31,7 +31,6 @@
 #include <rtems/posix/psignal.h>
 #include <rtems/posix/pthread.h>
 #include <rtems/posix/sigset.h>
-#include <rtems/score/apiext.h>
 #include <rtems/score/isrlock.h>
 #include <rtems/score/percpu.h>
 #include <rtems/score/threadqimpl.h>
diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c
index 84d2e72..ac5fbe4 100644
--- a/cpukit/posix/src/pthread.c
+++ b/cpukit/posix/src/pthread.c
@@ -27,7 +27,6 @@
 #include <rtems/system.h>
 #include <rtems/config.h>
 #include <rtems/sysinit.h>
-#include <rtems/score/apiext.h>
 #include <rtems/score/stack.h>
 #include <rtems/score/threadimpl.h>
 #include <rtems/score/threadqimpl.h>
diff --git a/cpukit/posix/src/pthreadinitthreads.c b/cpukit/posix/src/pthreadinitthreads.c
index c1f9340..05ceda2 100644
--- a/cpukit/posix/src/pthreadinitthreads.c
+++ b/cpukit/posix/src/pthreadinitthreads.c
@@ -24,7 +24,6 @@
 
 #include <rtems/system.h>
 #include <rtems/config.h>
-#include <rtems/score/apiext.h>
 #include <rtems/score/stack.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
diff --git a/cpukit/rtems/src/signalcatch.c b/cpukit/rtems/src/signalcatch.c
index bab4157..f0c62f7 100644
--- a/cpukit/rtems/src/signalcatch.c
+++ b/cpukit/rtems/src/signalcatch.c
@@ -22,7 +22,6 @@
 #include <rtems/rtems/signalimpl.h>
 #include <rtems/rtems/asrimpl.h>
 #include <rtems/rtems/tasks.h>
-#include <rtems/score/apiext.h>
 #include <rtems/score/isrlevel.h>
 #include <rtems/score/threaddispatch.h>
 #include <rtems/score/threadimpl.h>
diff --git a/cpukit/rtems/src/taskident.c b/cpukit/rtems/src/taskident.c
index c4f1770..421c827 100644
--- a/cpukit/rtems/src/taskident.c
+++ b/cpukit/rtems/src/taskident.c
@@ -26,7 +26,6 @@
 #include <rtems/rtems/tasksimpl.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
 
 rtems_status_code rtems_task_ident(
   rtems_name    name,
diff --git a/cpukit/rtems/src/taskinitusers.c b/cpukit/rtems/src/taskinitusers.c
index 4403cc4..81b6c04 100644
--- a/cpukit/rtems/src/taskinitusers.c
+++ b/cpukit/rtems/src/taskinitusers.c
@@ -28,7 +28,6 @@
 #include <rtems/rtems/tasksimpl.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
 
 static void _RTEMS_Global_construction( rtems_task_argument arg )
 {
diff --git a/cpukit/sapi/src/exinit.c b/cpukit/sapi/src/exinit.c
index a52a546..77633a2 100644
--- a/cpukit/sapi/src/exinit.c
+++ b/cpukit/sapi/src/exinit.c
@@ -30,10 +30,10 @@
 #include <rtems/config.h>
 #include <rtems/extensionimpl.h>
 #include <rtems/init.h>
+#include <rtems/io.h>
 #include <rtems/sysinit.h>
 #include <rtems/score/sysstate.h>
 
-#include <rtems/score/apiext.h>
 #include <rtems/score/apimutex.h>
 #include <rtems/score/copyrt.h>
 #include <rtems/score/heap.h>
@@ -95,30 +95,6 @@ static void rtems_initialize_data_structures(void)
   _SMP_Handler_initialize();
 }
 
-static void rtems_initialize_device_drivers(void)
-{
-  /*
-   *  Initialize all the device drivers and initialize the MPCI layer.
-   *
-   *  NOTE:  The MPCI may be build upon a device driver.
-   */
-
-  /* Initialize I/O drivers. 
-   *
-   * Driver Manager note:
-   * All drivers may not be registered yet. Drivers will dynamically
-   * be initialized when registered in level 2,3 and 4.
-   */
-  _IO_Initialize_all_drivers();
-
-  /*
-   *  Run the APIs and BSPs postdriver hooks.
-   *
-   *  The API extensions are supposed to create user initialization tasks.
-   */
-  _API_extensions_Run_postdriver();
-}
-
 RTEMS_LINKER_ROSET( _Sysinit, rtems_sysinit_item );
 
 RTEMS_SYSINIT_ITEM(
@@ -142,8 +118,14 @@ RTEMS_SYSINIT_ITEM(
   RTEMS_SYSINIT_ORDER_MIDDLE
 );
 
+/* Initialize I/O drivers.
+ *
+ * Driver Manager note:
+ * All drivers may not be registered yet. Drivers will dynamically
+ * be initialized when registered in level 2,3 and 4.
+ */
 RTEMS_SYSINIT_ITEM(
-  rtems_initialize_device_drivers,
+  _IO_Initialize_all_drivers,
   RTEMS_SYSINIT_DEVICE_DRIVERS,
   RTEMS_SYSINIT_ORDER_MIDDLE
 );
diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am
index 6593805..8506f22 100644
--- a/cpukit/score/Makefile.am
+++ b/cpukit/score/Makefile.am
@@ -25,7 +25,6 @@ include_rtems_HEADERS += include/rtems/seterr.h
 include_rtems_scoredir = $(includedir)/rtems/score
 
 include_rtems_score_HEADERS = include/rtems/score/address.h
-include_rtems_score_HEADERS += include/rtems/score/apiext.h
 include_rtems_score_HEADERS += include/rtems/score/apimutex.h
 include_rtems_score_HEADERS += include/rtems/score/assert.h
 include_rtems_score_HEADERS += include/rtems/score/atomic.h
@@ -343,7 +342,7 @@ libscore_a_SOURCES += src/userextaddset.c \
     src/userext.c src/userextremoveset.c src/userextiterate.c
 
 ## STD_C_FILES
-libscore_a_SOURCES += src/apiext.c src/chain.c src/chainappend.c \
+libscore_a_SOURCES += src/chain.c src/chainappend.c \
     src/chainextract.c src/chainget.c src/chaininsert.c \
     src/chainappendempty.c src/chainprependempty.c src/chaingetempty.c \
     src/chainnodecount.c \
diff --git a/cpukit/score/include/rtems/score/apiext.h b/cpukit/score/include/rtems/score/apiext.h
deleted file mode 100644
index ab1329b..0000000
--- a/cpukit/score/include/rtems/score/apiext.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- *  @file  rtems/score/apiext.h
- *
- *  @brief API Extensions Handler
- *
- *  This is the API Extensions Handler.
- */
-
-/*
- *  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_SCORE_APIEXT_H
-#define _RTEMS_SCORE_APIEXT_H
-
-#include <rtems/score/chainimpl.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  @defgroup ScoreAPIExtension API Extension Handler
- *
- *  @ingroup Score
- *
- *  This handler encapsulates functionality which provides mechanisms for the
- *  SuperCore to perform API specific actions without there beingg
- *  "up-references" from the SuperCore to APIs.  If these referencesg
- *  were allowed in the implementation, the cohesion would be too high
- *  and adding an API would be more difficult.  The SuperCore is supposed
- *  to be largely independent of any API.
- */
-/**@{*/
-
-/**
- *  This type defines the prototype of the Postdriver Hook.
- */
-typedef void (*API_extensions_Postdriver_hook)(void);
-
-/**
- *  The control structure which defines the points at which an API
- *  can add an extension to the system initialization thread.
- */
-typedef struct {
-  /** This field allows this structure to be used with the Chain Handler. */
-  Chain_Node                      Node;
-
-  /**
-   * This field is the callout invoked during RTEMS initialization after
-   * RTEMS data structures and device driver initialization has occurred
-   * but before multitasking is initiated.
-   *
-   * @note If this field is NULL, no extension is invoked.
-   */
-  API_extensions_Postdriver_hook  postdriver_hook;
-}  API_extensions_Control;
-
-/**
- *  @brief Add extension set to the active set.
- *
- *  This routine adds @a the_extension to the active set of API extensions.
- *
- *  @param[in] the_extension is the extension set to add.
- */
-void _API_extensions_Add(
-  API_extensions_Control *the_extension
-);
-
-/**
- *  @brief Execute all post-driver extensions.
- *
- *  This routine executes all of the postdriver callouts.
- */
-void _API_extensions_Run_postdriver( void );
-
-/**@}*/
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/preinstall.am b/cpukit/score/preinstall.am
index 1cc44da..0d9cade 100644
--- a/cpukit/score/preinstall.am
+++ b/cpukit/score/preinstall.am
@@ -68,10 +68,6 @@ $(PROJECT_INCLUDE)/rtems/score/address.h: include/rtems/score/address.h $(PROJEC
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/address.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/address.h
 
-$(PROJECT_INCLUDE)/rtems/score/apiext.h: include/rtems/score/apiext.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/apiext.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/apiext.h
-
 $(PROJECT_INCLUDE)/rtems/score/apimutex.h: include/rtems/score/apimutex.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/apimutex.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/apimutex.h
diff --git a/cpukit/score/src/apiext.c b/cpukit/score/src/apiext.c
deleted file mode 100644
index c91590b..0000000
--- a/cpukit/score/src/apiext.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * @file
- *
- * @brief Holding for API Extension Functions
- *
- * @ingroup ScoreAPIExtension
- */
-
-/*
- *  COPYRIGHT (c) 1989-1999.
- *  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/score/apiext.h>
-
-static CHAIN_DEFINE_EMPTY( _API_extensions_List );
-
-void _API_extensions_Add(
-  API_extensions_Control *the_extension
-)
-{
-  _Chain_Append( &_API_extensions_List, &the_extension->Node );
-}
-
-void _API_extensions_Run_postdriver( void )
-{
-  Chain_Node             *the_node;
-  API_extensions_Control *the_extension;
-
-  for ( the_node = _Chain_First( &_API_extensions_List );
-        !_Chain_Is_tail( &_API_extensions_List, the_node ) ;
-        the_node = the_node->next ) {
-
-    the_extension = (API_extensions_Control *) the_node;
-
-    /*
-     *  Currently all APIs configure this hook so it is always non-NULL.
-     */
-    (*the_extension->postdriver_hook)();
-  }
-}
diff --git a/cpukit/score/src/threaddispatch.c b/cpukit/score/src/threaddispatch.c
index 00c2f09..dc3c796 100644
--- a/cpukit/score/src/threaddispatch.c
+++ b/cpukit/score/src/threaddispatch.c
@@ -21,7 +21,6 @@
 #endif
 
 #include <rtems/score/threaddispatch.h>
-#include <rtems/score/apiext.h>
 #include <rtems/score/assert.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/threadimpl.h>
diff --git a/testsuites/sptests/spsize/size.c b/testsuites/sptests/spsize/size.c
index ffe9249..e9470e3 100644
--- a/testsuites/sptests/spsize/size.c
+++ b/testsuites/sptests/spsize/size.c
@@ -20,7 +20,6 @@
 
 #include <rtems/system.h>
 #include <rtems/config.h>
-#include <rtems/score/apiext.h>
 #include <rtems/score/copyrt.h>
 #include <rtems/rtems/clock.h>
 #include <rtems/rtems/tasksimpl.h>



More information about the vc mailing list