source: rtems/cpukit/rtems/src/intrcatch.c @ 3faa8459

5
Last change on this file since 3faa8459 was 3faa8459, checked in by Sebastian Huber <sebastian.huber@…>, on 11/08/18 at 05:25:32

rtems: Simplify rtems_interrupt_catch()

Remove casts and superfluous inline functions.

Update #3585.

  • Property mode set to 100644
File size: 966 bytes
Line 
1/**
2 *  @file
3 *
4 *  @brief RTEMS Interrupt Catch
5 *  @ingroup ClassicINTR
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-1999.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.org/license/LICENSE.
15 */
16
17#if HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21#include <rtems/rtems/intr.h>
22#include <rtems/score/isr.h>
23
24#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
25rtems_status_code rtems_interrupt_catch(
26  rtems_isr_entry      new_isr_handler,
27  rtems_vector_number  vector,
28  rtems_isr_entry     *old_isr_handler
29)
30{
31  if ( vector > CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER )
32    return RTEMS_INVALID_NUMBER;
33
34  if ( new_isr_handler == NULL )
35    return RTEMS_INVALID_ADDRESS;
36
37  if ( old_isr_handler == NULL )
38    return RTEMS_INVALID_ADDRESS;
39
40  _ISR_Install_vector( vector, new_isr_handler, old_isr_handler );
41
42  return RTEMS_SUCCESSFUL;
43}
44#endif
Note: See TracBrowser for help on using the repository browser.