summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/include/types.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-05-07 15:59:13 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-05-07 15:59:13 +0000
commitae1239087a624dbd33b7b527cb15a829acd1a0c9 (patch)
treeb9c71126c395bfbf12c89c1bb1818663c3dfb61c /nuttx/arch/arm/include/types.h
parente69c915f57a6e3d5612b13064b84b62870890958 (diff)
downloadnuttx-ae1239087a624dbd33b7b527cb15a829acd1a0c9.tar.gz
nuttx-ae1239087a624dbd33b7b527cb15a829acd1a0c9.tar.bz2
nuttx-ae1239087a624dbd33b7b527cb15a829acd1a0c9.zip
Add irqsave/restore() macros for Cortex-M3
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1758 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/include/types.h')
-rw-r--r--nuttx/arch/arm/include/types.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/nuttx/arch/arm/include/types.h b/nuttx/arch/arm/include/types.h
index f72e6de8c..964ce8960 100644
--- a/nuttx/arch/arm/include/types.h
+++ b/nuttx/arch/arm/include/types.h
@@ -67,11 +67,16 @@ typedef unsigned int uint32;
typedef long long sint64;
typedef unsigned long long uint64;
-/* This is the size of the interrupt state save returned by
- * irqsave()
+/* This is the size of the interrupt state save returned by irqsave(). For
+ * ARM, a 32 register value is returned, for the thumb2, Cortex-M3, the 16-bit
+ * primask register value is returned,
*/
+#ifdef __thumb2__
+typedef unsigned short irqstate_t;
+#else /* __thumb2__ */
typedef unsigned int irqstate_t;
+#endif /* __thumb2__ */
#endif /* __ASSEMBLY__ */