[Bug 1958] New: LEON_Is_interrupt_masked for Leon3 in leon.h

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Thu Nov 10 12:37:23 UTC 2011


           Summary: LEON_Is_interrupt_masked for Leon3 in leon.h
           Product: RTEMS
           Version: HEAD
          Platform: sparc
        OS/Version: RTEMS
            Status: NEW
          Severity: minor
          Priority: P3
         Component: bsps
        AssignedTo: joel.sherrill at oarcorp.com
        ReportedBy: silvah15 at gmail.com

LEON_Is_interrupt_masked for leon3 in leon.h
(c/src/lib/libbsp/sparc/leon3/include), currently defined as:

#define LEON_Is_interrupt_masked( _source ) \
  do {\
     (LEON3_IrqCtrl_Regs->mask[LEON3_Cpu_Index] & (1 << (_source))); \
   } while (0)

The current implementation with do{}while(0) does not implemented what is
expected by the macro name, it is not possible to perform:

anyVariable = LEON_Is_interrupt_masked( _source );

Proposed solution is to change to:

#define LEON_Is_interrupt_masked( _source ) \
     (LEON3_IrqCtrl_Regs->mask[LEON3_Cpu_Index] & (1 << (_source)))

Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the bugs mailing list