summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/macros/rtems/rtems
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2006-09-25 13:38:24 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2006-09-25 13:38:24 +0000
commit8042961d87b10e0bf0b0f021e24dbb8eb1979841 (patch)
tree975fa83004c5c30404880036836cdfae88e775ab /cpukit/rtems/macros/rtems/rtems
parentAdd name. (diff)
downloadrtems-8042961d87b10e0bf0b0f021e24dbb8eb1979841.tar.bz2
2006-09-25 Joel Sherrill <joel.sherrill@oarcorp.com>
* rtems/Makefile.am, rtems/preinstall.am, rtems/include/rtems.h, rtems/include/rtems/rtems/attr.h, rtems/include/rtems/rtems/config.h, rtems/inline/rtems/rtems/attr.inl, rtems/macros/rtems/rtems/attr.inl: Add Classic API Barriers. * rtems/include/rtems/rtems/barrier.h, rtems/include/rtems/rtems/barriermp.h, rtems/inline/rtems/rtems/barrier.inl, rtems/macros/rtems/rtems/barrier.inl, rtems/src/barrier.c, rtems/src/barriercreate.c, rtems/src/barrierdelete.c, rtems/src/barrierident.c, rtems/src/barrierrelease.c, rtems/src/barriertranslatereturncode.c, rtems/src/barrierwait.c: New files.
Diffstat (limited to 'cpukit/rtems/macros/rtems/rtems')
-rw-r--r--cpukit/rtems/macros/rtems/rtems/attr.inl9
-rw-r--r--cpukit/rtems/macros/rtems/rtems/barrier.inl49
2 files changed, 58 insertions, 0 deletions
diff --git a/cpukit/rtems/macros/rtems/rtems/attr.inl b/cpukit/rtems/macros/rtems/rtems/attr.inl
index 7f40bbdad3..fb6055325e 100644
--- a/cpukit/rtems/macros/rtems/rtems/attr.inl
+++ b/cpukit/rtems/macros/rtems/rtems/attr.inl
@@ -111,6 +111,15 @@
/*PAGE
*
+ * _Attributes_Is_barrier_automatic
+ *
+ */
+
+#define _Attributes_Is_barrier_automatic( _attribute_set ) \
+ ( (_attribute_set) & RTEMS_BARRIER_AUTOMATIC_RELEASE )
+
+/*PAGE
+ *
* _Attributes_Is_system_task
*
*/
diff --git a/cpukit/rtems/macros/rtems/rtems/barrier.inl b/cpukit/rtems/macros/rtems/rtems/barrier.inl
new file mode 100644
index 0000000000..c51bb580c2
--- /dev/null
+++ b/cpukit/rtems/macros/rtems/rtems/barrier.inl
@@ -0,0 +1,49 @@
+/**
+ * @file rtems/rtems/barrier.inl
+ */
+
+/*
+ * This file contains the macro implementation of the inlined
+ * routines from the Barrier Manager.
+ *
+ * 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.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#ifndef _RTEMS_RTEMS_BARRIER_INL
+#define _RTEMS_RTEMS_BARRIER_INL
+
+/*
+ * _Barrier_Allocate
+ */
+#define _Barrier_Allocate() \
+ (Barrier_Control *) _Objects_Allocate( &_Barrier_Information )
+
+/*
+ * _Barrier_Free
+ */
+#define _Barrier_Free( _the_barrier ) \
+ _Objects_Free( &_Barrier_Information, &(_the_barrier)->Object )
+
+/*
+ * _Barrier_Get
+ */
+
+#define _Barrier_Get( _id, _location ) \
+ (Barrier_Control *) \
+ _Objects_Get( &_Barrier_Information, (_id), (_location) )
+
+/*
+ * _Barrier_Is_null
+ */
+#define _Barrier_Is_null( _the_barrier ) \
+ ( (_the_barrier) == NULL )
+
+#endif
+/* end of include file */