source: rtems/cpukit/include/rtems/rtems/barrierdata.h @ 21275b58

5
Last change on this file since 21275b58 was 21275b58, checked in by Sebastian Huber <sebastian.huber@…>, on 11/22/18 at 18:14:51

score: Static Objects_Information initialization

Statically allocate the objects information together with the initial
set of objects either via <rtems/confdefs.h>. Provide default object
informations with zero objects via librtemscpu.a. This greatly
simplifies the workspace size estimate. RTEMS applications which do not
use the unlimited objects option are easier to debug since all objects
reside now in statically allocated objects of the right types.

Close #3621.

  • Property mode set to 100644
File size: 1.6 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup ClassicBarrierImpl
5 *
6 * @brief Classic Barrier Manager Data Structures
7 */
8
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_BARRIERDATA_H
19#define _RTEMS_RTEMS_BARRIERDATA_H
20
21#include <rtems/rtems/barrier.h>
22#include <rtems/score/objectdata.h>
23#include <rtems/score/corebarrier.h>
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29/**
30 * @addtogroup XXX
31 *
32 * @{
33 */
34
35/**
36 *  This type defines the control block used to manage each barrier.
37 */
38typedef struct {
39  /** This is used to manage a barrier as an object. */
40  Objects_Control          Object;
41  /** This is used to implement the barrier. */
42  CORE_barrier_Control     Barrier;
43  /** This is used to specify the attributes of a barrier. */
44  rtems_attribute          attribute_set;
45}   Barrier_Control;
46
47/**
48 * @brief The Classic Barrier objects information.
49 */
50extern Objects_Information _Barrier_Information;
51
52/**
53 * @brief Macro to define the objects information for the Classic Barrier
54 * objects.
55 *
56 * This macro should only be used by <rtems/confdefs.h>.
57 *
58 * @param max The configured object maximum (the OBJECTS_UNLIMITED_OBJECTS flag
59 * may be set).
60 */
61#define BARRIER_INFORMATION_DEFINE( max ) \
62  OBJECTS_INFORMATION_DEFINE( \
63    _Barrier, \
64    OBJECTS_CLASSIC_API, \
65    OBJECTS_RTEMS_BARRIERS, \
66    Barrier_Control, \
67    max, \
68    OBJECTS_NO_STRING_NAME, \
69    NULL \
70  )
71
72/** @} */
73
74#ifdef __cplusplus
75}
76#endif
77
78#endif
79/*  end of include file */
Note: See TracBrowser for help on using the repository browser.