RTEMS CPU Kit with SuperCore  4.11.3
intr.h
Go to the documentation of this file.
1 
13 /* COPYRIGHT (c) 1989-2013.
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_RTEMS_INTR_H
22 #define _RTEMS_RTEMS_INTR_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 #include <rtems/rtems/status.h>
29 #include <rtems/score/isr.h>
30 #include <rtems/score/isrlock.h>
31 
46 
51 
56 
57 #if (CPU_SIMPLE_VECTORED_INTERRUPTS == FALSE)
58 
59 typedef ISR_Handler_entry rtems_isr_entry;
60 
61 #else
62 
67 typedef rtems_isr ( *rtems_isr_entry )(
69  );
70 
85 rtems_status_code rtems_interrupt_catch(
86  rtems_isr_entry new_isr_handler,
87  rtems_vector_number vector,
88  rtems_isr_entry *old_isr_handler
89 );
90 #endif
91 
92 #if !defined(RTEMS_SMP)
93 
102 #define rtems_interrupt_disable( _isr_cookie ) \
103  _ISR_Disable(_isr_cookie)
104 
113 #define rtems_interrupt_enable( _isr_cookie ) \
114  _ISR_Enable(_isr_cookie)
115 
125 #define rtems_interrupt_flash( _isr_cookie ) \
126  _ISR_Flash(_isr_cookie)
127 
128 #endif /* RTEMS_SMP */
129 
141 #define rtems_interrupt_local_disable( _isr_cookie ) \
142  _ISR_Disable_without_giant( _isr_cookie )
143 
151 #define rtems_interrupt_local_enable( _isr_cookie ) \
152  _ISR_Enable_without_giant( _isr_cookie )
153 
161 #define rtems_interrupt_is_in_progress() \
162  _ISR_Is_in_progress()
163 
169 #define rtems_interrupt_cause( _interrupt_to_cause )
170 
176 #define rtems_interrupt_clear( _interrupt_to_clear )
177 
199 
204 
212 #define RTEMS_INTERRUPT_LOCK_MEMBER( _designator ) \
213  ISR_LOCK_MEMBER( _designator )
214 
223 #define RTEMS_INTERRUPT_LOCK_DECLARE( _qualifier, _designator ) \
224  ISR_LOCK_DECLARE( _qualifier, _designator )
225 
236 #define RTEMS_INTERRUPT_LOCK_DEFINE( _qualifier, _designator, _name ) \
237  ISR_LOCK_DEFINE( _qualifier, _designator, _name )
238 
247 #define RTEMS_INTERRUPT_LOCK_REFERENCE( _designator, _target ) \
248  ISR_LOCK_REFERENCE( _designator, _target )
249 
256 #define RTEMS_INTERRUPT_LOCK_INITIALIZER( _name ) ISR_LOCK_INITIALIZER( _name )
257 
268 #define rtems_interrupt_lock_initialize( _lock, _name ) \
269  _ISR_lock_Initialize( _lock, _name )
270 
278 #define rtems_interrupt_lock_destroy( _lock ) \
279  _ISR_lock_Destroy( _lock )
280 
295 #define rtems_interrupt_lock_acquire( _lock, _lock_context ) \
296  _ISR_lock_ISR_disable_and_acquire( _lock, _lock_context )
297 
312 #define rtems_interrupt_lock_release( _lock, _lock_context ) \
313  _ISR_lock_Release_and_ISR_enable( _lock, _lock_context )
314 
332 #define rtems_interrupt_lock_acquire_isr( _lock, _lock_context ) \
333  _ISR_lock_Acquire( _lock, _lock_context )
334 
348 #define rtems_interrupt_lock_release_isr( _lock, _lock_context ) \
349  _ISR_lock_Release( _lock, _lock_context )
350 
353 #ifdef __cplusplus
354 }
355 #endif
356 
359 #endif
360 /* end of include file */
uint32_t ISR_Vector_number
The following type defines the type used to manage the vectors.
Definition: isr.h:46
Data Related to the Management of Processor Interrupt Levels.
ISR_Vector_number rtems_vector_number
Control block type used to manage the vectors.
Definition: intr.h:50
ISR lock control.
Definition: isrlock.h:56
ISR_lock_Context rtems_interrupt_lock_context
Local interrupt lock context for acquire and release pairs.
Definition: intr.h:203
ISR_Handler rtems_isr
Return type for interrupt handler.
Definition: intr.h:55
rtems_status_code
Classic API Status.
Definition: status.h:46
uint32_t ISR_Level
The following type defines the control block used to manage the interrupt level portion of the status...
Definition: isrlevel.h:42
ISR_Level rtems_interrupt_level
Interrupt level type.
Definition: intr.h:45
void ISR_Handler
Return type for ISR Handler.
Definition: isr.h:51
Local ISR lock context for acquire and release pairs.
Definition: isrlock.h:65
ISR Locks.
ISR_lock_Control rtems_interrupt_lock
Interrupt lock control.
Definition: intr.h:198