ARM7TDMI: restore old IRQ_ENABLED() semantic.
authorarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 19 May 2010 10:04:03 +0000 (10:04 +0000)
committerarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 19 May 2010 10:04:03 +0000 (10:04 +0000)
Check if at least one between FIQs or IRQs are enabled to determine if
interrupts are enabled.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3715 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/cpu/irq.h

index 40571142bc33d3bb7be821c185b18099dafa4728..bda8b49729a60cf2c2807dc74edadc1187705fbb 100644 (file)
                        sreg;                                           \
                })
 
-               #define IRQ_ENABLED() (!(CPU_READ_FLAGS() & 0x80))
+               #define IRQ_ENABLED() ((CPU_READ_FLAGS() & 0xc0) != 0xc0)
 
                #if CONFIG_KERN_PREEMPT
                        EXTERN_C void asm_irq_switch_context(void);