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

Last change on this file since 9165349d was e324f82, checked in by Sebastian Huber <sebastian.huber@…>, on 01/05/21 at 13:56:25

nios2: Make _ISR_Is_in_progress() weak

This allows the BSP to override this function.

  • Property mode set to 100644
File size: 741 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.org/license/LICENSE.
13 */
14
15#ifdef HAVE_CONFIG_H
16#include "config.h"
17#endif
18
19#include <rtems/score/isr.h>
20#include <rtems/score/nios2-utility.h>
21#include <rtems/score/percpu.h>
22
23RTEMS_WEAK bool _ISR_Is_in_progress( void )
24{
25  if ( _Nios2_Has_internal_interrupt_controller() ) {
26    return _ISR_Nest_level != 0;
27  } else {
28    uint32_t status = _Nios2_Get_ctlreg_status();
29
30    return (status & NIOS2_STATUS_IH) != 0;
31  }
32}
Note: See TracBrowser for help on using the repository browser.