From 8042961d87b10e0bf0b0f021e24dbb8eb1979841 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 25 Sep 2006 13:38:24 +0000 Subject: 2006-09-25 Joel Sherrill * 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. --- cpukit/rtems/macros/rtems/rtems/attr.inl | 9 ++++++ cpukit/rtems/macros/rtems/rtems/barrier.inl | 49 +++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 cpukit/rtems/macros/rtems/rtems/barrier.inl (limited to 'cpukit/rtems/macros') 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 @@ -109,6 +109,15 @@ #define _Attributes_Is_priority_ceiling( _attribute_set ) \ ( (_attribute_set) & RTEMS_PRIORITY_CEILING ) +/*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 */ -- cgit v1.2.3