source: rtems/c/src/exec/rtems/src/intr.c @ 60b791ad

4.104.114.84.95
Last change on this file since 60b791ad was 60b791ad, checked in by Joel Sherrill <joel.sherrill@…>, on Feb 17, 1998 at 11:46:28 PM

updated copyright to 1998

  • Property mode set to 100644
File size: 1.6 KB
Line 
1/*
2 *  Interrupt Manager
3 *
4 *
5 *  COPYRIGHT (c) 1989-1998.
6 *  On-Line Applications Research Corporation (OAR).
7 *  Copyright assigned to U.S. Government, 1994.
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.OARcorp.com/rtems/license.html.
12 *
13 *  $Id$
14 */
15
16#include <rtems/system.h>
17#include <rtems/rtems/status.h>
18#include <rtems/score/isr.h>
19#include <rtems/rtems/intr.h>
20
21/*  _Interrupt_Manager_initialization
22 *
23 *  This routine initializes the interrupt manager.
24 *
25 *  Input parameters: NONE
26 *
27 *  Output parameters: NONE
28 */
29
30void _Interrupt_Manager_initialization( void )
31{
32}
33
34/*  rtems_interrupt_catch
35 *
36 *  This directive allows a thread to specify what action to take when
37 *  catching signals.
38 *
39 *  Input parameters:
40 *    new_isr_handler - address of interrupt service routine (isr)
41 *    vector          - interrupt vector number
42 *    old_isr_handler - address at which to store previous ISR address
43 *
44 *  Output parameters:
45 *    RTEMS_SUCCESSFUL - always succeeds
46 *    *old_isr_handler  - previous ISR address
47 */
48
49rtems_status_code rtems_interrupt_catch(
50  rtems_isr_entry      new_isr_handler,
51  rtems_vector_number  vector,
52  rtems_isr_entry     *old_isr_handler
53)
54{
55  if ( !_ISR_Is_vector_number_valid( vector ) )
56    return RTEMS_INVALID_NUMBER;
57
58  if ( !_ISR_Is_valid_user_handler( (void *) new_isr_handler ) )
59    return RTEMS_INVALID_ADDRESS;
60
61  if ( !_ISR_Is_valid_user_handler( (void *) old_isr_handler ) )
62    return RTEMS_INVALID_ADDRESS;
63
64  _ISR_Install_vector(
65    vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler );
66
67  return RTEMS_SUCCESSFUL;
68}
Note: See TracBrowser for help on using the repository browser.