RTEMS
barrierimpl.h
Go to the documentation of this file.
1 
9 /*
10  * COPYRIGHT (c) 1989-2008.
11  * On-Line Applications Research Corporation (OAR).
12  *
13  * The license and distribution terms for this file may be
14  * found in the file LICENSE in this distribution or at
15  * http://www.rtems.org/license/LICENSE.
16  */
17 
18 #ifndef _RTEMS_RTEMS_BARRIERIMPL_H
19 #define _RTEMS_RTEMS_BARRIERIMPL_H
20 
23 #include <rtems/score/objectimpl.h>
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
44 {
46 }
47 
55  Barrier_Control *the_barrier
56 )
57 {
58  _CORE_barrier_Destroy( &the_barrier->Barrier );
59  _Objects_Free( &_Barrier_Information, &the_barrier->Object );
60 }
61 
63  Objects_Id id,
64  Thread_queue_Context *queue_context
65 )
66 {
67  _Thread_queue_Context_initialize( queue_context );
68  return (Barrier_Control *) _Objects_Get(
69  id,
70  &queue_context->Lock_context.Lock_context,
72  );
73 }
74 
77 #ifdef __cplusplus
78 }
79 #endif
80 
81 #endif
82 /* end of include file */
static __inline__ void _CORE_barrier_Destroy(CORE_barrier_Control *the_barrier)
Destroys the core barrier.
Objects_Control Object
Definition: barrierdata.h:40
Thread queue context for the thread queue methods.
Definition: threadq.h:198
Inlined Routines Associated with the SuperCore Barrier.
Objects_Information _Barrier_Information
The Classic Barrier objects information.
Definition: barrier.c:47
static __inline__ void _Thread_queue_Context_initialize(Thread_queue_Context *queue_context)
Initializes a thread queue context.
Definition: threadqimpl.h:152
Objects_Control * _Objects_Allocate(Objects_Information *information)
Allocates an object.
static __inline__ void _Barrier_Free(Barrier_Control *the_barrier)
_Barrier_Free
Definition: barrierimpl.h:54
Inlined Routines in the Object Handler.
Thread_queue_Lock_context Lock_context
The lock context for the thread queue acquire and release operations.
Definition: threadq.h:203
static __inline__ Barrier_Control * _Barrier_Allocate(void)
_Barrier_Allocate
Definition: barrierimpl.h:43
CORE_barrier_Control Barrier
Definition: barrierdata.h:42
Classic Barrier Manager Data Structures.
uint32_t Objects_Id
Definition: object.h:80
Objects_Control * _Objects_Get(Objects_Id id, ISR_lock_Context *lock_context, const Objects_Information *information)
Maps the specified object identifier to the associated local object control block.
ISR_lock_Context Lock_context
The lock context for the thread queue acquire and release operations.
Definition: threadq.h:130
#define RTEMS_INLINE_ROUTINE
Gives a hint to the compiler in a function declaration to inline this function.
Definition: basedefs.h:683
static __inline__ void _Objects_Free(Objects_Information *information, Objects_Control *the_object)
Frees an object.
Definition: objectimpl.h:933