source: rtems/cpukit/rtems/include/rtems/rtems/intr.h @ 50f32b11

4.104.114.84.95
Last change on this file since 50f32b11 was 50f32b11, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/18/04 at 06:05:35

Remove stray white spaces.

  • Property mode set to 100644
File size: 3.1 KB
Line 
1/*  intr.h
2 *
3 *  This include file contains all the constants and structures associated
4 *  with the Interrupt Manager.
5 *
6 *  COPYRIGHT (c) 1989-1999.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.com/license/LICENSE.
12 *
13 *  $Id$
14 */
15
16#ifndef __RTEMS_INTERRUPT_h
17#define __RTEMS_INTERRUPT_h
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#include <rtems/score/isr.h>
24
25/*
26 *  Interrupt level type
27 */
28
29typedef ISR_Level rtems_interrupt_level;
30
31/*
32 *  The following type defines the control block used to manage
33 *  the vectors.
34 */
35
36typedef ISR_Vector_number rtems_vector_number;
37
38/*
39 *  Return type for ISR Handler
40 */
41
42typedef void rtems_isr;
43
44/*
45 *  Pointer to an ISR Handler
46 */
47
48typedef rtems_isr ( *rtems_isr_entry )(
49                 rtems_vector_number
50             );
51
52/*
53 *  _Interrupt_Manager_initialization
54 *
55 *  DESCRIPTION:
56 *
57 *  This routine initializes the interrupt manager.
58 *
59 */
60
61void _Interrupt_Manager_initialization( void );
62
63/*
64 *  rtems_interrupt_catch
65 *
66 *  DESCRIPTION:
67 *
68 *  This routine implements the rtems_interrupt_catch directive.  This
69 *  directive installs new_isr_handler as the RTEMS interrupt service
70 *  routine for vector.  The previous RTEMS interrupt service
71 *  routine is returned in old_isr_handler.
72 */
73
74rtems_status_code rtems_interrupt_catch(
75  rtems_isr_entry      new_isr_handler,
76  rtems_vector_number  vector,
77  rtems_isr_entry     *old_isr_handler
78);
79
80/*
81 *  rtems_interrupt_disable
82 *
83 *  DESCRIPTION:
84 *
85 *  This routine disables all maskable interrupts and returns the
86 *  previous level in _isr_cookie.
87 */
88
89#define rtems_interrupt_disable( _isr_cookie ) \
90    _ISR_Disable(_isr_cookie)
91
92/*
93 *  rtems_interrupt_enable
94 *
95 *  DESCRIPTION:
96 *
97 *  This routine enables maskable interrupts to the level indicated
98 *  _isr_cookie.
99 */
100
101#define rtems_interrupt_enable( _isr_cookie ) \
102    _ISR_Enable(_isr_cookie)
103
104/*
105 *  rtems_interrupt_flash
106 *
107 *  DESCRIPTION:
108 *
109 *  This routine temporarily enables maskable interrupts to the
110 *  level in _isr_cookie before redisabling them.
111 */
112
113#define rtems_interrupt_flash( _isr_cookie ) \
114    _ISR_Flash(_isr_cookie)
115
116/*
117 *  rtems_interrupt_is_in_progress
118 *
119 *  DESCRIPTION:
120 *
121 *  This function returns TRUE if the processor is currently servicing
122 *  an interrupt and FALSE otherwise.   A return value of TRUE indicates
123 *  that the caller is an interrupt service routine, NOT a thread.  The
124 *  directives available to an interrupt service routine are restricted.
125 */
126
127#define rtems_interrupt_is_in_progress() \
128    _ISR_Is_in_progress()
129
130/*
131 *  rtems_interrupt_cause
132 *
133 *  DESCRIPTION:
134 *
135 *  This routine generates an interrupt.
136 *
137 *  NOTE:  No implementation.
138 */
139
140#define rtems_interrupt_cause( _interrupt_to_cause )
141
142/*
143 *  rtems_interrupt_cause
144 *
145 *  DESCRIPTION:
146 *
147 *  This routine clears the specified interrupt.
148 *
149 *  NOTE:  No implementation.
150 */
151
152#define rtems_interrupt_clear( _interrupt_to_clear )
153
154#ifdef __cplusplus
155}
156#endif
157
158#endif
159/* end of include file */
Note: See TracBrowser for help on using the repository browser.