source: rtems/cpukit/include/rtems/rtems/eventimpl.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.1 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup ClassicEventImpl
5 *
6 * @brief Classic Event Implementation
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_EVENTIMPL_H
18#define _RTEMS_RTEMS_EVENTIMPL_H
19
20#include <rtems/rtems/event.h>
21#include <rtems/score/thread.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/**
28 * @defgroup ClassicEventImpl Classic Event Implementation
29 *
30 * @ingroup ClassicEvent
31 *
32 * @{
33 */
34
35/**
36 *  This constant is passed as the event_in to the
37 *  rtems_event_receive directive to determine which events are pending.
38 */
39#define EVENT_CURRENT  0
40
41/**
42 *  The following constant is the value of an event set which
43 *  has no events pending.
44 */
45#define EVENT_SETS_NONE_PENDING 0
46
47rtems_status_code _Event_Seize(
48  rtems_event_set    event_in,
49  rtems_option       option_set,
50  rtems_interval     ticks,
51  rtems_event_set   *event_out,
52  Thread_Control    *executing,
53  Event_Control     *event,
54  Thread_Wait_flags  wait_class,
55  States_Control     block_state,
56  ISR_lock_Context  *lock_context
57);
58
59rtems_status_code _Event_Surrender(
60  Thread_Control    *the_thread,
61  rtems_event_set    event_in,
62  Event_Control     *event,
63  Thread_Wait_flags  wait_class,
64  ISR_lock_Context  *lock_context
65);
66
67/**
68 *  @brief Timeout Event
69 */
70void _Event_Timeout(
71  Objects_Id  id,
72  void       *arg
73);
74
75RTEMS_INLINE_ROUTINE void _Event_Initialize( Event_Control *event )
76{
77  event->pending_events = EVENT_SETS_NONE_PENDING;
78}
79
80/**
81 *  @brief Checks if on events are posted in the event_set.
82 *
83 *  This function returns TRUE if on events are posted in the event_set,
84 *  and FALSE otherwise.
85 */
86RTEMS_INLINE_ROUTINE bool _Event_sets_Is_empty(
87  rtems_event_set the_event_set
88)
89{
90  return ( the_event_set == 0 );
91}
92
93/**
94 *  @brief Posts the given new_events into the event_set passed in.
95 *
96 *  This routine posts the given new_events into the event_set
97 *  passed in.  The result is returned to the user in event_set.
98 */
99RTEMS_INLINE_ROUTINE void _Event_sets_Post(
100  rtems_event_set  the_new_events,
101  rtems_event_set *the_event_set
102)
103{
104  *the_event_set |= the_new_events;
105}
106
107/**
108 *  @brief Returns the events in event_condition that are set in event_set.
109 *
110 *  This function returns the events in event_condition which are
111 *  set in event_set.
112 */
113RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get(
114  rtems_event_set the_event_set,
115  rtems_event_set the_event_condition
116)
117{
118   return ( the_event_set & the_event_condition );
119}
120
121/**
122 *  @brief Removes the events in mask from the event_set passed in.
123 *
124 *  This function removes the events in mask from the event_set
125 *  passed in.  The result is returned to the user in event_set.
126 */
127RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
128 rtems_event_set the_event_set,
129 rtems_event_set the_mask
130)
131{
132   return ( the_event_set & ~(the_mask) );
133}
134
135/**@}*/
136
137#ifdef __cplusplus
138}
139#endif
140
141#if defined(RTEMS_MULTIPROCESSING)
142#include <rtems/rtems/eventmp.h>
143#endif
144
145#endif
146/* end of include file */
Note: See TracBrowser for help on using the repository browser.