summaryrefslogtreecommitdiff
path: root/nuttx/arch/rgmp/include/irq.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-04 15:12:55 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-04 15:12:55 +0000
commitdec5edaa7fcf561f5538ca3ba0af07e402a6b55e (patch)
tree91d9f298d4568c87e8a0c3f4211e229dc80f2b13 /nuttx/arch/rgmp/include/irq.h
parent9c2462da3c765755e63a15e85050e92a9d873a6c (diff)
downloadpx4-nuttx-dec5edaa7fcf561f5538ca3ba0af07e402a6b55e.tar.gz
px4-nuttx-dec5edaa7fcf561f5538ca3ba0af07e402a6b55e.tar.bz2
px4-nuttx-dec5edaa7fcf561f5538ca3ba0af07e402a6b55e.zip
RGMP 4.0 update from Qiang Yu
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5305 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/rgmp/include/irq.h')
-rw-r--r--nuttx/arch/rgmp/include/irq.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/nuttx/arch/rgmp/include/irq.h b/nuttx/arch/rgmp/include/irq.h
index 00c977560..b0411b2ab 100644
--- a/nuttx/arch/rgmp/include/irq.h
+++ b/nuttx/arch/rgmp/include/irq.h
@@ -44,12 +44,13 @@
#ifndef __ASSEMBLY__
-#include <rgmp/spinlock.h>
#include <arch/types.h>
+
#include <rgmp/trap.h>
+#include <rgmp/arch/arch.h>
struct xcptcontext {
- struct Trapframe *tf;
+ struct rgmp_context ctx;
// for signal using
unsigned int save_eip;
unsigned int save_eflags;
@@ -63,12 +64,14 @@ extern int nest_irq;
static inline irqstate_t irqsave(void)
{
- return pushcli();
+ unsigned long flags;
+ local_irq_save(flags);
+ return flags;
}
static inline void irqrestore(irqstate_t flags)
{
- popcli(flags);
+ local_irq_restore(flags);
}
#endif /* !__ASSEMBLY__ */