source: rtems/c/src/lib/libbsp/unix/posix/startup/setvec.c @ 37f4c2d

4.104.114.84.95
Last change on this file since 37f4c2d was 37f4c2d, checked in by Joel Sherrill <joel.sherrill@…>, on 09/27/95 at 20:53:58

Modified UNIX simulator port so all references to native unix
stuff is in the executive source proper in the file cpu.c. This
should help avoid conflicts between RTEMS POSIX files and UNIX files.

  • Property mode set to 100644
File size: 1.7 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 *  NOTE 'type' is ignored on hppa; all interrupts are owned by RTEMS
12 *
13 *  RETURNS:
14 *    address of previous interrupt handler
15 *
16 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
17 *  On-Line Applications Research Corporation (OAR).
18 *  All rights assigned to U.S. Government, 1994.
19 *
20 *  This material may be reproduced by or for the U.S. Government pursuant
21 *  to the copyright license under the clause at DFARS 252.227-7013.  This
22 *  notice must appear in all copies of this file and its derivatives.
23 *
24 *  $Id$
25 */
26
27#include <bsp.h>
28
29/*
30 * Install an interrupt handler in the right place
31 * given its vector number from cpu/hppa.h
32 * There are 2 places an interrupt can be installed
33 *      _ISR_Vector_table
34 *      bsp interrupt      XXX: nyi
35 *
36 * We decide which based on the vector number
37 */
38
39rtems_isr_entry
40set_vector(                                     /* returns old vector */
41    rtems_isr_entry     handler,                /* isr routine        */
42    rtems_vector_number vector,                 /* vector number      */
43    int                 type                    /* RTEMS or RAW intr  */
44)
45{
46    rtems_isr_entry  rtems_isr_ptr;
47    proc_ptr         raw_isr_ptr;
48
49    if ( type ) {
50      rtems_interrupt_catch( handler, vector, &rtems_isr_ptr );
51      return rtems_isr_ptr;
52    } else {
53      _CPU_ISR_install_vector( vector, (proc_ptr) handler, &raw_isr_ptr );
54      return raw_isr_ptr;
55    }
56   
57}
58
59
Note: See TracBrowser for help on using the repository browser.