source: rtems/cpukit/include/rtems/rtems/partdata.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: 2.5 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup ClassicPartImpl
5 *
6 * @brief Classic Partition 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_PARTDATA_H
18#define _RTEMS_RTEMS_PARTDATA_H
19
20#include <rtems/rtems/part.h>
21#include <rtems/score/isrlock.h>
22#include <rtems/score/objectdata.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28/**
29 * @addtogroup ClassicPartImpl
30 *
31 * @{
32 */
33
34/**
35 *  The following defines the control block used to manage each partition.
36 */
37typedef struct {
38  /** This field is the object management portion of a Partition instance. */
39  Objects_Control     Object;
40  /** This field is the lock of the Partition. */
41  ISR_LOCK_MEMBER(    Lock )
42  /** This field is the physical starting address of the Partition. */
43  void               *starting_address;
44  /** This field is the size of the Partition in bytes. */
45  uintptr_t           length;
46  /** This field is the size of each buffer in bytes */
47  size_t              buffer_size;
48  /** This field is the attribute set provided at create time. */
49  rtems_attribute     attribute_set;
50  /** This field is the of allocated buffers. */
51  uintptr_t           number_of_used_blocks;
52  /** This field is the chain used to manage unallocated buffers. */
53  Chain_Control       Memory;
54}   Partition_Control;
55
56/**
57 * @brief The Classic Partition objects information.
58 */
59extern Objects_Information _Partition_Information;
60
61#if defined(RTEMS_MULTIPROCESSING)
62/**
63 *  @brief Partition_MP_Send_extract_proxy
64 *
65 *  This routine is invoked when a task is deleted and it
66 *  has a proxy which must be removed from a thread queue and
67 *  the remote node must be informed of this.
68 */
69void _Partition_MP_Send_extract_proxy (
70  Thread_Control *the_thread,
71  Objects_Id      id
72);
73#endif
74
75/**
76 * @brief Macro to define the objects information for the Classic Partition
77 * objects.
78 *
79 * This macro should only be used by <rtems/confdefs.h>.
80 *
81 * @param max The configured object maximum (the OBJECTS_UNLIMITED_OBJECTS flag
82 * may be set).
83 */
84#define PARTITION_INFORMATION_DEFINE( max ) \
85  OBJECTS_INFORMATION_DEFINE( \
86    _Partition, \
87    OBJECTS_CLASSIC_API, \
88    OBJECTS_RTEMS_PARTITIONS, \
89    Partition_Control, \
90    max, \
91    OBJECTS_NO_STRING_NAME, \
92    _Partition_MP_Send_extract_proxy \
93  )
94
95/** @} */
96
97#ifdef __cplusplus
98}
99#endif
100
101#endif
102/* end of include file */
Note: See TracBrowser for help on using the repository browser.