#1958 closed defect

LEON_Is_interrupt_masked for Leon3 in leon.h

Reported by: Helder Silva Owned by: Daniel Hellstrom
Priority: normal Milestone: 4.11
Component: bsps Version: 4.11
Severity: minor Keywords:
Cc: Blocked By:


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)))

Attachments (1)

0001-sparc-leon3-LEON_Is_interrupt_masked-for-Leon3-in-le.patch (1.1 KB) - added by Jiri Gaisler on 11/23/14 at 22:09:18.

Download all attachments as: .zip

Change History (5)

comment:1 Changed on 11/27/11 at 15:18:48 by Joel Sherrill

Jiri.. is this patch OK?

comment:2 Changed on 11/23/14 at 17:38:20 by Joel Sherrill

Owner: changed from Joel Sherrill to Daniel Hellstrom
Status: newassigned

comment:3 Changed on 11/23/14 at 22:13:02 by Jiri Gaisler

Resolution: fixed
Status: assignedclosed

I believe the attached patch solves the problem. Note that the condition needs to be inverted.

comment:4 Changed on 11/24/14 at 18:58:28 by Gedare Bloom

Version: HEAD4.11

Replace Version=HEAD with Version=4.11 for the tickets with Milestone >= 4.11

Note: See TracTickets for help on using tickets.