source: rtems/cpukit/rtems/include/rtems/rtems/intr.h @ 33c3b54d

4.104.115
Last change on this file since 33c3b54d was 33c3b54d, checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/29/09 at 11:57:23

Whitespace removal.

  • Property mode set to 100644
File size: 3.1 KB
Line 
1/**
2 *  @file rtems/rtems/intr.h
3 *
4 *  @brief Header file for the Interrupt Manager.
5 *
6 *  This include file contains all the constants and structures associated with
7 *  the Interrupt Manager.
8 */
9
10/*  COPYRIGHT (c) 1989-2008.
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.com/license/LICENSE.
16 *
17 *  $Id$
18 */
19
20#ifndef _RTEMS_RTEMS_INTR_H
21#define _RTEMS_RTEMS_INTR_H
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#include <rtems/score/isr.h>
28
29/**
30 *  @defgroup ClassicINTR Interrupts
31 *
32 *  @ingroup ClassicRTEMS
33 *
34 *  This encapsulates functionality which XXX
35 */
36/**@{*/
37
38/**
39 *  @brief Interrupt level type.
40 */
41typedef ISR_Level rtems_interrupt_level;
42
43/**
44 *  @brief Control block type used to manage the vectors.
45 */
46typedef ISR_Vector_number rtems_vector_number;
47
48/**
49 *  @brief Return type for interrupt handler.
50 */
51typedef void rtems_isr;
52
53/**
54 *  @brief Interrupt handler type.
55 *
56 *  @see rtems_interrupt_catch()
57 */
58typedef rtems_isr ( *rtems_isr_entry )(
59                 rtems_vector_number
60             );
61
62#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
63/**
64 *  @brief Implementation of the rtems_interrupt_catch directive.
65 *
66 *  This directive installs @a new_isr_handler as the RTEMS interrupt service
67 *  routine for the interrupt vector with number @a vector.  The previous RTEMS
68 *  interrupt service routine is returned in @a old_isr_handler.
69 */
70rtems_status_code rtems_interrupt_catch(
71  rtems_isr_entry      new_isr_handler,
72  rtems_vector_number  vector,
73  rtems_isr_entry     *old_isr_handler
74);
75#endif
76
77/**
78 *  @brief Disables all maskable interrupts and returns the previous level in
79 *  @a _isr_cookie.
80 *
81 *  @note The interrupt level shall be of type @ref rtems_interrupt_level.
82 */
83#define rtems_interrupt_disable( _isr_cookie ) \
84    _ISR_Disable(_isr_cookie)
85
86/**
87 *  @brief Enables maskable interrupts to the level indicated by @a
88 *  _isr_cookie.
89 *
90 *  @note The interrupt level shall be of type @ref rtems_interrupt_level.
91 */
92#define rtems_interrupt_enable( _isr_cookie ) \
93    _ISR_Enable(_isr_cookie)
94
95/**
96 *  @brief Temporarily enables maskable interrupts to the level in @a
97 *  _isr_cookie before redisabling them.
98 *
99 *  @note The interrupt level shall be of type @ref rtems_interrupt_level.
100 */
101#define rtems_interrupt_flash( _isr_cookie ) \
102    _ISR_Flash(_isr_cookie)
103
104/**
105 *  @brief Returns true if the processor is currently servicing an interrupt
106 *  and false otherwise.
107 *
108 *  A return value of true indicates that the caller is an interrupt service
109 *  routine and @b not a thread.  The directives available to an interrupt
110 *  service routine are restricted.
111 */
112#define rtems_interrupt_is_in_progress() \
113    _ISR_Is_in_progress()
114
115/**
116 *  @brief This routine generates an interrupt.
117 *
118 *  @note No implementation.
119 */
120#define rtems_interrupt_cause( _interrupt_to_cause )
121
122/**
123 *  @brief This routine clears the specified interrupt.
124 *
125 *  @note No implementation.
126 */
127#define rtems_interrupt_clear( _interrupt_to_clear )
128
129#ifdef __cplusplus
130}
131#endif
132
133/**@}*/
134
135#endif
136/* end of include file */
Note: See TracBrowser for help on using the repository browser.