source: rtems/cpukit/rtems/src/intr.c @ 8bdcfc4

4.104.114.84.95
Last change on this file since 8bdcfc4 was 5e9b32b, checked in by Joel Sherrill <joel.sherrill@…>, on 09/26/95 at 19:27:15

posix support initially added

  • Property mode set to 100644
File size: 1.6 KB
Line 
1/*
2 *  Interrupt Manager
3 *
4 *
5 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
6 *  On-Line Applications Research Corporation (OAR).
7 *  All rights assigned to U.S. Government, 1994.
8 *
9 *  This material may be reproduced by or for the U.S. Government pursuant
10 *  to the copyright license under the clause at DFARS 252.227-7013.  This
11 *  notice must appear in all copies of this file and its derivatives.
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( 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.