source: rtems/c/src/lib/libbsp/mips64orion/p4000/startup/setvec.c @ f198c63

4.104.114.84.95
Last change on this file since f198c63 was f198c63, checked in by Joel Sherrill <joel.sherrill@…>, on 09/06/96 at 18:11:41

new file for MIPS port by Craig Lebakken (lebakken@…) and
Derrick Ostertag (ostertag@…).

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*  set_vector
2 *
3 *  This routine installs an interrupt vector on the target Board/CPU.
4 *  This routine is allowed to be as board dependent as necessary.
5 *
6 *  INPUT:
7 *    handler - interrupt handler entry point
8 *    vector  - vector number
9 *    type    - 0 indicates raw hardware connect
10 *              1 indicates RTEMS interrupt connect
11 *
12 *  RETURNS:
13 *    address of previous interrupt handler
14 *
15 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
16 *  On-Line Applications Research Corporation (OAR).
17 *  All rights assigned to U.S. Government, 1994.
18 *
19 *  This material may be reproduced by or for the U.S. Government pursuant
20 *  to the copyright license under the clause at DFARS 252.227-7013.  This
21 *  notice must appear in all copies of this file and its derivatives.
22 *
23 *  setvec.c,v 1.2 1995/05/31 16:56:35 joel Exp
24 */
25
26#ifndef lint
27static char _sccsid[] = "@(#)setvec.c 04/25/96     1.2\n";
28#endif
29
30#include <rtems.h>
31#include <bsp.h>
32
33#include <excepthdr.h>
34
35mips_isr_entry set_vector(                    /* returns old vector */
36  rtems_isr_entry     handler,                  /* isr routine        */
37  rtems_vector_number vector,                   /* vector number      */
38  int                 type                      /* RTEMS or RAW intr  */
39)
40{
41  mips_isr_entry previous_isr;
42
43  if ( type )
44    rtems_interrupt_catch( handler, vector, (rtems_isr_entry *) &previous_isr );
45  else {
46    /* XXX: install non-RTEMS ISR as "raw" interupt */
47    rtems_interrupt_catch( handler, vector, (rtems_isr_entry *) &previous_isr );
48  }
49  return previous_isr;
50}
51
Note: See TracBrowser for help on using the repository browser.