source: rtems/cpukit/include/rtems/score/isr.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: 4.4 KB
Line 
1/**
2 *  @file  rtems/score/isr.h
3 *
4 *  @brief Data Related to the Management of Processor Interrupt Levels
5 *
6 *  This include file contains all the constants and structures associated
7 *  with the management of processor interrupt levels.  This handler
8 *  supports interrupt critical sections, vectoring of user interrupt
9 *  handlers, nesting of interrupts, and manipulating interrupt levels.
10 */
11
12/*
13 *  COPYRIGHT (c) 1989-2012.
14 *  On-Line Applications Research Corporation (OAR).
15 *
16 *  The license and distribution terms for this file may be
17 *  found in the file LICENSE in this distribution or at
18 *  http://www.rtems.org/license/LICENSE.
19 */
20
21#ifndef _RTEMS_SCORE_ISR_H
22#define _RTEMS_SCORE_ISR_H
23
24#include <rtems/score/isrlevel.h>
25
26/**
27 *  @defgroup ScoreISR ISR Handler
28 *
29 *  @ingroup Score
30 *
31 *  This handler encapsulates functionality which provides the foundation
32 *  ISR services used in all of the APIs supported by RTEMS.
33 *
34 *  The ISR Nest level counter variable is maintained as part of the
35 *  per cpu data structure.
36 */
37/**@{*/
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43/**
44 *  The following type defines the type used to manage the vectors.
45 */
46typedef uint32_t   ISR_Vector_number;
47
48/**
49 *  Return type for ISR Handler
50 */
51typedef void ISR_Handler;
52
53#if (CPU_SIMPLE_VECTORED_INTERRUPTS == FALSE)
54
55typedef void * ISR_Handler_entry;
56
57#else
58/**
59 *  Pointer to an ISR Handler
60 */
61#if (CPU_ISR_PASSES_FRAME_POINTER == TRUE)
62typedef ISR_Handler ( *ISR_Handler_entry )(
63                 ISR_Vector_number,
64                 CPU_Interrupt_frame *
65             );
66#else
67typedef ISR_Handler ( *ISR_Handler_entry )(
68                 ISR_Vector_number
69             );
70#endif
71
72/**
73 *  The following declares the Vector Table.  Application
74 *  interrupt service routines are vectored by the ISR Handler via this table.
75 */
76extern ISR_Handler_entry _ISR_Vector_table[ CPU_INTERRUPT_NUMBER_OF_VECTORS ];
77#endif
78
79/**
80 *  @brief Initialize the ISR handler.
81 *
82 *  This routine performs the initialization necessary for the ISR handler.
83 */
84void _ISR_Handler_initialization ( void );
85
86/**
87 *  @brief Install interrupt handler vector.
88 *
89 *  This routine installs new_handler as the interrupt service routine
90 *  for the specified vector.  The previous interrupt service routine is
91 *  returned as old_handler.
92 *
93 *  LM32 Specific Information:
94 *  XXX document implementation including references if appropriate
95 *
96 *  @param[in] _vector is the vector number
97 *  @param[in] _new_handler is ISR handler to install
98 *  @param[in] _old_handler is a pointer to a variable which will be set
99 *             to the old handler
100 *
101 *  @retval *_old_handler will be set to the old ISR handler
102 */
103#define _ISR_Install_vector( _vector, _new_handler, _old_handler ) \
104  _CPU_ISR_install_vector( _vector, _new_handler, _old_handler )
105
106/**
107 *  @brief ISR interrupt dispatcher.
108 *
109 *  This routine is the interrupt dispatcher.  ALL interrupts
110 *  are vectored to this routine so that minimal context can be saved
111 *  and setup performed before the application's high-level language
112 *  interrupt service routine is invoked.   After the application's
113 *  interrupt service routine returns control to this routine, it
114 *  will determine if a thread dispatch is necessary.  If so, it will
115 *  ensure that the necessary thread scheduling operations are
116 *  performed when the outermost interrupt service routine exits.
117 *
118 *  @note  Typically implemented in assembly language.
119 */
120void _ISR_Handler( void );
121
122/**
123 *  @brief ISR wrapper for thread dispatcher.
124 *
125 *  This routine provides a wrapper so that the routine
126 *  @ref _Thread_Dispatch can be invoked when a reschedule is necessary
127 *  at the end of the outermost interrupt service routine.  This
128 *  wrapper is necessary to establish the processor context needed
129 *  by _Thread_Dispatch and to save the processor context which is
130 *  corrupted by _Thread_Dispatch.  This context typically consists
131 *  of registers which are not preserved across routine invocations.
132 *
133 *  @note  Typically mplemented in assembly language.
134 */
135void _ISR_Dispatch( void );
136
137/**
138 *  @brief Checks if an ISR in progress.
139 *
140 *  This function returns true if the processor is currently servicing
141 *  and interrupt and false otherwise.   A return value of true indicates
142 *  that the caller is an interrupt service routine, NOT a thread.
143 *
144 *  @retval This methods returns true when called from an ISR.
145 */
146bool _ISR_Is_in_progress( void );
147
148#ifdef __cplusplus
149}
150#endif
151
152/**@}*/
153
154#endif
155/* end of include file */
Note: See TracBrowser for help on using the repository browser.