RTEMS
barrierrelease.c
Go to the documentation of this file.
1 
9 /*
10  * COPYRIGHT (c) 1989-2007.
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 #ifdef HAVE_CONFIG_H
19 #include "config.h"
20 #endif
21 
23 
25  rtems_id id,
26  uint32_t *released
27 )
28 {
29  Barrier_Control *the_barrier;
30  Thread_queue_Context queue_context;
31 
32  if ( released == NULL ) {
33  return RTEMS_INVALID_ADDRESS;
34  }
35 
36  the_barrier = _Barrier_Get( id, &queue_context );
37 
38  if ( the_barrier == NULL ) {
39  return RTEMS_INVALID_ID;
40  }
41 
42  _CORE_barrier_Acquire_critical( &the_barrier->Barrier, &queue_context );
43  *released = _CORE_barrier_Surrender(
44  &the_barrier->Barrier,
45  &queue_context
46  );
47  return RTEMS_SUCCESSFUL;
48 }
static __inline__ uint32_t _CORE_barrier_Surrender(CORE_barrier_Control *the_barrier, Thread_queue_Context *queue_context)
Manually releases the barrier.
rtems_status_code rtems_barrier_release(rtems_id id, uint32_t *released)
%
Thread queue context for the thread queue methods.
Definition: threadq.h:198
This status code indicates successful completion.
Definition: status.h:86
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:82
static __inline__ void _CORE_barrier_Acquire_critical(CORE_barrier_Control *the_barrier, Thread_queue_Context *queue_context)
Acquires critical core barrier.
This status code indicates that a specified address was invalid.
Definition: status.h:133
This status code indicates that an object identifier was invalid.
Definition: status.h:106
Objects_Id rtems_id
Values of this type identify an RTEMS object.
Definition: types.h:99
CORE_barrier_Control Barrier
Definition: barrierdata.h:42
Classic Barrier Manager Implementation.