summaryrefslogtreecommitdiff
path: root/nuttx/arch/rgmp
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-08-27 16:31:02 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-08-27 16:31:02 -0600
commita32bc5d688125095b309e96e32245736d8f61781 (patch)
treebc865f6c4196a702eb877ee203e8e223562f1619 /nuttx/arch/rgmp
parentdce98ad7cd0742cc258a2ed9200c6a76fbfb329f (diff)
downloadnuttx-a32bc5d688125095b309e96e32245736d8f61781.tar.gz
nuttx-a32bc5d688125095b309e96e32245736d8f61781.tar.bz2
nuttx-a32bc5d688125095b309e96e32245736d8f61781.zip
Add ADDRENV support to ALL implmentations of _exit()
Diffstat (limited to 'nuttx/arch/rgmp')
-rw-r--r--nuttx/arch/rgmp/src/nuttx.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/nuttx/arch/rgmp/src/nuttx.c b/nuttx/arch/rgmp/src/nuttx.c
index 2d7ab192e..386e588c9 100644
--- a/nuttx/arch/rgmp/src/nuttx.c
+++ b/nuttx/arch/rgmp/src/nuttx.c
@@ -453,6 +453,16 @@ void _exit(int status)
tcb = (struct tcb_s*)g_readytorun.head;
+#ifdef CONFIG_ARCH_ADDRENV
+ /* Make sure that the address environment for the previously running
+ * task is closed down gracefully (data caches dump, MMU flushed) and
+ * set up the address environment for the new thread at the head of
+ * the ready-to-run list.
+ */
+
+ (void)group_addrenv(tcb);
+#endif
+
/* Then switch contexts */
up_switchcontext(NULL, tcb);