[PATCH 1/9] rtems: Create semaphore implementation header
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed Jul 17 14:18:52 UTC 2013
Move implementation specific parts of sem.h and sem.inl into new header
file semimpl.h. The sem.h contains now only the application API.
---
cpukit/libcsupport/src/resource_snapshot.c | 2 +
cpukit/libmisc/monitor/mon-object.c | 1 +
cpukit/libnetworking/rtems/rtems_glue.c | 1 +
cpukit/rtems/Makefile.am | 2 +-
cpukit/rtems/include/rtems/rtems/sem.h | 81 ++-------------
cpukit/rtems/include/rtems/rtems/semimpl.h | 154 ++++++++++++++++++++++++++++
cpukit/rtems/include/rtems/rtems/semmp.h | 9 +--
cpukit/rtems/inline/rtems/rtems/sem.inl | 98 ------------------
cpukit/rtems/preinstall.am | 9 +-
cpukit/rtems/src/sem.c | 2 +-
cpukit/rtems/src/semcreate.c | 2 +-
cpukit/rtems/src/semdata.c | 3 +-
cpukit/rtems/src/semdelete.c | 2 +-
cpukit/rtems/src/semflush.c | 2 +-
cpukit/rtems/src/semident.c | 2 +-
cpukit/rtems/src/semmp.c | 2 +-
cpukit/rtems/src/semobtain.c | 2 +-
cpukit/rtems/src/semrelease.c | 2 +-
cpukit/rtems/src/semtranslatereturncode.c | 2 +-
cpukit/sapi/include/rtems/sptables.h | 1 -
cpukit/sapi/src/rtemsapi.c | 2 +-
testsuites/sptests/spintrcritical01/init.c | 3 +-
testsuites/sptests/spintrcritical09/init.c | 2 +
testsuites/sptests/spintrcritical16/init.c | 2 +
testsuites/sptests/spsize/size.c | 4 +-
testsuites/tmtests/tm26/task1.c | 1 +
26 files changed, 193 insertions(+), 200 deletions(-)
create mode 100644 cpukit/rtems/include/rtems/rtems/semimpl.h
delete mode 100644 cpukit/rtems/inline/rtems/rtems/sem.inl
diff --git a/cpukit/libcsupport/src/resource_snapshot.c b/cpukit/libcsupport/src/resource_snapshot.c
index 1ac9e63..f44f282 100644
--- a/cpukit/libcsupport/src/resource_snapshot.c
+++ b/cpukit/libcsupport/src/resource_snapshot.c
@@ -25,6 +25,8 @@
#include <rtems/score/wkspace.h>
#include <rtems/score/protectedheap.h>
+#include <rtems/rtems/semimpl.h>
+
#ifdef RTEMS_POSIX_API
#include <rtems/posix/barrier.h>
#include <rtems/posix/cond.h>
diff --git a/cpukit/libmisc/monitor/mon-object.c b/cpukit/libmisc/monitor/mon-object.c
index 77f95be..f431fda 100644
--- a/cpukit/libmisc/monitor/mon-object.c
+++ b/cpukit/libmisc/monitor/mon-object.c
@@ -20,6 +20,7 @@
#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
#include <rtems.h>
#include <rtems/monitor.h>
+#include <rtems/rtems/semimpl.h>
#if defined(RTEMS_POSIX_API)
#include <rtems/posix/pthread.h>
#endif
diff --git a/cpukit/libnetworking/rtems/rtems_glue.c b/cpukit/libnetworking/rtems/rtems_glue.c
index 95cabe4..61ac905 100644
--- a/cpukit/libnetworking/rtems/rtems_glue.c
+++ b/cpukit/libnetworking/rtems/rtems_glue.c
@@ -17,6 +17,7 @@
#include <rtems/libio.h>
#include <rtems/error.h>
#include <rtems/rtems_bsdnet.h>
+#include <rtems/rtems/semimpl.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/domain.h>
diff --git a/cpukit/rtems/Makefile.am b/cpukit/rtems/Makefile.am
index 31e2c3d..c61ca5a 100644
--- a/cpukit/rtems/Makefile.am
+++ b/cpukit/rtems/Makefile.am
@@ -33,6 +33,7 @@ include_rtems_rtems_HEADERS += include/rtems/rtems/ratemon.h
include_rtems_rtems_HEADERS += include/rtems/rtems/region.h
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/smp.h
include_rtems_rtems_HEADERS += include/rtems/rtems/status.h
@@ -69,7 +70,6 @@ include_rtems_rtems_HEADERS += inline/rtems/rtems/options.inl
include_rtems_rtems_HEADERS += inline/rtems/rtems/part.inl
include_rtems_rtems_HEADERS += inline/rtems/rtems/ratemon.inl
include_rtems_rtems_HEADERS += inline/rtems/rtems/region.inl
-include_rtems_rtems_HEADERS += inline/rtems/rtems/sem.inl
include_rtems_rtems_HEADERS += inline/rtems/rtems/status.inl
include_rtems_rtems_HEADERS += inline/rtems/rtems/support.inl
include_rtems_rtems_HEADERS += inline/rtems/rtems/tasks.inl
diff --git a/cpukit/rtems/include/rtems/rtems/sem.h b/cpukit/rtems/include/rtems/rtems/sem.h
index 046c0f2..fbe5590 100644
--- a/cpukit/rtems/include/rtems/rtems/sem.h
+++ b/cpukit/rtems/include/rtems/rtems/sem.h
@@ -1,11 +1,9 @@
/**
- * @file rtems/rtems/sem.h
+ * @file
*
- * @brief Semaphore Manager
+ * @ingroup ClassicSem
*
- * @defgroup ClassicSem Semaphores
- *
- * @ingroup ClassicRTEMS
+ * @brief Classic Semaphores API
*
* This include file contains all the constants and structures associated
* with the Semaphore Manager. This manager utilizes standard Dijkstra
@@ -32,25 +30,6 @@
#ifndef _RTEMS_RTEMS_SEM_H
#define _RTEMS_RTEMS_SEM_H
-/**
- * @brief Instantiate Semaphore Data
- *
- * Semaphore Manager -- Data Instantiation
- *
- * This constant is defined to extern most of the time when using
- * this header file. However by defining it to nothing, the data
- * declared in this header file can be instantiated. This is done
- * in a single per manager file.
- *
- */
-#ifndef RTEMS_SEM_EXTERN
-#define RTEMS_SEM_EXTERN extern
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#include <rtems/rtems/types.h>
#include <rtems/rtems/options.h>
#include <rtems/rtems/support.h>
@@ -60,6 +39,10 @@ extern "C" {
#include <rtems/score/object.h>
#include <rtems/score/coresem.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* @defgroup ClassicSem Semaphores
*
@@ -109,19 +92,6 @@ typedef struct {
} Semaphore_Control;
/**
- * The following defines the information control block used to manage
- * this class of objects.
- */
-RTEMS_SEM_EXTERN Objects_Information _Semaphore_Information;
-
-/**
- * @brief Semaphore Manager Initialization
- *
- * This routine performs the initialization necessary for this manager.
- */
-void _Semaphore_Manager_initialization(void);
-
-/**
* @brief rtems_semaphore_create
*
* This routine implements the rtems_semaphore_create directive. The
@@ -238,46 +208,11 @@ rtems_status_code rtems_semaphore_flush(
rtems_id id
);
-/**
- * @brief Semaphore Translate Core Mutex Return Code
- *
- * This function returns a RTEMS status code based on the mutex
- * status code specified.
- *
- * @param[in] the_mutex_status is the mutex status code to translate
- *
- * @retval translated RTEMS status code
- */
-rtems_status_code _Semaphore_Translate_core_mutex_return_code (
- uint32_t the_mutex_status
-);
-
-/**
- * @brief Semaphore Translate Core Semaphore Return Code
- *
- * This function returns a RTEMS status code based on the semaphore
- * status code specified.
- *
- * @param[in] the_mutex_status is the semaphore status code to translate
- *
- * @retval translated RTEMS status code
- */
-rtems_status_code _Semaphore_Translate_core_semaphore_return_code (
- uint32_t the_mutex_status
-);
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/rtems/sem.inl>
-#endif
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/rtems/semmp.h>
-#endif
+/**@}*/
#ifdef __cplusplus
}
#endif
-/**@}*/
-
#endif
/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/semimpl.h b/cpukit/rtems/include/rtems/rtems/semimpl.h
new file mode 100644
index 0000000..e07dca6
--- /dev/null
+++ b/cpukit/rtems/include/rtems/rtems/semimpl.h
@@ -0,0 +1,154 @@
+/**
+ * @file
+ *
+ * @ingroup ClassicSem
+ *
+ * @brief Classic Semaphores 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_SEMIMPL_H
+#define _RTEMS_RTEMS_SEMIMPL_H
+
+#include <rtems/rtems/sem.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Instantiate Semaphore Data
+ *
+ * Semaphore Manager -- Data Instantiation
+ *
+ * This constant is defined to extern most of the time when using
+ * this header file. However by defining it to nothing, the data
+ * declared in this header file can be instantiated. This is done
+ * in a single per manager file.
+ *
+ */
+#ifndef RTEMS_SEM_EXTERN
+#define RTEMS_SEM_EXTERN extern
+#endif
+
+/**
+ * The following defines the information control block used to manage
+ * this class of objects.
+ */
+RTEMS_SEM_EXTERN Objects_Information _Semaphore_Information;
+
+/**
+ * @brief Semaphore Manager Initialization
+ *
+ * This routine performs the initialization necessary for this manager.
+ */
+void _Semaphore_Manager_initialization(void);
+
+/**
+ * @brief Semaphore Translate Core Mutex Return Code
+ *
+ * This function returns a RTEMS status code based on the mutex
+ * status code specified.
+ *
+ * @param[in] the_mutex_status is the mutex status code to translate
+ *
+ * @retval translated RTEMS status code
+ */
+rtems_status_code _Semaphore_Translate_core_mutex_return_code (
+ uint32_t the_mutex_status
+);
+
+/**
+ * @brief Semaphore Translate Core Semaphore Return Code
+ *
+ * This function returns a RTEMS status code based on the semaphore
+ * status code specified.
+ *
+ * @param[in] the_mutex_status is the semaphore status code to translate
+ *
+ * @retval translated RTEMS status code
+ */
+rtems_status_code _Semaphore_Translate_core_semaphore_return_code (
+ uint32_t the_mutex_status
+);
+
+/**
+ * @brief Allocates a semaphore control block from
+ * the inactive chain of free semaphore control blocks.
+ *
+ * This function allocates a semaphore control block from
+ * the inactive chain of free semaphore control blocks.
+ */
+RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void )
+{
+ return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information );
+}
+
+/**
+ * @brief Frees a semaphore control block to the
+ * inactive chain of free semaphore control blocks.
+ *
+ * This routine frees a semaphore control block to the
+ * inactive chain of free semaphore control blocks.
+ */
+RTEMS_INLINE_ROUTINE void _Semaphore_Free (
+ Semaphore_Control *the_semaphore
+)
+{
+ _Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
+}
+
+/**
+ * @brief Maps semaphore IDs to semaphore control blocks.
+ *
+ * This function maps semaphore IDs to semaphore control blocks.
+ * If ID corresponds to a local semaphore, then it returns
+ * the_semaphore control pointer which maps to ID and location
+ * is set to OBJECTS_LOCAL. if the semaphore ID is global and
+ * resides on a remote node, then location is set to OBJECTS_REMOTE,
+ * and the_semaphore is undefined. Otherwise, location is set
+ * to OBJECTS_ERROR and the_semaphore is undefined.
+ */
+RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get (
+ Objects_Id id,
+ Objects_Locations *location
+)
+{
+ return (Semaphore_Control *)
+ _Objects_Get( &_Semaphore_Information, id, location );
+}
+
+/**
+ * @brief Maps semaphore IDs to semaphore control blocks.
+ *
+ * This function maps semaphore IDs to semaphore control blocks.
+ * If ID corresponds to a local semaphore, then it returns
+ * the_semaphore control pointer which maps to ID and location
+ * is set to OBJECTS_LOCAL. if the semaphore ID is global and
+ * resides on a remote node, then location is set to OBJECTS_REMOTE,
+ * and the_semaphore is undefined. Otherwise, location is set
+ * to OBJECTS_ERROR and the_semaphore is undefined.
+ */
+RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get_interrupt_disable (
+ Objects_Id id,
+ Objects_Locations *location,
+ ISR_Level *level
+)
+{
+ return (Semaphore_Control *)
+ _Objects_Get_isr_disable( &_Semaphore_Information, id, location, level );
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/semmp.h b/cpukit/rtems/include/rtems/rtems/semmp.h
index d52176d..72414a5 100644
--- a/cpukit/rtems/include/rtems/rtems/semmp.h
+++ b/cpukit/rtems/include/rtems/rtems/semmp.h
@@ -21,17 +21,12 @@
#ifndef _RTEMS_RTEMS_SEMMP_H
#define _RTEMS_RTEMS_SEMMP_H
+#include <rtems/rtems/semimpl.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/sem.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-
/**
* @defgroup ClassicSEM Semaphore MP Support
*
diff --git a/cpukit/rtems/inline/rtems/rtems/sem.inl b/cpukit/rtems/inline/rtems/rtems/sem.inl
deleted file mode 100644
index d1cdbb2..0000000
--- a/cpukit/rtems/inline/rtems/rtems/sem.inl
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * @file rtems/rtems/sem.inl
- *
- * This file contains the static inlin implementation of the inlined
- * routines from the Semaphore Manager.
- */
-
-/* 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_SEM_H
-# error "Never use <rtems/rtems/sem.inl> directly; include <rtems/rtems/sem.h> instead."
-#endif
-
-#ifndef _RTEMS_RTEMS_SEM_INL
-#define _RTEMS_RTEMS_SEM_INL
-
-/**
- * @addtogroup ClassicSem
- * @{
- */
-
-/**
- * @brief Allocates a semaphore control block from
- * the inactive chain of free semaphore control blocks.
- *
- * This function allocates a semaphore control block from
- * the inactive chain of free semaphore control blocks.
- */
-RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void )
-{
- return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information );
-}
-
-/**
- * @brief Frees a semaphore control block to the
- * inactive chain of free semaphore control blocks.
- *
- * This routine frees a semaphore control block to the
- * inactive chain of free semaphore control blocks.
- */
-RTEMS_INLINE_ROUTINE void _Semaphore_Free (
- Semaphore_Control *the_semaphore
-)
-{
- _Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
-}
-
-/**
- * @brief Maps semaphore IDs to semaphore control blocks.
- *
- * This function maps semaphore IDs to semaphore control blocks.
- * If ID corresponds to a local semaphore, then it returns
- * the_semaphore control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. if the semaphore ID is global and
- * resides on a remote node, then location is set to OBJECTS_REMOTE,
- * and the_semaphore is undefined. Otherwise, location is set
- * to OBJECTS_ERROR and the_semaphore is undefined.
- */
-RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get (
- Objects_Id id,
- Objects_Locations *location
-)
-{
- return (Semaphore_Control *)
- _Objects_Get( &_Semaphore_Information, id, location );
-}
-
-/**
- * @brief Maps semaphore IDs to semaphore control blocks.
- *
- * This function maps semaphore IDs to semaphore control blocks.
- * If ID corresponds to a local semaphore, then it returns
- * the_semaphore control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. if the semaphore ID is global and
- * resides on a remote node, then location is set to OBJECTS_REMOTE,
- * and the_semaphore is undefined. Otherwise, location is set
- * to OBJECTS_ERROR and the_semaphore is undefined.
- */
-RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get_interrupt_disable (
- Objects_Id id,
- Objects_Locations *location,
- ISR_Level *level
-)
-{
- return (Semaphore_Control *)
- _Objects_Get_isr_disable( &_Semaphore_Information, id, location, level );
-}
-
-/**@}*/
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/preinstall.am b/cpukit/rtems/preinstall.am
index 128d78f..b1e8368 100644
--- a/cpukit/rtems/preinstall.am
+++ b/cpukit/rtems/preinstall.am
@@ -103,6 +103,10 @@ $(PROJECT_INCLUDE)/rtems/rtems/sem.h: include/rtems/rtems/sem.h $(PROJECT_INCLUD
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/sem.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/sem.h
+$(PROJECT_INCLUDE)/rtems/rtems/semimpl.h: include/rtems/rtems/semimpl.h $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/semimpl.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/semimpl.h
+
$(PROJECT_INCLUDE)/rtems/rtems/signal.h: include/rtems/rtems/signal.h $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/signal.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/signal.h
@@ -136,7 +140,6 @@ $(PROJECT_INCLUDE)/rtems/rtems/atomic.h: include/rtems/rtems/atomic.h $(PROJECT_
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/atomic.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/atomic.h
endif
-
$(PROJECT_INCLUDE)/rtems/rtems/mainpage.h: mainpage.h $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/mainpage.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/mainpage.h
@@ -222,10 +225,6 @@ $(PROJECT_INCLUDE)/rtems/rtems/region.inl: inline/rtems/rtems/region.inl $(PROJE
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/region.inl
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/region.inl
-$(PROJECT_INCLUDE)/rtems/rtems/sem.inl: inline/rtems/rtems/sem.inl $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/sem.inl
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/sem.inl
-
$(PROJECT_INCLUDE)/rtems/rtems/status.inl: inline/rtems/rtems/status.inl $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/status.inl
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/status.inl
diff --git a/cpukit/rtems/src/sem.c b/cpukit/rtems/src/sem.c
index 4e22dac..47188e2 100644
--- a/cpukit/rtems/src/sem.c
+++ b/cpukit/rtems/src/sem.c
@@ -26,7 +26,7 @@
#include <rtems/score/isr.h>
#include <rtems/score/object.h>
#include <rtems/rtems/options.h>
-#include <rtems/rtems/sem.h>
+#include <rtems/rtems/semimpl.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/coresem.h>
#include <rtems/score/states.h>
diff --git a/cpukit/rtems/src/semcreate.c b/cpukit/rtems/src/semcreate.c
index e7f7b77..60ce2cc 100644
--- a/cpukit/rtems/src/semcreate.c
+++ b/cpukit/rtems/src/semcreate.c
@@ -25,7 +25,7 @@
#include <rtems/score/isr.h>
#include <rtems/score/object.h>
#include <rtems/rtems/options.h>
-#include <rtems/rtems/sem.h>
+#include <rtems/rtems/semimpl.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/coresem.h>
#include <rtems/score/states.h>
diff --git a/cpukit/rtems/src/semdata.c b/cpukit/rtems/src/semdata.c
index d19f0cc..ca4fb17 100644
--- a/cpukit/rtems/src/semdata.c
+++ b/cpukit/rtems/src/semdata.c
@@ -21,5 +21,4 @@
/* instantiate semaphore data */
#define RTEMS_SEM_EXTERN
-#include <rtems/system.h>
-#include <rtems/rtems/sem.h>
+#include <rtems/rtems/semimpl.h>
diff --git a/cpukit/rtems/src/semdelete.c b/cpukit/rtems/src/semdelete.c
index 12eb37f..0705292 100644
--- a/cpukit/rtems/src/semdelete.c
+++ b/cpukit/rtems/src/semdelete.c
@@ -25,7 +25,7 @@
#include <rtems/score/isr.h>
#include <rtems/score/object.h>
#include <rtems/rtems/options.h>
-#include <rtems/rtems/sem.h>
+#include <rtems/rtems/semimpl.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/coresem.h>
#include <rtems/score/states.h>
diff --git a/cpukit/rtems/src/semflush.c b/cpukit/rtems/src/semflush.c
index bed91aa..0b5aaeb 100644
--- a/cpukit/rtems/src/semflush.c
+++ b/cpukit/rtems/src/semflush.c
@@ -25,7 +25,7 @@
#include <rtems/score/isr.h>
#include <rtems/score/object.h>
#include <rtems/rtems/options.h>
-#include <rtems/rtems/sem.h>
+#include <rtems/rtems/semimpl.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/coresem.h>
#include <rtems/score/states.h>
diff --git a/cpukit/rtems/src/semident.c b/cpukit/rtems/src/semident.c
index b770d69..df6f050 100644
--- a/cpukit/rtems/src/semident.c
+++ b/cpukit/rtems/src/semident.c
@@ -25,7 +25,7 @@
#include <rtems/score/isr.h>
#include <rtems/score/object.h>
#include <rtems/rtems/options.h>
-#include <rtems/rtems/sem.h>
+#include <rtems/rtems/semimpl.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/coresem.h>
#include <rtems/score/states.h>
diff --git a/cpukit/rtems/src/semmp.c b/cpukit/rtems/src/semmp.c
index 1712c66..8e1c26f 100644
--- a/cpukit/rtems/src/semmp.c
+++ b/cpukit/rtems/src/semmp.c
@@ -24,7 +24,7 @@
#include <rtems/score/mppkt.h>
#include <rtems/score/object.h>
#include <rtems/rtems/options.h>
-#include <rtems/rtems/sem.h>
+#include <rtems/rtems/semmp.h>
#include <rtems/score/thread.h>
#include <rtems/score/watchdog.h>
#include <rtems/rtems/support.h>
diff --git a/cpukit/rtems/src/semobtain.c b/cpukit/rtems/src/semobtain.c
index 5b68974..3891782 100644
--- a/cpukit/rtems/src/semobtain.c
+++ b/cpukit/rtems/src/semobtain.c
@@ -25,7 +25,7 @@
#include <rtems/score/isr.h>
#include <rtems/score/object.h>
#include <rtems/rtems/options.h>
-#include <rtems/rtems/sem.h>
+#include <rtems/rtems/semimpl.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/coresem.h>
#include <rtems/score/states.h>
diff --git a/cpukit/rtems/src/semrelease.c b/cpukit/rtems/src/semrelease.c
index a5da108..be3f7d0 100644
--- a/cpukit/rtems/src/semrelease.c
+++ b/cpukit/rtems/src/semrelease.c
@@ -40,7 +40,7 @@
#include <rtems/score/isr.h>
#include <rtems/score/object.h>
#include <rtems/rtems/options.h>
-#include <rtems/rtems/sem.h>
+#include <rtems/rtems/semimpl.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/coresem.h>
#include <rtems/score/states.h>
diff --git a/cpukit/rtems/src/semtranslatereturncode.c b/cpukit/rtems/src/semtranslatereturncode.c
index a06a848..531a904 100644
--- a/cpukit/rtems/src/semtranslatereturncode.c
+++ b/cpukit/rtems/src/semtranslatereturncode.c
@@ -25,7 +25,7 @@
#include <rtems/score/isr.h>
#include <rtems/score/object.h>
#include <rtems/rtems/options.h>
-#include <rtems/rtems/sem.h>
+#include <rtems/rtems/semimpl.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/coresem.h>
#include <rtems/score/states.h>
diff --git a/cpukit/sapi/include/rtems/sptables.h b/cpukit/sapi/include/rtems/sptables.h
index f32729c..3c26de4 100644
--- a/cpukit/sapi/include/rtems/sptables.h
+++ b/cpukit/sapi/include/rtems/sptables.h
@@ -43,7 +43,6 @@ extern "C" {
#include <rtems/rtems/part.h>
#include <rtems/rtems/ratemon.h>
#include <rtems/rtems/region.h>
-#include <rtems/rtems/sem.h>
#include <rtems/rtems/signal.h>
#include <rtems/rtems/timer.h>
diff --git a/cpukit/sapi/src/rtemsapi.c b/cpukit/sapi/src/rtemsapi.c
index d59daa1..f4370fe 100644
--- a/cpukit/sapi/src/rtemsapi.c
+++ b/cpukit/sapi/src/rtemsapi.c
@@ -38,7 +38,7 @@
#include <rtems/rtems/part.h>
#include <rtems/rtems/ratemon.h>
#include <rtems/rtems/region.h>
-#include <rtems/rtems/sem.h>
+#include <rtems/rtems/semimpl.h>
#include <rtems/rtems/signal.h>
#include <rtems/rtems/timer.h>
diff --git a/testsuites/sptests/spintrcritical01/init.c b/testsuites/sptests/spintrcritical01/init.c
index 7859a14..9e1bbaa 100644
--- a/testsuites/sptests/spintrcritical01/init.c
+++ b/testsuites/sptests/spintrcritical01/init.c
@@ -11,10 +11,11 @@
#include "config.h"
#endif
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__ 1
#include <tmacros.h>
#include <intrcritical.h>
+#include <rtems/rtems/semimpl.h>
+
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
rtems_timer_service_routine test_release_from_isr(rtems_id timer, void *arg);
diff --git a/testsuites/sptests/spintrcritical09/init.c b/testsuites/sptests/spintrcritical09/init.c
index a00aae0..a7f79b2 100644
--- a/testsuites/sptests/spintrcritical09/init.c
+++ b/testsuites/sptests/spintrcritical09/init.c
@@ -15,6 +15,8 @@
#include <tmacros.h>
#include <intrcritical.h>
+#include <rtems/rtems/semimpl.h>
+
static rtems_id Semaphore;
static bool case_hit;
diff --git a/testsuites/sptests/spintrcritical16/init.c b/testsuites/sptests/spintrcritical16/init.c
index 4d551ba..4a32de2 100644
--- a/testsuites/sptests/spintrcritical16/init.c
+++ b/testsuites/sptests/spintrcritical16/init.c
@@ -15,6 +15,8 @@
#include <tmacros.h>
#include <intrcritical.h>
+#include <rtems/rtems/semimpl.h>
+
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
rtems_timer_service_routine test_release_from_isr(rtems_id timer, void *arg);
diff --git a/testsuites/sptests/spsize/size.c b/testsuites/sptests/spsize/size.c
index 2a77927..3e5e52e 100644
--- a/testsuites/sptests/spsize/size.c
+++ b/testsuites/sptests/spsize/size.c
@@ -37,7 +37,7 @@
#include <rtems/score/priority.h>
#include <rtems/rtems/ratemon.h>
#include <rtems/rtems/region.h>
-#include <rtems/rtems/sem.h>
+#include <rtems/rtems/semimpl.h>
#include <rtems/rtems/signal.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/sysstate.h>
@@ -355,7 +355,7 @@ uninitialized =
/*scheduler.h*/ SCHEDULER_OVHD +
-/*sem.h*/ (sizeof _Semaphore_Information) +
+/*semimpl.h*/ (sizeof _Semaphore_Information) +
#if defined(RTEMS_MULTIPROCESSING)
/*semmp.h*/ 0 +
diff --git a/testsuites/tmtests/tm26/task1.c b/testsuites/tmtests/tm26/task1.c
index 5cf3e7a..2c8ddfc 100644
--- a/testsuites/tmtests/tm26/task1.c
+++ b/testsuites/tmtests/tm26/task1.c
@@ -20,6 +20,7 @@
#include <tmacros.h>
#include <timesys.h>
+#include <rtems/rtems/semimpl.h>
/* TEST DATA */
rtems_id Semaphore_id;
--
1.7.7
More information about the devel
mailing list