source: rtems/cpukit/score/cpu/nios2/nios2-isr-is-in-progress.c @ 67518231

4.115
Last change on this file since 67518231 was e2d0c68, checked in by Sebastian Huber <sebastian.huber@…>, on 09/01/11 at 15:52:12

2011-09-01 Sebastian Huber <sebastian.huber@…>

  • cpu.c, cpu_asm.S: Removed files.
  • nios2-context-initialize.c, nios2-context-switch.S, nios2-fatal-halt.c, nios2-initialize-vectors.c, nios2-initialize.c, nios2-isr-get-level.c, nios2-isr-install-raw-handler.c, nios2-isr-install-vector.c, nios2-isr-is-in-progress.c, nios2-isr-set-level.c, nios2-thread-dispatch-disabled.c, rtems/score/nios2-utility.h: New files.
  • Makefile.am, preinstall.am: Reflect changes above.
  • irq.c: Update due to API changes.
  • rtems/score/cpu.h: New functions _CPU_Initialize_vectors(), _CPU_ISR_Set_level(), and _CPU_Fatal_halt() (instead of macros). Support for external interrupt controller (EIC). Documentation changes.
  • Property mode set to 100644
File size: 737 bytes
Line 
1/*
2 * Copyright (c) 2011 embedded brains GmbH.  All rights reserved.
3 *
4 *  embedded brains GmbH
5 *  Obere Lagerstr. 30
6 *  82178 Puchheim
7 *  Germany
8 *  <rtems@embedded-brains.de>
9 *
10 * The license and distribution terms for this file may be
11 * found in the file LICENSE in this distribution or at
12 * http://www.rtems.com/license/LICENSE.
13 *
14 * $Id$
15 */
16
17#ifdef HAVE_CONFIG_H
18  #include "config.h"
19#endif
20
21#include <rtems/system.h>
22#include <rtems/score/isr.h>
23#include <rtems/score/nios2-utility.h>
24
25bool _ISR_Is_in_progress( void )
26{
27  if ( _Nios2_Has_internal_interrupt_controller() ) {
28    return _ISR_Nest_level != 0;
29  } else {
30    uint32_t status = _Nios2_Get_ctlreg_status();
31
32    return (status & NIOS2_STATUS_IH) != 0;
33  }
34}
Note: See TracBrowser for help on using the repository browser.