source: rtems/cpukit/include/rtems/score/objectmp.h @ 21275b58

5
Last change on this file since 21275b58 was 2afb22b, checked in by Chris Johns <chrisj@…>, on 12/23/17 at 07:18:56

Remove make preinstall

A speciality of the RTEMS build system was the make preinstall step. It
copied header files from arbitrary locations into the build tree. The
header files were included via the -Bsome/build/tree/path GCC command
line option.

This has at least seven problems:

  • The make preinstall step itself needs time and disk space.
  • Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error.
  • There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult.
  • The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit.
  • An introduction of a new build system is difficult.
  • Include paths specified by the -B option are system headers. This may suppress warnings.
  • The parallel build had sporadic failures on some hosts.

This patch removes the make preinstall step. All installed header
files are moved to dedicated include directories in the source tree.
Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc,
etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g.
erc32, imx, qoriq, etc.

The new cpukit include directories are:

  • cpukit/include
  • cpukit/score/cpu/@RTEMS_CPU@/include
  • cpukit/libnetworking

The new BSP include directories are:

  • bsps/include
  • bsps/@RTEMS_CPU@/include
  • bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include

There are build tree include directories for generated files.

The include directory order favours the most general header file, e.g.
it is not possible to override general header files via the include path
order.

The "bootstrap -p" option was removed. The new "bootstrap -H" option
should be used to regenerate the "headers.am" files.

Update #3254.

  • Property mode set to 100644
File size: 5.8 KB
Line 
1/**
2 *  @file  rtems/score/objectmp.h
3 *
4 *  @brief Data Associated with the Manipulation of Global RTEMS Objects
5 *
6 *  This include file contains all the constants and structures associated
7 *  with the manipulation of Global RTEMS Objects.
8 */
9
10/*
11 *  COPYRIGHT (c) 1989-2009.
12 *  On-Line Applications Research Corporation (OAR).
13 *
14 *  The license and distribution terms for this file may be
15 *  found in the file LICENSE in this distribution or at
16 *  http://www.rtems.org/license/LICENSE.
17 */
18
19#ifndef _RTEMS_SCORE_OBJECTMP_H
20#define _RTEMS_SCORE_OBJECTMP_H
21
22#ifndef _RTEMS_SCORE_OBJECTIMPL_H
23# error "Never use <rtems/rtems/objectmp.h> directly; include <rtems/rtems/objectimpl.h> instead."
24#endif
25
26#include <rtems/score/chainimpl.h>
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32/**
33 *  @defgroup ScoreObjectMP Object Handler Multiprocessing Support
34 *
35 *  @ingroup Score
36 *
37 *  This handler encapsulates functionality which is used to manage
38 *  objects which have been declared to be globally visible.  This handler
39 *  knows objects from all of the nodes in the system.
40 */
41/**@{*/
42
43/**
44 *  @brief Intializes the inactive global object chain
45 *  based on the maximum number of global objects configured.
46 *
47 *  This routine intializes the inactive global object chain
48 *  based on the maximum number of global objects configured.
49 */
50void _Objects_MP_Handler_initialization(void);
51
52/**
53 *  @brief Intializes the global object node number
54 *  used in the ID field of all objects.
55 *
56 *  This routine intializes the global object node number
57 *  used in the ID field of all objects.
58 */
59void _Objects_MP_Handler_early_initialization(void);
60
61/**
62 *  @brief Place the specified global object in the
63 *  specified information table.
64 *
65 *  This routine place the specified global object in the
66 *  specified information table.
67 *
68 *  @param[in] information points to the object information table for this
69 *             object class.
70 *  @param[in] the_global_object points to the object being opened.
71 *  @param[in] the_name is the name of the object being opened.
72 *  @param[in] the_id is the Id of the object being opened.
73 *
74 *  @todo This method only works for object types with 4 byte object names.
75 *        It does not support variable length object names.
76 */
77void _Objects_MP_Open (
78  Objects_Information *information,
79  Objects_MP_Control  *the_global_object,
80  uint32_t             the_name,
81  Objects_Id           the_id
82);
83
84/**
85 *  @brief  Allocates a global object control block
86 *  and places it in the specified information table.
87 *
88 *  This routine allocates a global object control block
89 *  and places it in the specified information table.  If the
90 *  allocation fails, then is_fatal_error determines the
91 *  error processing actions taken.
92 *
93 *  @param[in] information points to the object information table for this
94 *             object class.
95 *  @param[in] the_name is the name of the object being opened.
96 *  @param[in] the_id is the Id of the object being opened.
97 *  @param[in] is_fatal_error is true if not being able to allocate the
98 *             object is considered a fatal error.
99 *
100 *  @todo This method only works for object types with 4 byte object names.
101 *        It does not support variable length object names.
102 */
103bool _Objects_MP_Allocate_and_open (
104  Objects_Information *information,
105  uint32_t             the_name,
106  Objects_Id           the_id,
107  bool                 is_fatal_error
108);
109
110/**
111 *  @brief Removes a global object from the specified information table.
112 *
113 *  This routine removes a global object from the specified
114 *  information table and deallocates the global object control block.
115 */
116void _Objects_MP_Close (
117  Objects_Information *information,
118  Objects_Id           the_id
119);
120
121/**
122 *  @brief Look for the object with the_name in the global
123 *  object tables indicated by information.
124 *
125 *  This routine looks for the object with the_name in the global
126 *  object tables indicated by information.  It returns the ID of the
127 *  object with that name if one is found.
128 *
129 *  @param[in] information points to the object information table for this
130 *             object class.
131 *  @param[in] the_name is the name of the object being searched for.
132 *  @param[in] nodes_to_search indicates the set of nodes to search.
133 *  @param[in] the_id will contain the Id of the object if found.
134 *
135 *  @retval This method returns one of the
136 *          @ref Objects_Name_or_id_lookup_errors.  If successful, @a the_id
137 *          will contain the Id of the object.
138 */
139Objects_Name_or_id_lookup_errors _Objects_MP_Global_name_search (
140  Objects_Information *information,
141  Objects_Name         the_name,
142  uint32_t             nodes_to_search,
143  Objects_Id          *the_id
144);
145
146/**
147 * @brief Returns true, if the object identifier is in the global object
148 * identifier cache of the specified object information, otherwise false.
149 *
150 * @param id The object identifier.
151 * @param information The object information.
152 *
153 * @retval true A remote objects with this object identifier exits in the
154 * global object identifier cache of the specified information.
155 * @retval false Otherwise.
156 */
157bool _Objects_MP_Is_remote(
158  Objects_Id                 id,
159  const Objects_Information *information
160);
161
162/**
163 *  This is the maximum number of global objects configured.
164 */
165extern uint32_t _Objects_MP_Maximum_global_objects;
166
167/**
168 * This function allocates a Global Object control block.
169 */
170
171Objects_MP_Control *_Objects_MP_Allocate_global_object( void );
172
173/**
174 * This routine deallocates a Global Object control block.
175 */
176
177void _Objects_MP_Free_global_object( Objects_MP_Control *the_object );
178
179/**
180 * This function returns whether the global object is NULL or not.
181 */
182
183RTEMS_INLINE_ROUTINE bool _Objects_MP_Is_null_global_object (
184  Objects_MP_Control *the_object
185)
186{
187  return( the_object == NULL );
188}
189
190/**@}*/
191
192#ifdef __cplusplus
193}
194#endif
195
196#endif
197/* end of include file */
Note: See TracBrowser for help on using the repository browser.