[rtems commit] rtems: Create signal implementation header

Sebastian Huber sebh at rtems.org
Fri Jul 26 09:51:53 UTC 2013


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Jul 25 10:20:24 2013 +0200

rtems: Create signal implementation header

Move implementation specific parts of signal.h into new header file
signalimpl.h.  The signal.h contains now only the application visible
API.

---

 cpukit/rtems/Makefile.am                      |    1 +
 cpukit/rtems/include/rtems/rtems/signal.h     |   44 ++++++---------------
 cpukit/rtems/include/rtems/rtems/signalimpl.h |   53 +++++++++++++++++++++++++
 cpukit/rtems/include/rtems/rtems/signalmp.h   |    4 ++
 cpukit/rtems/preinstall.am                    |    4 ++
 cpukit/rtems/src/signal.c                     |    9 +----
 cpukit/rtems/src/signalmp.c                   |   12 +-----
 cpukit/rtems/src/signalsend.c                 |    2 +-
 cpukit/sapi/src/rtemsapi.c                    |    2 +-
 9 files changed, 79 insertions(+), 52 deletions(-)

diff --git a/cpukit/rtems/Makefile.am b/cpukit/rtems/Makefile.am
index 7a14943..027cb04 100644
--- a/cpukit/rtems/Makefile.am
+++ b/cpukit/rtems/Makefile.am
@@ -45,6 +45,7 @@ include_rtems_rtems_HEADERS += include/rtems/rtems/rtemsapi.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/sem.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/semimpl.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/signal.h
+include_rtems_rtems_HEADERS += include/rtems/rtems/signalimpl.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/smp.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/status.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/statusimpl.h
diff --git a/cpukit/rtems/include/rtems/rtems/signal.h b/cpukit/rtems/include/rtems/rtems/signal.h
index 18f31b5..a1b43dd 100644
--- a/cpukit/rtems/include/rtems/rtems/signal.h
+++ b/cpukit/rtems/include/rtems/rtems/signal.h
@@ -1,19 +1,9 @@
 /**
- * @file rtems/rtems/signal.h
+ * @file
  *
- * @defgroup ClassicSignal Signals
- *
- * @ingroup ClassicRTEMS
- * @brief Signal Manager
- *
- * This include file contains all the constants and structures associated
- * with the Signal Manager. This manager provides capabilities required
- * for asynchronous communication between tasks via signal sets.
+ * @ingroup ClassicSignal
  *
- * Directives provided are:
- *
- * + establish an asynchronous signal routine
- * + send a signal set to a task
+ * @brief Signals API
  */
 
 /* COPYRIGHT (c) 1989-2008.
@@ -27,32 +17,26 @@
 #ifndef _RTEMS_RTEMS_SIGNAL_H
 #define _RTEMS_RTEMS_SIGNAL_H
 
-/**
- *  @defgroup ClassicSignal Signals
- *
- *  @ingroup ClassicRTEMS
- *
- *  This encapsulates functionality which XXX
- */
-/**@{*/
-
 #include <rtems/rtems/asr.h>
 #include <rtems/rtems/modes.h>
-#include <rtems/score/object.h>
 #include <rtems/rtems/status.h>
 #include <rtems/rtems/types.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
+
 /**
- *  @brief Signal Manager Initialization
+ * @defgroup ClassicSignal Signals
  *
- *  Signal Manager
+ * @ingroup ClassicRTEMS
  *
- *  This routine performs the initialization necessary for this manager.
+ * Directives provided are:
+ *
+ * + establish an asynchronous signal routine
+ * + send a signal set to a task
  */
-void _Signal_Manager_initialization( void );
+/**@{*/
 
 /**
  * @brief RTEMS Catch Signal
@@ -89,15 +73,11 @@ rtems_status_code rtems_signal_send(
   rtems_signal_set signal_set
 );
 
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/rtems/signalmp.h>
-#endif
+/**@}*/
 
 #ifdef __cplusplus
 }
 #endif
 
