source: rtems/c/src/lib/libbsp/unix/posix/startup/setvec.c @ 03f2154e

4.104.114.84.95
Last change on this file since 03f2154e was 03f2154e, checked in by Joel Sherrill <joel.sherrill@…>, on 04/22/97 at 17:20:27

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

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*  set_vector
2 *
3 *  This routine installs an interrupt vector on UNIX.
4 *
5 *  INPUT:
6 *    handler - interrupt handler entry point
7 *    vector  - vector number
8 *    type    - 0 indicates raw hardware connect
9 *              1 indicates RTEMS interrupt connect
10 *
11 *  RETURNS:
12 *    address of previous interrupt handler
13 *
14 *  COPYRIGHT (c) 1989-1997.
15 *  On-Line Applications Research Corporation (OAR).
16 *  Copyright assigned to U.S. Government, 1994.
17 *
18 *  The license and distribution terms for this file may in
19 *  the file LICENSE in this distribution or at
20 *  http://www.OARcorp.com/rtems/license.html.
21 *
22 *  $Id$
23 */
24
25#include <bsp.h>
26
27rtems_isr_entry
28set_vector(                                     /* returns old vector */
29    rtems_isr_entry     handler,                /* isr routine        */
30    rtems_vector_number vector,                 /* vector number      */
31    int                 type                    /* RTEMS or RAW intr  */
32)
33{
34    rtems_isr_entry  rtems_isr_ptr = 0;
35    proc_ptr         raw_isr_ptr;
36
37    if ( type ) {
38      rtems_interrupt_catch( handler, vector, &rtems_isr_ptr );
39      return rtems_isr_ptr;
40    } else {
41      _CPU_ISR_install_vector( vector, (proc_ptr) handler, &raw_isr_ptr );
42      return raw_isr_ptr;
43    }
44   
45}
46
47
Note: See TracBrowser for help on using the repository browser.