source: rtems/cpukit/rtems/src/intr.c @ 98e4ebf5

4.104.114.84.95
Last change on this file since 98e4ebf5 was 98e4ebf5, checked in by Joel Sherrill <joel.sherrill@…>, on 10/08/97 at 15:45:54

Fixed typo in the pointer to the license terms.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 *  Interrupt Manager
3 *
4 *
5 *  COPYRIGHT (c) 1989-1997.
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  _ISR_Install_vector(
62    vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler );
63
64  return RTEMS_SUCCESSFUL;
65}
Note: See TracBrowser for help on using the repository browser.