RTEMS: cpukit/include/rtems/rtems/barrierimpl.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
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
21#include <rtems/rtems/barrierdata.h>
22#include <rtems/score/corebarrierimpl.h>
23#include <rtems/score/objectimpl.h>
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
43 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void )
44{
45 return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information );
46}
47
54 RTEMS_INLINE_ROUTINE void _Barrier_Free (
55 Barrier_Control *the_barrier
56)
57{
58 _CORE_barrier_Destroy( &the_barrier->Barrier );
59 _Objects_Free( &_Barrier_Information, &the_barrier->Object );
60}
61
62 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get(
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,
71 &_Barrier_Information
72 );
73}
74
77#ifdef __cplusplus
78}
79#endif
80
81#endif
82/* end of include file */
barrierdata.h
Classic Barrier Manager Data Structures.
corebarrierimpl.h
Inlined Routines Associated with the SuperCore Barrier.
_Barrier_Information
Objects_Information _Barrier_Information
The Classic Barrier objects information.
_Barrier_Allocate
RTEMS_INLINE_ROUTINE Barrier_Control * _Barrier_Allocate(void)
_Barrier_Allocate
Definition: barrierimpl.h:43
_Barrier_Free
RTEMS_INLINE_ROUTINE void _Barrier_Free(Barrier_Control *the_barrier)
_Barrier_Free
Definition: barrierimpl.h:54
_CORE_barrier_Destroy
RTEMS_INLINE_ROUTINE void _CORE_barrier_Destroy(CORE_barrier_Control *the_barrier)
Destroys the core barrier.
Definition: corebarrierimpl.h:67
RTEMS_INLINE_ROUTINE
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:66
_Objects_Free
RTEMS_INLINE_ROUTINE void _Objects_Free(Objects_Information *information, Objects_Control *the_object)
Frees an object.
Definition: objectimpl.h:930
_Objects_Allocate
Objects_Control * _Objects_Allocate(Objects_Information *information)
Allocates an object.
Definition: objectallocate.c:42
Objects_Id
uint32_t Objects_Id
Definition: object.h:80
_Objects_Get
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.
Definition: objectgetlocal.c:28
_Thread_queue_Context_initialize
RTEMS_INLINE_ROUTINE void _Thread_queue_Context_initialize(Thread_queue_Context *queue_context)
Initializes a thread queue context.
Definition: threadqimpl.h:152
objectimpl.h
Inlined Routines in the Object Handler.
Barrier_Control
Definition: barrierdata.h:38
Barrier_Control::Barrier
CORE_barrier_Control Barrier
Definition: barrierdata.h:42
Barrier_Control::Object
Objects_Control Object
Definition: barrierdata.h:40
Thread_queue_Context
Thread queue context for the thread queue methods.
Definition: threadq.h:198
Thread_queue_Context::Lock_context
Thread_queue_Lock_context Lock_context
The lock context for the thread queue acquire and release operations.
Definition: threadq.h:203
Thread_queue_Lock_context::Lock_context
ISR_lock_Context Lock_context
The lock context for the thread queue acquire and release operations.
Definition: threadq.h:130