source: rtems/cpukit/include/rtems/rtems/dpmemdata.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.9 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup ClassicDPMEMImpl
5 *
6 * @brief Classic Dual Ported Memory Manager Data Structures
7 */
8
9/* COPYRIGHT (c) 1989-2008.
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_DPMEMDATA_H
18#define _RTEMS_RTEMS_DPMEMDATA_H
19
20#include <rtems/rtems/dpmem.h>
21#include <rtems/score/objectdata.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/**
28 * @addtogroup ClassicDPMEMImpl
29 *
30 * @{
31 */
32
33/**
34 *  The following structure defines the port control block.  Each port
35 *  has a control block associated with it.  This control block contains
36 *  all information required to support the port related operations.
37 */
38typedef struct {
39  /** This field is the object management portion of a Port instance. */
40  Objects_Control  Object;
41  /** This field is the base internal address of the port. */
42  void            *internal_base;
43  /** This field is the base external address of the port. */
44  void            *external_base;
45  /** This field is the length of dual-ported area of the port. */
46  uint32_t         length;
47}   Dual_ported_memory_Control;
48
49/**
50 * @brief The Classic Dual Ported Memory objects information.
51 */
52extern Objects_Information _Dual_ported_memory_Information;
53
54/**
55 * @brief Macro to define the objects information for the Classic Dual Ported
56 * Memory 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 DUAL_PORTED_MEMORY_INFORMATION_DEFINE( max ) \
64  OBJECTS_INFORMATION_DEFINE( \
65    _Dual_ported_memory, \
66    OBJECTS_CLASSIC_API, \
67    OBJECTS_RTEMS_PORTS, \
68    Dual_ported_memory_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.