RTEMS CPU Kit with SuperCore  4.11.3
barrierimpl.h
Go to the documentation of this file.
1 
10 /*
11  * COPYRIGHT (c) 1989-2011.
12  * On-Line Applications Research Corporation (OAR).
13  *
14  * The license and distribution terms for this file may be
15  * found in the file LICENSE in this distribution or at
16  * http://www.rtems.org/license/LICENSE.
17  */
18 
19 #ifndef _RTEMS_POSIX_BARRIERIMPL_H
20 #define _RTEMS_POSIX_BARRIERIMPL_H
21 
22 #include <rtems/posix/barrier.h>
24 #include <rtems/score/objectimpl.h>
25 
26 #include <pthread.h>
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
38 
46 
58  CORE_barrier_Status the_barrier_status
59 );
60 
68 {
69  return (POSIX_Barrier_Control *)
70  _Objects_Allocate( &_POSIX_Barrier_Information );
71 }
72 
80  POSIX_Barrier_Control *the_barrier
81 )
82 {
83  _CORE_barrier_Destroy( &the_barrier->Barrier );
84  _Objects_Free( &_POSIX_Barrier_Information, &the_barrier->Object );
85 }
86 
99  pthread_barrier_t *barrier,
100  Objects_Locations *location
101 )
102 {
104  &_POSIX_Barrier_Information,
105  (Objects_Id) *barrier,
106  location
107  );
108 }
109 
110 #ifdef __cplusplus
111 }
112 #endif
113 
114 #endif
115 /* end of include file */
void _Objects_Free(Objects_Information *information, Objects_Control *the_object)
Frees an object.
Definition: objectfree.c:25
CORE_barrier_Control Barrier
This is used to implement the barrier.
Definition: barrier.h:54
Inlined Routines Associated with the SuperCore Barrier.
Objects_Control * _Objects_Allocate(Objects_Information *information)
Allocates an object.
Definition: objectallocate.c:101
POSIX_EXTERN Objects_Information _POSIX_Barrier_Information
The following defines the information control block used to manage this class of objects.
Definition: barrierimpl.h:37
#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
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control * _POSIX_Barrier_Allocate(void)
Allocate a barrier control block.
Definition: barrierimpl.h:67
Objects_Control Object
This is used to manage a barrier as an object.
Definition: barrier.h:52
POSIX Threads Private Support.
int _POSIX_Barrier_Translate_core_barrier_return_code(CORE_barrier_Status the_barrier_status)
POSIX translate barrier return code.
Definition: pbarriertranslatereturncode.c:49
RTEMS_INLINE_ROUTINE void _POSIX_Barrier_Free(POSIX_Barrier_Control *the_barrier)
Free a barrier control block.
Definition: barrierimpl.h:79
void _POSIX_Barrier_Manager_initialization(void)
POSIX barrier manager initialization.
Definition: pbarrier.c:29
Objects_Control * _Objects_Get(Objects_Information *information, Objects_Id id, Objects_Locations *location)
Maps object ids to object control blocks.
Definition: objectget.c:23
This type defines the control block used to manage each barrier.
Definition: barrier.h:50
Constants and Structures Associated with the POSIX Barrier Manager.
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 POSIX_Barrier_Control * _POSIX_Barrier_Get(pthread_barrier_t *barrier, Objects_Locations *location)
Get a barrier control block.
Definition: barrierimpl.h:98
Objects_Locations
This enumerated type lists the locations which may be returned by _Objects_Get.
Definition: objectimpl.h:117
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
#define POSIX_EXTERN
The following ensures that all data is declared in the space of the initialization routine for either...
Definition: basedefs.h:123