RTEMS CPU Kit with SuperCore  4.11.3
barrierimpl.h
Go to the documentation of this file.
1 
13 /*
14  * COPYRIGHT (c) 1989-2008.
15  * On-Line Applications Research Corporation (OAR).
16  *
17  * The license and distribution terms for this file may be
18  * found in the file LICENSE in this distribution or at
19  * http://www.rtems.org/license/LICENSE.
20  */
21 
22 #ifndef _RTEMS_RTEMS_BARRIERIMPL_H
23 #define _RTEMS_RTEMS_BARRIERIMPL_H
24 
25 #include <rtems/rtems/barrier.h>
27 #include <rtems/score/objectimpl.h>
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
51 #ifndef RTEMS_BARRIER_EXTERN
52 #define RTEMS_BARRIER_EXTERN extern
53 #endif
54 
60 
67 
75 {
76  return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information );
77 }
78 
86  Barrier_Control *the_barrier
87 )
88 {
89  _CORE_barrier_Destroy( &the_barrier->Barrier );
90  _Objects_Free( &_Barrier_Information, &the_barrier->Object );
91 }
92 
105  Objects_Id id,
106  Objects_Locations *location
107 )
108 {
109  return (Barrier_Control *)
110  _Objects_Get( &_Barrier_Information, id, location );
111 }
112 
124  CORE_barrier_Status the_status
125 );
126 
129 #ifdef __cplusplus
130 }
131 #endif
132 
133 #endif
134 /* end of include file */
#define RTEMS_BARRIER_EXTERN
Instantiate Barrier Data.
Definition: barrierimpl.h:52
void _Objects_Free(Objects_Information *information, Objects_Control *the_object)
Frees an object.
Definition: objectfree.c:25
RTEMS_INLINE_ROUTINE Barrier_Control * _Barrier_Allocate(void)
_Barrier_Allocate
Definition: barrierimpl.h:74
Objects_Control Object
This is used to manage a barrier as an object.
Definition: barrier.h:57
Inlined Routines Associated with the SuperCore Barrier.
Objects_Control * _Objects_Allocate(Objects_Information *information)
Allocates an object.
Definition: objectallocate.c:101
#define RTEMS_INLINE_ROUTINE
The following (in conjunction with compiler arguments) are used to choose between the use of static i...
Definition: basedefs.h:135
Objects_Control * _Objects_Get(Objects_Information *information, Objects_Id id, Objects_Locations *location)
Maps object ids to object control blocks.
Definition: objectget.c:23
rtems_status_code
Classic API Status.
Definition: status.h:46
This type defines the control block used to manage each barrier.
Definition: barrier.h:55
RTEMS_BARRIER_EXTERN Objects_Information _Barrier_Information
The following defines the information control block used to manage this class of objects.
Definition: barrierimpl.h:59
The following defines the structure for the information used to manage each class of objects...
Definition: objectimpl.h:136
CORE_barrier_Status
Core Barrier handler return statuses.
Definition: corebarrierimpl.h:39
RTEMS_INLINE_ROUTINE Barrier_Control * _Barrier_Get(Objects_Id id, Objects_Locations *location)
_Barrier_Get
Definition: barrierimpl.h:104
CORE_barrier_Control Barrier
This is used to implement the barrier.
Definition: barrier.h:61
Objects_Locations
This enumerated type lists the locations which may be returned by _Objects_Get.
Definition: objectimpl.h:117
void _Barrier_Manager_initialization(void)
_Barrier_Manager_initialization
Definition: barrier.c:30
Inlined Routines in the Object Handler.
uint32_t Objects_Id
The following type defines the control block used to manage object IDs.
Definition: object.h:122
rtems_status_code _Barrier_Translate_core_barrier_return_code(CORE_barrier_Status the_status)
Translate SuperCore Barrier Status Code to RTEMS Status Code.
Definition: barriertranslatereturncode.c:33
RTEMS_INLINE_ROUTINE void _Barrier_Free(Barrier_Control *the_barrier)
_Barrier_Free
Definition: barrierimpl.h:85