ARM7TDMI: simplify IRQ_SAVE_DISABLE().
authorarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 13 May 2010 13:59:10 +0000 (13:59 +0000)
committerarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 13 May 2010 13:59:10 +0000 (13:59 +0000)
The temporary register moved to cpsr (to disable interrupts) can be
simply declared using a "register" variable.

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

bertos/cpu/irq.h

index 60acce21d7ed8a35b031f8c82f7475ca5deb3442..f4cd21ee32d4f90d4b7d93db085a166a6b250f55 100644 (file)
 
                #define IRQ_SAVE_DISABLE(x)                             \
                do {                                                    \
-                       cpu_flags_t sreg;                               \
-                       (void) (&sreg == &x);                           \
+                       register cpu_flags_t sreg;                      \
                        asm volatile (                                  \
                                "mrs %0, cpsr\n\t"                      \
                                "orr %1, %0, #0xc0\n\t"                 \