summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/inline/rtems/rtems/barrier.inl
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-19 10:42:39 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-22 16:57:21 +0200
commit0b32bb8042c908bcf376f763de8ac0401dc17288 (patch)
treeb70741c56d1007f0bfb450c37e2d3fef127ec29c /cpukit/rtems/inline/rtems/rtems/barrier.inl
parentscore: Include <limits.h> in basedefs.h (diff)
downloadrtems-0b32bb8042c908bcf376f763de8ac0401dc17288.tar.bz2
rtems: Create barrier implementation header
Move implementation specific parts of barrier.h and barrier.inl into new header file barrierimpl.h. The barrier.h contains now only the application visible API.
Diffstat (limited to '')
-rw-r--r--cpukit/rtems/include/rtems/rtems/barrierimpl.h (renamed from cpukit/rtems/inline/rtems/rtems/barrier.inl)61
1 files changed, 55 insertions, 6 deletions
diff --git a/cpukit/rtems/inline/rtems/rtems/barrier.inl b/cpukit/rtems/include/rtems/rtems/barrierimpl.h
index 0d0ee4cf88..9c630fb2eb 100644
--- a/cpukit/rtems/inline/rtems/rtems/barrier.inl
+++ b/cpukit/rtems/include/rtems/rtems/barrierimpl.h
@@ -19,19 +19,51 @@
* http://www.rtems.com/license/LICENSE.
*/
-#ifndef _RTEMS_RTEMS_BARRIER_H
-# error "Never use <rtems/rtems/barrier.inl> directly; include <rtems/rtems/barrier.h> instead."
-#endif
+#ifndef _RTEMS_RTEMS_BARRIERIMPL_H
+#define _RTEMS_RTEMS_BARRIERIMPL_H
+
+#include <rtems/rtems/barrier.h>
-#ifndef _RTEMS_RTEMS_BARRIER_INL
-#define _RTEMS_RTEMS_BARRIER_INL
+#ifdef __cplusplus
+extern "C" {
+#endif
/**
- * @addtogroup ClassicBarrier
+ * @defgroup ClassicBarrierImpl Classic Barrier Implementation
+ *
+ * @ingroup ClassicBarrier
+ *
* @{
*/
/**
+ * @brief Instantiate Barrier Data
+ *
+ * Barrier Manager -- Instantiate Data
+ *
+ * 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_BARRIER_EXTERN
+#define RTEMS_BARRIER_EXTERN extern
+#endif
+
+/**
+ * The following defines the information control block used to manage
+ * this class of objects.
+ */
+RTEMS_BARRIER_EXTERN Objects_Information _Barrier_Information;
+
+/**
+ * @brief _Barrier_Manager_initialization
+ *
+ * This routine performs the initialization necessary for this manager.
+ */
+void _Barrier_Manager_initialization(void);
+
+/**
* @brief _Barrier_Allocate
*
* This function allocates a barrier control block from
@@ -86,8 +118,25 @@ RTEMS_INLINE_ROUTINE bool _Barrier_Is_null (
{
return ( the_barrier == NULL );
}
+/**
+ * @brief Translate SuperCore Barrier Status Code to RTEMS Status Code
+ *
+ * This function returns a RTEMS status code based on the barrier
+ * status code specified.
+ *
+ * @param[in] the_status is the SuperCore Barrier status to translate.
+ *
+ * @retval a status code indicating success or the reason for failure.
+ */
+rtems_status_code _Barrier_Translate_core_barrier_return_code (
+ CORE_barrier_Status the_status
+);
/**@}*/
+#ifdef __cplusplus
+}
+#endif
+
#endif
/* end of include file */