diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-07-31 09:11:24 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-07-31 09:11:24 -0600 |
commit | 0129369fb0a18310f44dd6ff039c33d61c519532 (patch) | |
tree | 3405bd07bb03401bf03520eaf0525bd552854427 /nuttx/arch | |
parent | 69d1faa894c8f0c6a9c526793fa6b54b303cd4f4 (diff) | |
download | px4-nuttx-0129369fb0a18310f44dd6ff039c33d61c519532.tar.gz px4-nuttx-0129369fb0a18310f44dd6ff039c33d61c519532.tar.bz2 px4-nuttx-0129369fb0a18310f44dd6ff039c33d61c519532.zip |
SAMA5: Modification of some CPSR-related inline functions
Diffstat (limited to 'nuttx/arch')
-rwxr-xr-x | nuttx/arch/arm/include/armv7-a/irq.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/nuttx/arch/arm/include/armv7-a/irq.h b/nuttx/arch/arm/include/armv7-a/irq.h index 51a9702ae..09880f450 100755 --- a/nuttx/arch/arm/include/armv7-a/irq.h +++ b/nuttx/arch/arm/include/armv7-a/irq.h @@ -250,16 +250,15 @@ struct xcptcontext #ifndef __ASSEMBLY__ -/* Disable IRQs and return the previous IRQ state */ +/* Return the current IRQ state */ -static inline irqstate_t irqsave(void) +static inline irqstate_t irqstate(void) { unsigned int cpsr; __asm__ __volatile__ ( "\tmrs %0, cpsr\n" - "\tcpsid i\n" : "=r" (cpsr) : : "memory" @@ -268,16 +267,16 @@ static inline irqstate_t irqsave(void) return cpsr; } -/* Enable IRQs and return the previous IRQ state */ +/* Disable IRQs and return the previous IRQ state */ -static inline irqstate_t irqenable(void) +static inline irqstate_t irqsave(void) { unsigned int cpsr; __asm__ __volatile__ ( "\tmrs %0, cpsr\n" - "\tcpsie i\n" + "\tcpsid i\n" : "=r" (cpsr) : : "memory" @@ -286,16 +285,16 @@ static inline irqstate_t irqenable(void) return cpsr; } -/* Disable IRQs and return the previous IRQ state */ +/* Enable IRQs and return the previous IRQ state */ -static inline irqstate_t irqdisable(void) +static inline irqstate_t irqenable(void) { unsigned int cpsr; __asm__ __volatile__ ( "\tmrs %0, cpsr\n" - "\tcpsid i\n" + "\tcpsie i\n" : "=r" (cpsr) : : "memory" |