summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/include/armv6-m
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-17 16:13:28 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-17 16:13:28 +0000
commit2b2bbf6433f7271abce9c3e4cbdf2f456fcbeca3 (patch)
treedf9b3967acb62fff1190b1625cf373b8ed95f48a /nuttx/arch/arm/include/armv6-m
parentdb8769c0dbd3a9c33b60863a62f33cc5158bf7bd (diff)
downloadpx4-nuttx-2b2bbf6433f7271abce9c3e4cbdf2f456fcbeca3.tar.gz
px4-nuttx-2b2bbf6433f7271abce9c3e4cbdf2f456fcbeca3.tar.bz2
px4-nuttx-2b2bbf6433f7271abce9c3e4cbdf2f456fcbeca3.zip
Add support for nested system calls
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5752 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/include/armv6-m')
-rw-r--r--nuttx/arch/arm/include/armv6-m/irq.h30
1 files changed, 24 insertions, 6 deletions
diff --git a/nuttx/arch/arm/include/armv6-m/irq.h b/nuttx/arch/arm/include/armv6-m/irq.h
index 75aed8ff1..f4b026c41 100644
--- a/nuttx/arch/arm/include/armv6-m/irq.h
+++ b/nuttx/arch/arm/include/armv6-m/irq.h
@@ -57,8 +57,14 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
+/* Configuration ************************************************************/
+/* If this is a kernel build, how many nested system calls should we support? */
-/* IRQ Stack Frame Format:
+#ifndef CONFIG_SYS_NNEST
+# define CONFIG_SYS_NNEST 2
+#endif
+
+/* IRQ Stack Frame Format ***************************************************
*
* The following additional registers are stored by the interrupt handling
* logic.
@@ -140,11 +146,22 @@
* Public Types
****************************************************************************/
+#ifndef __ASSEMBLY__
+
+/* This structure represents the return state from a system call */
+
+#ifdef CONFIG_NUTTX_KERNEL
+struct xcpt_syscall_s
+{
+ uint32_t excreturn; /* The EXC_RETURN value */
+ uint32_t sysreturn; /* The return PC */
+};
+#endif
+
/* The following structure is included in the TCB and defines the complete
* state of the thread.
*/
-#ifndef __ASSEMBLY__
struct xcptcontext
{
#ifndef CONFIG_DISABLE_SIGNALS
@@ -168,16 +185,17 @@ struct xcptcontext
*/
uint32_t sigreturn;
+
# endif
#endif
#ifdef CONFIG_NUTTX_KERNEL
- /* The following holds the return address and the exc_return value needed
- * to return from a system call.
+ /* The following array holds the return address and the exc_return value
+ * needed to return from each nested system call.
*/
- uint32_t excreturn;
- uint32_t sysreturn;
+ uint8_t nsyscalls;
+ struct xcpt_syscall_s syscall[CONFIG_SYS_NNEST];
#endif
/* Register save area */