RTEMS
5.1
cpukit
include
rtems
rtems
intr.h
Go to the documentation of this file.
1
10
/* COPYRIGHT (c) 1989-2013.
11
* On-Line Applications Research Corporation (OAR).
12
*
13
* The license and distribution terms for this file may be
14
* found in the file LICENSE in this distribution or at
15
* http://www.rtems.org/license/LICENSE.
16
*/
17
18
#ifndef _RTEMS_RTEMS_INTR_H
19
#define _RTEMS_RTEMS_INTR_H
20
21
#include <
rtems/rtems/status.h
>
22
#include <
rtems/score/isr.h
>
23
#include <
rtems/score/isrlock.h
>
24
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
28
42
typedef
ISR_Level
rtems_interrupt_level
;
43
47
typedef
ISR_Vector_number
rtems_vector_number
;
48
52
typedef
ISR_Handler
rtems_isr
;
53
54
#if (CPU_SIMPLE_VECTORED_INTERRUPTS == FALSE)
55
56
typedef
ISR_Handler_entry rtems_isr_entry;
57
58
#else
59
64
typedef
rtems_isr
( *rtems_isr_entry )(
65
rtems_vector_number
66
);
67
82
rtems_status_code
rtems_interrupt_catch(
83
rtems_isr_entry new_isr_handler,
84
rtems_vector_number
vector,
85
rtems_isr_entry *old_isr_handler
86
);
87
#endif
88
89
#if !defined(RTEMS_SMP)
90
99
#define rtems_interrupt_disable( _isr_cookie ) \
100
_ISR_Local_disable(_isr_cookie)
101
110
#define rtems_interrupt_enable( _isr_cookie ) \
111
_ISR_Local_enable(_isr_cookie)
112
122
#define rtems_interrupt_flash( _isr_cookie ) \
123
_ISR_Local_flash(_isr_cookie)
124
125
#endif
/* RTEMS_SMP */
126
138
#define rtems_interrupt_local_disable( _isr_cookie ) \
139
_ISR_Local_disable( _isr_cookie )
140
148
#define rtems_interrupt_local_enable( _isr_cookie ) \
149
_ISR_Local_enable( _isr_cookie )
150
158
#define rtems_interrupt_is_in_progress() \
159
_ISR_Is_in_progress()
160
166
#define rtems_interrupt_cause( _interrupt_to_cause )
167
173
#define rtems_interrupt_clear( _interrupt_to_clear )
174
195
typedef
ISR_lock_Control
rtems_interrupt_lock
;
196
200
typedef
ISR_lock_Context
rtems_interrupt_lock_context
;
201
209
#define RTEMS_INTERRUPT_LOCK_MEMBER( _designator ) \
210
ISR_LOCK_MEMBER( _designator )
211
220
#define RTEMS_INTERRUPT_LOCK_DECLARE( _qualifier, _designator ) \
221
ISR_LOCK_DECLARE( _qualifier, _designator )
222
233
#define RTEMS_INTERRUPT_LOCK_DEFINE( _qualifier, _designator, _name ) \
234
ISR_LOCK_DEFINE( _qualifier, _designator, _name )
235
244
#define RTEMS_INTERRUPT_LOCK_REFERENCE( _designator, _target ) \
245
ISR_LOCK_REFERENCE( _designator, _target )
246
253
#define RTEMS_INTERRUPT_LOCK_INITIALIZER( _name ) ISR_LOCK_INITIALIZER( _name )
254
265
#define rtems_interrupt_lock_initialize( _lock, _name ) \
266
_ISR_lock_Initialize( _lock, _name )
267
275
#define rtems_interrupt_lock_destroy( _lock ) \
276
_ISR_lock_Destroy( _lock )
277
288
#define rtems_interrupt_lock_interrupt_disable( _lock_context ) \
289
_ISR_lock_ISR_disable( _lock_context )
290
305
#define rtems_interrupt_lock_acquire( _lock, _lock_context ) \
306
_ISR_lock_ISR_disable_and_acquire( _lock, _lock_context )
307
322
#define rtems_interrupt_lock_release( _lock, _lock_context ) \
323
_ISR_lock_Release_and_ISR_enable( _lock, _lock_context )
324
342
#if defined(RTEMS_SMP)
343
#define rtems_interrupt_lock_acquire_isr( _lock, _lock_context ) \
344
_SMP_lock_Acquire( \
345
&( _lock )->Lock, \
346
&( _lock_context )->Lock_context \
347
)
348
#else
349
#define rtems_interrupt_lock_acquire_isr( _lock, _lock_context ) \
350
do { (void) _lock_context; } while ( 0 )
351
#endif
352
366
#if defined(RTEMS_SMP)
367
#define rtems_interrupt_lock_release_isr( _lock, _lock_context ) \
368
_SMP_lock_Release( \
369
&( _lock )->Lock, \
370
&( _lock_context )->Lock_context \
371
)
372
#else
373
#define rtems_interrupt_lock_release_isr( _lock, _lock_context ) \
374
do { (void) _lock_context; } while ( 0 )
375
#endif
376
379
#ifdef __cplusplus
380
}
381
#endif
382
385
#endif
386
/* end of include file */
isr.h
Data Related to the Management of Processor Interrupt Levels.
rtems_vector_number
ISR_Vector_number rtems_vector_number
Control block type used to manage the vectors.
Definition:
intr.h:47
status.h
ISR_lock_Control
ISR lock control.
Definition:
isrlock.h:56
rtems_interrupt_lock_context
ISR_lock_Context rtems_interrupt_lock_context
Local interrupt lock context for acquire and release pairs.
Definition:
intr.h:200
rtems_isr
ISR_Handler rtems_isr
Return type for interrupt handler.
Definition:
intr.h:52
rtems_status_code
rtems_status_code
Classic API Status.
Definition:
status.h:43
ISR_Level
uint32_t ISR_Level
Definition:
isrlevel.h:41
rtems_interrupt_level
ISR_Level rtems_interrupt_level
Interrupt level type.
Definition:
intr.h:42
ISR_Vector_number
uint32_t ISR_Vector_number
Definition:
isr.h:51
ISR_lock_Context
Local ISR lock context for acquire and release pairs.
Definition:
isrlock.h:65
isrlock.h
ISR Locks.
ISR_Handler
void ISR_Handler
Definition:
isr.h:56
rtems_interrupt_lock
ISR_lock_Control rtems_interrupt_lock
Interrupt lock control.
Definition:
intr.h:195
Generated by
1.8.15