summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/macros/rtems/rtems/barrier.inl
blob: c51bb580c2dc69a5bbecbdff241626e6901ae0f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/**
 * @file rtems/rtems/barrier.inl
 */

/*
 *  This file contains the macro implementation of the inlined
 *  routines from the Barrier Manager.
 *
 *  COPYRIGHT (c) 1989-1999.
 *  On-Line Applications Research Corporation (OAR).
 *
 *  The license and distribution terms for this file may be
 *  found in the file LICENSE in this distribution or at
 *  http://www.rtems.com/license/LICENSE.
 *
 *  $Id$
 */

#ifndef _RTEMS_RTEMS_BARRIER_INL
#define _RTEMS_RTEMS_BARRIER_INL

/*
 *  _Barrier_Allocate
 */
#define _Barrier_Allocate() \
  (Barrier_Control *) _Objects_Allocate( &_Barrier_Information )

/*
 *  _Barrier_Free
 */
#define _Barrier_Free( _the_barrier ) \
  _Objects_Free( &_Barrier_Information, &(_the_barrier)->Object )

/*
 *  _Barrier_Get
 */

#define _Barrier_Get( _id, _location ) \
  (Barrier_Control *) \
  _Objects_Get( &_Barrier_Information, (_id), (_location) )

/*
 *  _Barrier_Is_null
 */
#define _Barrier_Is_null( _the_barrier ) \
  ( (_the_barrier) == NULL )

#endif
/*  end of include file */