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

Last change on this file since 21275b58 was 21275b58, checked in by Sebastian Huber <sebastian.huber@…>, on Nov 22, 2018 at 6:14:51 PM

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.7 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup ClassicRegionImpl
5 *
6 * @brief Classic Region Manager Data Structures
7 */
8
9/* COPYRIGHT (c) 1989-2013.
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#ifndef _RTEMS_RTEMS_REGIONDATA_H
18#define _RTEMS_RTEMS_REGIONDATA_H
19
20#include <rtems/rtems/region.h>
21#include <rtems/score/heap.h>
22#include <rtems/score/objectdata.h>
23#include <rtems/score/threadq.h>
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29/**
30 * @addtogroup ClassicRegionImpl
31 *
32 * @{
33 */
34
35/**
36 *  The following records define the control block used to manage
37 *  each region.
38 */
39
40typedef struct {
41  Objects_Control       Object;
42  Thread_queue_Control  Wait_queue;            /* waiting threads        */
43  const Thread_queue_Operations *wait_operations;
44  uintptr_t             maximum_segment_size;  /* in bytes               */
45  rtems_attribute       attribute_set;
46  Heap_Control          Memory;
47}  Region_Control;
48
49/**
50 * @brief The Classic Region objects information.
51 */
52extern Objects_Information _Region_Information;
53
54/**
55 * @brief Macro to define the objects information for the Classic Region
56 * objects.
57 *
58 * This macro should only be used by <rtems/confdefs.h>.
59 *
60 * @param max The configured object maximum (the OBJECTS_UNLIMITED_OBJECTS flag
61 * may be set).
62 */
63#define REGION_INFORMATION_DEFINE( max ) \
64  OBJECTS_INFORMATION_DEFINE( \
65    _Region, \
66    OBJECTS_CLASSIC_API, \
67    OBJECTS_RTEMS_REGIONS, \
68    Region_Control, \
69    max, \
70    OBJECTS_NO_STRING_NAME, \
71    NULL \
72  )
73
74/** @} */
75
76#ifdef __cplusplus
77}
78#endif
79
80#endif
81/* end of include file */
Note: See TracBrowser for help on using the repository browser.