#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:
Blocking:

Description

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 Nov 23, 2014 at 10:09:18 PM.

Download all attachments as: .zip

Change History (5)

comment:1 Changed on Nov 27, 2011 at 3:18:48 PM by Joel Sherrill

Jiri.. is this patch OK?

comment:2 Changed on Nov 23, 2014 at 5:38:20 PM by Joel Sherrill

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

comment:3 Changed on Nov 23, 2014 at 10:13:02 PM 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 Nov 24, 2014 at 6:58:28 PM 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.