source: rtems/c/src/exec/rtems/headers/intr.h @ 03f2154e

4.104.114.84.95
Last change on this file since 03f2154e was 03f2154e, checked in by Joel Sherrill <joel.sherrill@…>, on Apr 22, 1997 at 5:20:27 PM

headers updated to reflect new style copyright notice as part
of switching to the modified GNU GPL.

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