source: rtems/cpukit/rtems/src/barrierrelease.c @ 66cb142

Last change on this file since 66cb142 was 631b3c8, checked in by Sebastian Huber <sebastian.huber@…>, on May 23, 2016 at 9:40:18 AM

score: Move thread queue MP callout to context

Drop the multiprocessing (MP) dependent callout parameter from the
thread queue extract, dequeue, flush and unblock methods. Merge this
parameter with the lock context into new structure Thread_queue_Context.
This helps to gets rid of the conditionally compiled method call
helpers.

  • Property mode set to 100644
File size: 979 bytes
Line 
1/**
2 * @file
3 *
4 * @brief RTEMS Barrier Release
5 * @ingroup ClassicBarrier Barriers
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-2007.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.org/license/LICENSE.
15 */
16
17#if HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21#include <rtems/rtems/barrierimpl.h>
22
23rtems_status_code rtems_barrier_release(
24  rtems_id          id,
25  uint32_t         *released
26)
27{
28  Barrier_Control      *the_barrier;
29  Thread_queue_Context  queue_context;
30
31  if ( released == NULL ) {
32    return RTEMS_INVALID_ADDRESS;
33  }
34
35  the_barrier = _Barrier_Get( id, &queue_context );
36
37  if ( the_barrier == NULL ) {
38    return RTEMS_INVALID_ID;
39  }
40
41  _CORE_barrier_Acquire_critical( &the_barrier->Barrier, &queue_context );
42  *released = _CORE_barrier_Surrender(
43    &the_barrier->Barrier,
44    &queue_context
45  );
46  return RTEMS_SUCCESSFUL;
47}
Note: See TracBrowser for help on using the repository browser.