source: rtems/cpukit/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 02/17/98 at 23:46:28

updated copyright to 1998

  • Property mode set to 100644
File size: 1.6 KB
RevLine 
[ac7d5ef0]1/*
2 *  Interrupt Manager
3 *
4 *
[60b791ad]5 *  COPYRIGHT (c) 1989-1998.
[ac7d5ef0]6 *  On-Line Applications Research Corporation (OAR).
[03f2154e]7 *  Copyright assigned to U.S. Government, 1994.
[ac7d5ef0]8 *
[98e4ebf5]9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
[03f2154e]11 *  http://www.OARcorp.com/rtems/license.html.
[ac7d5ef0]12 *
13 *  $Id$
14 */
15
16#include <rtems/system.h>
[3a4ae6c]17#include <rtems/rtems/status.h>
[5e9b32b]18#include <rtems/score/isr.h>
[3a4ae6c]19#include <rtems/rtems/intr.h>
[ac7d5ef0]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 ) )
[3a4ae6c]56    return RTEMS_INVALID_NUMBER;
[ac7d5ef0]57
[ffe316d]58  if ( !_ISR_Is_valid_user_handler( (void *) new_isr_handler ) )
[3a4ae6c]59    return RTEMS_INVALID_ADDRESS;
[ac7d5ef0]60
[cdfd74a5]61  if ( !_ISR_Is_valid_user_handler( (void *) old_isr_handler ) )
62    return RTEMS_INVALID_ADDRESS;
63
[ac7d5ef0]64  _ISR_Install_vector(
65    vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler );
66
[3a4ae6c]67  return RTEMS_SUCCESSFUL;
[ac7d5ef0]68}
Note: See TracBrowser for help on using the repository browser.