-/**@}*/
-
 #endif
 /* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/signalimpl.h b/cpukit/rtems/include/rtems/rtems/signalimpl.h
new file mode 100644
index 0000000..41339f1
--- /dev/null
+++ b/cpukit/rtems/include/rtems/rtems/signalimpl.h
@@ -0,0 +1,53 @@
+/**
+ * @file
+ *
+ * @ingroup ClassicSignalImpl
+ *
+ * @brief Signals Implementation
+ */
+
+/* COPYRIGHT (c) 1989-2008.
+ * 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.
+ */
+
+#ifndef _RTEMS_RTEMS_SIGNALIMPL_H
+#define _RTEMS_RTEMS_SIGNALIMPL_H
+
+#include <rtems/rtems/signal.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup ClassicSignalImpl Signals Implementation
+ *
+ * @ingroup ClassicSignal
+ */
+/**@{*/
+
+/**
+ *  @brief Signal Manager Initialization
+ *
+ *  Signal Manager
+ *
+ *  This routine performs the initialization necessary for this manager.
+ */
+void _Signal_Manager_initialization( void );
+
+/**@}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#if defined(RTEMS_MULTIPROCESSING)
+#include <rtems/rtems/signalmp.h>
+#endif
+
+#endif
+/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/signalmp.h b/cpukit/rtems/include/rtems/rtems/signalmp.h
index 82a7e07..dd1271d 100644
--- a/cpukit/rtems/include/rtems/rtems/signalmp.h
+++ b/cpukit/rtems/include/rtems/rtems/signalmp.h
@@ -18,6 +18,10 @@
 #ifndef _RTEMS_RTEMS_SIGNALMP_H
 #define _RTEMS_RTEMS_SIGNALMP_H
 
+#ifndef _RTEMS_RTEMS_SIGNALIMPL_H
+# error "Never use <rtems/rtems/signalmp.h> directly; include <rtems/rtems/signalimpl.h> instead."
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
diff --git a/cpukit/rtems/preinstall.am b/cpukit/rtems/preinstall.am
index c3ebbec..72fa775 100644
--- a/cpukit/rtems/preinstall.am
+++ b/cpukit/rtems/preinstall.am
@@ -151,6 +151,10 @@ $(PROJECT_INCLUDE)/rtems/rtems/signal.h: include/rtems/rtems/signal.h $(PROJECT_
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/signal.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/signal.h
 
+$(PROJECT_INCLUDE)/rtems/rtems/signalimpl.h: include/rtems/rtems/signalimpl.h $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/signalimpl.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/signalimpl.h
+
 $(PROJECT_INCLUDE)/rtems/rtems/smp.h: include/rtems/rtems/smp.h $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/smp.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/smp.h
diff --git a/cpukit/rtems/src/signal.c b/cpukit/rtems/src/signal.c
index 13e04d3..ae85b0b 100644
--- a/cpukit/rtems/src/signal.c
+++ b/cpukit/rtems/src/signal.c
@@ -18,14 +18,7 @@
 #include "config.h"
 #endif
 
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/asr.h>
-#include <rtems/score/isr.h>
-#include <rtems/rtems/modes.h>
-#include <rtems/rtems/signal.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/tasks.h>
+#include <rtems/rtems/signalimpl.h>
 
 /*
  *  _Signal_Manager_initialization
diff --git a/cpukit/rtems/src/signalmp.c b/cpukit/rtems/src/signalmp.c
index 3deffcf..551860c 100644
--- a/cpukit/rtems/src/signalmp.c
+++ b/cpukit/rtems/src/signalmp.c
@@ -18,16 +18,8 @@
 #include "config.h"
 #endif
 
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/score/mpci.h>
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/signal.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/rtems/support.h>
+#include <rtems/rtems/signalimpl.h>
+#include <rtems/rtems/optionsimpl.h>
 #include <rtems/score/statesimpl.h>
 #include <rtems/score/threadimpl.h>
 #include <rtems/score/threadqimpl.h>
diff --git a/cpukit/rtems/src/signalsend.c b/cpukit/rtems/src/signalsend.c
index 56f5416..8da26e8 100644
--- a/cpukit/rtems/src/signalsend.c
+++ b/cpukit/rtems/src/signalsend.c
@@ -18,7 +18,7 @@
 #include "config.h"
 #endif
 
-#include <rtems/rtems/signal.h>
+#include <rtems/rtems/signalimpl.h>
 #include <rtems/rtems/asrimpl.h>
 #include <rtems/rtems/tasks.h>
 #include <rtems/score/threadimpl.h>
diff --git a/cpukit/sapi/src/rtemsapi.c b/cpukit/sapi/src/rtemsapi.c
index b9abb06..07880ba 100644
--- a/cpukit/sapi/src/rtemsapi.c
+++ b/cpukit/sapi/src/rtemsapi.c
@@ -39,7 +39,7 @@
 #include <rtems/rtems/ratemonimpl.h>
 #include <rtems/rtems/regionimpl.h>
 #include <rtems/rtems/semimpl.h>
-#include <rtems/rtems/signal.h>
+#include <rtems/rtems/signalimpl.h>
 #include <rtems/rtems/timerimpl.h>
 
 Objects_Information *_RTEMS_Objects[ OBJECTS_RTEMS_CLASSES_LAST + 1 ];




More information about the vc mailing list