source: rtems/cpukit/include/rtems/score/mppkt.h @ 2afb22b

5
Last change on this file since 2afb22b 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: 3.6 KB
Line 
1/**
2 *  @file  rtems/score/mppkt.h
3 *
4 *  @brief Specification for the Packet Handler
5 *
6 *  This package is the specification for the Packet Handler.
7 *  This handler defines the basic packet and provides
8 *  mechanisms to utilize packets based on this prefix.
9 *  Packets are the fundamental basis for messages passed between
10 *  nodes in an MP system.
11 */
12
13/*
14 *  COPYRIGHT (c) 1989-2011.
15 *  On-Line Applications Research Corporation (OAR).
16 *
17 *  The license and distribution terms for this file may be
18 *  found in the file LICENSE in this distribution or at
19 *  http://www.rtems.org/license/LICENSE.
20 */
21
22#ifndef _RTEMS_SCORE_MPPKT_H
23#define _RTEMS_SCORE_MPPKT_H
24
25#include <rtems/score/object.h>
26#include <rtems/score/priority.h>
27#include <rtems/score/watchdog.h>
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33/**
34 *  @defgroup ScoreMPPacket MP Packet Handler
35 *
36 *  @ingroup Score
37 *
38 *  This handler encapsulates the primary definition of MPCI packets.  This
39 *  handler defines the part of the packet that is common to all remote
40 *  operations.
41 */
42/**@{*/
43
44/**
45 *  The following enumerated type defines the packet classes.
46 *
47 *  @note  In general, each class corresponds to a manager
48 *         which supports global operations.  Each manager
49 *         defines the set of supported operations.
50 */
51typedef enum {
52  MP_PACKET_MPCI_INTERNAL    = 0,
53  MP_PACKET_TASKS            = 1,
54  MP_PACKET_MESSAGE_QUEUE    = 2,
55  MP_PACKET_SEMAPHORE        = 3,
56  MP_PACKET_PARTITION        = 4,
57  MP_PACKET_REGION           = 5,
58  MP_PACKET_EVENT            = 6,
59  MP_PACKET_SIGNAL           = 7
60}   MP_packet_Classes;
61
62/**
63 *  This constant defines the first entry in the MP_packet_Classes enumeration.
64 */
65#define MP_PACKET_CLASSES_FIRST  MP_PACKET_MPCI_INTERNAL
66
67/**
68 *  This constant defines the last entry in the MP_packet_Classes enumeration.
69 */
70#define MP_PACKET_CLASSES_LAST   MP_PACKET_SIGNAL
71
72/**
73 *  The following record contains the prefix for every packet
74 *  passed between nodes in an MP system.
75 *
76 *  @note This structure is padded to ensure that anything following it
77 *        is on a 16 byte boundary.  This is the most stringent structure
78 *        alignment rule encountered yet.
79 */
80typedef struct {
81  /** This field indicates the API class of the operation being performed. */
82  MP_packet_Classes       the_class;
83  /** This field is the id of the object to be acted upon. */
84  Objects_Id              id;
85  /** This field is the ID of the originating thread. */
86  Objects_Id              source_tid;
87  /** This field is the priority of the originating thread. */
88  uint32_t                source_priority;
89  /** This field is where the status of the operation will be returned. */
90  uint32_t                return_code;
91  /** This field is the length of the data following the prefix. */
92  uint32_t                length;
93  /** This field is the length of the data which required network conversion. */
94  uint32_t                to_convert;
95  /** This field is the requested timeout for this operation. */
96  Watchdog_Interval       timeout;
97}   MP_packet_Prefix;
98
99/**
100 *  An MPCI must support packets of at least this size.
101 */
102#define MP_PACKET_MINIMUM_PACKET_SIZE  64
103
104/**
105 *  The following constant defines the number of uint32_t's
106 *  in a packet which must be converted to native format in a
107 *  heterogeneous system.  In packets longer than
108 *  MP_PACKET_MINIMUN_HETERO_CONVERSION uint32_t's, some of the "extra" data
109 *  may a user message buffer which is not automatically endian swapped.
110 */
111#define MP_PACKET_MINIMUN_HETERO_CONVERSION  \
112  ( sizeof( MP_packet_Prefix ) / sizeof( uint32_t   ) )
113
114/**@}*/
115
116#ifdef __cplusplus
117}
118#endif
119
120#endif
121/* end of include file */
Note: See TracBrowser for help on using the repository browser.