source: rtems/cpukit/include/rtems/score/isr.h @ 5803f37

5
Last change on this file since 5803f37 was 24787d08, checked in by Andreas Dachsberger <andreas.dachsberger@…>, on 04/09/19 at 09:30:21

doxygen: score: adjust doc in isr.h to doxygen guidelines

Update #3706.

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