source: rtems/c/src/exec/rtems/headers/intr.h @ 2c5d78b

4.104.114.84.95
Last change on this file since 2c5d78b was 2c5d78b, checked in by Joel Sherrill <joel.sherrill@…>, on 07/09/97 at 23:46:59

Corrected typos and spacing.

  • Property mode set to 100644
File size: 3.1 KB
RevLine 
[ac7d5ef0]1/*  intr.h
2 *
3 *  This include file contains all the constants and structures associated
4 *  with the Interrupt Manager.
5 *
[03f2154e]6 *  COPYRIGHT (c) 1989-1997.
[ac7d5ef0]7 *  On-Line Applications Research Corporation (OAR).
[03f2154e]8 *  Copyright assigned to U.S. Government, 1994.
[ac7d5ef0]9 *
[03f2154e]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.
[ac7d5ef0]13 *
14 *  $Id$
15 */
16
17#ifndef __RTEMS_INTERRUPT_h
18#define __RTEMS_INTERRUPT_h
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
[5e9b32b]24#include <rtems/score/isr.h>
[ac7d5ef0]25
26/*
27 *  Interrupt level type
28 */
29
30typedef ISR_Level rtems_interrupt_level;
31
[3a4ae6c]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
[ac7d5ef0]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(
[2c5d78b]76  rtems_isr_entry      new_isr_handler,
[ac7d5ef0]77  rtems_vector_number  vector,
[2c5d78b]78  rtems_isr_entry     *old_isr_handler
[ac7d5ef0]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
[6dae1c2d]117/*
118 *  rtems_interrupt_is_in_progress
119 *
120 *  DESCRIPTION:
121 *
122 *  This function returns TRUE if the processor is currently servicing
[2c5d78b]123 *  an interrupt and FALSE otherwise.   A return value of TRUE indicates
[6dae1c2d]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
[ac7d5ef0]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.