source: rtems/cpukit/rtems/src/intrbody.c @ c499856

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/**
2 *  @file
3 *
4 *  @brief RTEMS Interrupt Support
5 *  @ingroup ClassicINTR
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-2013.
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/system.h>
22#include <rtems/rtems/status.h>
23#include <rtems/score/isr.h>
24#include <rtems/rtems/intr.h>
25
26/*
27 *  Undefine all of these is normally a macro and we want a real body in
28 *  the library for other language bindings.
29 */
30#undef rtems_interrupt_disable
31#undef rtems_interrupt_enable
32#undef rtems_interrupt_flash
33#undef rtems_interrupt_is_in_progress
34
35/*
36 *  Prototype them to avoid warnings
37 */
38rtems_interrupt_level rtems_interrupt_disable( void );
39void rtems_interrupt_enable( rtems_interrupt_level previous_level );
40void rtems_interrupt_flash( rtems_interrupt_level previous_level );
41bool rtems_interrupt_is_in_progress( void );
42
43/*
44 *  Now define real bodies
45 */
46rtems_interrupt_level rtems_interrupt_disable( void )
47{
48  rtems_interrupt_level previous_level;
49
50  _ISR_Disable( previous_level );
51
52  return previous_level;
53}
54
55void rtems_interrupt_enable(
56  rtems_interrupt_level previous_level
57)
58{
59  _ISR_Enable( previous_level );
60}
61
62void rtems_interrupt_flash(
63  rtems_interrupt_level previous_level
64)
65{
66  _ISR_Flash( previous_level );
67}
68
69bool rtems_interrupt_is_in_progress( void )
70{
71  return _ISR_Is_in_progress();
72}
Note: See TracBrowser for help on using the repository browser.